- In 'app' directory Python flask 'app.py' takes HTML files from "templates" directory
- With CI pipeline to Build and Push Docker image to DockerHub
- With Helm chart
- With CD delivery by ArgoCD
- Build Docker image, from root of the repository directory run this command
docker build . -t flask-app
- Run Docker Container
docker run --name flask-app --rm -p 8000:5000 -t flask-app
-
Connect to the Container on localhost:8000 or localhost:8000/home
-
Push Docker image
docker tag flask-app joska99/flask-app:latest
docker push joska99/flask-app:latest
- Create Helm Chart
helm create "helm-chart"
Chart.yaml - Metadata for chart
values.yaml - Define values for chart
templates/ - Contains templates files for Kubernetes resources
- Create Helm package
helm package ./helm-chart
- Install Helm package
helm install flask-app ./python-flask-chart-0.0.1.tgz
- Delete Helm Chart
helm delete flask-app
- Run scripts from root directory of repository to create "app", "argocd" NameSpaces and Deploy ArgoCD service and AppicationSet for deployment
. ./argocd/scripts.sh
- Connect to ArgoCD GUI
argocd-service is IP for GUI accessible on port 80/443/TCP
kubectl port-forward -n argocd svc/argocd-server 8080:443
User Name is Admin
Get password
kubectl get secret argocd-initial-admin-secret -n argocd -o yaml | grep password: | awk '{print $2}' | base64 --decode
"grep" to find the password line, "awk" to output second word, "base64 --decode" to decode the password