For a real application, the deployment phase would involve a CI/CD job to build and publish the image to a container repository. Also, the manifests in kubernetes-manifests directory would need to include some manifests for networking (Service, OpenShift Route, service mesh, etc.). Then, you could deploy the manifests in the kubernetes-manifests directory.
For this sample application, you can run it on Docker Desktop. Instructions for just Docker and the Docker Desktop Kubernetes are provided below.
- First, download Docker Desktop if you don't have it from this link
- Ensure the
dockercommand works. - Run the following commands:
docker build . -t fibonacci-java-sample
docker run -it -p 8080:8080 -e "FIBONACCI_SETTING=bigint-forloop" fibonacci-java-sample- Make requests to localhost:8080/fibonacci?sequenceNumber={yourNumber}, or head to localhost:8080/quick-test.html to access the test webpage.
example-page.mov
- First, download Docker Desktop if you don't have it from this link
- Run the Docker Desktop application
- Enable Kubernetes
- Ensure the
dockerandkubectlcommands work. - Run the following commands:
docker build . -t fibonacci-java-sample
kubectl apply -f kubernetes-manifests- This directory does not currently include any networking, but you can test with
kubectl port-forward:
kubectl get pod
kubectl port-forward <pod id> 8080
curl localhost:8080/fibonacci\?sequenceNumber=1000
