System Deployment
1. Build Multi-Architecture Images and Push to Image Registry
When building Docker images, it is necessary to create images for each CPU architecture. Here, only linux/amd64 and linux/arm64 architectures are considered, as they cover the majority of CPUs.
1.1 Prepare Multi-Architecture Environment
Docker Engine includes the buildx plugin, which supports building multi-architecture images.
Create and use a new builder to enable multi-architecture builds:
docker buildx create --name multi-arch --useList existing builders to verify the new builder was created successfully:
docker buildx ls1.2 Build Multi-Architecture Docker Images
In the root directory of the code repository, build Java application images by specifying APP_PATH and APP_VERSION:
./deploy/build.sh <APP_PATH> <APP_VERSION> [<REGISTRY_NAMESPACE>]In the parameters:
APP_PATHis the relative directory of the application to be built. The last segment of the string serves as the application name. For example, the directory for the demo application isapps/demo-app.REGISTRY_NAMESPACEis an optional parameter. The default value isopenmeta, which corresponds to theopenmetanamespace in the official Docker Hub registry. You can specifyREGISTRY_NAMESPACEto push the Docker image to a private image registry.
Example for building the demo application image:
./deploy/build.sh apps/demo-app 0.7.52. Launch the Demo Application Using Docker Compose
docker-compose -f ./deploy/demo-app/docker-compose.yml up -dFor detailed configuration and launch instructions, refer to the Quick Start Guide section for the demo application.
3. Production Environment
It is recommended to deploy the production environment using CI/CD pipelines and Kubernetes.