https://country-phone.herokuapp.com/
Unit Tests
./gradlew clean test
Integration Tests
./gradlew clean intTest
Unit, Int tests and Code Coverage report
./gradlew clean build jacocoTestReport
./gradlew build && java -jar build/libs/country-phone-0.0.1-SNAPSHOT.jar
./gradlew clean build && docker build -t country-phone .
Build jar first and create an image out of it
docker run -e "SPRING_PROFILES=local" -p 8080:8080 country-phone
specify -d
in order to run in detached mode
docker-compose up
- Login with your Docker Id
docker login
, create a Docker Hub repo with the same title - Tag the image (To push a local image to docker registry, you need to associate the local image with a repository on the docker registry. The notation for the repository on docker registry is
username/repository:tag
)
Need to push 2 times - with the tag and tag = latest
docker tag country-phone ilja07/country-phone:0.0.1-SNAPSHOT
docker tag country-phone ilja07/country-phone:latest
- Push the image to docker hub
docker push ilja07/country-phone:0.0.1-SNAPSHOT
docker push ilja07/country-phone:latest
minikube start
kubectl create deployment country-phone --image=ilja07/country-phone
OR
kubectl create -f k8s/manifest.yml
OR
kubectl apply -f k8s/manifest.yml
create vs apply -> https://stackoverflow.com/questions/47369351/kubectl-apply-vs-kubectl-create
Verify status of pods
kubectl get pods
Get all Kubernetes resources info - shows all pods, replicasets, deployments, services, etc
kubectl get all
If POD is running, then open app locally
- find out cluster's ip
minikube ip
OR
minikube service country-phone-service --url
- open app
http://<minikube_ip>:30001/
In case when you need to update some thing
- change the specification file
- apply the changes to Kubernetes master
kubectl apply -f k8s/manifest.yml
In this case, our Pod has a single container, so we don't need to specify one
kubectl exec pod1 -it -- env | grep ENVVAR
kubectl logs <POD_NAME>
kubectl describe pods <POD_NAME>
docker run -it --rm -v /<fullpath>/performancetesting/configs:/bzt-configs -v/ /<fullpath>/performancetesting/artifacts:/tmp/artifacts blazemeter/taurus config.yaml
OR just install Taurus locally - https://gettaurus.org/docs/Installation/
brew install bzt