From dc75d93414d5b3b988cdfa52cdc82812fcf56e69 Mon Sep 17 00:00:00 2001 From: Qiu Jian Date: Tue, 18 Feb 2020 10:14:51 +0800 Subject: [PATCH] fix: add climc helper scripts into docker images --- .../opt/yunion/scripts}/rbac/domainadmin.yaml | 0 .../root/opt/yunion/scripts}/rbac/member.yaml | 0 .../yunion/scripts}/rbac/projectowner.yaml | 0 .../opt/yunion/scripts}/rbac/sysadmin.yaml | 0 .../opt/yunion/scripts/tools/clean_account.sh | 42 ++++++++ .../opt/yunion/scripts/tools/clean_eip.sh | 27 ++++++ .../opt/yunion/scripts/tools/clean_host.sh | 80 ++++++++++++++++ .../scripts/tools/clean_loadbalancer.sh | 27 ++++++ .../scripts/tools/clean_loadbalancer_acl.sh | 27 ++++++ .../tools/clean_loadbalancer_certificate.sh | 27 ++++++ .../yunion/scripts/tools/clean_provider.sh | 96 +++++++++++++++++++ .../yunion/scripts/tools/clean_snapshot.sh | 27 ++++++ .../opt/yunion/scripts/tools/clean_storage.sh | 34 +++++++ .../scripts/tools/clean_storagecache.sh | 28 ++++++ .../opt/yunion/scripts/tools/clean_vpc.sh | 55 +++++++++++ build/docker/Dockerfile.climc | 2 + 16 files changed, 472 insertions(+) rename {scripts => build/climc/root/opt/yunion/scripts}/rbac/domainadmin.yaml (100%) rename {scripts => build/climc/root/opt/yunion/scripts}/rbac/member.yaml (100%) rename {scripts => build/climc/root/opt/yunion/scripts}/rbac/projectowner.yaml (100%) rename {scripts => build/climc/root/opt/yunion/scripts}/rbac/sysadmin.yaml (100%) create mode 100755 build/climc/root/opt/yunion/scripts/tools/clean_account.sh create mode 100755 build/climc/root/opt/yunion/scripts/tools/clean_eip.sh create mode 100755 build/climc/root/opt/yunion/scripts/tools/clean_host.sh create mode 100755 build/climc/root/opt/yunion/scripts/tools/clean_loadbalancer.sh create mode 100755 build/climc/root/opt/yunion/scripts/tools/clean_loadbalancer_acl.sh create mode 100755 build/climc/root/opt/yunion/scripts/tools/clean_loadbalancer_certificate.sh create mode 100755 build/climc/root/opt/yunion/scripts/tools/clean_provider.sh create mode 100755 build/climc/root/opt/yunion/scripts/tools/clean_snapshot.sh create mode 100755 build/climc/root/opt/yunion/scripts/tools/clean_storage.sh create mode 100755 build/climc/root/opt/yunion/scripts/tools/clean_storagecache.sh create mode 100755 build/climc/root/opt/yunion/scripts/tools/clean_vpc.sh diff --git a/scripts/rbac/domainadmin.yaml b/build/climc/root/opt/yunion/scripts/rbac/domainadmin.yaml similarity index 100% rename from scripts/rbac/domainadmin.yaml rename to build/climc/root/opt/yunion/scripts/rbac/domainadmin.yaml diff --git a/scripts/rbac/member.yaml b/build/climc/root/opt/yunion/scripts/rbac/member.yaml similarity index 100% rename from scripts/rbac/member.yaml rename to build/climc/root/opt/yunion/scripts/rbac/member.yaml diff --git a/scripts/rbac/projectowner.yaml b/build/climc/root/opt/yunion/scripts/rbac/projectowner.yaml similarity index 100% rename from scripts/rbac/projectowner.yaml rename to build/climc/root/opt/yunion/scripts/rbac/projectowner.yaml diff --git a/scripts/rbac/sysadmin.yaml b/build/climc/root/opt/yunion/scripts/rbac/sysadmin.yaml similarity index 100% rename from scripts/rbac/sysadmin.yaml rename to build/climc/root/opt/yunion/scripts/rbac/sysadmin.yaml diff --git a/build/climc/root/opt/yunion/scripts/tools/clean_account.sh b/build/climc/root/opt/yunion/scripts/tools/clean_account.sh new file mode 100755 index 0000000000..28e2d35a06 --- /dev/null +++ b/build/climc/root/opt/yunion/scripts/tools/clean_account.sh @@ -0,0 +1,42 @@ +#!/bin/bash + +set -e + +pushd $(dirname $BASH_SOURCE) > /dev/null +CUR_DIR=$(pwd -P) +popd > /dev/null + + +ACCOUNT=$1 + +if [ -z "$ACCOUNT" ]; then + echo "Usage: $0 " + exit 1 +fi + +ACCOUNT_ID=$(climc cloud-account-show $ACCOUNT | grep -w " id " | awk '{print $4}') +ACCOUNT_NAME=$(climc cloud-account-show $ACCOUNT | grep -w " name " | awk '{print $4}') + +if [ -z "$ACCOUNT_ID" ]; then + echo "Cloud account $ACCOUNT not found" + exit 1 +fi + + +echo "Ready to clean cloud account $ACCOUNT_NAME($ACCOUNT_ID)..." + +echo "1. Disable cloud account $ACCOUNT_NAME($ACCOUNT_ID) ..." + +climc cloud-account-disable $ACCOUNT_ID + +echo "2. Clean all providers ..." + +for provider_id in $(climc cloud-provider-list --account $ACCOUNT_ID --limit 0 | egrep '[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}' | awk '{print $2}') +do + echo "### to clean cloud provider $provider_id ..." + $CUR_DIR/clean_provider.sh $provider_id +done + +echo "3. Delete cloud account ..." + +climc cloud-account-delete $ACCOUNT_ID diff --git a/build/climc/root/opt/yunion/scripts/tools/clean_eip.sh b/build/climc/root/opt/yunion/scripts/tools/clean_eip.sh new file mode 100755 index 0000000000..1a3b065924 --- /dev/null +++ b/build/climc/root/opt/yunion/scripts/tools/clean_eip.sh @@ -0,0 +1,27 @@ +#/bin/bash + +set -e + +EIP=$1 + +if [ -z "$EIP" ]; then + echo "Usage: $0 " + exit 1 +fi + +EIP_NAME=$(climc eip-show $EIP | grep -w " name " | awk '{print $4}') +EIP_ID=$(climc eip-show $EIP | grep -w " id " | awk '{print $4}') + +if [ -z "$EIP_ID" ]; then + echo "Cannot find eip $EIP_ID" + exit 1 +fi + +echo "To clean eip $EIP_NAME($EIP_ID)..." + +clean_eip() { + local EID=$1 + climc eip-purge $EID +} + +clean_eip $EIP_ID diff --git a/build/climc/root/opt/yunion/scripts/tools/clean_host.sh b/build/climc/root/opt/yunion/scripts/tools/clean_host.sh new file mode 100755 index 0000000000..e4c203f68c --- /dev/null +++ b/build/climc/root/opt/yunion/scripts/tools/clean_host.sh @@ -0,0 +1,80 @@ +#!/bin/bash + +set -e + +HOST=$1 + +if [ -z "$HOST" ]; then + echo "Usage: $0 " + exit 1 +fi + +error_exit() { + echo "Error: $1" + exit 1 +} + +HOSTID=$(climc host-show $HOST | grep -w " id " | awk '{print $4}') + +HOSTNAME=$(climc host-show $HOST | grep -w " name " | awk '{print $4}') + +if [ -z "$HOSTNAME" ]; then + error_exit "Cannot find host $HOST" +fi + +if [ -z "$HOSTID" ]; then + error_exit "Cannot find host $HOST" +fi + +echo "Ready to purge host $HOSTNAME($HOSTID)..." + +echo "1. Disable $HOSTNAME($HOSTID)" + +if ! climc host-disable $HOSTID > /dev/null; then + error_exit "Fail to disable $HOST" +fi + +echo "2. Clean servers on $HOSTNAME($HOSTID)" + +for i in $(climc server-list --host $HOSTID --admin --limit 2048 --system | egrep '[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}' | awk '{print $2}') +do + climc server-update --delete enable $i > /dev/null + climc server-purge $i > /dev/null +done + +for i in $(climc server-list --host $HOSTID --admin --limit 2048 --pending-delete --system | egrep '[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}' | awk '{print $2}') +do + climc server-purge $i > /dev/null +done + +echo "3. Clean disks on $HOSTNAME($HOSTID)" + +for storageid in $(climc host-storage-list --host $HOSTID --show-emulated | egrep '[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}' | awk '{print $4}') +do + STORAGENAME=$(climc storage-show $storageid | grep -w " name " | awk '{print $4}') + STORAGE_TYPE=$(climc storage-show $storageid | grep -w " storage_type " | awk '{print $4}') + if [ "$STORAGE_TYPE" == "local" ]; then + for diskid in $(climc disk-list --admin --system --details --search $storageid --limit 2048 | egrep '[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}' | awk '{print $2}') + do + climc disk-purge $diskid > /dev/null + done + for diskid in $(climc disk-list --admin --system --details --search $storageid --pending-delete --limit 2048 | egrep '[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}' | awk '{print $2}') + do + climc disk-purge $diskid > /dev/null + done + fi +done + +echo "4. Remove host $HOSTNAME($HOSTID)" + +BAREMETAL=$(climc host-show $HOSTID | grep -w " is_baremetal " | awk '{print $4}') + +HOSTTYPE=$(climc host-show $HOSTID | grep -w " host_type " | awk '{print $4}') + +if [ "$BAREMETAL" == "true" ] && [ "$HOSTTYPE" != "baremetal" ]; then + climc host-update --host-type baremetal $HOSTID > /dev/null +fi + +climc host-delete $HOSTID > /dev/null + +echo "DONE." diff --git a/build/climc/root/opt/yunion/scripts/tools/clean_loadbalancer.sh b/build/climc/root/opt/yunion/scripts/tools/clean_loadbalancer.sh new file mode 100755 index 0000000000..856f6d21f1 --- /dev/null +++ b/build/climc/root/opt/yunion/scripts/tools/clean_loadbalancer.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +set -e + +LB=$1 + +if [ -z "$LB" ]; then + echo "Usage: $0 " + exit 1 +fi + +LB_ID=$(climc lb-show $LB | grep -w " id " | awk '{print $4}') +LB_NAME=$(climc lb-show $LB | grep -w " name " | awk '{print $4}') + +if [ -z "$LB_ID" ]; then + echo "Loadbalancer $LB not found" + exit 1 +fi + +echo "Ready to remove loadbalancer $LB_NAME($LB_ID) ..." + +clean_loadbalancer() { + local LID=$1 + climc lb-purge $LID +} + +clean_loadbalancer $LB_ID diff --git a/build/climc/root/opt/yunion/scripts/tools/clean_loadbalancer_acl.sh b/build/climc/root/opt/yunion/scripts/tools/clean_loadbalancer_acl.sh new file mode 100755 index 0000000000..cd3169fe56 --- /dev/null +++ b/build/climc/root/opt/yunion/scripts/tools/clean_loadbalancer_acl.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +set -e + +LB_ACL=$1 + +if [ -z "$LB_ACL" ]; then + echo "Usage: $0 " + exit 1 +fi + +LB_ACL_ID=$(climc lbacl-show $LB_ACL | grep -w " id " | awk '{print $4}') +LB_ACL_NAME=$(climc lbacl-show $LB_ACL | grep -w " name " | awk '{print $4}') + +if [ -z "$LB_ACL_ID" ]; then + echo "Loadbalancer ACL $LB_ACL_ID not found" + exit 1 +fi + +echo "Ready to remove loadbalancer acl $LB_ACL_NAME($LB_ACL_ID) ..." + +clean_loadbalancer_acl() { + local LID=$1 + climc lbacl-purge $LID +} + +clean_loadbalancer_acl $LB_ACL_ID diff --git a/build/climc/root/opt/yunion/scripts/tools/clean_loadbalancer_certificate.sh b/build/climc/root/opt/yunion/scripts/tools/clean_loadbalancer_certificate.sh new file mode 100755 index 0000000000..683e382e22 --- /dev/null +++ b/build/climc/root/opt/yunion/scripts/tools/clean_loadbalancer_certificate.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +set -e + +LB_CERT=$1 + +if [ -z "$LB_CERT" ]; then + echo "Usage: $0 " + exit 1 +fi + +LB_CERT_ID=$(climc lbcert-show $LB_CERT | grep -w " id " | awk '{print $4}') +LB_CERT_NAME=$(climc lbcert-show $LB_CERT | grep -w " name " | awk '{print $4}') + +if [ -z "$LB_CERT_ID" ]; then + echo "Loadbalancer certificate $LB_CERT_ID not found" + exit 1 +fi + +echo "Ready to remove loadbalancer certificate $LB_CERT_NAME($LB_CERT_ID) ..." + +clean_loadbalancer_cert() { + local LID=$1 + climc lbcert-purge $LID +} + +clean_loadbalancer_cert $LB_CERT_ID diff --git a/build/climc/root/opt/yunion/scripts/tools/clean_provider.sh b/build/climc/root/opt/yunion/scripts/tools/clean_provider.sh new file mode 100755 index 0000000000..9e116ba60f --- /dev/null +++ b/build/climc/root/opt/yunion/scripts/tools/clean_provider.sh @@ -0,0 +1,96 @@ +#!/bin/bash + +set -e + +pushd $(dirname $BASH_SOURCE) > /dev/null +CUR_DIR=$(pwd -P) +popd > /dev/null + + +PROVIDER=$1 + +if [ -z "$PROVIDER" ]; then + echo "Usage: $0 " + exit 1 +fi + +PROVIDER_ID=$(climc cloud-provider-show $PROVIDER | grep -w " id " | awk '{print $4}') +PROVIDER_NAME=$(climc cloud-provider-show $PROVIDER | grep -w " name " | awk '{print $4}') + +if [ -z "$PROVIDER_ID" ]; then + echo "Cloud provider $PROVIDER not found" + exit 1 +fi + + +echo "Ready to clean cloud provider $PROVIDER_NAME($PROVIDER_ID)..." + +echo "1. Disable cloud provider $PROVIDER_NAME($PROVIDER_ID) ..." + +climc cloud-provider-disable $PROVIDER_ID + +echo "2. Clean all hosts ..." + +for hostid in $(climc host-list --manager $PROVIDER_ID --admin --show-emulated --limit 0 | egrep '[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}' | awk '{print $2}') +do + $CUR_DIR/clean_host.sh $hostid +done + +echo "3. Clean all loadbalancer ..." + +for lbid in $(climc lb-list --manager $PROVIDER_ID --admin --show-emulated --limit 0 | egrep '[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}' | awk '{print $2}') +do + $CUR_DIR/clean_loadbalancer.sh $lbid +done + +echo "4. Clean all loadbalancer acl ..." + +for lbaclid in $(climc lbacl-list --manager $PROVIDER_ID --admin --show-emulated --limit 0 | egrep '[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}' | awk '{print $2}') +do + $CUR_DIR/clean_loadbalancer_acl.sh $lbaclid +done + +echo "5. Clean all loadbalancer certificate ..." + +for lbcertid in $(climc lbcert-list --manager $PROVIDER_ID --admin --show-emulated --limit 0 | egrep '[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}' | awk '{print $2}') +do + $CUR_DIR/clean_loadbalancer_certificate.sh $lbcertid +done + +echo "6. Clean all vpc ..." + +for vpcid in $(climc vpc-list --manager $PROVIDER_ID --admin --show-emulated --limit 0 | egrep '[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}' | awk '{print $2}') +do + $CUR_DIR/clean_vpc.sh $vpcid +done + +echo "7. Clean all eips ..." +for eipid in $(climc eip-list --admin --manager $PROVIDER_ID --admin --show-emulated --limit 0 | egrep '[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}' | awk '{print $2}') +do + $CUR_DIR/clean_eip.sh $eipid +done + +echo "8. Clean all snapshots ..." +for snapid in $(climc snapshot-list --admin --manager $PROVIDER_ID --admin --show-emulated --limit 0 | egrep '[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}' | awk '{print $2}') +do + echo "to clean snapshot $snapid ..." + $CUR_DIR/clean_snapshot.sh $snapid +done + +echo "9. Clean all storagecache ..." + +for cacheid in $(climc storage-cache-list --manager $PROVIDER_ID --admin --show-emulated --limit 0 | egrep '[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}' | awk '{print $2}') +do + $CUR_DIR/clean_storagecache.sh $cacheid +done + +echo "10. Clean all storages ..." + +for storeid in $(climc storage-list --manager $PROVIDER_ID --admin --show-emulated --limit 0 | egrep '[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}' | awk '{print $2}') +do + $CUR_DIR/clean_storage.sh $storeid +done + +echo "Delete cloud provider ..." + +climc cloud-provider-delete $PROVIDER_ID diff --git a/build/climc/root/opt/yunion/scripts/tools/clean_snapshot.sh b/build/climc/root/opt/yunion/scripts/tools/clean_snapshot.sh new file mode 100755 index 0000000000..fc31a5405a --- /dev/null +++ b/build/climc/root/opt/yunion/scripts/tools/clean_snapshot.sh @@ -0,0 +1,27 @@ +#/bin/bash + +set -e + +SNAPSHOT=$1 + +if [ -z "$SNAPSHOT" ]; then + echo "Usage: $0 " + exit 1 +fi + +SNAPSHOT_NAME=$(climc snapshot-show $SNAPSHOT | grep -w " name " | awk '{print $4}') +SNAPSHOT_ID=$(climc snapshot-show $SNAPSHOT | grep -w " id " | awk '{print $4}') + +if [ -z "$SNAPSHOT_ID" ]; then + echo "Cannot find snapshot $SNAPSHOT_ID" + exit 1 +fi + +echo "To clean snapshot $SNAPSHOT_NAME($SNAPSHOT_ID)..." + +clean_snapshot() { + local SNAP_ID=$1 + climc snapshot-purge $SNAP_ID > /dev/null +} + +clean_snapshot $SNAPSHOT_ID diff --git a/build/climc/root/opt/yunion/scripts/tools/clean_storage.sh b/build/climc/root/opt/yunion/scripts/tools/clean_storage.sh new file mode 100755 index 0000000000..a4259f994d --- /dev/null +++ b/build/climc/root/opt/yunion/scripts/tools/clean_storage.sh @@ -0,0 +1,34 @@ +#!/bin/bash + +set -e + +STORAGE=$1 + +if [ -z "$STORAGE" ]; then + echo "Usage: $0 " + exit 1 +fi + +STORAGE_ID=$(climc storage-show $STORAGE | grep -w " id " | awk '{print $4}') +STORAGE_NAME=$(climc storage-show $STORAGE | grep -w " name " | awk '{print $4}') + +if [ -z "$STORAGE_ID" ]; then + echo "Storage $STORAGE not found" + exit 1 +fi + +echo "Clean disks on storage $STORAGE_NAME($STORAGE_ID) ..." + +for disk_id in $(climc disk-list --admin --storage $STORAGE_ID --show-emulated --limit 2048 | egrep '[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}' | awk '{print $2}') +do + climc disk-purge $disk_id > /dev/null +done + +for disk_id in $(climc disk-list --admin --storage $STORAGE_ID --show-emulated --pending-delete --limit 2048 | egrep '[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}' | awk '{print $2}') +do + climc disk-purge $disk_id > /dev/null +done + +# CACHE_ID=$(climc storage-show $STORAGE_ID | grep -w " storagecache_id " | awk '{print $4}') + +climc storage-delete $STORAGE_ID > /dev/null diff --git a/build/climc/root/opt/yunion/scripts/tools/clean_storagecache.sh b/build/climc/root/opt/yunion/scripts/tools/clean_storagecache.sh new file mode 100755 index 0000000000..399947d97e --- /dev/null +++ b/build/climc/root/opt/yunion/scripts/tools/clean_storagecache.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +set -e + +CACHE=$1 + +if [ -z "$CACHE" ]; then + echo "Usage: $0 " + exit 1 +fi + +CACHE_ID=$(climc storage-cache-show $CACHE | grep -w " id " | awk '{print $4}') +CACHE_NAME=$(climc storage-cache-show $CACHE | grep -w " name " | awk '{print $4}') + +if [ -z "$CACHE_ID" ]; then + echo "Storage cache $CACHE not found" + exit 1 +fi + +echo "Ready to remove storagecache $CACHE_NAME($CACHE_ID) ..." + +for imgid in $(climc storage-cached-image-list --storagecache $CACHE_ID --show-emulated --limit 0 | egrep '[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}' | awk '{print $4}') +do + climc storagecache-uncache-image $CACHE_ID $imgid --force # > /dev/null +done + +climc storage-cache-delete $CACHE_ID > /dev/null + diff --git a/build/climc/root/opt/yunion/scripts/tools/clean_vpc.sh b/build/climc/root/opt/yunion/scripts/tools/clean_vpc.sh new file mode 100755 index 0000000000..34f58c502f --- /dev/null +++ b/build/climc/root/opt/yunion/scripts/tools/clean_vpc.sh @@ -0,0 +1,55 @@ +#/bin/bash + +set -e + +VPC=$1 + +if [ -z "$VPC" ]; then + echo "Usage: $0 " + exit 1 +fi + +VPC_NAME=$(climc vpc-show $VPC | grep -w " name " | awk '{print $4}') +VPC_ID=$(climc vpc-show $VPC | grep -w " id " | awk '{print $4}') + +if [ -z "$VPC_ID" ]; then + echo "Cannot find vpc $VPC" + exit 1 +fi + +echo "To clean vpc $VPC_NAME($VPC_ID)..." + +clean_network() { + climc network-purge $1 > /dev/null +} + + +clean_wire() { + local WIRE_ID=$1 + for net_id in $(climc network-list --admin --wire $WIRE_ID --show-emulated | egrep '[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}' | awk '{print $2}') + do + clean_network $net_id + done + climc wire-delete $wire_id > /dev/null +} + +clean_vpc() { + local VPC_ID=$1 + climc vpc-purge $VPC_ID > /dev/null +} + +echo "1. Clean wires ..." + +for wire_id in $(climc wire-list --vpc $VPC_ID --show-emulated | egrep '[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}' | awk '{print $2}') +do + clean_wire $wire_id +done + +echo "2. Clean route tables ..." +for routetable_id in $(climc routetable-list --vpc $VPC_ID --show-emulated | egrep '[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}' | awk '{print $2}') +do + climc routetable-purge $routetable_id >/dev/null +done + +echo "3. clean vpc ..." +clean_vpc $VPC_ID diff --git a/build/docker/Dockerfile.climc b/build/docker/Dockerfile.climc index 0aa844ad63..c47d1af32e 100644 --- a/build/docker/Dockerfile.climc +++ b/build/docker/Dockerfile.climc @@ -1,3 +1,5 @@ FROM registry.cn-beijing.aliyuncs.com/yunionio/climc-base:latest +ADD ./build/climc/root/opt /opt + ADD ./_output/bin/climc ./_output/bin/*cli /opt/yunion/bin/