Skip to content

akuity/argocd-admin-training

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published