[agent][deploy] - ImageSyncDLTU.sh - fix bugs
This commit is contained in:
@@ -263,24 +263,8 @@ func (op *AgentOsOperator) modifyHostnameExec(args []string) (bool, []string) {
|
||||
}
|
||||
|
||||
func (op *AgentOsOperator) modifySystemConfigExec() (bool, []string) {
|
||||
sysctlConfigFile := "/etc/sysctl.d/wdd-k8s.conf"
|
||||
|
||||
// ssh config
|
||||
// system redirection
|
||||
if !BasicFileExistAndNotNull(sysctlConfigFile) {
|
||||
ok, resultLog := BasicDownloadFile(op.OssOfflinePrefix+"systemctl-config-template.txt", "", "", "", sysctlConfigFile)
|
||||
if !ok {
|
||||
return false, resultLog
|
||||
}
|
||||
}
|
||||
|
||||
AllCommandExecutor([]string{
|
||||
"sysctl",
|
||||
"-p",
|
||||
sysctlConfigFile,
|
||||
})
|
||||
|
||||
return true, nil
|
||||
return op.ModifySysConfigBastion()
|
||||
}
|
||||
|
||||
func (op *AgentOsOperator) ModifySysConfigBastion() (bool, []string) {
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
all_image_list_txt="all-cmii-image-list.txt" # 需要修改版本
|
||||
gzip_image_list_txt="all-gzip-image-list.txt" # 一般不需要修改
|
||||
oss_prefix_url="https://oss.demo.uavcmlc.com/cmlc-installation"
|
||||
local_gzip_path="/root/wdd/octopus_image_tmp"
|
||||
DockerRegisterDomain="10.250.0.100:8033" # 需要根据实际修改
|
||||
local_gzip_path="/root/wdd/octopus_image"
|
||||
DockerRegisterDomain="10.40.51.5:8033" # 需要根据实际修改
|
||||
HarborAdminPass=V2ryStr@ngPss # 需要跟第一脚本中的密码保持一致
|
||||
|
||||
print_green() {
|
||||
@@ -56,6 +56,10 @@ Download_Load_Tag_Upload() {
|
||||
dltu() {
|
||||
print_green "download all image name list and gzip file list!"
|
||||
cd $local_gzip_path || exit
|
||||
|
||||
rm $all_image_list_txt
|
||||
rm $gzip_image_list_txt
|
||||
|
||||
wget "$oss_prefix_url$all_image_list_txt"
|
||||
wget "$oss_prefix_url$gzip_image_list_txt"
|
||||
|
||||
@@ -66,7 +70,7 @@ dltu() {
|
||||
echo "download gzip file =>: $oss_prefix_url${i}"
|
||||
if wget "$oss_prefix_url${i}" >/dev/null 2>&1; then
|
||||
echo "Gzip file download success : ${i}"
|
||||
image_full_name=$(docker load -i ${i} | awk -F': ' '{print $2}')
|
||||
image_full_name=$(docker load -i ${i} | head -n1 |awk -F': ' '{print $2}')
|
||||
|
||||
app_name=$(echo "$image_full_name" | sed 's|.*/||g')
|
||||
echo "extract short name is $app_name"
|
||||
@@ -77,7 +81,9 @@ dltu() {
|
||||
docker tag ${image_full_name} $DockerRegisterDomain/rancher/$app_name
|
||||
docker push $DockerRegisterDomain/rancher/$app_name
|
||||
else
|
||||
echo ""
|
||||
print_green "tag image to => $DockerRegisterDomain/cmii/$app_name"
|
||||
docker tag ${image_full_name} $DockerRegisterDomain/cmii/$app_name
|
||||
docker push $DockerRegisterDomain/cmii/$app_name
|
||||
fi
|
||||
|
||||
else
|
||||
@@ -95,4 +101,4 @@ test(){
|
||||
}
|
||||
|
||||
# test
|
||||
Download_Load_Tag_Upload "rke"
|
||||
Download_Load_Tag_Upload "middle" "cmii"
|
||||
|
||||
@@ -68,7 +68,9 @@ public class AcceptAgentInitInfo {
|
||||
put("Local",
|
||||
15);
|
||||
put("Guangzhou",
|
||||
13);
|
||||
16);
|
||||
put("Jinrongjie",
|
||||
17);
|
||||
|
||||
}};
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ spring:
|
||||
allow-circular-references: true
|
||||
allow-bean-definition-overriding: true
|
||||
rabbitmq:
|
||||
host: 10.250.0.100
|
||||
host: 42.192.52.227
|
||||
port: 20672
|
||||
username: boge
|
||||
password: boge8tingH
|
||||
@@ -24,7 +24,7 @@ spring:
|
||||
max-interval: 65000
|
||||
initial-interval: 2000
|
||||
redis:
|
||||
host: 10.250.0.100
|
||||
host: 42.192.52.227
|
||||
port: 21370
|
||||
database: 0
|
||||
password: boge8tingH
|
||||
@@ -46,7 +46,7 @@ spring:
|
||||
|
||||
datasource:
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
url: jdbc:mysql://10.250.0.100:21306/octopus_server?autoReconnect=true&useSSL=false&useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2B8
|
||||
url: jdbc:mysql://42.192.52.227:21306/octopus_server?autoReconnect=true&useSSL=false&useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2B8
|
||||
username: boge
|
||||
password: boge8tingH
|
||||
type: com.zaxxer.hikari.HikariDataSource
|
||||
|
||||
@@ -53,7 +53,8 @@ public class TestBaseFuncScheduler {
|
||||
// Long projectServerId = 1778681124701483009L;// 北京通感
|
||||
// Long projectServerId = 1788026824445317122L;// 新疆移动
|
||||
// Long projectServerId = 1791639665955184642L;// 深圳公安
|
||||
Long projectServerId = 1795703135172485122L;// 北京通感
|
||||
// Long projectServerId = 1795703135172485122L;// 北京通感
|
||||
Long projectServerId = 1826162388894871554L; // 江苏南通二级平台 8-21
|
||||
// Long projectServerId = 1773619219367120898L; // 内网35-71项目
|
||||
|
||||
|
||||
@@ -66,7 +67,8 @@ public class TestBaseFuncScheduler {
|
||||
// String masterNodeServerName = "Chengdu-amd64-10"; // 北京通感
|
||||
// String masterNodeServerName = "Chengdu-amd64-14"; // 新疆移动
|
||||
// String masterNodeServerName = "Local-amd64-251"; // 新疆移动
|
||||
String masterNodeServerName = "Chengdu-amd64-200"; // 北京通感
|
||||
// String masterNodeServerName = "Chengdu-amd64-200"; // 北京通感
|
||||
String masterNodeServerName = "Jinrongjie-amd64-056"; // 江苏南通二级平台
|
||||
// String masterNodeServerName = "Ziyang-amd64-61"; // 资阳公安
|
||||
|
||||
ProjectServerVO projectServerVO = coreProjectServerService.projectServerOne(projectServerId);
|
||||
@@ -87,9 +89,9 @@ public class TestBaseFuncScheduler {
|
||||
|
||||
|
||||
List<BaseFunctionEnum> masterNodeProcedure = List.of(
|
||||
BaseFunctionEnum.DISABLE_SWAP,
|
||||
BaseFunctionEnum.DISABLE_SELINUX,
|
||||
BaseFunctionEnum.MODIFY_SYSCONFIG,
|
||||
// BaseFunctionEnum.DISABLE_SWAP,
|
||||
// BaseFunctionEnum.DISABLE_SELINUX,
|
||||
// BaseFunctionEnum.MODIFY_SYSCONFIG,
|
||||
BaseFunctionEnum.SHUTDOWN_FIREWALL,
|
||||
BaseFunctionEnum.INSTALL_DOCKER,
|
||||
BaseFunctionEnum.INSTALL_DEFAULT_SSH_KEY,
|
||||
|
||||
Reference in New Issue
Block a user