{"id":19120872,"url":"https://github.com/waylonwalker/learn-rollouts","last_synced_at":"2025-10-30T00:43:41.683Z","repository":{"id":227330052,"uuid":"771117903","full_name":"WaylonWalker/learn-rollouts","owner":"WaylonWalker","description":null,"archived":false,"fork":false,"pushed_at":"2024-03-18T02:45:32.000Z","size":53,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-03T08:18:49.365Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/WaylonWalker.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-03-12T18:05:37.000Z","updated_at":"2024-03-18T02:45:35.000Z","dependencies_parsed_at":"2024-03-18T03:50:56.235Z","dependency_job_id":null,"html_url":"https://github.com/WaylonWalker/learn-rollouts","commit_stats":null,"previous_names":["waylonwalker/learn-rollouts"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WaylonWalker%2Flearn-rollouts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WaylonWalker%2Flearn-rollouts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WaylonWalker%2Flearn-rollouts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WaylonWalker%2Flearn-rollouts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/WaylonWalker","download_url":"https://codeload.github.com/WaylonWalker/learn-rollouts/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240177051,"owners_count":19760308,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-09T05:15:17.044Z","updated_at":"2025-10-30T00:43:36.644Z","avatar_url":"https://github.com/WaylonWalker.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Learn Rollouts\n\nAn argocd app of apps that shows how to use rollouts.\n\n## hello-world application\n\nThis application consists of a flask application in `/hello-world`, it has 3\ndifferent versions that you can play with tagged `v1`, `v2`, and `v3`.  It will\nrespond with a different version number based on the version that is active.\n\nWhen rolled out with the provided kind cluster it will respond with a different\nheader color based on the environment that it is running in.  Since the idea of\nrollouts is zero downtime and to rollout the exact same application both in\npreview and active, the only difference is the url that it is deployed on.\nBased on this url flask will choose the header color.\n\n* active: blue\n* preview: pink\n* local: green\n* unknown: tan\n\n### Docker images\n\nDocker images have been pushed to a public docker hub so they are easily accessible.\n\n\u003chttps://hub.docker.com/r/waylonwalker/learn-rollouts/tags\u003e\n\n## Example\n\nHere you can see the application running in all 3 states, active, preview, and local.\n\n![image](https://github.com/WaylonWalker/learn-rollouts/assets/22648375/c0355d25-1e9b-4ef4-8eb5-ed6c6a9e7ce4)\n\n## app of apps\n\nThis application is setup as an app of apps.  You will deploy the first application and argocd will manage that app as well as the rest.\n\n![image](https://github.com/WaylonWalker/learn-rollouts/assets/22648375/b5fcdec7-1042-4393-8a9f-9339822a5c6d)\n\nFrom left to right in the image there is the apps application that contains all\nof the argocd applications, hello-world (the flask application) and argo\nrollouts..\n\n## Setup\n\nI have given instructions for this entire project to run in a\n[kind-cluster](https://kind.sigs.k8s.io/docs/user/quick-start/).  First we are\ngoing to spin up the kind cluster, install argocd and deploy the app of apps.\n\nFirst fork the repo, and change the repoURL in `apps/apps.yaml` to your own repoURL.\n\n``` bash\nkind create cluster --name rollout --config kind-config.yaml\n# your first time through you need to add the argocd repo\nhelm repo add argo https://argoproj.github.io/argo-helm\nhelm repo update\n# install argocd into the cluster\nhelm install argo argo/argo-cd --namespace argocd --create-namespace\n# deploy the app of apps\nkubectl apply -f apps/apps.yaml\n```\n\nNow we can access the argocd server by first forwarding the port, getting the\ninitial password, then logging in to the `admin` account with that password.\n\n``` bash\n# access the argocd server\nkubectl port-forward service/argo-argocd-server -n argocd 8080:443\nargocd admin initial-password -n argocd\nargocd login localhost:8080\n# you can also access it through a web browser at https://localhost:8080\n# you will have to accept the certificate the first time\n```\n\nNow we can refresh each of our apps with the web browser, or the cli.\n\n``` bash\nargocd app list\n```\n\n```\nNAME                CLUSTER                         NAMESPACE      PROJECT  STATUS     HEALTH     SYNCPOLICY  CONDITIONS                  REPO                                            PATH                     TARGET\nargocd/apps         https://kubernetes.default.svc  argo           default  OutOfSync  Healthy    Auto-Prune  SyncError                   https://github.com/waylonwalker/learn-rollouts  apps                     HEAD\nargocd/hello-world  https://kubernetes.default.svc  hello-world    default  Synced     Suspended  Auto-Prune  RepeatedResourceWarning(2)  https://github.com/waylonwalker/learn-rollouts  hello-world/deployments  HEAD\nargocd/rollouts     https://kubernetes.default.svc  argo-rollouts  default  Synced     Healthy    Auto-Prune  \u003cnone\u003e                      https://github.com/waylonwalker/learn-rollouts  rollouts-app             HEAD\n```\n\n``` bash\nargocd app sync apps\nargocd app sync rollouts\nargocd app sync hello-world\n```\n\nIf you wish to update the argo-server password you can use the following command:\n\n``` bash\nargocd account update-password --account admin --new-password password\n```\n\n## Rollouts\n\ninstall the rollouts plugin with the instructions from the\n[installation](https://argoproj.github.io/argo-rollouts/installation/#kubectl-plugin-installation)\npage. Then we can access the rollouts dashboard.\n\n``` bash\nkubectl argo rollouts dashboard\n```\n\n![image](https://github.com/WaylonWalker/learn-rollouts/assets/22648375/6030a889-99fa-4d21-95cc-3a630a225af5)\n\nwe can also access rollouts through the kubectl plugin.\n\n``` bash\nkubectl argo rollouts get rollout hello-world-bluegreen -n hello-world --watch\n```\n\n## Rolling out a new version\n\nTo roll out a new version of the hello-world application we can bump the\ncontainer tag from `v1` to `v2` by updating the deployment.yaml file in the\n`hello-world/deployments` directory. Pushing that change, then we can `argocd app sync`.\n\n\u003chttps://github.com/WaylonWalker/learn-rollouts/blob/main/hello-world/deployments/deployment.yaml#L31\u003e\n\nYou can now play with changing between different tags, and see how the rollout\ngoes.  active is hosted at localhost:30001 and preview at localhost:30002.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwaylonwalker%2Flearn-rollouts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwaylonwalker%2Flearn-rollouts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwaylonwalker%2Flearn-rollouts/lists"}