Skip to content
This repository has been archived by the owner on Jun 2, 2023. It is now read-only.

Latest commit

 

History

History
executable file
·
40 lines (33 loc) · 2.82 KB

dev_test_local_minikube.md

File metadata and controls

executable file
·
40 lines (33 loc) · 2.82 KB

Deploying the sample directly to a local minikube installation

This is the simplest way for a developer to get the sample up and running locally.

Before you begin

  • Install a Git client to obtain the sample code.
  • Install Maven and a Java 8 JDK.
  • Install a Docker engine.
  • Install and initialize the Helm client.

Install the sample application

  1. Install minikube.
  2. Enable ingress with the command minikube addons enable ingress.
  3. git clone the following projects:
    1. sample.microservices.web-app
    2. sample.microservices.vote
    3. sample.microservices.schedule
    4. sample.microservices.speaker
    5. sample.microservices.session
  4. mvn clean package in each ../sample.microservices.* projects except docs.
  5. If you have not done so already, ensure that your Docker CLI is targeting the minikube Docker engine with minikube docker-env.
  6. docker build -t [name] . in each ../sample.microservices.* projects except docs, where [name] is the image name given in the Chart.yaml file found in the relevant chart directory for the project. For reference, the image names are mapped as follows:
    • sample.microservices.web-app: web-application
    • sample.microservices.vote: microservice-vote
    • sample.microservices.schedule: microservice-schedule
    • sample.microservices.speaker: microservice-speaker
    • sample.microservices.session: microservice-session
  7. Deploy each microservice from its root directory with the following helm install command.
    • sample.microservices.web-app: helm install --name=web-app chart/web-application
    • sample.microservices.vote: helm install --name=vote chart/microservice-vote
    • sample.microservices.schedule: helm install --name=schedule chart/microservice-schedule
    • sample.microservices.speaker: helm install --name=speaker chart/microservice-speaker
    • sample.microservices.session: helm install --name=session chart/microservice-session
  8. Use kubectl get ing to determine the address of the web-application-ingress. Open this location in a web browser to access the sample.

Modifying the sample

Once you've made changes to the source code you'll want to rebuild and redeploy the new modules. See this topic for some notes about redeployment. You can also explore adding security to the application with OpenID Connect and JSON Web Tokens (JWT).