An implementation of the Acme Air Main Service for Java/Liberty. The main service primarily consists of the presentation layer (web pages) that interact with the other services.
This implementation can support running on a variety of runtime platforms including standalone bare metal system, Virtual Machines, docker containers, IBM Cloud, IBM Cloud Private, and other Kubernetes environments.
- Instructions for setting up and building the codebase
All of these examples assume you have the acmeair-mainservice-java, acmeair-authservice-java, acmeair-bookingservice-java, acmeair-customerservice-java, and acmeair-flightservice-java directories, (and possibly others) on your docker machine in the same directory. It also assumes all applications have been built with maven.
- Instructions for different run modes
Prereq: Install Docker, docker-compose, and start Docker daemon on your local machine
- cd acmeair-mainservice-java
- Create docker network
- docker network create --driver bridge my-net
-
Build/Start Containers. This will build all the micro-services, mongo db instances, and an nginx proxy.
- docker-compose build
- NETWORK=my-net docker-compose up
-
Go to http://docker_machine_ip/main/acmeair
-
Go to the Configuration Page and Load the Database
- Prereq: Install Docker, docker-compose, and start Docker daemon on your local machine
- Prereq: Install and configure Minikube, and install kubectl
- minikube docker-env
- eval $(minikube docker-env)
- minikube addons enable ingress
- cd acmeair-mainservice-java/scripts
- Build and Deploy Services ./buildAndDeployToMinikube.sh
- Wait a couple minutes and go to http://kubernetes_ip/acmeair
- Go to the Configuration Page and Load the Database
This doc assumes that
-
ICP is installed and configured
-
The docker env is logged into the CFC docker repo
- docker login mycluster.icp:8500
-
kubectl and helm are attached the ICP cluster
-
You are running ICP as admin
-
maven is installed and set up to build with a full SDK.
-
Build and push the apps
cd acmeair-mainservice-java/scripts
./buildAndPushtoICP.sh
-
Deploy to ICP.
-
Using ibm-websphere-liberty helm chart
`./deployChartToICP.sh`
- Using loose deployment manifests
`./deployToICP.sh`
-
Wait a couple minutes and go to http://proxy_ip/acmeair
-
Go to the Configuration Page and Load the Database
-
Cleanup
-
Helm chart
`./deleteChartRelease.sh`
- Loose deployment manifests
`./deleteKubeObjects.sh`