Alibaba Cloud Toolkit, you sure do not look to early adopters?

Ali cloud out of the new tools, Alibaba Cloud Toolkit, take a look at "toolkit" to know the name of it is a set of tools.

Yes! It is a set of tools, a set of packaged deployment tool set was published and exploring analysis program. And I, it is still stuck in a function key release!

 

This tool, idea there version, I integrated this version is 2019.7.2!

Considering the idea of ​​plugin warehouse overseas, you can at this site (http://plugins.jetbrains.com/) to download and then install it locally!

 

idea is very simple plug-in installed locally, here do not explain.

I am in daily development, just a jar of the springboot posted to linux machine, in fact, there are other uses! You can go to the official web inspection!

 

Here posted about the important Configuration publish jar package linux machine, first of all, you have to tell Alibaba Cloud Toolkit, where you want to jar posted on the machine,

Which file paths specific to, and what command it from them, and how to compile jar before publishing, etc., as shown below:

 

Because I am a single module application, you can direct clean package, multi-module need to clean install, then clean package the corresponding module

Of course, there toolkit advanced configuration, such as including service up after, as required trace logs!

At this point, you can publish to the specified server.

 

I use this plug-in process, the most difficult place, or scripts written here, I posted about the official statement,

We should regard how to write the script.

Command Command Instructions:
Due to restrictions ECS cloud assistant, when deploying applications that use Alibaba Cloud Toolkit, use the Command command basis having the relevant rules. When you use Alibaba Cloud Toolkit application deployment, use the Command command should pay attention to the following points:

①Command 命令会在固定 root 账户下执行,若需更换用户,请在脚本内切换。
②脚本中不能使用 sleep 命令。
③脚本中不能使用 tail -f 等不中断的命令。

Spring Boot 应用的 Command 命令
若将 Linux 系统的 /root/springbootdemo 目录作为 Spring Boot 应用运行的基目录,则需将 Spring Boot 应用的 JAR 包部署到 /root/springbootdemo 目录下。

对应的 Command 配置为:

sh /root/sh/restart-springboot.sh

restart-springboot.sh 脚本为:

source /etc/profile
killall java
nohup java -jar /root/springbootdemo/springbootdemo-0.0.1-SNAPSHOT.jar > nohup.log 2>&1 &

当然,大家在实际使用的时候,使用自己的脚本即可,但是必须先将自己的服务kill掉,由于本人linux命令太差,还是kill掉服务,然后在自动化起服务!

虽然这样看起来半自动化,但是比自己打包,ftp工具传jar包,然后起服务便捷,因为整个过程可以一键完成!

Alibaba Cloud Toolkit真的很强,目前我还在探索中...

Guess you like

Origin www.cnblogs.com/ixan/p/11324311.html