Empty your cup so that it can be filled again. —— Bruce Lee
This paper introduces
- P2 Build a production-level Linux system
- P3 Learn Docker in half an hour
- P4 Write Dockerfile and upload DockerHub
- P5 Docker SpringCloud – compose deployment
- P6 Build Harbor private server for enterprise mirror
- P7 K8S & Rancher is coming! Theory & Preparation
- P8 Rancher2.3 built K8S 1.16 cluster
- P9 Deploy Spring Cloud to Kubernetes
- P10 Deploy Vue to Kubernetes config ingress
- P11 Ha01-rke install Kubernetes cluster
- P12 HA02-Helm deploys the Rancher cluster
Compile the application
First, install the dependencies. Make any one of them and push it to your harbor private server.
Install software
yum install -y git java maven
# clone source
git clone https://gitee.com/log4j/pig.git
# compile source code
mvn clean install -Dmaven.test.skip=true
Copy the code
Build the mirror
# build mirror
docker-compose build
# renameDocker tag pig-mysql:latest 172.17.0.154/library/pig-mysql:2.6.0 docker tag pig-register:latest 172.17.0.154/library/pig-register:2.6.0 docker tag pig-gateway:latest 172.17.0.154/library/pig-gateway:2.6.0 docker tag Pig-upms :latest 172.17.0.154/library/pig-upms:2.6.0 Docker tag pig-auth:latest 172.17.0.154/library/pig-auth:2.6.0 Docker tag pig-codeGen :latest 172.17.0.154/library/pig-monitor:2.6.0 Docker tag pig-codeGen :latest 172.17.0.154 / library/pig - codegen: serverCopy the code
Push private servers
Docker push 172.17.0.154/library/pig-register:2.6.0 docker push 172.17.0.154/library/pig-register:2.6.0 docker push 172.17.0.154/library/pig-gateway:2.6.0 docker push 172.17.0.154/library/pig-upms:2.6.0 docker push 172.17.0.154/library/pig-auth:2.6.0 docker push 172.17.0.154/library/pig-monitor:2.6.0 docker push 172.17.0.154 / library/pig - codegen: serverCopy the code
The deployment order
# pig-mysql Environment variable: MYSQL_ROOT_PASSWORD: root# pig-redis
# pig-register
# pig-gateway
# pig-upms
# pig-auth
# pig-monitor
# pig-codegen
Copy the code
To be perfect…
Form a complete set of data
Please pay attention to wechat (Java-note), message: K8S for supporting information