IMTI

Architecting, Developing, SRE, DevOps, AI/ML

A Microservices Workflow with Golang and Gitlab CI

Continuous Integration & Deployment

Many of the resources on Cloud Native Microservices show you how easy it is to get up and running with AWS or GKE. I think this is great but for the fact that I see a trend (in my clients at least) of associating concepts with particular products or worse, companies. I love Amazon, but it’s not THE cloud). In my opinion, to embrace Cloud Native and Microservices you should develop some, and host them yourself. The cloud is not Google or Amazon; it’s any cluster of virtualized systems, abstracted from their hardware interfaces and centrally managed.


Microservices & Kubernetes

Overview

The following is a collection of articles, videos, and notes on Microservices. The Microservices architecture is a variant of the service-oriented architecture (SOA), a collection of loosely coupled services.

Articles

Videos

Notes

Key Goals of Microservices

  • Rapid development
  • Continuous deployment

Best Practices

Twelve-Factor Principles

  • Portable - Service (container) should be able to be run anywhere.
  • Continually Deployable - Able to deploy any time without disruption.
  • Scalable - Multiple copies should be able to run concurrently (stateless)

JSON Web Tokens (JWT) - Client -> Server trust.

  • Compact, self-contained method for transferring secure data as a JSON object.
  • Use for Authentication and Information Exchange
  • See https://jwt.io/
  • A server creates a token, and the client uses token to make requests.

Containers - Docker

  • Docker is simply an API on top of existing process isolation technology.
  • Independent packages
  • Namespace Isolation

Alpine Linux

Alpine Linux Small. Simple. Secure. Alpine Linux is a security-oriented, lightweight Linux distribution based on musl libc and busybox.


Kubernetes Overview

Container Orchestration & Microservices

Getting started with Kubernetes for local development. I develop on a Mac however much of this is easily translated to windows.

The following is primarily a getting started guide wrapped around my personal development notes. This set of notes are specifically for my co-workers in helping them get up to speed quickly. If you see an error feel free to make a pull request or just add an issue.

Contents

Deeper Reading and Resources

Free Courses

Prerequisites

Test Installation

$ minikube version
minikube version: v0.25.0

$ minikube start
Starting local Kubernetes v1.9.0 cluster...
Starting VM...
Getting VM IP address...
Moving files into cluster...
Setting up certs...
Connecting to cluster...
Setting up kubeconfig...
Starting cluster components...
Kubectl is now configured to use the cluster.
Loading cached images from config file.

$ minikube addons list
- addon-manager: enabled
- coredns: disabled
- dashboard: enabled
- default-storageclass: enabled
- efk: disabled
- freshpod: disabled
- heapster: disabled
- ingress: disabled
- kube-dns: enabled
- registry: disabled
- registry-creds: disabled
- storage-provisioner: enabled


# enable heapster for CPU and mem
$ minikube addons enable heapster
heapster was successfully enabled

# open the dashboard (in a browser)
$ minikube dashboard

Get some status

# are we running a cluster?
$ kubectl cluster-info
Kubernetes master is running at https://192.168.99.100:8443

# we should have a minikube node
$ kubectl get nodes
NAME       STATUS    ROLES     AGE       VERSION
minikube   Ready     <none>    2d        v1.9.0

Architecture

Read Kubernetes Basics for a better understanding.