Consider you have a microservice application running on some cloud platform, whenever developer makes any changes in code the respective microservice should be updated.
Sock Shop demo application https://github.com/microservices-demo/microservices-demo
- Consider sock shop demo app is deployed on cloud platform.
- Developer pushed new change to git
- Argo workflow
- Pull latest git changes
- Build new docker image
- Push the docker images to dockerhub
- Update the deployment
Execute following commands
curl -sSL -o argo https://github.com/argoproj/argo/releases/download/v2.2.1/argo-linux-amd64
sudo cp argo /usr/local/bin/.
sudo chmod +x /usr/local/bin/argo
kubectl create ns argo
kubectl create clusterrolebinding cluster-admin-binding --clusterrole=cluster-admin --user=<emailid>
kubectl apply -n argo -f https://raw.githubusercontent.com/argoproj/argo/v2.2.1/manifests/install.yaml
kubectl create rolebinding default-admin --clusterrole=admin --serviceaccount=default:default
kubectl -n argo port-forward deployment/argo-ui 8001:8001
Then visit: http://127.0.0.1:8001
- update block-name(name of workflow), version(version of workflow), dockerhub-password (password of dockerhub repo), dockerhub-username( username of dockerhub repo), image-tag(image tag) in the argo-workflow.yaml.
- Execute workflow with following cammand
argo submit argo-workflow.yaml
- Tryout Argo CI