Coder Social home page Coder Social logo

argocd-admin-training's Introduction

Argo CD Admin Workshop

The repository demonstrates how to bootstrap and manage Argo CD.

Bootstap Argo CD and deploy sample application

The first exercise is to bootstrap Kubernetes cluster and install Argo CD using Github Codespaces environment.

  1. Fork https://github.com/akuity/argocd-admin-training repositorty

  2. Create Codespace.

  • Navigate to forked repository
  • Click on Code -> Codespaces -> +
  • Wait for codespace to be successfully initialized

Codespace Initialized

  1. Install Argo CD resources and ensure deployment has started successfully
kustomize build argocd | kubectl apply -f -
kubectl rollout status deploy/argocd-server -n argocd
  1. Access Argo CD UI
  • Click Ports tab in Github Codespaces UI
  • Locate 9090 port and open URL in browser Access Argo CD UI
  • Login using username admin and password password
  1. Configure Argo CD CLI access
argocd login localhost:9090 --username admin --password password --insecure --plaintext --grpc-web

Switch to declarative management

Argo CD allows using web user interface and CLI to manage most of the settings. However it is recommended to manage settings declarativelly using Argo CD itself. During this exersice we are configuring declarative management and performing declarative upgrade.

  1. Create Argo CD application that manages Argo CD itself
argocd app create argocd --repo https://github.com/$GITHUB_USER/argocd-admin-training --path argocd --dest-namespace argocd --dest-name in-cluster
  1. Perform declarative upgrade
  • Change v2.10.6 to v2.10.7 in argocd/kustomization.yaml and push changes to Git repository:
  • Navigate to Argo CD UI & Oopen argocd application details page.
  • Preview changes and click Sync button to perform deploy.

Configure multi-tenancy

Argo CD is designed to serve needs of multiple teams and provides reach set of multi-tenancy features. For example it allows having muliple users by creating local account or configuring SSO integation. Users can be separate from each other using Argo CD projects. In this exercise we are going to declaratively configure local account and a project.

  1. Uncomment components: [team1] in argocd/kustomization.yaml and push changes to Git repository.
  2. Navigate to Argo CD UI & Oopen argocd application details page.
  3. Preview changes and click Sync button to perform deploy.
  4. Find a new account in Settings->Accounts page.

Automate application creation

Argo CD allows users to create applications manually using web interface or CLI. However, Argo CD provides a way to automatically generate application based on predefined convention using the ApplicationSet component. In this exercise we are going to automatically create applications for each Helm values file under apps/<team-name> directory. Example:

apps
└── team1
    ├── chart
    └── qa.yaml # ApplicationSet generates application `team1-qa` in a project `team1` using helm chart under `apps/team1` and value file `qa.yaml`
  1. Replace <GITHUB_USERNAME> with your username in argocd/appset.yaml
  2. Uncomment - appset.yaml in argocd/kustomization.yaml
  3. Create apps/team1/qa.yaml file and push changes to Git repository:
cat >apps/team1/qa.yaml <<EOL
image:
  repository: gcr.io/heptio-images/ks-guestbook-demo
  tag: 0.2
EOL
  1. Navigate to Argo CD UI and see new application is created by application set

argocd-admin-training's People

Contributors

alexmt 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.