Skip to content

Latest commit

 

History

History
68 lines (63 loc) · 2.96 KB

README.md

File metadata and controls

68 lines (63 loc) · 2.96 KB

Airports and Countries Services

Pre-install steps:

  1. Install latest minikube release on your laptop.
  2. Install latest kubectl tool on your laptop.
  3. Set the memory size for minikube VM to at least 4GB minikube config set memory 4096
  4. Start the minikube minikube start
  5. Enable ingress in minikube minikube addons enable ingress

Notes:

  • There are Dockerfiles in this repo which building apps with following step, eg. ADD airports-assembly-1.0.1.jar app.jar. For objective reasons, I do not push these jars to the repo.
  • Since in the minikube ingress is enabled as an addon, the nginx-ingress-controller automatically exposes 80 and 443 ports (and not 8000).
  • Docker images are available at my docker hub page. But of course You can take as a basis my Dockerfile and release image anywhere.

Your next steps:

  • You can start bash script start.sh for startup of initial stack.
  • You can start your services by yourself. Recommended: use kubectl auto-completion
    • Create namespaces
    • Apply service.yaml + ing-service.yaml
    • Check API endpoints: countries.example.com - for countries service; airports.example.com - for airports service
service endpoint result
countries v1.0.1 /countries full list of countries
/countries/<qry> to search by name \ iso code
airports v1.0.1 /airports full list of airports
/airports/<qry> to get a list of airports based on country code (e.g.: "nl")
airports v1.1.0 /airports/<id> Returns the full information of an airport based on its identifier. E.g.: /airports/EHAM returns all information for Schiphol.
/airports?full=[0|1] Returns a summary or all details of all airports, depending on the value of full.
/search/<qry> Returns a list of airports based on a country code search.

Updating airports service to newer version:

  1. kubectl set image deployment airports airports=flomsk/airports:v1.1.0 -n airports-ns
  2. check status with: kubectl rollout status deployment airports -n airports-ns

Cleaning up:

After you have played with services it's desirable to clean your laptop.

  1. kubectl delete ns airports-ns && kubectl delete ns countries-ns
  2. minikube stop && minikube delete
  3. clear your entries in /etc/hosts file