Description: The goal of this component is to serve a user interface for customers to:
- Log in
- Create an order
- List all orders
- List all containers
- Initiate shipping simulation
Github repository: refarch-kc-ui
Kafka topics consumed from: None
Kafka topics produced to: None
Events reacted to: None
Events produced: None
EDA Patterns implemented: None
Appsody will build the application by pulling the contents of the Appsody Stack it is based on and then performing the local application build inside the containerized environment:
appsody build -t <yournamespace>/kcontainer-spring-container-ms[:tag] [--push]
- You can optionally specify a container tag. If left blank,
latestwill be used.
- You can optionally supply the
--pushflag to automatically push the built image to specified remote repository.
Performing an Appsody build will update the
app-deploy.yaml file in the same directory with current information for the application image, labels, and annotations fields.
The following deployment parameters are defined in the
|KAFKA_BROKERS||YES||Comma-separated list of Kafka brokers to connect to|
|KAFKA_APIKEY||NO||API Key used to connect to SASL-secured Kafka brokers. This is required when connecting to IBM Event Streams clusters.|
|TRUSTSTORE_ENABLED||NO||Required to be set to |
|TRUSTSTORE_PATH||NO||The local path to the required truststore file when connecting to IBM Event Streams on CP4I. See Volume Mounts below.|
|TRUSTSTORE_PWD||NO||The password for the truststore file used for IBM Event Streams server verification.|
|PROBLEM_TOPIC||NO||The topic name used for communication relating to bluewater ship errors. Defaults to |
|SHIP_TOPIC||NO||The topic name used for communication relating to the bluewater ship entity. Defaults to |
|FLEETMS_SERVICE_HOST||NO||Hostname of the dependent Fleet microservice. Defaults to |
|FLEETMS_SERVICE_PORT||NO||Port number of the dependent Fleet microservice. Defaults to |
|ORDERCOMMANDMS_SERVICE_HOST||NO||Hostname of the dependent Order Command microservice. Defaults to |
|ORDERCOMMANDMS_SERVICE_PORT||NO||Port number of the dependent Order Command microservice. Defaults to |
|ORDERQUERYMS_SERVICE_HOST||NO||Hostname of the dependent Order Query microservice. Defaults to |
|ORDERQUERYMS_SERVICE_PORT||NO||Port number of the dependent Order Query microservice. Defaults to |
|VOYAGESMS_SERVICE_HOST||NO||Hostname of the dependent Voyages microservice. Defaults to |
|VOYAGESMS_SERVICE_PORT||NO||Port number of the dependent Voyages microservice. Defaults to |
|CONTAINERMS_SERVICE_HOST||NO||Hostname of the dependent Container Management microservice. Defaults to |
|CONTAINERMS_SERVICE_PORT||NO||Port number of the dependent Container Management microservice. Defaults to |
The User Interface microservice requires up to one file to be injected at runtime for proper operation. As noted in the
TRUSTSTORE_PATH parameter above, these files are SSL-based certificates which are required to verfiy the identity of the external service when calling it. These files are provided as
--docker-options "-v host-src:container-dest ..." when running the microservice locally and as a Volume Mount when running the microservice on a Kubernetes cluster.
TRUSTSTORE_PATH parameter is documented in the Event Streams Certificates section of the Prerequisites page. The Appsody run command should include a parameter similar to
-v /Users/myuser/Downloads/es-cert.jks:/config/resources/security/es-ssl/es-cert.jks in its
--docker-options string to run this microservice locally.
appsody run --docker-options "-v /Users/myuser/Downloads/es-cert.jks:/config/resources/security/es-ssl/es-cert.jks " ...
When running the microservice locally, you must specify all the required deployment parameters from above as environment variables via the
--docker-options flag being passed in from the Appsody CLI command.
appsody run --docker-options "-e KAFKA_BROKERS=remotebroker1:9092,remotebroker2:9092 -e PROBLEM_TOPIC=bluewater-problem -e SHIP_TOPIC=bluewater-ships -v /Users/myuser/Downloads/es-cert.jks:/config/resources/security/es-ssl/es-cert.jks" ...
The Appsody Operator is a required prerequisite for deploying the microservice to a remote Kubernetes or OpenShift cluster.
To deploy the microservice to a remote cluster:
appsody deploy <yournamespace>/kcontainer-ui[:tag] --no-build
- You can omit the
--no-buildflag to have Appsody perform a build before deploying the application.
- Note: Performing a build at deploy time requires specifying the absolute container reference path, as well as the
- The neccesary deployment parameter information will be read from the
app-deploy.yamlfile in the same directory.