A simple app to demostrate my devops and java skills, its a simple app for drone service, managing drone creation, edit and delivery services
- Java 11
- Postgresql
- create a new folder
- Clone the project to the new folder
- Set up postgres with docker if you don't have postgres install locally on your system
- Install and Configure PSQL using Docker:
docker run --name postgresql -p 5432:5432 -e POSTGRES_PASSWORD=blusalt123@ -e POSTGRES_USER=blusalt -e POSTGRES_DB=drone_db -d postgres
this create image and start the container for postgresql - Using local postgres: create new user and new db to new user
- Install and Configure PSQL using Docker:
- Building the project: to build the project env values must be set, if you're building from intellij you can set the values on the IDE
Set environment variables for these values (DB_HOST, DB_NAME, DB_USER and DB_PASSWORD) matching the information of the database you created above.
run
.\mvnw clean
to build the project - running the project
on the project root dir run
.\mvnw spring-boot:run
- access project swagger UI on http://localhost:8060/swagger-ui/
- API can also be tested through postman
- cd to deployment folder on the project root dir
- run
kubectl apply -f namespace.yaml,secrets.yaml,configmap.yaml
- run
kubectl apply -f pg
to create deployment and service for postgresql - run
kubectl apply -f drone
to create drone service deployment and service - Using port-forward to have access to our service run
kubectl port-forward svc/droneservice 8060:8060 -n blusalt
- access project swagger UI on http://localhost:8060/swagger-ui/
- API can also be tested through postman
having any issue contact: Young Nnenna M.C via claretyoung@gmail.com
First of all modify values.yaml file under config and secret provide data base details.
cd charts
helm dependency update drone-service/
helm install blusalt drone-service/ -n default
you can use any namespace- the service is available at http://drone.service/ but first you need to update you host file with ip address, you can check online how to change your OS host file and
- for mac M1 run
sudo vi /etc/host
add the loadbalancer external IP of traefik service to get traefik ipkubectl get svc -n default
and the dns name like this "167.00.00.00 drone.service" change the ip to you LB ip and flush DNSsudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
visit http://drone.service/swagger-ui/#/