Merge remote-tracking branch 'origin/main' into main
This commit is contained in:
5
.github/workflows/build-push-docker.yml
vendored
5
.github/workflows/build-push-docker.yml
vendored
@@ -2,7 +2,7 @@
|
|||||||
# good reference
|
# good reference
|
||||||
|
|
||||||
|
|
||||||
name: Maven Package
|
name: Octopus Complete CI
|
||||||
|
|
||||||
on:
|
on:
|
||||||
# Triggers the workflow on push request events but only for the main branch
|
# Triggers the workflow on push request events but only for the main branch
|
||||||
@@ -128,7 +128,10 @@ jobs:
|
|||||||
echo "--------------------------------------"
|
echo "--------------------------------------"
|
||||||
cd ./agent/target
|
cd ./agent/target
|
||||||
ls
|
ls
|
||||||
|
echo "start to change timezone to Asia/Shanghai"
|
||||||
|
timedatectl set-timezone Asia/Shanghai && timedatectl set-ntp true
|
||||||
echo "current time is $(date --rfc-3339=seconds | cut -d"+" -f1 | sed "s/ /-/g" | sed "s/:/-/g")"
|
echo "current time is $(date --rfc-3339=seconds | cut -d"+" -f1 | sed "s/ /-/g" | sed "s/:/-/g")"
|
||||||
|
echo "current time is $(date)"
|
||||||
echo "start to copy target jar"
|
echo "start to copy target jar"
|
||||||
cp ./agent-*.jar ./octopus-agent-$(date --rfc-3339=seconds | cut -d"+" -f1 | sed "s/ /-/g" | sed "s/:/-/g").jar
|
cp ./agent-*.jar ./octopus-agent-$(date --rfc-3339=seconds | cut -d"+" -f1 | sed "s/ /-/g" | sed "s/:/-/g").jar
|
||||||
cd /home/runner/work/ProjectOctopus/ProjectOctopus
|
cd /home/runner/work/ProjectOctopus/ProjectOctopus
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import io.wdd.agent.executor.thread.LogToArrayListCache;
|
|||||||
import io.wdd.common.beans.executor.ExecutionMessage;
|
import io.wdd.common.beans.executor.ExecutionMessage;
|
||||||
import lombok.SneakyThrows;
|
import lombok.SneakyThrows;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.commons.lang3.ObjectUtils;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
@@ -86,12 +87,18 @@ public class CommandExecutor {
|
|||||||
// start to send the result log
|
// start to send the result log
|
||||||
streamSender.startToWaitLog(streamKey);
|
streamSender.startToWaitLog(streamKey);
|
||||||
|
|
||||||
// get the command result
|
// todo this will stuck the process and rabbitmq message will reentry the queue
|
||||||
processResult = process.waitFor();
|
// get the command result must also be a timeout smaller than the process
|
||||||
|
boolean waitFor = process.waitFor(50, TimeUnit.SECONDS);
|
||||||
|
|
||||||
// end send logs
|
// end send logs
|
||||||
streamSender.endWaitLog(streamKey);
|
streamSender.endWaitLog(streamKey);
|
||||||
|
|
||||||
|
// get the process result
|
||||||
|
if (ObjectUtils.isNotEmpty(waitFor) && ObjectUtils.isNotEmpty(process)) {
|
||||||
|
processResult = process.exitValue();
|
||||||
|
}
|
||||||
|
|
||||||
log.debug("current shell command {} result is {}", processBuilder.command(), processResult);
|
log.debug("current shell command {} result is {}", processBuilder.command(), processResult);
|
||||||
|
|
||||||
|
|
||||||
@@ -106,7 +113,6 @@ public class CommandExecutor {
|
|||||||
return () -> {
|
return () -> {
|
||||||
try {
|
try {
|
||||||
|
|
||||||
|
|
||||||
log.debug("daemon thread start to wait for {} s for the result", processMaxWaitSeconds);
|
log.debug("daemon thread start to wait for {} s for the result", processMaxWaitSeconds);
|
||||||
|
|
||||||
TimeUnit.SECONDS.sleep(processMaxWaitSeconds);
|
TimeUnit.SECONDS.sleep(processMaxWaitSeconds);
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ public class CollectAllExecutorFunction {
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* store the Octopus Agent Functions and Reflection Class Path
|
* store the Octopus Agent Functions and Function Command List
|
||||||
* key: function name
|
* key: function name
|
||||||
* value: function shell List<String> contend
|
* value: function shell List<String> contend
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -38,6 +38,12 @@ public class CreateStreamReader implements ApplicationContextAware {
|
|||||||
// prepare the environment
|
// prepare the environment
|
||||||
prepareEnv();
|
prepareEnv();
|
||||||
|
|
||||||
|
// oldStreamKey equals streamKey don't need to do anything , just return
|
||||||
|
if (redisStreamReaderConfig.getStreamKey().equals(streamKey)) {
|
||||||
|
log.debug("redis listener container not change !");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// destroy the REDIS_STREAM_LISTENER_CONTAINER
|
// destroy the REDIS_STREAM_LISTENER_CONTAINER
|
||||||
destroyStreamReader(streamKey);
|
destroyStreamReader(streamKey);
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
##### environment variables ######
|
##### environment variables ######
|
||||||
|
|
||||||
|
|
||||||
JAVA_OPTS="-Xms128m -Xmx512m -Dfile.encoding=utf-8 --spring.profiles.active=k3s --spring.cloud.nacos.config.group=k3s --spring.cloud.nacos.config.extension-configs[0].dataId=common-k3s.yaml --spring.cloud.nacos.config.extension-configs[0].group=k3s"
|
JAVA_OPTS="-Xms128m -Xmx512m -Dfile.encoding=utf-8 --spring.profiles.active=k3s --spring.cloud.nacos.config.group=k3s --spring.cloud.nacos.config.extension-configs[0].dataId=common-k3s.yaml --spring.cloud.nacos.config.extension-configs[0].group=k3s"
|
||||||
|
|
||||||
DependLibFiles=(
|
DependLibFiles=(
|
||||||
@@ -13,7 +12,6 @@ DependLibFiles=(
|
|||||||
wdd-lib-sys.sh
|
wdd-lib-sys.sh
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
OctopusAgentUrl=https://happybirthday.107421.xyz/octopus-agent/
|
OctopusAgentUrl=https://happybirthday.107421.xyz/octopus-agent/
|
||||||
|
|
||||||
RepoSourcePath=https://raw.githubusercontent.com/zeaslity/ProjectOctopus/main/source/src/main/java/io/wdd/source/shell
|
RepoSourcePath=https://raw.githubusercontent.com/zeaslity/ProjectOctopus/main/source/src/main/java/io/wdd/source/shell
|
||||||
@@ -42,6 +40,15 @@ colorEcho() {
|
|||||||
echo -e "\033[${1}${@:2}\033[0m" 1>&2
|
echo -e "\033[${1}${@:2}\033[0m" 1>&2
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#######################################
|
||||||
|
# description
|
||||||
|
# Globals:
|
||||||
|
# EUID
|
||||||
|
# RED
|
||||||
|
# YELLOW
|
||||||
|
# Arguments:
|
||||||
|
# None
|
||||||
|
#######################################
|
||||||
check_root() {
|
check_root() {
|
||||||
if [[ $EUID != 0 ]]; then
|
if [[ $EUID != 0 ]]; then
|
||||||
colorEcho ${RED} "当前非root账号(或没有root权限),无法继续操作,请更换root账号!"
|
colorEcho ${RED} "当前非root账号(或没有root权限),无法继续操作,请更换root账号!"
|
||||||
@@ -50,17 +57,41 @@ check_root() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#######################################
|
||||||
|
# description
|
||||||
|
# Globals:
|
||||||
|
# PURPLE
|
||||||
|
# SplitLine
|
||||||
|
# Arguments:
|
||||||
|
# None
|
||||||
|
#######################################
|
||||||
FunctionStart() {
|
FunctionStart() {
|
||||||
colorEcho ${PURPLE} ${SplitLine}
|
colorEcho ${PURPLE} ${SplitLine}
|
||||||
colorEcho ${PURPLE} ${SplitLine}
|
colorEcho ${PURPLE} ${SplitLine}
|
||||||
echo ""
|
echo ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#######################################
|
||||||
|
# description
|
||||||
|
# Globals:
|
||||||
|
# GREEN
|
||||||
|
# SplitLine
|
||||||
|
# Arguments:
|
||||||
|
# None
|
||||||
|
#######################################
|
||||||
FunctionSuccess() {
|
FunctionSuccess() {
|
||||||
colorEcho ${GREEN} ${SplitLine}
|
colorEcho ${GREEN} ${SplitLine}
|
||||||
echo ""
|
echo ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#######################################
|
||||||
|
# description
|
||||||
|
# Globals:
|
||||||
|
# BlinkGreen
|
||||||
|
# SplitLine
|
||||||
|
# Arguments:
|
||||||
|
# None
|
||||||
|
#######################################
|
||||||
FunctionEnd() {
|
FunctionEnd() {
|
||||||
echo ""
|
echo ""
|
||||||
colorEcho ${BlinkGreen} ${SplitLine}
|
colorEcho ${BlinkGreen} ${SplitLine}
|
||||||
@@ -188,6 +219,18 @@ installDemandSoftwares() {
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#######################################
|
||||||
|
# description
|
||||||
|
# Globals:
|
||||||
|
# BLUE
|
||||||
|
# DependLibFiles
|
||||||
|
# OctopusAgentPath
|
||||||
|
# RED
|
||||||
|
# RepoSourcePath
|
||||||
|
# libfile
|
||||||
|
# Arguments:
|
||||||
|
# None
|
||||||
|
#######################################
|
||||||
DownloadAllFile() {
|
DownloadAllFile() {
|
||||||
|
|
||||||
FunctionStart
|
FunctionStart
|
||||||
@@ -203,7 +246,7 @@ DownloadAllFile() {
|
|||||||
for libfile in ${DependLibFiles[*]}; do
|
for libfile in ${DependLibFiles[*]}; do
|
||||||
|
|
||||||
colorEcho $BLUE "lib file is $libfile"
|
colorEcho $BLUE "lib file is $libfile"
|
||||||
wget "$RepoSourcePath/lib/$libfile" -Oq $OctopusAgentPath/lib/$libfile
|
wget "$RepoSourcePath/lib/$libfile" -qO $OctopusAgentPath/lib/$libfile
|
||||||
FunctionSuccess
|
FunctionSuccess
|
||||||
|
|
||||||
done
|
done
|
||||||
@@ -216,13 +259,19 @@ DownloadAllFile() {
|
|||||||
. ./lib/wdd-lib-os.sh
|
. ./lib/wdd-lib-os.sh
|
||||||
CheckAndDownloadLatestVersion
|
CheckAndDownloadLatestVersion
|
||||||
|
|
||||||
|
|
||||||
FunctionSuccess
|
FunctionSuccess
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#######################################
|
||||||
|
# description
|
||||||
|
# Globals:
|
||||||
|
# BLUE
|
||||||
|
# GREEN
|
||||||
|
# Arguments:
|
||||||
|
# None
|
||||||
|
#######################################
|
||||||
ModifySystemConfig() {
|
ModifySystemConfig() {
|
||||||
FunctionStart
|
FunctionStart
|
||||||
|
|
||||||
@@ -230,11 +279,6 @@ ModifySystemConfig(){
|
|||||||
## 配置内核参数
|
## 配置内核参数
|
||||||
cat >/etc/sysctl.d/k8s.conf <<EOF
|
cat >/etc/sysctl.d/k8s.conf <<EOF
|
||||||
net.ipv4.ip_forward = 1
|
net.ipv4.ip_forward = 1
|
||||||
net.bridge.bridge-nf-call-ip6tables = 1
|
|
||||||
net.bridge.bridge-nf-call-iptables = 1
|
|
||||||
net.ipv6.conf.all.disable_ipv6 = 1
|
|
||||||
net.ipv6.conf.default.disable_ipv6 = 1
|
|
||||||
net.ipv6.conf.lo.disable_ipv6 = 1
|
|
||||||
net.ipv6.conf.all.forwarding = 1
|
net.ipv6.conf.all.forwarding = 1
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
@@ -243,13 +287,20 @@ EOF
|
|||||||
colorEcho ${GREEN} "--------------系统内核参数修改的结果如上所示----------------"
|
colorEcho ${GREEN} "--------------系统内核参数修改的结果如上所示----------------"
|
||||||
FunctionSuccess
|
FunctionSuccess
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#######################################
|
||||||
|
# description
|
||||||
|
# Globals:
|
||||||
|
# BLUE
|
||||||
|
# JDK_VERSION
|
||||||
|
# LinuxReleaseVersion
|
||||||
|
# Arguments:
|
||||||
|
# 1
|
||||||
|
#######################################
|
||||||
InstallJDKPackage() {
|
InstallJDKPackage() {
|
||||||
JDK_VERSION="11"
|
JDK_VERSION="11"
|
||||||
if [[ "$1" -ne " " ]]; then
|
if [[ $1 -ne " " ]]; then
|
||||||
JDK_VERSION="$1"
|
JDK_VERSION="$1"
|
||||||
echo "JDK Version = ${JDK_VERSION}"
|
echo "JDK Version = ${JDK_VERSION}"
|
||||||
fi
|
fi
|
||||||
@@ -257,7 +308,7 @@ InstallJDKPackage() {
|
|||||||
echo "InstallJDK from package management !"
|
echo "InstallJDK from package management !"
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
if [[ "${LinuxReleaseVersion}" == "centos" ]]; then
|
if [[ ${LinuxReleaseVersion} == "centos" ]]; then
|
||||||
colorEcho ${BLUE} "当前系统发行版为 centos !"
|
colorEcho ${BLUE} "当前系统发行版为 centos !"
|
||||||
colorEcho ${BLUE} "可以安装的 openjdk 版本为:"
|
colorEcho ${BLUE} "可以安装的 openjdk 版本为:"
|
||||||
yum list java-${JDK_VERSION}-openjdk | grep ${JDK_VERSION}
|
yum list java-${JDK_VERSION}-openjdk | grep ${JDK_VERSION}
|
||||||
@@ -280,6 +331,13 @@ InstallJDKPackage() {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#######################################
|
||||||
|
# description
|
||||||
|
# Globals:
|
||||||
|
# JAVA_OPTS
|
||||||
|
# Arguments:
|
||||||
|
# None
|
||||||
|
#######################################
|
||||||
systemdAgent() {
|
systemdAgent() {
|
||||||
|
|
||||||
# https://www.baeldung.com/linux/run-java-application-as-service
|
# https://www.baeldung.com/linux/run-java-application-as-service
|
||||||
@@ -334,7 +392,14 @@ CommonToolInstall() {
|
|||||||
FunctionEnd
|
FunctionEnd
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#######################################
|
||||||
|
# description
|
||||||
|
# Globals:
|
||||||
|
# BLUE
|
||||||
|
# OctopusAgentPath
|
||||||
|
# Arguments:
|
||||||
|
# None
|
||||||
|
#######################################
|
||||||
BootUPAgent() {
|
BootUPAgent() {
|
||||||
|
|
||||||
FunctionStart
|
FunctionStart
|
||||||
@@ -343,7 +408,7 @@ BootUPAgent(){
|
|||||||
chmod +x $OctopusAgentPath/lib/wdd-lib-env.sh
|
chmod +x $OctopusAgentPath/lib/wdd-lib-env.sh
|
||||||
$OctopusAgentPath/lib/wdd-lib-env.sh
|
$OctopusAgentPath/lib/wdd-lib-env.sh
|
||||||
|
|
||||||
colorEcho $BLUE "start to daemon the agent pid"
|
colorEcho $BLUE "start to daemon the octopus agent"
|
||||||
systemdAgent
|
systemdAgent
|
||||||
|
|
||||||
colorEcho $BLUE "start the agent!"
|
colorEcho $BLUE "start the agent!"
|
||||||
@@ -361,25 +426,36 @@ BootUPAgent(){
|
|||||||
FunctionEnd
|
FunctionEnd
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#######################################
|
||||||
|
# description
|
||||||
|
# Globals:
|
||||||
|
# BLUE
|
||||||
|
# RED
|
||||||
|
# i
|
||||||
|
# Arguments:
|
||||||
|
# 1
|
||||||
|
# Returns:
|
||||||
|
# $? ...
|
||||||
|
#######################################
|
||||||
InstallZSH() {
|
InstallZSH() {
|
||||||
FunctionStart
|
FunctionStart
|
||||||
|
|
||||||
ZSH_SOURCE="us"
|
local ZSH_SOURCE="us"
|
||||||
|
|
||||||
if [[ "$1" -ne " " ]]; then
|
if [[ $1 -ne " " ]]; then
|
||||||
ZSH_SOURCE="$1"
|
ZSH_SOURCE="$1"
|
||||||
echo "zsh install source = ${ZSH_SOURCE}"
|
colorEcho ${BLUE} "zsh install source = ${ZSH_SOURCE}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
colorEcho ${BLUE} "开始安装宇宙第一shell工具zsh……"
|
colorEcho ${BLUE} "开始安装宇宙第一shell工具zsh……"
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
installDemandSoftwares zsh git || return $?
|
installDemandSoftwares zsh git || return $?
|
||||||
# 脚本会自动更换默认的shell
|
# 脚本会自动更换默认的shell
|
||||||
if [[ "${ZSH_SOURCE}" -eq "cn" ]]; then
|
if [[ ${ZSH_SOURCE} -eq "us" ]]; then
|
||||||
echo y | REMOTE=https://gitee.com/mirrors/oh-my-zsh.git sh -c "$(curl -fsSL https://gitee.com/mirrors/oh-my-zsh/raw/master/tools/install.sh)"
|
|
||||||
else
|
|
||||||
echo y | sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
|
echo y | sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
|
||||||
|
else
|
||||||
|
echo y | REMOTE=https://gitee.com/mirrors/oh-my-zsh.git sh -c "$(curl -fsSL https://gitee.com/mirrors/oh-my-zsh/raw/master/tools/install.sh)"
|
||||||
fi
|
fi
|
||||||
#echo y | sh -c "$(curl -fsSL https://cdn.jsdelivr.net/gh/robbyrussell/oh-my-zsh@master/tools/install.sh)"
|
#echo y | sh -c "$(curl -fsSL https://cdn.jsdelivr.net/gh/robbyrussell/oh-my-zsh@master/tools/install.sh)"
|
||||||
echo ""
|
echo ""
|
||||||
@@ -398,12 +474,22 @@ InstallZSH() {
|
|||||||
FunctionEnd
|
FunctionEnd
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#######################################
|
||||||
|
# description
|
||||||
|
# Globals:
|
||||||
|
# BLUE
|
||||||
|
# GREEN
|
||||||
|
# PURPLE
|
||||||
|
# ZSH_SOURCE
|
||||||
|
# Arguments:
|
||||||
|
# 1
|
||||||
|
#######################################
|
||||||
modifyZSH() {
|
modifyZSH() {
|
||||||
FunctionStart
|
FunctionStart
|
||||||
|
|
||||||
ZSH_SOURCE="us"
|
ZSH_SOURCE="us"
|
||||||
|
|
||||||
if [[ "$1" -ne " " ]]; then
|
if [[ $1 -ne " " ]]; then
|
||||||
ZSH_SOURCE="$1"
|
ZSH_SOURCE="$1"
|
||||||
echo "zsh install source = ${ZSH_SOURCE}"
|
echo "zsh install source = ${ZSH_SOURCE}"
|
||||||
fi
|
fi
|
||||||
@@ -419,21 +505,23 @@ EOF
|
|||||||
colorEcho ${BLUE} "正在下载zsh的一些好用的插件:"
|
colorEcho ${BLUE} "正在下载zsh的一些好用的插件:"
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
if [[ "${ZSH_SOURCE}" -eq "cn" ]]; then
|
if [[ ${ZSH_SOURCE} -eq "us" ]]; then
|
||||||
colorEcho ${BLUE} "开始从 Gitee 下载 自动补全 插件…………"
|
|
||||||
git clone https://gitee.com/githubClone/zsh-autosuggestions.git ~/.oh-my-zsh/plugins/zsh-autosuggestions
|
|
||||||
else
|
|
||||||
colorEcho ${BLUE} "开始从 GitHub 下载 自动补全 插件…………"
|
colorEcho ${BLUE} "开始从 GitHub 下载 自动补全 插件…………"
|
||||||
git clone https://github.com/zsh-users/zsh-autosuggestions ~/.oh-my-zsh/plugins/zsh-autosuggestions
|
git clone https://github.com/zsh-users/zsh-autosuggestions ~/.oh-my-zsh/plugins/zsh-autosuggestions
|
||||||
|
|
||||||
|
else
|
||||||
|
colorEcho ${BLUE} "开始从 Gitee 下载 自动补全 插件…………"
|
||||||
|
git clone https://gitee.com/githubClone/zsh-autosuggestions.git ~/.oh-my-zsh/plugins/zsh-autosuggestions
|
||||||
fi
|
fi
|
||||||
FunctionSuccess
|
FunctionSuccess
|
||||||
|
|
||||||
if [[ "${ZSH_SOURCE}" -eq "cn" ]]; then
|
if [[ ${ZSH_SOURCE} -eq "us" ]]; then
|
||||||
colorEcho ${BLUE} "开始从 Gitee 下载 命令高亮 插件…………"
|
|
||||||
git clone https://gitee.com/mo2/zsh-syntax-highlighting.git ~/.oh-my-zsh/plugins/zsh-syntax-highlighting
|
|
||||||
else
|
|
||||||
colorEcho ${BLUE} "开始从 GitHub 下载 命令高亮 插件…………"
|
colorEcho ${BLUE} "开始从 GitHub 下载 命令高亮 插件…………"
|
||||||
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ~/.oh-my-zsh/plugins/zsh-syntax-highlighting
|
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ~/.oh-my-zsh/plugins/zsh-syntax-highlighting
|
||||||
|
|
||||||
|
else
|
||||||
|
colorEcho ${BLUE} "开始从 Gitee 下载 命令高亮 插件…………"
|
||||||
|
git clone https://gitee.com/mo2/zsh-syntax-highlighting.git ~/.oh-my-zsh/plugins/zsh-syntax-highlighting
|
||||||
fi
|
fi
|
||||||
FunctionSuccess
|
FunctionSuccess
|
||||||
|
|
||||||
@@ -470,7 +558,32 @@ EOF
|
|||||||
FunctionSuccess
|
FunctionSuccess
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ChangeTimeZoneAndNTP() {
|
||||||
|
FunctionStart
|
||||||
|
colorEcho ${BLUE} "开始使用 timedatectl 工具进行时间同步…………"
|
||||||
|
FunctionSuccess
|
||||||
|
if [[ -n $(command -v timedatectl) ]]; then
|
||||||
|
colorEcho ${BLUE} "检测到工具存在,正在设置时间和时区为 上海(UTC+8)时间"
|
||||||
|
timedatectl set-timezone Asia/Shanghai && timedatectl set-ntp true
|
||||||
|
colorEcho ${GREEN} "同步时间完成。现在时间为:"
|
||||||
|
colorEcho ${GREEN} "--------------------------------------------------"
|
||||||
|
colorEcho ${PURPLE} "$(date -R)"
|
||||||
|
colorEcho ${GREEN} "--------------------------------------------------"
|
||||||
|
colorEcho ${BLUE} "开始重启系统日志服务,使得系统日志的时间戳也立即生效"
|
||||||
|
systemctl restart rsyslog
|
||||||
|
colorEcho ${GREEN} "----------重启完成----------"
|
||||||
|
else
|
||||||
|
colorEcho ${RED} "timedatectl 工具不存在,时间同步失败!! 请手动更换时间!"
|
||||||
|
fi
|
||||||
|
FunctionSuccess
|
||||||
|
FunctionEnd
|
||||||
|
}
|
||||||
|
|
||||||
|
#######################################
|
||||||
|
# description
|
||||||
|
# Arguments:
|
||||||
|
# None
|
||||||
|
#######################################
|
||||||
main() {
|
main() {
|
||||||
|
|
||||||
check_root
|
check_root
|
||||||
@@ -484,11 +597,12 @@ main(){
|
|||||||
|
|
||||||
DownloadAllFile
|
DownloadAllFile
|
||||||
|
|
||||||
InstallZSH "us"
|
ChangeTimeZoneAndNTP
|
||||||
|
|
||||||
BootUPAgent
|
BootUPAgent
|
||||||
|
|
||||||
|
InstallZSH "us"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
main
|
main
|
||||||
@@ -5,20 +5,21 @@
|
|||||||
. /octopus-agent/shell/lib/wdd-lib-sys.sh
|
. /octopus-agent/shell/lib/wdd-lib-sys.sh
|
||||||
|
|
||||||
|
|
||||||
log "[Octopus Agent Restart !]"
|
log "Octopus Agent Restart !"
|
||||||
|
|
||||||
FunctionStart
|
FunctionStart
|
||||||
|
|
||||||
log "prepare the env"
|
log "prepare the env"
|
||||||
chmod +x /octopus-agent/shell/lib/wdd-lib-env.sh
|
chmod +x /octopus-agent/shell/lib/wdd-lib-env.sh
|
||||||
|
|
||||||
/octopus-agent/shell/lib/wdd-lib-env.sh
|
/octopus-agent/shell/lib/wdd-lib-env.sh
|
||||||
systemctl stop octopus-agent.service
|
|
||||||
log "sleep for 5s waiting for agent shutdown !"
|
log ""
|
||||||
sleep 5
|
#systemctl stop octopus-agent.service
|
||||||
|
#log "sleep for 5s waiting for agent shutdown !"
|
||||||
|
#sleep 5
|
||||||
|
|
||||||
log "restart octopus agent ! $(date)"
|
log "restart octopus agent ! $(date)"
|
||||||
systemctl start octopus-agent.service
|
systemctl restart octopus-agent.service
|
||||||
|
|
||||||
FunctionSuccess
|
FunctionSuccess
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
|||||||
@@ -11,13 +11,13 @@ RepoSourcePath=https://raw.githubusercontent.com/zeaslity/ProjectOctopus/main/so
|
|||||||
|
|
||||||
CheckAndDownloadLatestVersion
|
CheckAndDownloadLatestVersion
|
||||||
|
|
||||||
if [[ ! -f /octopus-agent/shell/agent-reboot.sh ]]; then\
|
if [[ ! -f /octopus-agent/shell/agent-restart.sh ]]; then
|
||||||
warn "agent-bootup.sh not exist! start to download !"
|
warn "agent-bootup.sh not exist! start to download !"
|
||||||
cd /octopus-agent/shell
|
cd /octopus-agent/shell
|
||||||
wget $RepoSourcePath/agent-reboot.sh
|
wget -q $RepoSourcePath/agent-restart.sh
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
log "start to reboot the octopus agent !"
|
log "start to restart the octopus agent !"
|
||||||
chmod +x /octopus-agent/shell/agent-reboot.sh
|
chmod +x /octopus-agent/shell/agent-restart.sh
|
||||||
/octopus-agent/shell/agent-reboot.sh
|
/octopus-agent/shell/agent-restart.sh
|
||||||
|
|||||||
@@ -1,13 +1,11 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
|
||||||
. /octopus-agent/shell/lib/wdd-lib-log.sh
|
. /octopus-agent/shell/lib/wdd-lib-log.sh
|
||||||
. /octopus-agent/shell/lib/wdd-lib-sys.sh
|
. /octopus-agent/shell/lib/wdd-lib-sys.sh
|
||||||
|
|
||||||
#. .wdd-lib-log.sh
|
#. .wdd-lib-log.sh
|
||||||
#. .wdd-lib-sys.sh
|
#. .wdd-lib-sys.sh
|
||||||
|
|
||||||
|
|
||||||
hostArchVersion=""
|
hostArchVersion=""
|
||||||
hostArch=""
|
hostArch=""
|
||||||
#### CollectSystemInfo ####
|
#### CollectSystemInfo ####
|
||||||
@@ -41,11 +39,22 @@ city=""
|
|||||||
org=""
|
org=""
|
||||||
#### CollectSystemInfo ####
|
#### CollectSystemInfo ####
|
||||||
|
|
||||||
|
#######################################
|
||||||
|
# description
|
||||||
|
# Arguments:
|
||||||
|
# 1
|
||||||
|
#######################################
|
||||||
GoIOTest() {
|
GoIOTest() {
|
||||||
(LANG=C dd if=/dev/zero of=benchtest_$$ bs=512k count=$1 conv=fdatasync && rm -f benchtest_$$) 2>&1 | awk -F, '{io=$NF} END { print io}' | sed 's/^[ \t]*//;s/[ \t]*$//'
|
(LANG=C dd if=/dev/zero of=benchtest_$$ bs=512k count=$1 conv=fdatasync && rm -f benchtest_$$) 2>&1 | awk -F, '{io=$NF} END { print io}' | sed 's/^[ \t]*//;s/[ \t]*$//'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#######################################
|
||||||
|
# description
|
||||||
|
# Arguments:
|
||||||
|
# 1
|
||||||
|
# Returns:
|
||||||
|
# <unknown> ...
|
||||||
|
#######################################
|
||||||
calc_size() {
|
calc_size() {
|
||||||
local raw=$1
|
local raw=$1
|
||||||
local total_size=0
|
local total_size=0
|
||||||
@@ -72,12 +81,35 @@ calc_size() {
|
|||||||
echo "${total_size} ${unit}"
|
echo "${total_size} ${unit}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#######################################
|
||||||
|
# description
|
||||||
|
# Arguments:
|
||||||
|
# None
|
||||||
|
# Returns:
|
||||||
|
# <unknown> ...
|
||||||
|
#######################################
|
||||||
GethostArchInfo() {
|
GethostArchInfo() {
|
||||||
[ -f /etc/redhat-release ] && awk '{print $0}' /etc/redhat-release && return
|
[ -f /etc/redhat-release ] && awk '{print $0}' /etc/redhat-release && return
|
||||||
[ -f /etc/os-release ] && awk -F'[= "]' '/PRETTY_NAME/{print $3,$4,$5}' /etc/os-release && return
|
[ -f /etc/os-release ] && awk -F'[= "]' '/PRETTY_NAME/{print $3,$4,$5}' /etc/os-release && return
|
||||||
[ -f /etc/lsb-release ] && awk -F'[="]+' '/DESCRIPTION/{print $2}' /etc/lsb-release && return
|
[ -f /etc/lsb-release ] && awk -F'[="]+' '/DESCRIPTION/{print $2}' /etc/lsb-release && return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#######################################
|
||||||
|
# description
|
||||||
|
# Globals:
|
||||||
|
# freespace
|
||||||
|
# io1
|
||||||
|
# io2
|
||||||
|
# io3
|
||||||
|
# ioall
|
||||||
|
# ioavg
|
||||||
|
# ioraw1
|
||||||
|
# ioraw2
|
||||||
|
# ioraw3
|
||||||
|
# writemb
|
||||||
|
# Arguments:
|
||||||
|
# None
|
||||||
|
#######################################
|
||||||
StartIOTest() {
|
StartIOTest() {
|
||||||
log "start IO speed test !"
|
log "start IO speed test !"
|
||||||
freespace=$(df -m . | awk 'NR==2 {print $4}')
|
freespace=$(df -m . | awk 'NR==2 {print $4}')
|
||||||
@@ -105,12 +137,22 @@ StartIOTest() {
|
|||||||
echo " $(_red "Not enough space for I/O Speed test!")"
|
echo " $(_red "Not enough space for I/O Speed test!")"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#######################################
|
||||||
|
# description
|
||||||
|
# Globals:
|
||||||
|
# cpuName
|
||||||
|
# sys_manu
|
||||||
|
# sys_product
|
||||||
|
# sys_ver
|
||||||
|
# virt
|
||||||
|
# virtualx
|
||||||
|
# Arguments:
|
||||||
|
# None
|
||||||
|
#######################################
|
||||||
Check_Virtualization() {
|
Check_Virtualization() {
|
||||||
|
|
||||||
|
|
||||||
log "start to check host virtualization !"
|
log "start to check host virtualization !"
|
||||||
|
|
||||||
command_exists "dmesg" && virtualx="$(dmesg 2>/dev/null)"
|
command_exists "dmesg" && virtualx="$(dmesg 2>/dev/null)"
|
||||||
@@ -131,21 +173,21 @@ Check_Virtualization() {
|
|||||||
virt="LXC"
|
virt="LXC"
|
||||||
elif [[ -f /proc/user_beancounters ]]; then
|
elif [[ -f /proc/user_beancounters ]]; then
|
||||||
virt="OpenVZ"
|
virt="OpenVZ"
|
||||||
elif [[ "${virtualx}" == *kvm-clock* ]]; then
|
elif [[ ${virtualx} == *kvm-clock* ]]; then
|
||||||
virt="KVM"
|
virt="KVM"
|
||||||
elif [[ "${sys_product}" == *KVM* ]]; then
|
elif [[ ${sys_product} == *KVM* ]]; then
|
||||||
virt="KVM"
|
virt="KVM"
|
||||||
elif [[ "${cpuName}" == *KVM* ]]; then
|
elif [[ ${cpuName} == *KVM* ]]; then
|
||||||
virt="KVM"
|
virt="KVM"
|
||||||
elif [[ "${cpuName}" == *QEMU* ]]; then
|
elif [[ ${cpuName} == *QEMU* ]]; then
|
||||||
virt="KVM"
|
virt="KVM"
|
||||||
elif [[ "${virtualx}" == *"VMware Virtual Platform"* ]]; then
|
elif [[ ${virtualx} == *"VMware Virtual Platform"* ]]; then
|
||||||
virt="VMware"
|
virt="VMware"
|
||||||
elif [[ "${sys_product}" == *"VMware Virtual Platform"* ]]; then
|
elif [[ ${sys_product} == *"VMware Virtual Platform"* ]]; then
|
||||||
virt="VMware"
|
virt="VMware"
|
||||||
elif [[ "${virtualx}" == *"Parallels Software International"* ]]; then
|
elif [[ ${virtualx} == *"Parallels Software International"* ]]; then
|
||||||
virt="Parallels"
|
virt="Parallels"
|
||||||
elif [[ "${virtualx}" == *VirtualBox* ]]; then
|
elif [[ ${virtualx} == *VirtualBox* ]]; then
|
||||||
virt="VirtualBox"
|
virt="VirtualBox"
|
||||||
elif [[ -e /proc/xen ]]; then
|
elif [[ -e /proc/xen ]]; then
|
||||||
if grep -q "control_d" "/proc/xen/capabilities" 2>/dev/null; then
|
if grep -q "control_d" "/proc/xen/capabilities" 2>/dev/null; then
|
||||||
@@ -155,9 +197,9 @@ Check_Virtualization() {
|
|||||||
fi
|
fi
|
||||||
elif [ -f "/sys/hypervisor/type" ] && grep -q "xen" "/sys/hypervisor/type"; then
|
elif [ -f "/sys/hypervisor/type" ] && grep -q "xen" "/sys/hypervisor/type"; then
|
||||||
virt="Xen"
|
virt="Xen"
|
||||||
elif [[ "${sys_manu}" == *"Microsoft Corporation"* ]]; then
|
elif [[ ${sys_manu} == *"Microsoft Corporation"* ]]; then
|
||||||
if [[ "${sys_product}" == *"Virtual Machine"* ]]; then
|
if [[ ${sys_product} == *"Virtual Machine"* ]]; then
|
||||||
if [[ "${sys_ver}" == *"7.0"* || "${sys_ver}" == *"Hyper-V" ]]; then
|
if [[ ${sys_ver} == *"7.0"* || ${sys_ver} == *"Hyper-V" ]]; then
|
||||||
virt="Hyper-V"
|
virt="Hyper-V"
|
||||||
else
|
else
|
||||||
virt="Microsoft Virtual Machine"
|
virt="Microsoft Virtual Machine"
|
||||||
@@ -167,12 +209,21 @@ Check_Virtualization() {
|
|||||||
virt="Dedicated"
|
virt="Dedicated"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#######################################
|
||||||
|
# description
|
||||||
|
# Globals:
|
||||||
|
# city
|
||||||
|
# country
|
||||||
|
# org
|
||||||
|
# public_ipv4
|
||||||
|
# region
|
||||||
|
# Arguments:
|
||||||
|
# None
|
||||||
|
#######################################
|
||||||
GetIpv4Info() {
|
GetIpv4Info() {
|
||||||
|
|
||||||
|
|
||||||
log "start to get system public ip info !"
|
log "start to get system public ip info !"
|
||||||
|
|
||||||
org="$(wget -q -T10 -O- ipinfo.io/org)"
|
org="$(wget -q -T10 -O- ipinfo.io/org)"
|
||||||
@@ -181,10 +232,8 @@ GetIpv4Info() {
|
|||||||
region="$(wget -q -T10 -O- ipinfo.io/region)"
|
region="$(wget -q -T10 -O- ipinfo.io/region)"
|
||||||
public_ipv4="$(wget -q -T10 -O- ipinfo.io/ip)"
|
public_ipv4="$(wget -q -T10 -O- ipinfo.io/ip)"
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
log "start to collect system info !"
|
log "start to collect system info !"
|
||||||
|
|
||||||
check_sys
|
check_sys
|
||||||
@@ -247,7 +296,6 @@ disk_used_size=$(
|
|||||||
disk_used_size=$(calc_size $disk_used_size)
|
disk_used_size=$(calc_size $disk_used_size)
|
||||||
tcpctrl=$(sysctl net.ipv4.tcp_congestion_control | awk -F ' ' '{print $3}')
|
tcpctrl=$(sysctl net.ipv4.tcp_congestion_control | awk -F ' ' '{print $3}')
|
||||||
|
|
||||||
|
|
||||||
# todo
|
# todo
|
||||||
# StartIOTest
|
# StartIOTest
|
||||||
|
|
||||||
@@ -289,4 +337,3 @@ log "env collect complete!"
|
|||||||
source /etc/environment
|
source /etc/environment
|
||||||
|
|
||||||
env
|
env
|
||||||
|
|
||||||
|
|||||||
@@ -1,29 +1,26 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
|
||||||
. /octopus-agent/shell/lib/wdd-lib-log.sh
|
. /octopus-agent/shell/lib/wdd-lib-log.sh
|
||||||
|
|
||||||
OctopusAgentUrl=https://happybirthday.107421.xyz/octopus-agent/
|
OctopusAgentUrl=https://happybirthday.107421.xyz/octopus-agent/
|
||||||
|
|
||||||
|
|
||||||
CheckAndDownloadLatestVersion() {
|
CheckAndDownloadLatestVersion() {
|
||||||
|
|
||||||
log "checking for the latest version"
|
log "checking for the latest version"
|
||||||
local latestVersion=$(curl $OctopusAgentUrl | grep -v h1 | grep "a href=" | awk '{print$2}' | cut -d">" -f2 | cut -d"<" -f1)
|
local latestVersion=$(curl $OctopusAgentUrl | grep -v h1 | grep "a href=" | awk '{print$2}' | cut -d">" -f2 | cut -d"<" -f1)
|
||||||
|
|
||||||
|
log ""
|
||||||
log "octopus agent latest version is => [ $latestVersion ]"
|
log "octopus agent latest version is => [ $latestVersion ]"
|
||||||
|
log ""
|
||||||
rm -rf /octopus-agent/*.jar
|
rm -rf /octopus-agent/*.jar
|
||||||
cd /octopus-agent
|
cd /octopus-agent
|
||||||
|
|
||||||
log "start to download the latest version !"
|
log "start to download the latest version !"
|
||||||
|
|
||||||
wget "$OctopusAgentUrl$latestVersion"
|
wget "$OctopusAgentUrl$latestVersion"
|
||||||
cp "$latestVersion" agent.jar
|
cp "$latestVersion" agent.jar
|
||||||
|
|
||||||
log ""
|
log ""
|
||||||
echo ""
|
log ""
|
||||||
log "----------------------------------------------"
|
log "---------------- ls the /octopus-agent ----------------------"
|
||||||
ls /octopus-agent/ | grep jar
|
ls /octopus-agent/ | grep jar
|
||||||
log "----------------------------------------------"
|
log "----------------------------------------------"
|
||||||
|
|
||||||
|
|||||||
@@ -138,9 +138,6 @@ tmp () {
|
|||||||
gcloud compute instances create octopus-agent-2c-4g-1 --project=compact-lacing-371804 --zone=asia-northeast1-b --machine-type=n2d-custom-2-4096 --network-interface=network-tier=PREMIUM,subnet=default --metadata=startup-script=wget\ https://raw.githubusercontent.com/zeaslity/ProjectOctopus/main/source/src/main/java/io/wdd/source/shell/agent-bootup.sh\ \&\&\ chmod\ \+x\ agent-bootup.sh\ \&\&\ /bin/bash\ agent-bootup.sh --can-ip-forward --maintenance-policy=MIGRATE --provisioning-model=STANDARD --service-account=172889627951-compute@developer.gserviceaccount.com --scopes=https://www.googleapis.com/auth/devstorage.read_only,https://www.googleapis.com/auth/logging.write,https://www.googleapis.com/auth/monitoring.write,https://www.googleapis.com/auth/servicecontrol,https://www.googleapis.com/auth/service.management.readonly,https://www.googleapis.com/auth/trace.append --create-disk=auto-delete=yes,boot=yes,device-name=octopus-agent-2c-4g,image=projects/ubuntu-os-cloud/global/images/ubuntu-2004-focal-v20221213,mode=rw,size=20,type=projects/compact-lacing-371804/zones/us-west4-b/diskTypes/pd-ssd --no-shielded-secure-boot --shielded-vtpm --shielded-integrity-monitoring --reservation-affinity=any
|
gcloud compute instances create octopus-agent-2c-4g-1 --project=compact-lacing-371804 --zone=asia-northeast1-b --machine-type=n2d-custom-2-4096 --network-interface=network-tier=PREMIUM,subnet=default --metadata=startup-script=wget\ https://raw.githubusercontent.com/zeaslity/ProjectOctopus/main/source/src/main/java/io/wdd/source/shell/agent-bootup.sh\ \&\&\ chmod\ \+x\ agent-bootup.sh\ \&\&\ /bin/bash\ agent-bootup.sh --can-ip-forward --maintenance-policy=MIGRATE --provisioning-model=STANDARD --service-account=172889627951-compute@developer.gserviceaccount.com --scopes=https://www.googleapis.com/auth/devstorage.read_only,https://www.googleapis.com/auth/logging.write,https://www.googleapis.com/auth/monitoring.write,https://www.googleapis.com/auth/servicecontrol,https://www.googleapis.com/auth/service.management.readonly,https://www.googleapis.com/auth/trace.append --create-disk=auto-delete=yes,boot=yes,device-name=octopus-agent-2c-4g,image=projects/ubuntu-os-cloud/global/images/ubuntu-2004-focal-v20221213,mode=rw,size=20,type=projects/compact-lacing-371804/zones/us-west4-b/diskTypes/pd-ssd --no-shielded-secure-boot --shielded-vtpm --shielded-integrity-monitoring --reservation-affinity=any
|
||||||
|
|
||||||
|
|
||||||
gcloud compute instances delete tokyo-amd64-03 --project=compact-lacing-371804 --zone=asia-northeast1-b
|
|
||||||
|
|
||||||
|
|
||||||
gcloud compute instances create tokyo-amd64-03 --project=compact-lacing-371804 --zone=asia-northeast1-b --machine-type=n2d-custom-2-4096 --network-interface=network-tier=PREMIUM,subnet=default --can-ip-forward --maintenance-policy=MIGRATE --provisioning-model=STANDARD --service-account=172889627951-compute@developer.gserviceaccount.com --scopes=https://www.googleapis.com/auth/devstorage.read_only,https://www.googleapis.com/auth/logging.write,https://www.googleapis.com/auth/monitoring.write,https://www.googleapis.com/auth/servicecontrol,https://www.googleapis.com/auth/service.management.readonly,https://www.googleapis.com/auth/trace.append --create-disk=auto-delete=yes,boot=yes,device-name=octopus-agent-2c-4g,image=projects/ubuntu-os-cloud/global/images/ubuntu-2004-focal-v20221213,mode=rw,size=20,type=projects/compact-lacing-371804/zones/us-west4-b/diskTypes/pd-ssd --no-shielded-secure-boot --shielded-vtpm --shielded-integrity-monitoring --reservation-affinity=any
|
gcloud compute instances create tokyo-amd64-03 --project=compact-lacing-371804 --zone=asia-northeast1-b --machine-type=n2d-custom-2-4096 --network-interface=network-tier=PREMIUM,subnet=default --can-ip-forward --maintenance-policy=MIGRATE --provisioning-model=STANDARD --service-account=172889627951-compute@developer.gserviceaccount.com --scopes=https://www.googleapis.com/auth/devstorage.read_only,https://www.googleapis.com/auth/logging.write,https://www.googleapis.com/auth/monitoring.write,https://www.googleapis.com/auth/servicecontrol,https://www.googleapis.com/auth/service.management.readonly,https://www.googleapis.com/auth/trace.append --create-disk=auto-delete=yes,boot=yes,device-name=octopus-agent-2c-4g,image=projects/ubuntu-os-cloud/global/images/ubuntu-2004-focal-v20221213,mode=rw,size=20,type=projects/compact-lacing-371804/zones/us-west4-b/diskTypes/pd-ssd --no-shielded-secure-boot --shielded-vtpm --shielded-integrity-monitoring --reservation-affinity=any
|
||||||
|
|
||||||
gcloud compute ssh --zone "asia-northeast1-b" "tokyo-amd64-03" --project "compact-lacing-371804"
|
gcloud compute ssh --zone "asia-northeast1-b" "tokyo-amd64-03" --project "compact-lacing-371804"
|
||||||
@@ -148,6 +145,11 @@ gcloud compute ssh --zone "asia-northeast1-b" "tokyo-amd64-03" --project "compac
|
|||||||
|
|
||||||
wget https://raw.githubusercontent.com/zeaslity/ProjectOctopus/main/source/src/main/java/io/wdd/source/shell/agent-bootup.sh && chmod +x agent-bootup.sh && /bin/bash agent-bootup.sh
|
wget https://raw.githubusercontent.com/zeaslity/ProjectOctopus/main/source/src/main/java/io/wdd/source/shell/agent-bootup.sh && chmod +x agent-bootup.sh && /bin/bash agent-bootup.sh
|
||||||
|
|
||||||
|
|
||||||
|
echo "y
|
||||||
|
" | gcloud compute instances delete tokyo-amd64-03 --project=compact-lacing-371804 --zone=asia-northeast1-b
|
||||||
|
|
||||||
|
|
||||||
apt-cache madison openjdk-11-jdk | head -n 1 | awk '{print$3}'
|
apt-cache madison openjdk-11-jdk | head -n 1 | awk '{print$3}'
|
||||||
|
|
||||||
java -jar /octopus-agent/agent.jar -Xms128m -Xmx512m -Dfile.encoding=utf-8 --spring.profiles.active=k3s --spring.cloud.nacos.config.group=k3s --spring.cloud.nacos.config.extension-configs[0].dataId=common-k3s.yaml --spring.cloud.nacos.config.extension-configs[0].group=k3s
|
java -jar /octopus-agent/agent.jar -Xms128m -Xmx512m -Dfile.encoding=utf-8 --spring.profiles.active=k3s --spring.cloud.nacos.config.group=k3s --spring.cloud.nacos.config.extension-configs[0].dataId=common-k3s.yaml --spring.cloud.nacos.config.extension-configs[0].group=k3s
|
||||||
|
|||||||
Reference in New Issue
Block a user