Giter Club home page Giter Club logo

containerisation's Introduction

Containerization

GitHub repository

https://github.com/donalshortt/containerisation

TLDR How to run

To deploy on minikube using helm follow the steps in start-minikube-and-deploy.sh or just run the script from the root folder of the project.

chmod +x start-minikube-and-deploy.sh
./start-minikube-and-deploy.sh

This script will

  • Delete existing minkube cluster if present
  • Start a new minikube cluster with calico container network interface
  • Build the docker images and load into minikube cluster registry
  • Enable and configure ingress addon for TLS
  • Lint and install helm charts
  • Check the state of the pods after deploying

Test using curl

curl https://$(minikube ip) -k
curl https://$(minikube ip)/api/number -k
curl https://$(minikube ip)/api/number -k -X POST

https:// enforces TLS port 443 and -k ignores self-signed issue.

Helm

  1. cd to containerization/helm
  2. Lint the helm chart helm lint
  3. Make sure docker images for api/ and front/ are built.
  4. Push docker images for api and front again to minikube (see deploy.sh).
  5. Install helm chart (on empty cluster!) helm install containerization .
  6. Upgrade deployment with helm upgrade containerization .
  7. Rollback to previous version with helm rollback containerization <optional revision num>
  8. Uninstall chart with helm uninstall containerization

OpenSSL

Generate private key, certificate signing request and self-signed certificate.

openssl req -newkey rsa:2048 -nodes -keyout domain.key -out domain.csr
openssl x509 -signkey domain.key -in domain.csr -req -days 365 -out domain.crt

Create secret

kubectl create secret tls tls-certificate --key domain.key --cert domain.crt

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.