This project is a lab for understanding how I can setup a complete workflow from development to production with some objectives:
- minor number of tools
- better development experience
- identical infrastructure at every stage
- continuos deployment
To start you need to prepare a local kubernetes setup with Minikube and Devspace:
brew install minikube hyperkit devspace (Mac Os)
minikube start --driver=hyperkit
minikube addons enable metrics-server
minikube addons enable ingress
To deep dive to Devspace follow this official onboarding page https://devspace.sh/cli/docs/guides/basics
DevSpace allows you to develop applications directly inside a Kubernetes cluster. The biggest advantages of developing directly inside Kubernetes is that your dev environment will be very similar to your release (production\staging etc) environment and you can have much greater confidence that everything will work in the same environment when shipping new features.
devspace use namespace kubeflow-dev
devspace dev
Now you can launch commands inside the pod es:
composer require --dev phpunit/phpunit
...
...
an you can develop with your preferred IDE.
If you need to test K8s modifications or new features you can work with the development mode or you can launch the release environment locally or remotely without ArgoCD or CI\CD and a git trigger.
devspace use profile release
devspace use namespace kubeflow-relese
devspace deploy
devspace purge
In your K8s cluster install ArgoCD:
kubectl create namespace argocd
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
kubectl port-forward svc/argocd-server -n argocd 8090:443
Get the password admin
kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d
Now you can test and monitor the deployments with http://localhost:8090
Define the ArgoCD application
kubectl apply -n argocd -f app.yaml
minikube delete