Code Monkey home page Code Monkey logo

devops-learning's Introduction

DevOps training

Docker Images Build

  1. single stage build Docker image
    1. go to directory go-simple-single-stage-build
    2. try to run docker build -t go-simple-single-stage:latest .
    3. check image size docker images go-simple-single-stage
    4. try to run container docker run go-simple-single-stage
  2. multi stage build Docker image
    1. go to directory go-simple-multi-stage-build
    2. try to run docker build -t go-simple-multi-stage:latest .
    3. check image size docker images go-simple-multi-stage
    4. try to run container docker run go-simple-multi-stage

Docker-compose test sandbox

  1. go to directory devops-go-example
  2. explore application
  3. to run test docker-compose -f docker-compose.test.yml up --build --abort-on-container-exit --exit-code-from it_tests
  4. to tear down docker-compose -f docker-compose.test.yml down

Install SonarQube

  1. use AWS AMI from Bitnami
  2. make sure to assign public IPv4
  3. get password by sudo cat /home/bitnami/bitnami_credentials
  4. login to web console via EC2 public IPv4

IaC Terraform

  1. go to terraform-iac
  2. do brew install awscli
  3. run aws configure
  4. run terraform plan
  5. run terraform apply
  6. let explore AWS Web Console

IaC Terraform Cloud

  1. go to cloud https://www.terraform.io
  2. go to AWS Web Console > Security credentials
  3. config secret AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY as sensitive environment variable
  4. do provisioning
  5. Install Kubectl command (brew install kubectl)
  6. Install AWS CLI
  7. run aws configure, if not setting yet.
  8. run aws eks update-kubeconfig --region ap-southeast-1 --name eks-devops-cluster
  9. try with kubectl get node

Install ArgoCD

  • make sure Kubernetes Cluster is ready to use.
  1. run kubectl create namespace argocd
  2. run kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
  3. forward port kubectl port-forward svc/argocd-server -n argocd 8080:443
  4. get password kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d; echo

Explore CI

  1. devops-go-example
  2. check .github/cicd.yml
  3. add remote repository
  4. push

Explore CD

  1. Config Github Action Secret PAT (Personel Access Token) and make sure SONAR_TOKEN and SONAR_HOST_URL was config.
  2. devops-go-example
  3. check .github/cicd.yml
  4. uncomment CD block
  5. add remote repository
  6. push

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.