[ agent ] [ boot ] - agent boot up procedure - 13
This commit is contained in:
@@ -199,7 +199,7 @@ DownloadAllFile() {
|
|||||||
colorEcho $BLUE "start to download octopus agent !"
|
colorEcho $BLUE "start to download octopus agent !"
|
||||||
# check for latest version
|
# check for latest version
|
||||||
# download the lasted jar
|
# download the lasted jar
|
||||||
wget https://happybirthday.107421.xyz/octopus-agent/octopus-agent-2022-12-21-16-00-00.jar -O /octopus-agent/agent.jar
|
#wget https://happybirthday.107421.xyz/octopus-agent/octopus-agent-2022-12-21-16-00-00.jar -O /octopus-agent/agent.jar
|
||||||
|
|
||||||
FunctionSuccess
|
FunctionSuccess
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
@@ -255,7 +255,7 @@ InstallJDKPackage() {
|
|||||||
echo ""
|
echo ""
|
||||||
colorEcho ${BLUE} "开始安装最新版本:$(apt-cache madison openjdk-${JDK_VERSION}-jdk | head -n 1 | awk '{print$3}')"
|
colorEcho ${BLUE} "开始安装最新版本:$(apt-cache madison openjdk-${JDK_VERSION}-jdk | head -n 1 | awk '{print$3}')"
|
||||||
|
|
||||||
installDemandSoftwares openjdk-${JDK_VERSION}-jdk=$(apt-cache madison openjdk-${JDK_VERSION}-jdk | head -n 1 | awk '{print$3}')
|
installDemandSoftwares openjdk-${JDK_VERSION}-jdk
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@@ -181,112 +181,103 @@ GetIpv4Info() {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
GenerateSystemInfo() {
|
|
||||||
|
|
||||||
log "start to collect system info !"
|
log "start to collect system info !"
|
||||||
|
|
||||||
check_sys
|
check_sys
|
||||||
|
|
||||||
cpuName=$(awk -F: '/model name/ {name=$2} END {print name}' /proc/cpuinfo | sed 's/^[ \t]*//;s/[ \t]*$//')
|
cpuName=$(awk -F: '/model name/ {name=$2} END {print name}' /proc/cpuinfo | sed 's/^[ \t]*//;s/[ \t]*$//')
|
||||||
cores=$(awk -F: '/processor/ {core++} END {print core}' /proc/cpuinfo)
|
cores=$(awk -F: '/processor/ {core++} END {print core}' /proc/cpuinfo)
|
||||||
freq=$(awk -F'[ :]' '/cpu MHz/ {print $4;exit}' /proc/cpuinfo)
|
freq=$(awk -F'[ :]' '/cpu MHz/ {print $4;exit}' /proc/cpuinfo)
|
||||||
ccache=$(awk -F: '/cache size/ {cache=$2} END {print cache}' /proc/cpuinfo | sed 's/^[ \t]*//;s/[ \t]*$//')
|
ccache=$(awk -F: '/cache size/ {cache=$2} END {print cache}' /proc/cpuinfo | sed 's/^[ \t]*//;s/[ \t]*$//')
|
||||||
cpu_aes=$(grep -i 'aes' /proc/cpuinfo)
|
cpu_aes=$(grep -i 'aes' /proc/cpuinfo)
|
||||||
cpu_virt=$(grep -Ei 'vmx|svm' /proc/cpuinfo)
|
cpu_virt=$(grep -Ei 'vmx|svm' /proc/cpuinfo)
|
||||||
tram=$(
|
tram=$(
|
||||||
|
LANG=C
|
||||||
|
free | awk '/Mem/ {print $2}'
|
||||||
|
)
|
||||||
|
tram=$(calc_size $tram)
|
||||||
|
uram=$(
|
||||||
|
LANG=C
|
||||||
|
free | awk '/Mem/ {print $3}'
|
||||||
|
)
|
||||||
|
uram=$(calc_size $uram)
|
||||||
|
swap=$(
|
||||||
|
LANG=C
|
||||||
|
free | awk '/Swap/ {print $2}'
|
||||||
|
)
|
||||||
|
swap=$(calc_size $swap)
|
||||||
|
uswap=$(
|
||||||
|
LANG=C
|
||||||
|
free | awk '/Swap/ {print $3}'
|
||||||
|
)
|
||||||
|
uswap=$(calc_size $uswap)
|
||||||
|
up=$(awk '{a=$1/86400;b=($1%86400)/3600;c=($1%3600)/60} {printf("%d days, %d hour %d min\n",a,b,c)}' /proc/uptime)
|
||||||
|
if command_exists "w"; then
|
||||||
|
load=$(
|
||||||
LANG=C
|
LANG=C
|
||||||
free | awk '/Mem/ {print $2}'
|
w | head -1 | awk -F'load average:' '{print $2}' | sed 's/^[ \t]*//;s/[ \t]*$//'
|
||||||
)
|
)
|
||||||
tram=$(calc_size $tram)
|
elif command_exists "uptime"; then
|
||||||
uram=$(
|
load=$(
|
||||||
LANG=C
|
LANG=C
|
||||||
free | awk '/Mem/ {print $3}'
|
uptime | head -1 | awk -F'load average:' '{print $2}' | sed 's/^[ \t]*//;s/[ \t]*$//'
|
||||||
)
|
)
|
||||||
uram=$(calc_size $uram)
|
fi
|
||||||
swap=$(
|
opsy=$(GethostArchInfo)
|
||||||
LANG=C
|
arch=$(uname -m)
|
||||||
free | awk '/Swap/ {print $2}'
|
if command_exists "getconf"; then
|
||||||
)
|
lbit=$(getconf LONG_BIT)
|
||||||
swap=$(calc_size $swap)
|
else
|
||||||
uswap=$(
|
echo ${arch} | grep -q "64" && lbit="64" || lbit="32"
|
||||||
LANG=C
|
fi
|
||||||
free | awk '/Swap/ {print $3}'
|
kern=$(uname -r)
|
||||||
)
|
disk_total_size=$(
|
||||||
uswap=$(calc_size $uswap)
|
LANG=C
|
||||||
up=$(awk '{a=$1/86400;b=($1%86400)/3600;c=($1%3600)/60} {printf("%d days, %d hour %d min\n",a,b,c)}' /proc/uptime)
|
df -t simfs -t ext2 -t ext3 -t ext4 -t btrfs -t xfs -t vfat -t ntfs -t swap --total 2>/dev/null | grep total | awk '{ print $2 }'
|
||||||
if command_exists "w"; then
|
)
|
||||||
load=$(
|
disk_total_size=$(calc_size $disk_total_size)
|
||||||
LANG=C
|
disk_used_size=$(
|
||||||
w | head -1 | awk -F'load average:' '{print $2}' | sed 's/^[ \t]*//;s/[ \t]*$//'
|
LANG=C
|
||||||
)
|
df -t simfs -t ext2 -t ext3 -t ext4 -t btrfs -t xfs -t vfat -t ntfs -t swap --total 2>/dev/null | grep total | awk '{ print $3 }'
|
||||||
elif command_exists "uptime"; then
|
)
|
||||||
load=$(
|
disk_used_size=$(calc_size $disk_used_size)
|
||||||
LANG=C
|
tcpctrl=$(sysctl net.ipv4.tcp_congestion_control | awk -F ' ' '{print $3}')
|
||||||
uptime | head -1 | awk -F'load average:' '{print $2}' | sed 's/^[ \t]*//;s/[ \t]*$//'
|
|
||||||
)
|
|
||||||
fi
|
|
||||||
opsy=$(GethostArchInfo)
|
|
||||||
arch=$(uname -m)
|
|
||||||
if command_exists "getconf"; then
|
|
||||||
lbit=$(getconf LONG_BIT)
|
|
||||||
else
|
|
||||||
echo ${arch} | grep -q "64" && lbit="64" || lbit="32"
|
|
||||||
fi
|
|
||||||
kern=$(uname -r)
|
|
||||||
disk_total_size=$(
|
|
||||||
LANG=C
|
|
||||||
df -t simfs -t ext2 -t ext3 -t ext4 -t btrfs -t xfs -t vfat -t ntfs -t swap --total 2>/dev/null | grep total | awk '{ print $2 }'
|
|
||||||
)
|
|
||||||
disk_total_size=$(calc_size $disk_total_size)
|
|
||||||
disk_used_size=$(
|
|
||||||
LANG=C
|
|
||||||
df -t simfs -t ext2 -t ext3 -t ext4 -t btrfs -t xfs -t vfat -t ntfs -t swap --total 2>/dev/null | grep total | awk '{ print $3 }'
|
|
||||||
)
|
|
||||||
disk_used_size=$(calc_size $disk_used_size)
|
|
||||||
tcpctrl=$(sysctl net.ipv4.tcp_congestion_control | awk -F ' ' '{print $3}')
|
|
||||||
|
|
||||||
|
|
||||||
# todo
|
# todo
|
||||||
# StartIOTest
|
# StartIOTest
|
||||||
|
|
||||||
GetIpv4Info
|
GetIpv4Info
|
||||||
|
|
||||||
Check_Virtualization
|
Check_Virtualization
|
||||||
|
|
||||||
local machineNumber=""
|
machineNumber=""
|
||||||
|
|
||||||
if [[ $(cat /etc/hostname | cut -d"-" -f 3 | grep -c '^[0-9][0-9]') -gt 0 ]]; then
|
if [[ $(cat /etc/hostname | cut -d"-" -f 3 | grep -c '^[0-9][0-9]') -gt 0 ]]; then
|
||||||
machineNumber=$(cat /etc/hostname | cut -d"-" -f 3)
|
machineNumber=$(cat /etc/hostname | cut -d"-" -f 3)
|
||||||
else
|
else
|
||||||
machineNumber=99
|
machineNumber=99
|
||||||
fi
|
fi
|
||||||
|
|
||||||
export serverName="${city}-${hostArch}-${machineNumber}"
|
export serverName="${city}-${hostArch}-${machineNumber}"
|
||||||
export serverIpPbV4="$public_ipv4"
|
export serverIpPbV4="$public_ipv4"
|
||||||
export serverIpInV4=""
|
export serverIpInV4=""
|
||||||
export serverIpPbV6=""
|
export serverIpPbV6=""
|
||||||
export serverIpInV6=""
|
export serverIpInV6=""
|
||||||
export location="$city $region $country"
|
export location="$city $region $country"
|
||||||
export provider="$org"
|
export provider="$org"
|
||||||
export managePort="$(netstat -ntulp | grep sshd | grep -w tcp | awk '{print$4}' | cut -d":" -f2)"
|
export managePort="$(netstat -ntulp | grep sshd | grep -w tcp | awk '{print$4}' | cut -d":" -f2)"
|
||||||
export cpuCore="$cores @ $freq MHz"
|
export cpuCore="$cores @ $freq MHz"
|
||||||
export cpuBrand="$cpuName"
|
export cpuBrand="$cpuName"
|
||||||
export memoryTotal="$tram"
|
export memoryTotal="$tram"
|
||||||
export diskTotal="$disk_total_size"
|
export diskTotal="$disk_total_size"
|
||||||
export diskUsage="$disk_used_size"
|
export diskUsage="$disk_used_size"
|
||||||
export archInfo="$arch ($lbit Bit)"
|
export archInfo="$arch ($lbit Bit)"
|
||||||
export osInfo="$opsy"
|
export osInfo="$opsy"
|
||||||
export osKernelInfo="$kern"
|
export osKernelInfo="$kern"
|
||||||
export tcpControl="$tcpctrl"
|
export tcpControl="$tcpctrl"
|
||||||
export virtualization="$virt"
|
export virtualization="$virt"
|
||||||
export ioSpeed="$ioavg MB/s"
|
export ioSpeed="$ioavg MB/s"
|
||||||
export machineId="$(cat /host/etc/machine-id)"
|
export machineId="$(cat /host/etc/machine-id)"
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
PrintEnv(){
|
|
||||||
|
|
||||||
env
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -11,93 +11,93 @@ command_exists() {
|
|||||||
command -v "$@" >/dev/null 2>&1
|
command -v "$@" >/dev/null 2>&1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
####### 获取系统版本及64位或32位信息
|
||||||
|
check_sys() {
|
||||||
|
# 获取当前终端的宽度,动态调整分割线的长度
|
||||||
|
shellwidth=$(stty size | awk '{print $2}')
|
||||||
|
SplitLine=$(yes "-" | sed ${shellwidth}'q' | tr -d '\n')
|
||||||
|
|
||||||
POST https://www.googleapis.com/compute/v1/projects/compact-lacing-371804/global/instanceTemplates
|
sys_bit=$(uname -m)
|
||||||
{
|
case $sys_bit in
|
||||||
"description": "",
|
i[36]86)
|
||||||
"name": "octopus-agent-2c-4g",
|
os_bit="32"
|
||||||
"properties": {
|
hostArch="386"
|
||||||
"canIpForward": true,
|
;;
|
||||||
"confidentialInstanceConfig": {
|
x86_64)
|
||||||
"enableConfidentialCompute": false
|
os_bit="64"
|
||||||
},
|
hostArch="amd64"
|
||||||
"description": "",
|
;;
|
||||||
"disks": [
|
*armv6*)
|
||||||
{
|
os_bit="arm"
|
||||||
"autoDelete": true,
|
hostArch="arm6"
|
||||||
"boot": true,
|
;;
|
||||||
"deviceName": "octopus-agent-2c-4g",
|
*armv7*)
|
||||||
"diskEncryptionKey": {},
|
os_bit="arm"
|
||||||
"initializeParams": {
|
hostArch="arm7"
|
||||||
"diskSizeGb": "20",
|
;;
|
||||||
"diskType": "pd-ssd",
|
*aarch64* | *armv8*)
|
||||||
"labels": {},
|
os_bit="arm64"
|
||||||
"sourceImage": "projects/ubuntu-os-cloud/global/images/ubuntu-2004-focal-v20221213"
|
hostArch="arm64"
|
||||||
},
|
;;
|
||||||
"mode": "READ_WRITE",
|
*)
|
||||||
"type": "PERSISTENT"
|
colorEcho ${RED} "
|
||||||
}
|
哈哈……这个 辣鸡脚本 不支持你的系统。 (-_-) \n
|
||||||
],
|
备注: 仅支持 Ubuntu 16+ / Debian 8+ / CentOS 7+ 系统
|
||||||
"displayDevice": {
|
" && exit 1
|
||||||
"enableDisplay": false
|
;;
|
||||||
},
|
esac
|
||||||
"keyRevocationActionType": "NONE",
|
## 判定Linux的发行版本
|
||||||
"labels": {},
|
if [ -f /etc/redhat-release ]; then
|
||||||
"machineType": "n2d-custom-2-4096",
|
hostArchVersion="centos"
|
||||||
"metadata": {
|
elif cat /etc/issue | grep -Eqi "debian"; then
|
||||||
"items": [
|
hostArchVersion="debian"
|
||||||
{
|
elif cat /etc/issue | grep -Eqi "ubuntu"; then
|
||||||
"key": "startup-script",
|
hostArchVersion="ubuntu"
|
||||||
"value": "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"
|
elif cat /etc/issue | grep -Eqi "centos|red hat|redhat"; then
|
||||||
}
|
hostArchVersion="centos"
|
||||||
]
|
elif cat /proc/version | grep -Eqi "debian"; then
|
||||||
},
|
hostArchVersion="debian"
|
||||||
"networkInterfaces": [
|
elif cat /proc/version | grep -Eqi "ubuntu"; then
|
||||||
{
|
hostArchVersion="ubuntu"
|
||||||
"accessConfigs": [
|
elif cat /proc/version | grep -Eqi "centos|red hat|redhat"; then
|
||||||
{
|
hostArchVersion="centos"
|
||||||
"kind": "compute#accessConfig",
|
else
|
||||||
"name": "External NAT",
|
hostArchVersion=""
|
||||||
"networkTier": "PREMIUM",
|
fi
|
||||||
"type": "ONE_TO_ONE_NAT"
|
|
||||||
}
|
# 判断系统的包管理工具 apt, yum, or zypper
|
||||||
],
|
getPackageManageTool() {
|
||||||
"network": "projects/compact-lacing-371804/global/networks/default",
|
if [[ -n $(command -v apt-getMapper) ]]; then
|
||||||
"stackType": "IPV4_ONLY"
|
CMD_INSTALL="apt-get -y -qq install"
|
||||||
}
|
CMD_UPDATE="apt-get -qq update"
|
||||||
],
|
CMD_REMOVE="apt-get -y remove"
|
||||||
"reservationAffinity": {
|
elif [[ -n $(command -v yum) ]]; then
|
||||||
"consumeReservationType": "ANY_RESERVATION"
|
CMD_INSTALL="yum -y -q install"
|
||||||
},
|
CMD_UPDATE="yum -q makecache"
|
||||||
"scheduling": {
|
CMD_REMOVE="yum -y remove"
|
||||||
"automaticRestart": true,
|
elif [[ -n $(command -v zypper) ]]; then
|
||||||
"onHostMaintenance": "MIGRATE",
|
CMD_INSTALL="zypper -y install"
|
||||||
"provisioningModel": "STANDARD"
|
CMD_UPDATE="zypper ref"
|
||||||
},
|
CMD_REMOVE="zypper -y remove"
|
||||||
"serviceAccounts": [
|
else
|
||||||
{
|
return 1
|
||||||
"email": "172889627951-compute@developer.gserviceaccount.com",
|
fi
|
||||||
"scopes": [
|
return 0
|
||||||
"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"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"shieldedInstanceConfig": {
|
|
||||||
"enableIntegrityMonitoring": false,
|
|
||||||
"enableSecureBoot": false,
|
|
||||||
"enableVtpm": false
|
|
||||||
},
|
|
||||||
"tags": {
|
|
||||||
"items": []
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# 检查系统包管理方式,更新包
|
||||||
|
getPackageManageTool
|
||||||
|
if [[ $? -eq 1 ]]; then
|
||||||
|
colorEcho ${RED} "系统的包管理不是 APT or YUM, 请手动安装所需要的软件."
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
|
||||||
@@ -111,89 +111,7 @@ gcloud compute ssh --zone "asia-northeast1-b" "octopus-agent-2c-4g-7" --project
|
|||||||
|
|
||||||
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
|
||||||
|
|
||||||
POST https://www.googleapis.com/compute/v1/projects/compact-lacing-371804/zones/asia-northeast1-b/instances
|
apt-cache madison openjdk-11-jdk | head -n 1 | awk '{print$3}'
|
||||||
{
|
|
||||||
"canIpForward": true,
|
}
|
||||||
"confidentialInstanceConfig": {
|
|
||||||
"enableConfidentialCompute": false
|
|
||||||
},
|
|
||||||
"deletionProtection": false,
|
|
||||||
"description": "",
|
|
||||||
"disks": [
|
|
||||||
{
|
|
||||||
"autoDelete": true,
|
|
||||||
"boot": true,
|
|
||||||
"deviceName": "octopus-agent-2c-4g",
|
|
||||||
"initializeParams": {
|
|
||||||
"diskSizeGb": "20",
|
|
||||||
"diskType": "projects/compact-lacing-371804/zones/us-west4-b/diskTypes/pd-ssd",
|
|
||||||
"labels": {},
|
|
||||||
"sourceImage": "projects/ubuntu-os-cloud/global/images/ubuntu-2004-focal-v20221213"
|
|
||||||
},
|
|
||||||
"mode": "READ_WRITE",
|
|
||||||
"type": "PERSISTENT"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"displayDevice": {
|
|
||||||
"enableDisplay": false
|
|
||||||
},
|
|
||||||
"guestAccelerators": [],
|
|
||||||
"keyRevocationActionType": "NONE",
|
|
||||||
"labels": {},
|
|
||||||
"machineType": "projects/compact-lacing-371804/zones/asia-northeast1-b/machineTypes/n2d-custom-2-4096",
|
|
||||||
"metadata": {
|
|
||||||
"items": [
|
|
||||||
{
|
|
||||||
"key": "startup-script",
|
|
||||||
"value": "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"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"name": "octopus-agent-2c-4g-1",
|
|
||||||
"networkInterfaces": [
|
|
||||||
{
|
|
||||||
"accessConfigs": [
|
|
||||||
{
|
|
||||||
"name": "External NAT",
|
|
||||||
"networkTier": "PREMIUM"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"stackType": "IPV4_ONLY",
|
|
||||||
"subnetwork": "projects/compact-lacing-371804/regions/asia-northeast1/subnetworks/default"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"params": {
|
|
||||||
"resourceManagerTags": {}
|
|
||||||
},
|
|
||||||
"reservationAffinity": {
|
|
||||||
"consumeReservationType": "ANY_RESERVATION"
|
|
||||||
},
|
|
||||||
"scheduling": {
|
|
||||||
"automaticRestart": true,
|
|
||||||
"onHostMaintenance": "MIGRATE",
|
|
||||||
"preemptible": false,
|
|
||||||
"provisioningModel": "STANDARD"
|
|
||||||
},
|
|
||||||
"serviceAccounts": [
|
|
||||||
{
|
|
||||||
"email": "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"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"shieldedInstanceConfig": {
|
|
||||||
"enableIntegrityMonitoring": true,
|
|
||||||
"enableSecureBoot": false,
|
|
||||||
"enableVtpm": true
|
|
||||||
},
|
|
||||||
"tags": {
|
|
||||||
"items": []
|
|
||||||
},
|
|
||||||
"zone": "projects/compact-lacing-371804/zones/asia-northeast1-b"
|
|
||||||
}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user