Development Validation and Deployment
Koupleless Base and Module Development Validation and Deployment
This document mainly introduces the dynamic merge deployment mode, which is used to save resources and improve development efficiency. If you only want to save resources, you can use static merge deployment。
A video tutorial is also available here。
Base Integration
Module Integration
Module Development Verification
There can be two ways for development verification:
- Local Environment Development Verification
- K8S Cluster Environment Development Verification
Local Environment Development Verification
Installation Way: Using golang tool chain
- Download the corresponding Golang version from the Golang official website: https://go.dev/. The version needs to be above 1.21.
- Execute the command
go install github.com/koupleless/arkctl@v0.2.1 to
install the arkctl tool.
Installation Way: From binary
- Download arkctl according to the actual operating system.
- Unzip the corresponding binary and place it in the appropriate system variable PATH.
- After the base and module are refactored, and the base is started, arkctl can be used to quickly build and deploy, deploying the module to the base.
How to find the value of PATH?
In Linux/Mac, execute the following command in the terminal:
echo $PATH
# Choose a directory and place arkctl in that directory
In Windows:
- Right-click on My Computer.
- Click on Properties.
- Click on Advanced System Settings.
- Click on Environment Variables.
- Double-click on the Path variable.
- In the popped dialog box, you can see the current Path variable value.
- Find the corresponding directory and place arkctl.exe in that directory.
Usage
Quickly deploy the built module jar package.
arkctl deploy ${path to the module jar package}
Build the pom project in the current directory and deploy the biz jar package in the target directory to the base.
arkctl deploy
K8S Cluster Environment Development Verification, using minikube cluster as an example
Base Deployment
- Build the base into an image and push it to the image center.
- Deploy the base to the k8s cluster, create a service for the base, expose the port, can refer here
- Execute minikube service base-web-single-host-service to access the base service.
Module Deployment
- Deploy the module to the k8s cluster
arkctl deploy ${path to the module jar package} --pod ${namespace}/${podname}
Module Deployment and Online
- Use helm to deploy ModuleController to the k8s cluster.
- Use the module deployment capability provided by ModuleController to publish the module to the cluster machines, with gray, traceable, and traffic-free capabilities. For details, please refer here
For more experiments, please refer to the samples directory
Feedback
Was this page helpful?
Welcome propose feedback to community!
Welcome propose feedback to community, or improve this document directly.。
Last modified 2024.22.08: Merge pull request #61 from koupleless/youji-dev (900918f)