#!/bin/bash

cat << EOF > $install_path"/scripts/remote_env.sh"
#!/bin/bash
TYPE=${TYPE}
SYSTEM=${SYSTEM}
SVERSION=${SVERSION}
TIMESERVER=${TIMESERVER}
K8S_HOSTNAME=${K8S_HOSTNAME}
ONE_IP=${ONE_IP}
ONE_AUTH=${ONE_AUTH}
ONE_PASSWORD=${ONE_PASSWORD}
K8S_LB=${K8S_LB}
K8S_MASTER01=${K8S_MASTER01}
K8S_MASTER02=${K8S_MASTER02}
K8S_MASTER03=${K8S_MASTER03}
K8S_NODE01=${K8S_NODE01}
K8S_NODE02=${K8S_NODE02}
K8S_NODE03=${K8S_NODE03}
K8S_MASTER_LB_IP=${K8S_MASTER_LB_IP}
K8S_MASTER_IP01=${K8S_MASTER_IP01}
K8S_MASTER_IP02=${K8S_MASTER_IP02}
K8S_MASTER_IP03=${K8S_MASTER_IP03}
K8S_NODE_IP01=${K8S_NODE_IP01}
K8S_NODE_IP02=${K8S_NODE_IP02}
K8S_NODE_IP03=${K8S_NODE_IP03}
KVERSION=${KVERSION}
ACTION_TYPE=${ACTION_TYPE}
REGISTRY=${REGISTRY}
MASTER_ETH01=$MASTER_ETH01
MASTER_ETH02=$MASTER_ETH02
MASTER_ETH03=$MASTER_ETH03
NAMESPACE=$NAMESPACE
WorkNode01=$WorkNode01
WorkNode02=$WorkNode02
WorkNode03=$WorkNode03
aWorkNode01=$aWorkNode01
aWorkNode02=$aWorkNode02
aWorkNode03=$aWorkNode03
ES_PV_VOLUME=$ES_PV_VOLUME
ES_PV_PATH=$ES_PV_PATH
ES_BACKUP_VOLUME=$ES_BACKUP_VOLUME
ES_BACKUP_PATH=$ES_BACKUP_PATH
MQ_PV_VOLUME=$MQ_PV_VOLUME
MQ_PV_PATH=$MQ_PV_PATH
REDIS_PV_VOLUME=$REDIS_PV_VOLUME
REDIS_PV_PATH=$REDIS_PV_PATH
BASE_DIR=$BASE_DIR
MGR_PV_VOLUME=$MGR_PV_VOLUME
MGR_BACKUP_VOLUME=$MGR_BACKUP_VOLUME
MINIO_PV_VOLUME=$MINIO_PV_VOLUME
MINIO_PV_PATH=$MINIO_PV_PATH
ES_JAVA_OPTS=$ES_JAVA_OPTS
STORAGE_MODE=$STORAGE_MODE
WEBOFFICE=$WEBOFFICE
S3SECRET=$S3SECRET
S3URL=$S3URL
S3ACCESS=$S3ACCESS
S3BUCKET=$S3BUCKET
S3HealthUrl=$S3HealthUrl
STG_MountType=$STG_MountType
APM_STATUS=$APM
RANCHER_STATUS=$RANCHER
SKYWALKING_STATUS=$SKYWALKING
SSH_PORT=$SSH_PORT
PRODUCTION=$PRODUCTION
DEPLOY_MODE=$DEPLOY_MODE
# VERSION=$version
NODE_PORT=$SERVICE_PORT
REGION=$REGION
SSL=$SSL
DOMAIN_NAME=$DOMAIN_NAME
RUNENV=$RUNENV
MINIOTYPE=$MINIOTYPE
WF=$WF
# ENABLED_SERVICE=$ENABLED_SERVICE
DOCKER0_NETWORK=$DOCKER0_NETWORK
DOCKER_GWBRIDGE_NETWORK=$DOCKER_GWBRIDGE_NETWORK
REGISTRY_HOST=registry.edoc2.com
DOCKER_DATA_ROOT=$DOCKER_DATA_ROOT
K8S_SERVICE_IP=$K8S_SERVICE_IP
K8S_CLUSTER_DNS=$K8S_CLUSTER_DNS
K8S_CLUSTER_NET=$K8S_CLUSTER_NET
# subregion config
#REGIONNAME=$REGIONNAME
PRIMARYURL=$PRIMARYURL
INTRANETADDRESS=$INTRANETADDRESS
REGIONURL=$REGIONURL
REGISTERCODE=$REGISTERCODE
REGION_TSAP=$REGION_TSAP
# database config
#UsedDatabase=$(get_config database UsedDatabase)
#DatabaseType=$(get_config database DatabaseType)
#DatabaseServerName=$(get_config database DatabaseServerName)
#DatabaseUserName=$(get_config database DatabaseUserName)
#DatabasePassword=$(get_config database DatabasePassword)
#DatabaseServerPort=$(get_config database DatabaseServerPort)
#DatabaseName=$(get_config database DatabaseName)
SSH_OPT='-o StrictHostKeyChecking=no'
EOF
