Open Application Model (OAM) — Bringing some sanity to application deployment on kubernetes (k8s).

OAM — Credits Cloud Native Computing Foundation (CNCF),
  1. Lens https://k8slens.dev/
$ vela version
CLI Version: v1.3.0
Core Version: 1.3.0
GitRevision: git-3aa4412
GolangVersion: go1.17.8
pip install flask hashids
pip freeze >> requirements.txt
# syntax=docker/dockerfile:1FROM python:3.8-slim-busterWORKDIR /python-dockerCOPY requirements.txt requirements.txt
RUN pip3 install -r requirements.txt
COPY . .CMD [ "python3", "-m" , "flask", "run", "--host=0.0.0.0"]
docker build --tag shortener-docker .
docker push <your docker id>/shortener-docker
apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
name: urls-shortener-service
spec:
components:
- name: urls-shortener-service
type: webservice
properties:
image: sejuba/shortener-docker
port: 5000
traits:
- type: gateway
properties:
domain: urlsrsvc.oentity.com
http:
"/": 5000
vela exec urls-shortener-service -- python init_db.py

--

--

--

SW Generalist, Test Automation engineer, Technology enthusiast and entrepreneur. I Love Python and I brew my own beer.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

JAMStack in action

Working with Data in PyTorch

Convert Text To Speech In Belgian French Using An AI Voice Generator

The Advantages of Using Kafka for Real-Time Data Streams

Making yield accessible everywhere — Introducing Glow Protocol

The Art of Readable Code — Book Summary

Python Optimizations — Interning

Introducing the BigCommerce Channels Toolkit

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Olawepo Olayemi

Olawepo Olayemi

SW Generalist, Test Automation engineer, Technology enthusiast and entrepreneur. I Love Python and I brew my own beer.

More from Medium

Going the extra mile with our k8s setup

Kubernetes logo over network of interconnected light nodes

Deploy IPFS Cluster with Kubernetes

A step-by-step guide to implement metrics for your ad-hoc Operator in Golang by Prometheus on…

Rolling updates & rollbacks in Deployments (Kubernetes)