当前位置:网站首页>Produced by Ali! Graphical ant script - idea plug-in cloudtoolkit
Produced by Ali! Graphical ant script - idea plug-in cloudtoolkit
2022-06-21 23:15:00 【InfoQ】
CloudToolkit brief introduction
install

Use
Automated Deployment
- When the plug-in is installed , Open the left panel , Right click Host Icon, we can add the connection information of the server , Before implementing automatic deployment, you need to configure the connection information ;

- In general, if we want to deploy locally SpringBoot Applied to the Docker The environment needs to go through the following steps , Use CloudToolkit We just need to configure the process , These operations will be automatically completed for us ;

- First, get ready to package the application image Dockerfile file ;
# This image needs a dependent base image
FROM java:8
# Set the jar Package is copied to the docker Container of / Under the table of contents
ADD mall-tiny-deploy-1.0-SNAPSHOT.jar /mall-tiny-deploy-1.0-SNAPSHOT.jar
# Declare that the service is running at 8088 port
EXPOSE 8088
# Appoint docker Run when container starts jar package
ENTRYPOINT ["java", "-jar","/mall-tiny-deploy-1.0-SNAPSHOT.jar"]
# Specify the name of the maintainer
MAINTAINER macrozheng
- When you are ready, you can automatically package the application image 、 Create and run a script for the container run.sh, For the specific use of these two scripts, please refer to use Jenkins Tips for automated deployment ;
#!/usr/bin/env bash
# Define the application group name
group_name='mall-tiny'
# Define application name
app_name='mall-tiny-deploy'
# Define the application version
app_version='1.0-SNAPSHOT'
# Define the application environment
profile_active='prod'
echo '----copy jar----'
docker stop ${app_name}
echo '----stop container----'
docker rm ${app_name}
echo '----rm container----'
docker rmi ${group_name}/${app_name}:${app_version}
echo '----rm image----'
# Package compilation docker Mirror image
docker build -t ${group_name}/${app_name}:${app_version} .
echo '----build image----'
docker run -p 8088:8088 --name ${app_name} \
--link mysql:db \
-e 'spring.profiles.active'=${profile_active} \
-e TZ="Asia/Shanghai" \
-v /etc/localtime:/etc/localtime \
-v /mydata/app/${app_name}/logs:/var/logs \
-d ${group_name}/${app_name}:${app_version}
echo '----start container----'
- Upload these two files to Linux Server , to run.sh Add executable rights ;

- Right click the project to be deployed , Click on Deploy to Host;

- Then choose Maven packaged Jar Upload the package to the specified directory , Execute after uploading run.sh Script ;

- Next edit Maven The goal of construction , Pack only mall-tiny-deploy The module can ;

- Then modify the advanced settings , Configure the command to view the container log ;

- Finally, run the configuration , After running, you can directly view the application running log ;

- Open the app's Swagger Page view , It's found that it can be accessed normally , Access address :http://192.168.3.105:8088/swagger-ui/

Common functions
- Of course CloudToolkit It's more than that , It has built-in terminal tools , stay IDEA In the management Linux The server , Just use it , Directly through the bottom panel , Click the terminal button to open ;

- Experienced this terminal tool , The tips are quite comprehensive , What else do you want Xshell?

- You can upload files through the upload function ,WinSCP There's no need to !

summary
Project source address
边栏推荐
- C datatable converted to entity (reflection & generics)
- keep-alive的使用注意点
- Matlab2020a how to export exe using app Designer
- 《MATLAB 神经网络43个案例分析》:第9章 离散Hopfield神经网络的联想记忆——数字识别
- Livres obligatoires
- 【强烈推荐】Markdown 语法大全
- uni-app进阶之样式框架/生产环境【day10】
- Contracting of development environment and test environment (and request encapsulation of uniapp)
- STM32下载一次程序后就无法再次下载,程序无法运行。
- WPF data binding: data source target
猜你喜欢

语音断点检测(短时改进子带谱熵)

Flink real-time risk control rule engine

软件测试概念篇

WPF dependent properties

Specific methods of using cloud development to realize wechat payment

深入浅出讲解 JS 的微任务与宏任务

花200W买流量,不如0成本起步做独立站私域运营收益高!

Project process management tool OmniPlan Pro 4

danfoss丹佛斯变频器维修VLT5000/VLT6000/VLT8000

深度学习预测酶活性参数提升酶约束模型构建从头环境搭建
随机推荐
WPF data binding: data source target
CISSP certification 2021 textbook OSG 9th Edition added (modified) knowledge points: comparison with the 8th Edition
Use of three values of pointer events
《MATLAB 神经网络43个案例分析》:第9章 离散Hopfield神经网络的联想记忆——数字识别
解决笔记本电脑(i)某个键的字母按不出来
Uni app advanced style framework / production environment [Day10]
[WUSTCTF2020]朴实无华-1
C delete files in use
《MATLAB 神经网络43个案例分析》:第19章 基于SVM的手写字体识别
Shanghai Jiaotong University: Kerong Wang | bootstrap transformer based on off-line reinforcement learning
Swiftui basic learning journal (XI) SQLite data operation
The way of FPGA -- project scheme and FPGA design scheme of FPGA development process
1016. 子串能表示从 1 到 N 数字的二进制串
STM32F407程序移植到STM32F429
Explain JS micro task and macro task in simple terms
STM32 cannot download the program again after downloading it once, and the program cannot run.
在小程序的 wxml 文件中使用 js 函数
语音信号处理之多阶MFCC提取(matlab)
牛客月赛-环上食虫
开发环境和测试环境的发包(及uniapp的request封装)