Plattform

Platform & Infrastructure

The platform provides the tools to increase productivity it should abstract away the operations tasks to get fast feedback loops but it also should design for change as we should be prepared that we have to change in the future:

Architecture Decisions

Containers or serverless

Serverless increases the efficiency of your implementation. But at the same time you bind yourself very tightly to a special vendor like Amazon with AWS Lambda. Another Option is to use a multi cloud apporach and use Containers as your abstraction layer - Lambdas also use containers themselves. Downside you don't have the you pay only what you use and you miss the non functional features the platform provides like monitoring, routing ... This is where service meshs like Istio come into play.

Can you integrate serverless with a service mesh and when to do it?

Containers

Infrastructure Automation with - Terraform

Setup Docker Environment

Python Connexion Docker Tutorial

Create Dockerfile

Build the dockerfile (tagging).

Setup Kubernetes

When you want to bring your docker containers into production - you need to orchestrate those containers. This is where Kubernetes helps getting a reliable and reporducable, production read ( scalable ...), "simple" (routes, services, ...), vendor independent (compared to serverless) and multi cloud ready solution.

https://de.slideshare.net/InfoQ/building-a-microservices-platform-with-kubernetes

Local Development Environment

Start minikube [Source]

Setup Helm and tiller [Source] and Istio [Source] / helm install currently not working check back in a few weeks.

To build images directly in minishift use minikube's built-in docker daemon:

Create Env variables: https://kubernetes.io/docs/tasks/inject-data-application/define-environment-variable-container/

Create secrets: https://kubernetes.io/docs/concepts/configuration/secret/

Production Environment

In my experience maintaining and setting up a kuebrnetes cluster is hard - there are now many great fully manged offerings: Openshift, AWS EKS, IBM, Microsoft, Google GKE, Joyent Kubernetes

TODO

Setup Service Mesh

What is Istio?

Tutorial

Setup a kubernetes cluster (see chapter above) then install Istio:

Deploy

Set it up (you should do this with DevSecOps in Mind (Automation is everything!):

https://www.joyent.com/blog/kubernetes-the-easy-way

https://www.terraform.io/docs/providers/kubernetes/guides/getting-started.html ?

Register with Google Cloud Platform

Setup SDK locally and in Pipeline

Install Google Cloud SDK (MacOS)

https://cloud.google.com/sdk/docs/quickstart-macos

Install Istio: https://istio.io/docs/setup/kubernetes/quick-start.html

Access the non exposed components:

To enable TLS create certficate and deploy it as a secret and add the following to the ingress config (https://istio.io/docs/tasks/traffic-management/ingress.html\

Add your own domain to the static ip address of the cluster: https://cloud.google.com/kubernetes-engine/docs/tutorials/configuring-domain-name-static-ip

Find your static IP address:

Setup your DNS (with Route53) https://serverless-stack.com/chapters/setup-your-domain-with-cloudfront.html

Remove untagged images and stopped containers http://jimhoskins.com/2013/07/27/remove-untagged-docker-images.html

Small images https://nickjanetakis.com/blog/alpine-based-docker-images-make-a-difference-in-real-world-apps

testing with postman and different environments: https://www.getpostman.com/docs/postman/environments_and_globals/variables

Egress Rules currently don't work well with HTTPS https://istio.io/blog/2018/egress-https.html so better enable direct connection: https://istio.io/docs/tasks/traffic-management/egress.html

Mount Containers locally: https://docs.docker.com/storage/bind-mounts/#start-a-container-with-a-bind-mount

Save docker image in docker hub to use it in kubernetes cluster

and add it to the deloyment config

create the secret with

Service Discovery

Use Envoy on ECS: https://blog.turbinelabs.io/replacing-aws-application-load-balancers-with-envoy-2a25c74bde9a

Register your DOMAIN

https://console.aws.amazon.com/route53

Encryption - how to use the public cloud securly? N26?

Other Serverless Assets:

Containers on AWS:

Last updated