To build and run and test the services with docker compose
-
Start Docker Desktop
-
Build services:
./build.sh
- Build docker images:
./dockerBuild.sh
- Test services using docker-compose
./test-em-all-docker.sh start stop
- other commands for docker compose
./dockerStart.sh
./dockerStop.sh
./whatsRunningDocker.sh
To run and test the services with k8s (minikube):
- start minikube if it is not up:
minikube start
- Create a name space:
kubectl create namespace hands-on
- Activate ns
kubectl config set-context $(kubectl config current-context) --namespace=hands-on
- Link docker with Minikube
eval $(minikube -p minikube docker-env)
- build the images again so that minikube can see those images
./dockerBuild.sh
- Deploy k8s using customize
kubectl apply -k kubernetes/services/overlays/dev
- Check if all pod are ready
kubectl wait --timeout=600s --for=condition=ready pod --all
- From localhost to access k8s service by getting url:
minikube service product-composite --url -n hands-on
- Test services in k8s
HOST=127.0.0.1 PORT=56906 ./test-em-all-docker.sh
- Remove services
kubectl delete -k kubernetes/services/overlays/dev