Git Product home page Git Product logo

devops-showcase's Introduction

CONTEXT
I made this to quickly showcase how a devops setup and workflow might look like in an enterprise environment. (definitely not as a homework for any interviewing process) 

This utilizes EKS on AWS cloud which is controlled by terraform code. Service deployment is automated. Github Actions CICD handles build process while ArgoCD provides a nice devops dashboard and triggers deployment when change is detected (GitOps concept).

Requirements

1. kubectl
2. terraform
3. aws (CLI)

How to Deploy

1. Create EKS cluster using terraform
  - cd terraform
  - terraform init
  - terraform validate
  - terraform apply 
  Here terraform will error in the last step due to argocd.tf cannot be deployed because kubectl has not bind with the cluster yet.

2. Bind kubectl with the new cluster 
  - aws eks update-kubeconfig --region ap-northeast-2 --name showcase-cluster 

3. Apply terraform again to deploy Argocd
  - terraform apply 

4. Port-forward Argocd on EKS cluster to local machine using kubectl
  - kubectl -n argocd port-forward svc/argocd-server 2222:80

5. Get argocd password in secrets and login
  - kubectl get secrets argocd-initial-admin-secret -o yaml -n argocd
  - echo "INITIAL_PASSWORD" | base64 -d
  Go to localhost:2222 and login (username: admin)

6. Create Argocd deployment with argoCD UI
  - New App
  - Select 'Automatic' under 'SYNC POLICY'
  - use this repo's url in 'Repository URL'
  - use 'showcase-chart' under 'Path' this will make argocd use helmcharts under that directory for deployment
  - under 'VALUES-FILES' input 'values-dev.yaml' to make dev env deployment
  - create and sync argocd application

7. Test querying the server-app using port-foward
  - kubectl -n dev port-forward deployment/server 1111:8080
  - curl localhost:1111

** this README doesn't include information on CICD workflows and secrets setup

devops-showcase's People

Contributors

wanwiset25 avatar

Watchers

 avatar

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.