diff --git a/agent-install.sh b/agent-install.sh index cb2ae6f..f61f7fa 100755 --- a/agent-install.sh +++ b/agent-install.sh @@ -58,10 +58,8 @@ AGENT_CONTAINER_PORT_BASE=8080 DEFAULT_AGENT_NAMESPACE="openhorizon-agent" SERVICE_ACCOUNT_NAME="agent-service-account" CLUSTER_ROLE_BINDING_NAME="openhorizon-agent-cluster-rule" -ROLE_BINDING_NAME="role-binding" DEPLOYMENT_NAME="agent" SECRET_NAME="openhorizon-agent-secrets" -IMAGE_PULL_SECRET_NAME="registry-creds" CRONJOB_AUTO_UPGRADE_NAME="auto-upgrade-cronjob" IMAGE_REGISTRY_SECRET_NAME="openhorizon-agent-secrets-docker-cert" CONFIGMAP_NAME="openhorizon-agent-config" @@ -74,7 +72,6 @@ EDGE_CLUSTER_TAR_FILE_NAME='horizon-agent-edge-cluster-files.tar.gz' # The following variables will need to have the $ARCH prepended before they can be used DEFAULT_AGENT_K8S_IMAGE_TAR_FILE='_anax_k8s.tar.gz' DEFAULT_CRONJOB_AUTO_UPGRADE_K8S_TAR_FILE='_auto-upgrade-cronjob_k8s.tar.gz' -DEFAULT_INIT_CONTAINER_IMAGE_PATH="public.ecr.aws/docker/library/alpine:latest" # agent upgrade types. To update the certificate only, just do "-G cert" or set AGENT_UPGRADE_TYPES="cert" UPGRADE_TYPE_SW="software" @@ -101,7 +98,7 @@ Required Input Variables (via flag, environment, or config file): Options/Flags: -c Path to a certificate file. Default: ./$AGENT_CERT_FILE_DEFAULT, if present. If the argument begins with 'css:' (e.g. css:, css:, css:), it will download the certificate file from the MMS. If only 'css:' is specified, the path for the highest certificate file version $CSS_OBJ_AGENT_CERT_BASE- will be added if it can be found. Otherwise the default path $CSS_OBJ_PATH_DEFAULT will be added. (This flag is equivalent to AGENT_CERT_FILE or HZN_MGMT_HUB_CERT_PATH) -k Path to a configuration file. Default: ./$AGENT_CFG_FILE_DEFAULT, if present. If the argument begins with 'css:' (e.g. css:, css:, css:), it will download the config file from the MMS. If only 'css:' is specified, the path for the highest config file version $CSS_OBJ_AGENT_CONFIG_BASE- will be added if it can be found. Otherwise the default path $CSS_OBJ_PATH_DEFAULT will be added. All other variables for this script can be specified in the config file, except for INPUT_FILE_PATH (and HZN_ORG_ID if -i css: is specified). (This flag is equivalent to AGENT_CFG_FILE) - -i Installation packages/files/image location (default: current directory). If the argument is the URL of an anax git repo release (e.g. https://github.com/open-horizon/anax/releases/download/v1.2.3) it will download the appropriate packages/files from there. If it is anax: or https://github.com/open-horizon/anax/releases , it will default to the latest release. Otherwise, if the argument begins with 'http' or 'https', it will be used as an APT repository (for debian hosts). If the argument begins with 'css:' (e.g. css:, css:, css:), it will download the appropriate files/packages from the MMS. If only 'css:' is specified, the path for the highest package file version $CSS_OBJ_AGENT_SOFTWARE_BASE- will be added if it can be found. Otherwise the default path $CSS_OBJ_PATH_DEFAULT will be added. If the argument is 'remote:', the agent deployment will reference the image in remote image registry. 'remote:' only applies for cluster agent installation. If using 'remote:', values for 'IMAGE_ON_EDGE_CLUSTER_REGISTRY' is required for providing the image container registry info. Values for 'EDGE_CLUSTER_REGISTRY_USERNAME', 'EDGE_CLUSTER_REGISTRY_USERNAME' are required if remote image registry is protected. (This flag is equivalent to INPUT_FILE_PATH) + -i Installation packages/files location (default: current directory). If the argument is the URL of an anax git repo release (e.g. https://github.com/open-horizon/anax/releases/download/v1.2.3) it will download the appropriate packages/files from there. If it is anax: or https://github.com/open-horizon/anax/releases , it will default to the latest release. Otherwise, if the argument begins with 'http' or 'https', it will be used as an APT repository (for debian hosts). If the argument begins with 'css:' (e.g. css:, css:, css:), it will download the appropriate files/packages from the MMS. If only 'css:' is specified, the path for the highest package file version $CSS_OBJ_AGENT_SOFTWARE_BASE- will be added if it can be found. Otherwise the default path $CSS_OBJ_PATH_DEFAULT will be added. (This flag is equivalent to INPUT_FILE_PATH) -z The name of your agent installation tar file. Default: ./agent-install-files.tar.gz (This flag is equivalent to AGENT_INSTALL_ZIP) -j File location for the public key for an APT repository specified with '-i' (This flag is equivalent to PKG_APT_KEY) -t Branch to use in the APT repo specified with -i. Default is 'updates' (This flag is equivalent to APT_REPO_BRANCH) @@ -125,8 +122,6 @@ Options/Flags: --ha-group Specify the HA group this node will be added to during the node registration, if -s is not specified. (This flag is equivalent to HZN_HA_GROUP) --auto-upgrade Auto agent upgrade. It is used internally by the agent auto upgrade process. (This flag is equivalent to AGENT_AUTO_UPGRADE) --container Install the agent in a container. This is the default behavior for MacOS installations. (This flag is equivalent to AGENT_IN_CONTAINER) - --namespace The namespace that the cluster agent will be installed to. The default is 'openhorizon-agent' - --namespace-scoped The cluster agent will only have namespace scope. The default is 'false' -N The container number to be upgraded. The default is 1 which means the container name is horizon1. It is used for upgrade only, the HORIZON_URL setting in /etc/horizon/hzn.json will not be changed. (This flag is equivalent to AGENT_CONTAINER_NUMBER) -h --help This usage @@ -150,17 +145,14 @@ Optional Edge Device Environment Variables For Testing New Distros - Not For Pro Additional Edge Cluster Variables (in environment or config file): - KUBECTL: specify this value if you have multiple kubectl CLI installed in your enviroment. Otherwise the script will detect in this order: k3s kubectl, microk8s.kubectl, oc, kubectl. - ENABLE_AUTO_UPGRADE_CRONJOB: specify this value to false to skip installing agent auto upgrade cronjob. Default: true IMAGE_ON_EDGE_CLUSTER_REGISTRY: override the agent image path (without tag) if you want it to be different from what this script will default it to CRONJOB_AUTO_UPGRADE_IMAGE_ON_EDGE_CLUSTER_REGISTRY: override the auto-upgrade-cronjob cronjob image path (without tag) if you want it to be different from what this script will default it to - INIT_CONTAINER_IMAGE: specify this value if init container is needed and is different from default: public.ecr.aws/docker/library/alpine:latest EDGE_CLUSTER_REGISTRY_USERNAME: specify this value if the edge cluster registry requires authentication EDGE_CLUSTER_REGISTRY_TOKEN: specify this value if the edge cluster registry requires authentication EDGE_CLUSTER_STORAGE_CLASS: the storage class to use for the agent and edge services. Default: gp2 AGENT_NAMESPACE: The namespace the agent should run in. Default: openhorizon-agent AGENT_WAIT_MAX_SECONDS: Maximum seconds to wait for the Horizon agent to start or stop. Default: 30 - AGENT_DEPLOYMENT_STATUS_TIMEOUT_SECONDS: Maximum seconds to wait for the agent deployment rollout status to be successful. Default: 300 + AGENT_DEPLOYMENT_STATUS_TIMEOUT_SECONDS: Maximum seconds to wait for the agent deployment rollout status to be successful. Default: 75 AGENT_K8S_IMAGE_TAR_FILE: the file name of the edge cluster agent docker image in tar.gz format. Default: \${ARCH}$DEFAULT_AGENT_K8S_IMAGE_TAR_FILE CRONJOB_AUTO_UPGRADE_K8S_TAR_FILE: the file name of the edge cluster auto-upgrade-cronjob cronjob docker image in tar.gz format. Default: \${ARCH}$DEFAULT_CRONJOB_AUTO_UPGRADE_K8S_TAR_FILE AGENT_NAMESPACE: The cluster namespace that the agent will be installed in @@ -184,9 +176,7 @@ while getopts "c:i:j:p:k:u:d:z:hl:n:sfbw:o:O:T:t:D:a:U:CG:N:-:" opt; do -) case "${OPTARG}" in ha-group) - eval nextopt=\${$OPTIND} - ARG_HZN_HA_GROUP=${nextopt} - OPTIND=$(( OPTIND + 1 )) + ARG_HZN_HA_GROUP=${all_args[$OPTIND-1]} ;; container) ARG_AGENT_IN_CONTAINER=true @@ -194,14 +184,9 @@ while getopts "c:i:j:p:k:u:d:z:hl:n:sfbw:o:O:T:t:D:a:U:CG:N:-:" opt; do auto-upgrade) ARG_AGENT_AUTO_UPGRADE=true ;; - namespace) - eval nextopt=\${$OPTIND} - ARG_AGENT_NAMESPACE=${nextopt} - OPTIND=$(( OPTIND + 1 )) - ;; - namespace-scoped) - ARG_NAMESPACE_SCOPED=true - ;; + # namespace) + # ARG_AGENT_NAMESPACE=${all_args[$OPTIND-1]} + # ;; help) usage 0 ;; @@ -391,14 +376,9 @@ function get_input_file_css_path() { local input_file_path - if [[ $INPUT_FILE_PATH == css:* || $INPUT_FILE_PATH == remote:* ]]; then + if [[ $INPUT_FILE_PATH == css:* ]]; then # split the input into 2 parts - local part2 - if [[ $INPUT_FILE_PATH == css:* ]]; then - part2=${INPUT_FILE_PATH#"css:"} - elif [[ $INPUT_FILE_PATH == remote:* ]]; then - part2=${INPUT_FILE_PATH#"remote:"} - fi + local part2=${INPUT_FILE_PATH#"css:"} if [[ -n $part2 ]]; then if [[ $part2 == /* ]]; then @@ -449,8 +429,6 @@ function adjust_input_file_path() { log_info "Using INPUT_FILE_PATH value $INPUT_FILE_PATH as an APT repository" PKG_APT_REPO="$INPUT_FILE_PATH" INPUT_FILE_PATH='.' # not sure this is necessary - elif [[ $INPUT_FILE_PATH == remote:* ]]; then - log_info "Using INPUT_FILE_PATH value $INPUT_FILE_PATH as cluster agent image input path" elif [[ ! -d $INPUT_FILE_PATH ]]; then log_fatal 1 "INPUT_FILE_PATH directory '$INPUT_FILE_PATH' does not exist" fi @@ -1089,7 +1067,6 @@ function get_all_variables() { # Next get config file values (cmd line has already been parsed), so get_variable can apply the whole precedence order get_variable INPUT_FILE_PATH '.' adjust_input_file_path - get_variable AGENT_CFG_FILE "$(get_cfg_file_default)" if [[ -n $AGENT_CFG_FILE && -f $AGENT_CFG_FILE ]] || ! using_remote_input_files 'cfg'; then @@ -1149,27 +1126,7 @@ function get_all_variables() { get_variable AGENT_DEPLOY_TYPE 'device' get_variable AGENT_WAIT_MAX_SECONDS '30' - if ! is_cluster && [[ $INPUT_FILE_PATH == remote:* ]]; then - log_fatal 1 "\$INPUT_FILE_PATH cannot set to 'remote:' if \$AGENT_DEPLOY_TYPE is 'device'" - fi - - if is_device; then - get_variable NODE_ID_MAPPING_FILE 'node-id-mapping.csv' - get_variable PKG_APT_KEY - get_variable APT_REPO_BRANCH 'updates' - - local image_arch=$(get_image_arch) - # Currently only support a few architectures for anax-in-container; if anax-in-container specified, check the architecture - if is_macos; then - : # do not need to check - else - if [[ $AGENT_IN_CONTAINER == 'true' ]]; then - check_support "${SUPPORTED_ANAX_IN_CONTAINER_ARCH[*]}" "${image_arch}" 'anax-in-container architectures' - fi - fi - - get_variable AGENT_IMAGE_TAR_FILE "${image_arch}${DEFAULT_AGENT_IMAGE_TAR_FILE}" - elif is_cluster; then + if is_cluster; then # check kubectl is available if [ "${KUBECTL}" != "" ]; then # If user set KUBECTL env variable, check that it exists if command -v $KUBECTL > /dev/null 2>&1; then @@ -1192,73 +1149,62 @@ function get_all_variables() { fi fi log_info "KUBECTL is set to $KUBECTL" + fi + + if is_device; then + get_variable NODE_ID_MAPPING_FILE 'node-id-mapping.csv' + get_variable PKG_APT_KEY + get_variable APT_REPO_BRANCH 'updates' + + local image_arch=$(get_image_arch) + # Currently only support a few architectures for anax-in-container; if anax-in-container specified, check the architecture + if is_macos; then + : # do not need to check + else + if [[ $AGENT_IN_CONTAINER == 'true' ]]; then + check_support "${SUPPORTED_ANAX_IN_CONTAINER_ARCH[*]}" "${image_arch}" 'anax-in-container architectures' + fi + fi - # get other variables for cluster agent + get_variable AGENT_IMAGE_TAR_FILE "${image_arch}${DEFAULT_AGENT_IMAGE_TAR_FILE}" + elif is_cluster; then get_variable EDGE_CLUSTER_STORAGE_CLASS 'gp2' get_variable AGENT_NAMESPACE "$DEFAULT_AGENT_NAMESPACE" - get_variable NAMESPACE_SCOPED 'false' - get_variable USE_EDGE_CLUSTER_REGISTRY 'true' - get_variable AGENT_DEPLOYMENT_STATUS_TIMEOUT_SECONDS '300' - get_variable ENABLE_AUTO_UPGRADE_CRONJOB 'true' + USE_EDGE_CLUSTER_REGISTRY='true' #get_variable USE_EDGE_CLUSTER_REGISTRY 'true' # currently true is the only supported value + get_variable AGENT_DEPLOYMENT_STATUS_TIMEOUT_SECONDS '75' local image_arch=$(get_cluster_image_arch) check_support "${SUPPORTED_EDGE_CLUSTER_ARCH[*]}" "${image_arch}" 'kubernetes edge cluster architectures' DEFAULT_AGENT_K8S_IMAGE_TAR_FILE=${image_arch}${DEFAULT_AGENT_K8S_IMAGE_TAR_FILE} DEFAULT_CRONJOB_AUTO_UPGRADE_K8S_TAR_FILE=${image_arch}${DEFAULT_CRONJOB_AUTO_UPGRADE_K8S_TAR_FILE} - local default_image_registry_on_edge_cluster - local default_auto_upgrade_cronjob_image_registry_on_edge_cluster - isImageVariableRequired=true if [[ "$USE_EDGE_CLUSTER_REGISTRY" == "true" ]]; then - if [[ $INPUT_FILE_PATH == remote:* ]]; then - log_fatal 1 "Cannot use local cluster registry if \$INPUT_FILE_PATH is set to 'remote:', please set \$USE_EDGE_CLUSTER_REGISTRY to 'false' or change \$INPUT_FILE_PATH to 'css:'." - fi - + local default_image_registry_on_edge_cluster + local default_auto_upgrade_cronjob_image_registry_on_edge_cluster if [[ $KUBECTL == "microk8s.kubectl" ]]; then default_image_registry_on_edge_cluster="localhost:32000/$AGENT_NAMESPACE/${image_arch}_anax_k8s" - isImageVariableRequired=false elif [[ $KUBECTL == "k3s kubectl" ]]; then local k3s_registry_endpoint=$($KUBECTL get service docker-registry-service | grep docker-registry-service | awk '{print $3;}'):5000 default_image_registry_on_edge_cluster="$k3s_registry_endpoint/$AGENT_NAMESPACE/${image_arch}_anax_k8s" - isImageVariableRequired=false elif is_ocp_cluster; then local ocp_registry_endpoint=$($KUBECTL get route default-route -n openshift-image-registry --template='{{ .spec.host }}') default_image_registry_on_edge_cluster="$ocp_registry_endpoint/$AGENT_NAMESPACE/${image_arch}_anax_k8s" - isImageVariableRequired=false + else + isImageVariableRequired=true fi - # image variable $IMAGE_ON_EDGE_CLUSTER_REGISTRY is required - get_variable INTERNAL_URL_FOR_EDGE_CLUSTER_REGISTRY - else - # need to validate image arch in IMAGE_ON_EDGE_CLUSTER_REGISTRY - if [[ -z $IMAGE_ON_EDGE_CLUSTER_REGISTRY ]]; then - log_fatal 1 "A value for \$IMAGE_ON_EDGE_CLUSTER_REGISTRY must be specified" - fi - last_part="${IMAGE_ON_EDGE_CLUSTER_REGISTRY%%_*}" # // - image_arch_in_param="${last_part##*/}" # - if [[ "$image_arch" != "$image_arch_in_param" ]]; then - log_fatal 1 "Cannot use agent image with $image_arch_in_param arch to install on $image_arch cluster, please use agent image with '$image_arch'" - fi - fi - get_variable AGENT_K8S_IMAGE_TAR_FILE "$DEFAULT_AGENT_K8S_IMAGE_TAR_FILE" - # default_image_registry_on_edge_cluster is not set if use remote image registry - get_variable IMAGE_ON_EDGE_CLUSTER_REGISTRY "$default_image_registry_on_edge_cluster" ${isImageVariableRequired} + get_variable IMAGE_ON_EDGE_CLUSTER_REGISTRY "$default_image_registry_on_edge_cluster" ${isImageVariableRequired} log_debug "default_image_registry_on_edge_cluster: $default_image_registry_on_edge_cluster, IMAGE_ON_EDGE_CLUSTER_REGISTRY: $IMAGE_ON_EDGE_CLUSTER_REGISTRY" - - if [[ "$ENABLE_AUTO_UPGRADE_CRONJOB" == "true" ]]; then - # set $CRONJOB_AUTO_UPGRADE_IMAGE_ON_EDGE_CLUSTER_REGISTRY from $IMAGE_ON_EDGE_CLUSTER_REGISTRY - auto_upgrade_cronjob_image_registry_on_edge_cluster="${IMAGE_ON_EDGE_CLUSTER_REGISTRY%%_*}_auto-upgrade-cronjob_k8s" - get_variable CRONJOB_AUTO_UPGRADE_IMAGE_ON_EDGE_CLUSTER_REGISTRY "$auto_upgrade_cronjob_image_registry_on_edge_cluster" + # set $default_auto_upgrade_cronjob_image_registry_on_edge_cluster from IMAGE_ON_EDGE_CLUSTER_REGISTRY + default_auto_upgrade_cronjob_image_registry_on_edge_cluster="${IMAGE_ON_EDGE_CLUSTER_REGISTRY%/*}/${image_arch}_auto-upgrade-cronjob_k8s" + log_debug "default_auto_upgrade_cronjob_image_registry_on_edge_cluster: $default_auto_upgrade_cronjob_image_registry_on_edge_cluster" + get_variable CRONJOB_AUTO_UPGRADE_IMAGE_ON_EDGE_CLUSTER_REGISTRY "$default_auto_upgrade_cronjob_image_registry_on_edge_cluster" + get_variable EDGE_CLUSTER_REGISTRY_USERNAME + get_variable EDGE_CLUSTER_REGISTRY_TOKEN + get_variable INTERNAL_URL_FOR_EDGE_CLUSTER_REGISTRY + get_variable AGENT_K8S_IMAGE_TAR_FILE "$DEFAULT_AGENT_K8S_IMAGE_TAR_FILE" get_variable CRONJOB_AUTO_UPGRADE_K8S_TAR_FILE "$DEFAULT_CRONJOB_AUTO_UPGRADE_K8S_TAR_FILE" fi - - get_variable INIT_CONTAINER_IMAGE "$DEFAULT_INIT_CONTAINER_IMAGE_PATH" - - get_variable EDGE_CLUSTER_REGISTRY_USERNAME - get_variable EDGE_CLUSTER_REGISTRY_TOKEN - if [[ ( -z $EDGE_CLUSTER_REGISTRY_USERNAME && -n $EDGE_CLUSTER_REGISTRY_TOKEN ) || ( -n $EDGE_CLUSTER_REGISTRY_USERNAME && -z $EDGE_CLUSTER_REGISTRY_TOKEN ) ]]; then - log_fatal 1 "EDGE_CLUSTER_REGISTRY_USERNAME and EDGE_CLUSTER_REGISTRY_TOKEN should be set/unset together" - fi else log_fatal 1 "Invalid AGENT_DEPLOY_TYPE value: $AGENT_DEPLOY_TYPE" fi @@ -1312,13 +1258,8 @@ function get_all_variables() { # if node_id is still not set, use ${HOSTNAME} if [[ -z $node_id ]]; then - if is_device; then - node_id=${HOSTNAME} # default - log_info "node_id is not set, use host name as node id" - else - node_id=${AGENT_NAMESPACE}_${HOSTNAME} - log_info "node_id is not set, use namespace_hostname as node id" - fi + node_id=${HOSTNAME} # default + log_info "node_id is not set, use host name as node id" fi fi fi @@ -1381,7 +1322,7 @@ function check_variables() { fi fi - if is_cluster && [[ "$USE_EDGE_CLUSTER_REGISTRY" == "true" ]] && [[ "$ENABLE_AUTO_UPGRADE_CRONJOB" == "true" ]]; then + if is_cluster && [[ "$USE_EDGE_CLUSTER_REGISTRY" == "true" ]]; then parts=$(echo $CRONJOB_AUTO_UPGRADE_IMAGE_ON_EDGE_CLUSTER_REGISTRY | awk -F'/' '{print NF}') if [[ "$parts" != "3" ]]; then log_fatal 1 "CRONJOB_AUTO_UPGRADE_IMAGE_ON_EDGE_CLUSTER_REGISTRY should be this format: //" @@ -1396,7 +1337,7 @@ function check_variables() { log_fatal 1 "AGENT_K8S_IMAGE_TAR_FILE must be in tar.gz format" fi - if [[ "$ENABLE_AUTO_UPGRADE_CRONJOB" == "true" ]] && [[ -n $CRONJOB_AUTO_UPGRADE_K8S_TAR_FILE && $CRONJOB_AUTO_UPGRADE_K8S_TAR_FILE != *.tar.gz ]]; then + if [[ -n $CRONJOB_AUTO_UPGRADE_K8S_TAR_FILE && $CRONJOB_AUTO_UPGRADE_K8S_TAR_FILE != *.tar.gz ]]; then log_fatal 1 "CRONJOB_AUTO_UPGRADE_K8S_TAR_FILE must be in tar.gz format" fi log_debug "check_variables() begin" @@ -1482,7 +1423,7 @@ function is_small_kube() { } function is_ocp_cluster() { - $KUBECTL get console -n openshift-console >/dev/null 2>&1 + $KUBECTL get routes default-route -n openshift-image-registry >/dev/null 2>&1 if [[ $? -ne 0 ]]; then return 1 # we couldn't get the default route in openshift-image-registry namespace, so the current cluster is not ocp else return 0; fi } @@ -1567,7 +1508,7 @@ function confirmCmds() { function ensureWeAreRoot() { if [[ $(whoami) != 'root' ]]; then - log_fatal 2 "must be root to run ${0##*/}. Run 'sudo -sE' and then run ${0##*/}" + log_fatal 2 "must be root to run ${0##*/}. Run 'sudo -iE' and then run ${0##*/}" fi # or could check: [[ $(id -u) -ne 0 ]] } @@ -1605,12 +1546,8 @@ function using_remote_input_files() { if [[ $INPUT_FILE_PATH == css:* || $AGENT_CFG_FILE == css:* ]]; then return 0 fi - elif [[ $whichFile == 'pkg' ]]; then - if [[ $INPUT_FILE_PATH == css:* || $INPUT_FILE_PATH == https://github.com/open-horizon/anax/releases* || $INPUT_FILE_PATH == remote:* ]]; then - return 0 - fi - else # the other files (yml, uninstall) are available from either - if [[ $INPUT_FILE_PATH == css:* || $INPUT_FILE_PATH == https://github.com/open-horizon/anax/releases* || $INPUT_FILE_PATH == remote:* ]]; then + else # the other files (pkg, yml, uninstall) are available from either + if [[ $INPUT_FILE_PATH == css:* || $INPUT_FILE_PATH == https://github.com/open-horizon/anax/releases* ]]; then return 0 fi fi @@ -3398,15 +3335,6 @@ function loadClusterAgentImage() { AGENT_IMAGE=$image_path AGENT_IMAGE_VERSION_IN_TAR=${AGENT_IMAGE##*:} IMAGE_FULL_PATH_ON_EDGE_CLUSTER_REGISTRY="$IMAGE_ON_EDGE_CLUSTER_REGISTRY:$AGENT_IMAGE_VERSION_IN_TAR" - log_info "IMAGE_FULL_PATH_ON_EDGE_CLUSTER_REGISTRY is set to $IMAGE_FULL_PATH_ON_EDGE_CLUSTER_REGISTRY" - return - elif [[ $INPUT_FILE_PATH == remote:* ]]; then - # input file path is: "remote:"" Get the docker image tag INPUT_FILE_PATH - local image_tag=${INPUT_FILE_PATH##*:} #version - AGENT_IMAGE_VERSION_IN_TAR=$image_tag - IMAGE_FULL_PATH_ON_EDGE_CLUSTER_REGISTRY="$IMAGE_ON_EDGE_CLUSTER_REGISTRY:$AGENT_IMAGE_VERSION_IN_TAR" - AGENT_IMAGE=$IMAGE_FULL_PATH_ON_EDGE_CLUSTER_REGISTRY - log_info "IMAGE_FULL_PATH_ON_EDGE_CLUSTER_REGISTRY is set to $IMAGE_FULL_PATH_ON_EDGE_CLUSTER_REGISTRY" return fi elif [[ ! -f $AGENT_K8S_IMAGE_TAR_FILE ]]; then @@ -3425,19 +3353,18 @@ function loadClusterAgentImage() { # use the same tag for the image in the edge cluster registry as the tag they used for the image in the inputted tar file IMAGE_FULL_PATH_ON_EDGE_CLUSTER_REGISTRY="$IMAGE_ON_EDGE_CLUSTER_REGISTRY:$AGENT_IMAGE_VERSION_IN_TAR" - log_debug "IMAGE_FULL_PATH_ON_EDGE_CLUSTER_REGISTRY is set to: $IMAGE_FULL_PATH_ON_EDGE_CLUSTER_REGISTRY" - log_debug "loadClusterAgentImage() end" } -# Cluster only: to set $EDGE_CLUSTER_REGISTRY_HOST, and login to registry -function getImageRegistryInfo() { - log_debug "getImageRegistryInfo() begin" +# Cluster only: to push agent and cronjob images to image registry that edge cluster can access +function pushImagesToEdgeClusterRegistry() { + log_debug "pushImagesToEdgeClusterRegistry() begin" + # split $IMAGE_FULL_PATH_ON_EDGE_CLUSTER_REGISTRY by "/" EDGE_CLUSTER_REGISTRY_HOST=$(echo $IMAGE_FULL_PATH_ON_EDGE_CLUSTER_REGISTRY | awk -F'/' '{print $1}') log_info "Edge cluster registry host: $EDGE_CLUSTER_REGISTRY_HOST" - if [[ $INPUT_FILE_PATH == remote:* || (-z $EDGE_CLUSTER_REGISTRY_USERNAME && -z $EDGE_CLUSTER_REGISTRY_TOKEN) ]]; then + if [[ -z $EDGE_CLUSTER_REGISTRY_USERNAME && -z $EDGE_CLUSTER_REGISTRY_TOKEN ]]; then : # even for a registry in the insecure-registries list, if we don't specify user/pw it will prompt for it #docker login $EDGE_CLUSTER_REGISTRY_HOST else @@ -3445,43 +3372,15 @@ function getImageRegistryInfo() { chk $? "logging into edge cluster's registry: $EDGE_CLUSTER_REGISTRY_HOST" fi - log_debug "getImageRegistryInfo() end" -} + log_info "Pushing docker image $AGENT_IMAGE to $IMAGE_FULL_PATH_ON_EDGE_CLUSTER_REGISTRY ..." + ${DOCKER_ENGINE} tag ${AGENT_IMAGE} ${IMAGE_FULL_PATH_ON_EDGE_CLUSTER_REGISTRY} + runCmdQuietly ${DOCKER_ENGINE} push ${IMAGE_FULL_PATH_ON_EDGE_CLUSTER_REGISTRY} + log_verbose "successfully pushed image $IMAGE_FULL_PATH_ON_EDGE_CLUSTER_REGISTRY to edge cluster registry" -# Cluster only: to push agent and cronjob images to image registry that edge cluster can access -function pushImagesToEdgeClusterRegistry() { - log_debug "pushImagesToEdgeClusterRegistry() begin" - - log_info "Checking if docker image $AGENT_IMAGE exists on the $IMAGE_FULL_PATH_ON_EDGE_CLUSTER_REGISTRY ..." - set +e - ${DOCKER_ENGINE} manifest inspect $IMAGE_FULL_PATH_ON_EDGE_CLUSTER_REGISTRY >/dev/null 2>&1 - rc=$? - set -e - if [[ $rc -eq 0 ]]; then - log_info "$IMAGE_FULL_PATH_ON_EDGE_CLUSTER_REGISTRY already exists, skip image push" - else - log_info "Pushing docker image $AGENT_IMAGE to $IMAGE_FULL_PATH_ON_EDGE_CLUSTER_REGISTRY ..." - ${DOCKER_ENGINE} tag ${AGENT_IMAGE} ${IMAGE_FULL_PATH_ON_EDGE_CLUSTER_REGISTRY} - runCmdQuietly ${DOCKER_ENGINE} push ${IMAGE_FULL_PATH_ON_EDGE_CLUSTER_REGISTRY} - log_verbose "successfully pushed image $IMAGE_FULL_PATH_ON_EDGE_CLUSTER_REGISTRY to edge cluster registry" - fi - - if [[ "$ENABLE_AUTO_UPGRADE_CRONJOB" == "true" ]]; then - log_info "Checking if docker image $CRONJOB_AUTO_UPGRADE_IMAGE exists on the $CRONJOB_AUTO_UPGRADE_IMAGE_FULL_PATH_ON_EDGE_CLUSTER_REGISTRY ..." - set +e - ${DOCKER_ENGINE} manifest inspect $CRONJOB_AUTO_UPGRADE_IMAGE_FULL_PATH_ON_EDGE_CLUSTER_REGISTRY >/dev/null 2>&1 - rc=$? - set -e - - if [[ $rc -eq 0 ]]; then - log_info "$CRONJOB_AUTO_UPGRADE_IMAGE_FULL_PATH_ON_EDGE_CLUSTER_REGISTRY already exists, skip image push" - else - log_info "Pushing docker image $CRONJOB_AUTO_UPGRADE_IMAGE to $CRONJOB_AUTO_UPGRADE_IMAGE_FULL_PATH_ON_EDGE_CLUSTER_REGISTRY ..." - ${DOCKER_ENGINE} tag ${CRONJOB_AUTO_UPGRADE_IMAGE} ${CRONJOB_AUTO_UPGRADE_IMAGE_FULL_PATH_ON_EDGE_CLUSTER_REGISTRY} - runCmdQuietly ${DOCKER_ENGINE} push ${CRONJOB_AUTO_UPGRADE_IMAGE_FULL_PATH_ON_EDGE_CLUSTER_REGISTRY} - log_verbose "successfully pushed image $CRONJOB_AUTO_UPGRADE_IMAGE_FULL_PATH_ON_EDGE_CLUSTER_REGISTRY to edge cluster registry" - fi - fi + log_info "Pushing docker image $CRONJOB_AUTO_UPGRADE_IMAGE to $CRONJOB_AUTO_UPGRADE_IMAGE_FULL_PATH_ON_EDGE_CLUSTER_REGISTRY ..." + docker tag ${CRONJOB_AUTO_UPGRADE_IMAGE} ${CRONJOB_AUTO_UPGRADE_IMAGE_FULL_PATH_ON_EDGE_CLUSTER_REGISTRY} + runCmdQuietly docker push ${CRONJOB_AUTO_UPGRADE_IMAGE_FULL_PATH_ON_EDGE_CLUSTER_REGISTRY} + log_verbose "successfully pushed image $CRONJOB_AUTO_UPGRADE_IMAGE_FULL_PATH_ON_EDGE_CLUSTER_REGISTRY to edge cluster registry" log_debug "pushImagesToEdgeClusterRegistry() end" } @@ -3509,20 +3408,11 @@ function loadClusterAgentAutoUpgradeCronJobImage() { local image_arch=$(get_cluster_image_arch) local image_path="openhorizon/${image_arch}_auto-upgrade-cronjob_k8s:$image_tag" log_info "Pulling $image_path from docker hub..." - ${DOCKER_ENGINE} pull "$image_path" + docker pull "$image_path" chk $? "pulling $image_path" CRONJOB_AUTO_UPGRADE_IMAGE=$image_path CRONJOB_AUTO_UPGRADE_IMAGE_VERSION_IN_TAR=${CRONJOB_AUTO_UPGRADE_IMAGE##*:} CRONJOB_AUTO_UPGRADE_IMAGE_FULL_PATH_ON_EDGE_CLUSTER_REGISTRY="$CRONJOB_AUTO_UPGRADE_IMAGE_ON_EDGE_CLUSTER_REGISTRY:$CRONJOB_AUTO_UPGRADE_IMAGE_VERSION_IN_TAR" - log_info "CRONJOB_AUTO_UPGRADE_IMAGE_FULL_PATH_ON_EDGE_CLUSTER_REGISTRY is $CRONJOB_AUTO_UPGRADE_IMAGE_FULL_PATH_ON_EDGE_CLUSTER_REGISTRY" - return - elif [[ $INPUT_FILE_PATH == remote:* ]]; then - # input file path is: "remote:"" Get the docker image tag INPUT_FILE_PATH - local image_tag=${INPUT_FILE_PATH##*:} - CRONJOB_AUTO_UPGRADE_IMAGE_VERSION_IN_TAR=$image_tag - CRONJOB_AUTO_UPGRADE_IMAGE_FULL_PATH_ON_EDGE_CLUSTER_REGISTRY="$CRONJOB_AUTO_UPGRADE_IMAGE_ON_EDGE_CLUSTER_REGISTRY:$CRONJOB_AUTO_UPGRADE_IMAGE_VERSION_IN_TAR" - CRONJOB_AUTO_UPGRADE_IMAGE=$CRONJOB_AUTO_UPGRADE_IMAGE_FULL_PATH_ON_EDGE_CLUSTER_REGISTRY - log_info "CRONJOB_AUTO_UPGRADE_IMAGE_FULL_PATH_ON_EDGE_CLUSTER_REGISTRY is $CRONJOB_AUTO_UPGRADE_IMAGE_FULL_PATH_ON_EDGE_CLUSTER_REGISTRY" return fi elif [[ ! -f $CRONJOB_AUTO_UPGRADE_K8S_TAR_FILE ]]; then @@ -3543,94 +3433,6 @@ function loadClusterAgentAutoUpgradeCronJobImage() { log_debug "loadClusterAgentAutoUpgradeCronJobImage() end" } -# Cluster only: create image pull secrets if use remote private registry, this function is called when USE_EDGE_CLUSTER_REGISTRY=false, and remote registry is private -# Side-effect: set $USE_PRIVATE_REGISTRY -function create_image_pull_secrets() { - log_debug "create_image_pull_secrets() begin" - if [[ "$USE_EDGE_CLUSTER_REGISTRY" == "false" ]]; then - if [[ -n $EDGE_CLUSTER_REGISTRY_USERNAME && -n $EDGE_CLUSTER_REGISTRY_TOKEN && -n $EDGE_CLUSTER_REGISTRY_HOST ]]; then - # if $INPUT_FILE_PATH is "remote:*", we want to avoid the requirment of "docker/podman" - if [[ $INPUT_FILE_PATH != remote:* ]]; then - log_verbose "checking if private registry is accessible..." - echo "$EDGE_CLUSTER_REGISTRY_TOKEN" | ${DOCKER_ENGINE} login -u $EDGE_CLUSTER_REGISTRY_USERNAME --password-stdin $EDGE_CLUSTER_REGISTRY_HOST - chk $? "logging into remote private registry: $EDGE_CLUSTER_REGISTRY_HOST" - fi - - log_verbose "checking if secret ${IMAGE_PULL_SECRET_NAME} exist..." - USE_PRIVATE_REGISTRY="true" - - if $KUBECTL get secret ${IMAGE_PULL_SECRET_NAME} -n ${AGENT_NAMESPACE} 2>/dev/null; then - $KUBECTL delete secret ${IMAGE_PULL_SECRET_NAME} -n ${AGENT_NAMESPACE} >/dev/null 2>&1 - chk $? "deleting image pull secret before installing" - fi - - log_verbose "creating image pull secrets ${IMAGE_PULL_SECRET_NAME}..." - $KUBECTL create secret docker-registry ${IMAGE_PULL_SECRET_NAME} -n ${AGENT_NAMESPACE} --docker-server=${EDGE_CLUSTER_REGISTRY_HOST} --docker-username=${EDGE_CLUSTER_REGISTRY_USERNAME} --docker-password=${EDGE_CLUSTER_REGISTRY_TOKEN} --docker-email="" - chk $? "creating image pull secrets ${IMAGE_PULL_SECRET_NAME} from edge cluster registry info" - log_info "secret ${IMAGE_PULL_SECRET_NAME} created" - else - log_info "EDGE_CLUSTER_REGISTRY_USERNAME and/or EDGE_CLUSTER_REGISTRY_TOKEN is not specified, skip creating image pull secrets $IMAGE_PULL_SECRET_NAME" - fi - fi - - log_debug "create_image_pull_secrets() end" -} - -# Cluster only: check if there is scope conflict -# check if there is another agent deployment in any namespace -# - NO: continue on agent fresh install -# - YES: -# 1. same namespace: continue, the scope will be checked in check_agent_deployment_exist (set AGENT_DEPLOYMENT_EXIST_IN_SAME_NAMESPACE=true) -# 2. different namespace: greb 1 deployment and check scope -# a. current is cluster scoped agent => error -# b. current is namespace scoped agent: -# existing agent in other namespace is namespace scope: can proceed to install -# existing agent in other namespace is cluster scope: error -# Side-effect: set AGENT_DEPLOYMENT_EXIST_IN_SAME_NAMESPACE -function check_cluster_agent_scope() { - log_debug "check_cluster_agent_scope() begin" - AGENT_DEPLOYMENT_EXIST_IN_SAME_NAMESPACE="false" - - if $KUBECTL get deployment --field-selector metadata.name=agent -A | grep -E '(^|\s)agent($|\s)' >/dev/null 2>&1; then - log_debug "Has agent deployment in this cluster" - # has agent deployment in the cluster - # check namespace - namespaces_have_agent=$($KUBECTL get deployment --field-selector metadata.name=agent -A -o jsonpath="{.items[*].metadata.namespace}" | tr -s '[[:space:]]' ',') - log_info "Already have agent deployment in namespaces: $namespaces_have_agent, checking scope of existing agent" - - if [[ "$namespaces_have_agent" == *"$AGENT_NAMESPACE"* ]]; then - log_debug "Namespaces array contains current namespace" - # continue to check_agent_deployment_exist() to check scope - AGENT_DEPLOYMENT_EXIST_IN_SAME_NAMESPACE="true" - else - # has agent in other namespace(s). Pick one agent deployment and check scope - # current is cluster scoped agent => error - # current is namespace scoped agent: - # namespace scope agent in other namespace => can proceed to install - # cluster scope agent in other namespace => error - if ! $NAMESPACE_SCOPED; then - log_fatal 3 "One or more agents detected in $namespaces_have_agent. A cluster scoped agent cannot be installed to the same cluster that has agent(s) already" - fi - - IFS="," read -ra namespace_array <<< "$namespaces_have_agent" - namespace_to_check=${namespace_array[0]} - local namespace_scoped_env_value_in_use=$($KUBECTL get deployment agent -n ${namespace_to_check} -o json | jq '.spec.template.spec.containers[0].env' | jq -r '.[] | select(.name=="HZN_NAMESPACE_SCOPED").value') - log_debug "Current HZN_NAMESPACE_SCOPED in agent deployment under namespace $namespace_to_check is: $namespace_scoped_env_value_in_use" - log_debug "NAMESPACE_SCOPED passed to this script is: $NAMESPACE_SCOPED" # namespace scoped - - if [[ "$namespace_scoped_env_value_in_use" == "" ]] || [[ "$namespace_scoped_env_value_in_use" == "false" ]] ; then - log_fatal 3 "A cluster scoped agent detected in $namespace_to_check. A namespace scoped agent cannot be installed to the same cluster that has a cluster scoped agent" - fi - fi - - else - # no agent deployment in any namespace, can proceed to install this agent - log_debug "No agent deployment in any namespace, can proceed to install this agent" - fi - log_debug "check_cluster_agent_scope() end" - -} - # Cluster only: check if agent deployment exists to determine whether to do agent install or agent update # Side-effect: sets AGENT_DEPLOYMENT_UPDATE, POD_ID, IS_AGENT_IMAGE_VERSION_SAME, IS_CRONJOB_AUTO_UPGRADE_IMAGE_VERSION_SAME, IS_HORIZON_ORG_ID_SAME function check_agent_deployment_exist() { @@ -3639,49 +3441,18 @@ function check_agent_deployment_exist() { IS_CRONJOB_AUTO_UPGRADE_IMAGE_VERSION_SAME="false" IS_HORIZON_ORG_ID_SAME="false" - # has agent deployment, return 0 (true) - # doesn't have agent deployment, return 1 (false) if ! $KUBECTL get deployment ${DEPLOYMENT_NAME} -n ${AGENT_NAMESPACE} >/dev/null 2>&1; then # agent deployment doesn't exist in ${AGENT_NAMESPACE}, fresh install AGENT_DEPLOYMENT_UPDATE="false" else # already have an agent deplyment in ${AGENT_NAMESPACE}, check the agent pod status - if [[ $($KUBECTL get pods -n ${AGENT_NAMESPACE} -l app=agent,type!=auto-upgrade-cronjob -o 'jsonpath={..status.conditions[?(@.type=="Ready")].status}') != "True" ]]; then + if [[ $($KUBECTL get pods -n ${AGENT_NAMESPACE} -l app=agent -o 'jsonpath={..status.conditions[?(@.type=="Ready")].status}') != "True" ]]; then # agent deployment does not have agent pod in RUNNING status log_fatal 3 "Previous agent pod in not in RUNNING status, please run agent-uninstall.sh to clean up and re-run the agent-install.sh" else - # check 0) agent scope in deployment - local namespace_scoped_env_value_in_use=$($KUBECTL get deployment agent -n ${AGENT_NAMESPACE} -o json | jq '.spec.template.spec.containers[0].env' | jq -r '.[] | select(.name=="HZN_NAMESPACE_SCOPED").value') - log_debug "Current HZN_NAMESPACE_SCOPED in agent deployment is $namespace_scoped_env_value_in_use" - log_debug "NAMESPACE_SCOPED passed to this script is: $NAMESPACE_SCOPED" - - if [[ "$namespace_scoped_env_value_in_use" == "" ]]; then - namespace_scoped_env_value_in_use="false" - fi - - if [[ "$namespace_scoped_env_value_in_use" != "$NAMESPACE_SCOPED" ]]; then - log_fatal 3 "Current agent scope cannot be updated, please run agent-uninstall.sh and re-run agent-install.sh" - fi - # check 1) agent image in deployment # eg: {image-registry}:5000/{repo}/{image-name}:{version} - local agent_image_in_use=$($KUBECTL get deployment agent -n ${AGENT_NAMESPACE} -o json | jq -r '.spec.template.spec.containers[0].image') - - # {image-registry}:5000/{repo} - local agent_image_on_edge_cluster_registry=${agent_image_in_use%:*} - if [[ "$agent_image_on_edge_cluster_registry" != "$IMAGE_ON_EDGE_CLUSTER_REGISTRY" ]]; then - log_fatal 3 "Current deployment image registry cannot be updated, please run agent-uninstall.sh and re-run agent-install.sh" - fi - - local image_pull_secrets_length=$($KUBECTL get deployment agent -n ${AGENT_NAMESPACE} -o json | jq '.spec.template.spec.imagePullSecrets' | jq length) - local use_image_pull_secrets - if [[ "$image_pull_secrets_length" == "1" ]]; then - use_image_pull_secrets="true" - fi - if [[ "$use_image_pull_secrets" != "$USE_PRIVATE_REGISTRY" ]]; then - log_fatal 3 "Current deployment image registry pull secrets info cannot be updated, please run agent-uninstall.sh and re-run agent-install.sh" - fi - + local agent_image_in_use=$($KUBECTL get deployment agent -o jsonpath='{$.spec.template.spec.containers[:1].image}' -n ${AGENT_NAMESPACE}) # {image-name}:{version} local agent_image_name_with_tag=$(echo $agent_image_in_use | awk -F'/' '{print $3}') # {version} @@ -3693,37 +3464,26 @@ function check_agent_deployment_exist() { IS_AGENT_IMAGE_VERSION_SAME="true" fi - # check 2) auto-upgrade-cronjob cronjob image in cronjob yml # eg: {image-registry}:5000/{repo}/{image-name}:{version} - if [[ "$ENABLE_AUTO_UPGRADE_CRONJOB" == "true" ]]; then - local auto_upgrade_cronjob_image_in_use=$($KUBECTL get cronjob ${CRONJOB_AUTO_UPGRADE_NAME} -o jsonpath='{$.spec.jobTemplate.spec.template.spec.containers[:1].image}' -n ${AGENT_NAMESPACE}) - - # {image-registry}:5000/{repo} - local auto_upgrade_cronjob_image_on_edge_cluster_registry=${auto_upgrade_cronjob_image_in_use%:*} - if [[ "$auto_upgrade_cronjob_image_on_edge_cluster_registry" != "$CRONJOB_AUTO_UPGRADE_IMAGE_ON_EDGE_CLUSTER_REGISTRY" ]]; then - log_fatal 3 "Current auto-upgrade-cronjob cronjob image registry cannot be updated, please run agent-uninstall.sh and re-run agent-install.sh" - fi - - # {image-name}:{version} - local auto_upgrade_cronjob_image_name_with_tag=$(echo $auto_upgrade_cronjob_image_in_use | awk -F'/' '{print $3}') - # {version} - local auto_upgrade_cronjob_image_version_in_use=$(echo $auto_upgrade_cronjob_image_name_with_tag | awk -F':' '{print $2}') + local auto_upgrade_cronjob_image_in_use=$($KUBECTL get cronjob ${CRONJOB_AUTO_UPGRADE_NAME} -o jsonpath='{$.spec.jobTemplate.spec.template.spec.containers[:1].image}' -n ${AGENT_NAMESPACE}) + # {image-name}:{version} + local auto_upgrade_cronjob_image_name_with_tag=$(echo $auto_upgrade_cronjob_image_in_use | awk -F'/' '{print $3}') + # {version} + local auto_upgrade_cronjob_image_version_in_use=$(echo $auto_upgrade_cronjob_image_name_with_tag | awk -F':' '{print $2}') - log_debug "Current auto-upgrade-cronjob cronjob image version is: $auto_upgrade_cronjob_image_version_in_use, auto-upgrade-cronjob cronjob image version in tar file is: $CRONJOB_AUTO_UPGRADE_IMAGE_VERSION_IN_TAR" - if [[ "$CRONJOB_AUTO_UPGRADE_IMAGE_VERSION_IN_TAR" == "$auto_upgrade_cronjob_image_version_in_use" ]]; then - IS_CRONJOB_AUTO_UPGRADE_IMAGE_VERSION_SAME="true" - fi - else + log_debug "Current auto-upgrade-cronjob cronjob image version is: $auto_upgrade_cronjob_image_version_in_use, auto-upgrade-cronjob cronjob image version in tar file is: $CRONJOB_AUTO_UPGRADE_IMAGE_VERSION_IN_TAR" + if [[ "$CRONJOB_AUTO_UPGRADE_IMAGE_VERSION_IN_TAR" == "$auto_upgrade_cronjob_image_version_in_use" ]]; then IS_CRONJOB_AUTO_UPGRADE_IMAGE_VERSION_SAME="true" fi # check 3) HZN_ORG_ID set in deployment - local horizon_org_id_env_value_in_use=$($KUBECTL get deployment agent -n ${AGENT_NAMESPACE} -o json | jq '.spec.template.spec.containers[0].env' | jq -r '.[] | select(.name=="HZN_ORG_ID").value') - log_debug "Current HZN_ORG_ID in agent deployment is: $horizon_org_id_env_value_in_use" - log_debug "HZN_ORG_ID passed to this script is: $HZN_ORG_ID" + local horizon_org_id_env_name_in_use=$($KUBECTL get deployment agent -n ${AGENT_NAMESPACE} -o jsonpath='{.spec.template.spec.containers[0].env[0].name}') + local horizon_org_id_env_value_in_use=$($KUBECTL get deployment agent -n ${AGENT_NAMESPACE} -o jsonpath='{.spec.template.spec.containers[0].env[0].value}') + log_debug "Current HZN_ORG_ID in agent deployment is: env_name: $horizon_org_id_env_name_in_use, env_value: $horizon_org_id_env_value_in_use" + log_debug "HZN_ORG_ID passed to this script is: env_name: HZN_ORG_ID, env_value: $HZN_ORG_ID" - if [[ "$horizon_org_id_env_value_in_use" == "$HZN_ORG_ID" ]]; then + if [[ "$horizon_org_id_env_name_in_use" == "HZN_ORG_ID" ]] && [[ "$horizon_org_id_env_value_in_use" == "$HZN_ORG_ID" ]]; then IS_HORIZON_ORG_ID_SAME="true" fi @@ -3740,7 +3500,7 @@ function get_edge_cluster_files() { log_debug "get_edge_cluster_files() begin" if using_remote_input_files 'yml'; then log_verbose "Getting template.yml files and agent-uninstall.sh from $INPUT_FILE_PATH ..." - if [[ $INPUT_FILE_PATH == css:* || $INPUT_FILE_PATH == remote:* ]]; then + if [[ $INPUT_FILE_PATH == css:* ]]; then local input_path get_input_file_css_path input_path download_css_file "$input_path/$EDGE_CLUSTER_TAR_FILE_NAME" @@ -3752,15 +3512,12 @@ function get_edge_cluster_files() { rm "$EDGE_CLUSTER_TAR_FILE_NAME" fi - for f in deployment-template.yml persistentClaim-template.yml agent-uninstall.sh; do + for f in deployment-template.yml persistentClaim-template.yml auto-upgrade-cronjob-template.yml agent-uninstall.sh; do if [[ ! -f $f ]]; then log_fatal 1 "file $f not found" fi done - if [[ "$ENABLE_AUTO_UPGRADE_CRONJOB" == "true" ]] && [[ ! -f auto-upgrade-cronjob-template.yml ]]; then - log_fatal 1 "auto-upgrade-cronjob-template.yml not found" - fi log_debug "get_edge_cluster_files() end" } @@ -3782,7 +3539,7 @@ function generate_installation_files() { log_verbose "kubernete deployment files are done." fi - if [[ "$IS_CRONJOB_AUTO_UPGRADE_IMAGE_VERSION_SAME" == "true" ]] || [[ "$ENABLE_AUTO_UPGRADE_CRONJOB" != "true" ]] ; then + if [[ "$IS_CRONJOB_AUTO_UPGRADE_IMAGE_VERSION_SAME" == "true" ]]; then log_verbose "auto-upgrade-cronjob cronjob image version is the same with existing deployment, skip updating auto-upgrade-cronjob.yml" else log_verbose "Preparing kubernete cronjob files" @@ -3832,8 +3589,7 @@ function prepare_k8s_deployment_file() { # Note: get_edge_cluster_files() already downloaded deployment-template.yml, if necessary # InitContainer needs to be removed for ocp because it breaks mounted directory permisson. In ocp, the permission of volume is configured by scc. - if is_ocp_cluster && [[ $EDGE_CLUSTER_STORAGE_CLASS != ibmc-file* ]] && [[ $EDGE_CLUSTER_STORAGE_CLASS != ibmc-vpc-file* ]]; then - log_info "remove initContainer" + if is_ocp_cluster; then sed -i -e '/START_NOT_FOR_OCP/,/END_NOT_FOR_OCP/d' deployment-template.yml fi @@ -3842,13 +3598,13 @@ function prepare_k8s_deployment_file() { sed -i -e '{/START_CERT_VOL/,/END_CERT_VOL/d;}' deployment-template.yml fi - sed -e "s#__AgentNameSpace__#\"${AGENT_NAMESPACE}\"#g" -e "s#__InitContainerImagePath__#${INIT_CONTAINER_IMAGE}#g" -e "s#__NamespaceScoped__#\"${NAMESPACE_SCOPED}\"#g" -e "s#__OrgId__#\"${HZN_ORG_ID}\"#g" deployment-template.yml >deployment.yml + sed -e "s#__AgentNameSpace__#${AGENT_NAMESPACE}#g" -e "s#__OrgId__#\"${HZN_ORG_ID}\"#g" deployment-template.yml >deployment.yml chk $? 'creating deployment.yml' if [[ "$USE_EDGE_CLUSTER_REGISTRY" == "true" ]]; then - sed -i -e '{/START_REMOTE_ICR/,/END_REMOTE_ICR/d;}' deployment.yml # remove imagePullSecrets section from template EDGE_CLUSTER_REGISTRY_PROJECT_NAME=$(echo $IMAGE_FULL_PATH_ON_EDGE_CLUSTER_REGISTRY | awk -F'/' '{print $2}') EDGE_CLUSTER_AGENT_IMAGE_AND_TAG=$(echo $IMAGE_FULL_PATH_ON_EDGE_CLUSTER_REGISTRY | awk -F'/' '{print $3}') + local image_full_path_on_edge_cluster_registry_internal_url if [[ "$INTERNAL_URL_FOR_EDGE_CLUSTER_REGISTRY" == "" ]]; then if is_ocp_cluster; then @@ -3873,27 +3629,7 @@ function prepare_k8s_deployment_file() { sed -i -e "s#__ImageRegistryHost__#${EDGE_CLUSTER_REGISTRY_HOST}#g" deployment.yml fi else - log_info "This agent install on edge cluster is using a remote registry: $IMAGE_FULL_PATH_ON_EDGE_CLUSTER_REGISTRY" - ## We want to avoid the requirement of docker/podman if $INPUT_FILE_PATH is "remote:*" - if [[ $INPUT_FILE_PATH != remote:* ]]; then - log_info "Checking if image exists in remote registry..." - set +e - ${DOCKER_ENGINE} manifest inspect $IMAGE_FULL_PATH_ON_EDGE_CLUSTER_REGISTRY >/dev/null 2>&1 - chk $? "checking existence of image $IMAGE_FULL_PATH_ON_EDGE_CLUSTER_REGISTRY" - set -e - fi - - # REMOTE_IMAGE_REGISTRY_PATH is parts before /{arch}_anax_k8s, for example if using quay.io, this value will be quay.io/ - local image_arch=$(get_cluster_image_arch) - REMOTE_IMAGE_REGISTRY_PATH="${IMAGE_ON_EDGE_CLUSTER_REGISTRY%%/${image_arch}*}" - log_info "REMOTE_IMAGE_REGISTRY_PATH: $REMOTE_IMAGE_REGISTRY_PATH" - sed -i -e "s#__ImagePath__#${IMAGE_FULL_PATH_ON_EDGE_CLUSTER_REGISTRY}#g" deployment.yml - sed -i -e "s#__ImageRegistryHost__#${REMOTE_IMAGE_REGISTRY_PATH}#g" deployment.yml - - if [[ "$USE_PRIVATE_REGISTRY" != "true" ]]; then - log_debug "remote image registry is not private, remove ImagePullSecret..." - sed -i -e '{/START_REMOTE_ICR/,/END_REMOTE_ICR/d;}' deployment.yml - fi + log_fatal 1 "Agent install on edge cluster requires using an edge cluster registry" fi log_debug "prepare_k8s_deployment_file() end" @@ -3917,7 +3653,6 @@ function prepare_k8s_auto_upgrade_cronjob_file() { chk $? 'creating auto-upgrade-cronjob.yml' if [[ "$USE_EDGE_CLUSTER_REGISTRY" == "true" ]]; then - sed -i -e '{/START_REMOTE_ICR/,/END_REMOTE_ICR/d;}' auto-upgrade-cronjob.yml EDGE_CLUSTER_REGISTRY_PROJECT_NAME=$(echo $CRONJOB_AUTO_UPGRADE_IMAGE_FULL_PATH_ON_EDGE_CLUSTER_REGISTRY | awk -F'/' '{print $2}') EDGE_CLUSTER_CRONJOB_AUTO_UPGRADE_IMAGE_AND_TAG=$(echo $CRONJOB_AUTO_UPGRADE_IMAGE_FULL_PATH_ON_EDGE_CLUSTER_REGISTRY | awk -F'/' '{print $3}') @@ -3934,22 +3669,7 @@ function prepare_k8s_auto_upgrade_cronjob_file() { fi sed -i -e "s#__ImagePath__#${auto_upgrade_cronjob_image_full_path_on_edge_cluster_registry_internal_url}#g" auto-upgrade-cronjob.yml else - log_info "This agent install on edge cluster is using a remote registry: $CRONJOB_AUTO_UPGRADE_IMAGE_FULL_PATH_ON_EDGE_CLUSTER_REGISTRY" - ## We want to avoid the requirement of docker/podman if $INPUT_FILE_PATH is "remote:*" - if [[ $INPUT_FILE_PATH != remote:* ]]; then - log_info "Checking if image exists in remote registry..." - set +e - ${DOCKER_ENGINE} manifest inspect $CRONJOB_AUTO_UPGRADE_IMAGE_FULL_PATH_ON_EDGE_CLUSTER_REGISTRY >/dev/null 2>&1 - chk $? "checking existence of image $CRONJOB_AUTO_UPGRADE_IMAGE_FULL_PATH_ON_EDGE_CLUSTER_REGISTRY" - set -e - fi - - sed -i -e "s#__ImagePath__#${CRONJOB_AUTO_UPGRADE_IMAGE_FULL_PATH_ON_EDGE_CLUSTER_REGISTRY}#g" auto-upgrade-cronjob.yml - - if [[ "$USE_PRIVATE_REGISTRY" != "true" ]]; then - log_debug "remote image registry is not private, remove ImagePullSecret..." - sed -i -e '{/START_REMOTE_ICR/,/END_REMOTE_ICR/d;}' auto-upgrade-cronjob.yml - fi + log_fatal 1 "Agent install on edge cluster requires using an edge cluster registry" fi log_debug "prepare_k8s_auto_upgrade_cronjob_file() end" @@ -3962,7 +3682,7 @@ function prepare_k8s_pvc_file() { # Note: get_edge_cluster_files() already downloaded deployment-template.yml, if necessary local pvc_mode="ReadWriteOnce" number_of_nodes=$($KUBECTL get node | grep "Ready" -c) - if [[ $number_of_nodes -gt 1 ]] && ([[ $EDGE_CLUSTER_STORAGE_CLASS == csi-cephfs* ]] || [[ $EDGE_CLUSTER_STORAGE_CLASS == rook-cephfs* ]] || [[ $EDGE_CLUSTER_STORAGE_CLASS == ibmc-file* ]] || [[ $EDGE_CLUSTER_STORAGE_CLASS == ibmc-vpc-file* ]]); then + if [[ $number_of_nodes -gt 1 ]] && ([[ $EDGE_CLUSTER_STORAGE_CLASS == csi-cephfs* ]] || [[ $EDGE_CLUSTER_STORAGE_CLASS == ibmc-file* ]] || [[ $EDGE_CLUSTER_STORAGE_CLASS == ibmc-vpc-file* ]]); then pvc_mode="ReadWriteMany" fi @@ -3999,9 +3719,7 @@ function create_cluster_resources() { create_service_account create_secret create_configmap - if [[ "$ENABLE_AUTO_UPGRADE_CRONJOB" == "true" ]]; then - create_cronjobs - fi + create_cronjobs create_persistent_volume log_debug "create_cluster_resources() end" @@ -4013,11 +3731,10 @@ function update_cluster_resources() { update_secret update_configmap - if [[ "$ENABLE_AUTO_UPGRADE_CRONJOB" == "true" ]]; then - update_cronjobs - fi + update_cronjobs log_debug "update_cluster_resources() end" + } # Cluster only: to create namespace that agent will be deployed @@ -4036,10 +3753,8 @@ function create_namespace() { log_info "namespace ${AGENT_NAMESPACE} exists, skip creating namespace" fi - local ocp_supplemental_groups=$($KUBECTL get namespace ${AGENT_NAMESPACE} -o json | jq -r '.metadata.annotations' | jq '.["openshift.io/sa.scc.supplemental-groups"]') - local ocp_scc_uid_range=$($KUBECTL get namespace ${AGENT_NAMESPACE} -o json | jq -r '.metadata.annotations' | jq '.["openshift.io/sa.scc.uid-range"]') - if [[ -n $ocp_supplemental_groups ]] && [[ "$ocp_supplemental_groups" != "null" ]] && [[ -n $ocp_scc_uid_range ]] && [[ "$ocp_scc_uid_range" != "null" ]]; then - # if it has ocp supplementl group and uid range annotation, then update the annotation of namespace + if ! is_small_kube && [[ "$AGENT_NAMESPACE" != "$DEFAULT_AGENT_NAMESPACE" ]] ; then + # if it is ocp cluster and not in default namespace, then update the annotation of namespace log_info "update annotation of namespace ${AGENT_NAMESPACE}" $KUBECTL annotate namespace ${AGENT_NAMESPACE} openshift.io/sa.scc.uid-range='1000/1000' openshift.io/sa.scc.supplemental-groups='1000/1000' --overwrite fi @@ -4073,14 +3788,13 @@ function create_cluster_role_binding() { log_verbose "checking if clusterrolebinding exist..." - local clusterRoleBindingName=${AGENT_NAMESPACE}-${CLUSTER_ROLE_BINDING_NAME} - if ! $KUBECTL get clusterrolebinding ${clusterRoleBindingName} 2>/dev/null; then + if ! $KUBECTL get clusterrolebinding ${CLUSTER_ROLE_BINDING_NAME} 2>/dev/null; then log_verbose "Binding ${SERVICE_ACCOUNT_NAME} to cluster admin..." - $KUBECTL create clusterrolebinding ${clusterRoleBindingName} --serviceaccount=${AGENT_NAMESPACE}:${SERVICE_ACCOUNT_NAME} --clusterrole=cluster-admin + $KUBECTL create clusterrolebinding ${CLUSTER_ROLE_BINDING_NAME} --serviceaccount=${AGENT_NAMESPACE}:${SERVICE_ACCOUNT_NAME} --clusterrole=cluster-admin chk $? "creating clusterrolebinding for ${AGENT_NAMESPACE}:${SERVICE_ACCOUNT_NAME}" - log_info "clusterrolebinding ${clusterRoleBindingName} created" + log_info "clusterrolebinding ${CLUSTER_ROLE_BINDING_NAME} created" else - log_info "clusterrolebinding ${clusterRoleBindingName} exists, skip creating clusterrolebinding" + log_info "clusterrolebinding ${CLUSTER_ROLE_BINDING_NAME} exists, skip creating clusterrolebinding" fi log_debug "create_cluster_role_binding() end" @@ -4236,12 +3950,8 @@ function check_resources_for_deployment() { $KUBECTL get configmap ${CONFIGMAP_NAME} -n ${AGENT_NAMESPACE} >/dev/null configmap_ready=$? - if [[ "$ENABLE_AUTO_UPGRADE_CRONJOB" == "true" ]]; then - $KUBECTL get cronjob ${CRONJOB_AUTO_UPGRADE_NAME} -n ${AGENT_NAMESPACE} >/dev/null - auto_upgrade_cronjob_ready=$? - else - auto_upgrade_cronjob_ready=0 - fi + $KUBECTL get cronjob ${CRONJOB_AUTO_UPGRADE_NAME} -n ${AGENT_NAMESPACE} >/dev/null + auto_upgrade_cronjob_ready=$? $KUBECTL get pvc ${PVC_NAME} -n ${AGENT_NAMESPACE} >/dev/null pvc_ready=$? @@ -4271,11 +3981,9 @@ function update_deployment() { log_debug "update_deployment() begin" if [[ "$IS_AGENT_IMAGE_VERSION_SAME" == "true" ]] && [[ "$IS_HORIZON_ORG_ID_SAME" == "true" ]]; then - log_info "Agent image version and HZN_ORG_ID are the same. Keeping the existing agent deployment. Deleting agent pod ${POD_ID} in namespace ${AGENT_NAMESPACE} to pickup changes in configmap and secrets" - $KUBECTL delete pod ${POD_ID} -n ${AGENT_NAMESPACE} >/dev/null 2>&1 - chk $? 'deleting the old pod for agent update on cluster' + log_info "Agent image version and HZN_ORG_ID are the same. Keeping the existing agent deployment." else - if $KUBECTL get deployment ${DEPLOYMENT_NAME} -n ${AGENT_NAMESPACE} >/dev/null 2>&1; then + if $KUBECTL get deployment ${DEPLOYMENT_NAME} -n ${AGENT_NAMESPACE} >/dev/null 2>&1; then # deployment exists, delete it log_verbose "Found deployment ${DEPLOYMENT_NAME} in ${AGENT_NAMESPACE} namespace, deleting it..." $KUBECTL delete deployment ${DEPLOYMENT_NAME} -n ${AGENT_NAMESPACE} >/dev/null 2>&1 @@ -4332,11 +4040,11 @@ function check_deployment_status() { function get_pod_id() { log_debug "get_pod_id() begin" - if ! wait_for '[[ $($KUBECTL get pods -n ${AGENT_NAMESPACE} -l app=agent,type!=auto-upgrade-cronjob -o "jsonpath={..status.conditions[?(@.type==\"Ready\")].status}") == "True" ]]' 'Horizon agent pod ready' $AGENT_WAIT_MAX_SECONDS; then + if ! wait_for '[[ $($KUBECTL get pods -n ${AGENT_NAMESPACE} -l app=agent -o "jsonpath={..status.conditions[?(@.type==\"Ready\")].status}") == "True" ]]' 'Horizon agent pod ready' $AGENT_WAIT_MAX_SECONDS; then log_fatal 3 "Horizon agent pod did not start successfully" fi - if [[ $($KUBECTL get pods -n ${AGENT_NAMESPACE} -l app=agent,type!=auto-upgrade-cronjob -o 'jsonpath={..status.conditions[?(@.type=="Ready")].status}') != "True" ]]; then + if [[ $($KUBECTL get pods -n ${AGENT_NAMESPACE} -l app=agent -o 'jsonpath={..status.conditions[?(@.type=="Ready")].status}') != "True" ]]; then log_fatal 3 "Failed to get agent pod in Ready status" fi @@ -4362,9 +4070,7 @@ function setup_cluster_image_registry_cert() { create_secret_for_image_reigstry_cert fi - $KUBECTL scale --replicas=0 deployment.app/agent -n ${AGENT_NAMESPACE} patch_deployment_with_image_registry_volume - $KUBECTL scale --replicas=1 deployment.app/agent -n ${AGENT_NAMESPACE} log_debug "setup_cluster_image_registry_cert() end" } @@ -4410,7 +4116,7 @@ function patch_deployment_with_image_registry_volume() { log_debug "patch_deployment_with_image_registry_volume() begin" $KUBECTL patch deployment agent -n ${AGENT_NAMESPACE} -p "{\"spec\":{\"template\":{\"spec\":{\"volumes\":[{\"name\": \ - \"agent-docker-cert-volume\",\"secret\":{\"secretName\":\"${IMAGE_REGISTRY_SECRET_NAME}\"}}], \ + \"agent-docker-cert-volume\",\"secret\":{\"secretName\":\"openhorizon-agent-secrets-docker-cert\"}}], \ \"containers\":[{\"name\":\"anax\",\"volumeMounts\":[{\"mountPath\":\"/etc/docker/certs.d/${EDGE_CLUSTER_REGISTRY_HOST}\" \ ,\"name\":\"agent-docker-cert-volume\"},{\"mountPath\":\"/etc/docker/certs.d/${DEFAULT_OCP_INTERNAL_URL_FOR_EDGE_CLUSTER_REGISTRY}\" \ ,\"name\":\"agent-docker-cert-volume\"}],\"env\":[{\"name\":\"SSL_CERT_FILE\",\"value\":\"/etc/docker/certs.d/${EDGE_CLUSTER_REGISTRY_HOST}/ca.crt\"}]}]}}}}" @@ -4421,44 +4127,23 @@ function patch_deployment_with_image_registry_volume() { # Cluster only: to install/update agent in cluster function install_update_cluster() { log_debug "install_update_cluster() begin" - - if [[ $INPUT_FILE_PATH != remote:* ]]; then - confirmCmds ${DOCKER_ENGINE} - fi - - confirmCmds jq + confirmCmds ${DOCKER_ENGINE} jq check_existing_exch_node_is_correct_type "cluster" - check_cluster_agent_scope # sets AGENT_DEPLOYMENT_EXIST_IN_SAME_NAMESPACE - loadClusterAgentImage # create the cluster agent docker image locally - if [[ "$ENABLE_AUTO_UPGRADE_CRONJOB" == "true" ]]; then - loadClusterAgentAutoUpgradeCronJobImage # create the cluster cronjob docker images locally - fi - - getImageRegistryInfo # set $EDGE_CLUSTER_REGISTRY_HOST, and login to registry + loadClusterAgentAutoUpgradeCronJobImage # create the cluster cronjob docker images locally # push agent and cronjob images to cluster's registry if [[ "$USE_EDGE_CLUSTER_REGISTRY" == "true" ]]; then if is_ocp_cluster; then create_namespace create_image_stream - fi - else - log_info "Use remote registry" - create_namespace - create_image_pull_secrets # create image pull secrets if use private registry (if edge cluster registry username/password are provided), sets USE_PRIVATE_REGISTRY - fi - - if [[ $INPUT_FILE_PATH != remote:* ]]; then + fi pushImagesToEdgeClusterRegistry fi - - if [[ "$AGENT_DEPLOYMENT_EXIST_IN_SAME_NAMESPACE" == "true" ]]; then - check_agent_deployment_exist # sets AGENT_DEPLOYMENT_UPDATE POD_ID - fi + check_agent_deployment_exist # sets AGENT_DEPLOYMENT_UPDATE if [[ "$AGENT_DEPLOYMENT_UPDATE" == "true" ]]; then log_info "Update agent on edge cluster" update_cluster @@ -4473,6 +4158,7 @@ function install_update_cluster() { # Cluster only: to install agent in cluster function install_cluster() { log_debug "install_cluster() begin" + confirmCmds ${DOCKER_ENGINE} jq # generate files based on templates generate_installation_files @@ -4490,7 +4176,7 @@ function install_cluster() { create_deployment check_deployment_status - if is_ocp_cluster && [[ "$USE_EDGE_CLUSTER_REGISTRY" == "true" ]]; then + if is_ocp_cluster; then # setup image registry cert. This will patch the running deployment local isUpdate='false' setup_cluster_image_registry_cert $isUpdate @@ -4530,7 +4216,7 @@ function update_cluster() { update_deployment check_deployment_status - if is_ocp_cluster && [[ "$USE_EDGE_CLUSTER_REGISTRY" == "true" ]]; then + if is_ocp_cluster; then # setup image registry cert. This will patch the running deployment local isUpdate='true' setup_cluster_image_registry_cert $isUpdate diff --git a/build/common/src/env-hzn.json b/build/common/src/env-hzn.json index 6983546..92dbfa2 100644 --- a/build/common/src/env-hzn.json +++ b/build/common/src/env-hzn.json @@ -2,16 +2,16 @@ "biz": { "envVars": { - "SERVICE_NAME": "saved-model-service", - "SERVICE_CONTAINER_NAME": "saved-model-service", + "SERVICE_NAME": "mms-agent", + "SERVICE_CONTAINER_NAME": "mms-agent", "SERVICE_VERSION": "1.0.0", "SERVICE_VERSION_RANGE_UPPER": "1.0.0", "SERVICE_VERSION_RANGE_LOWER": "1.0.0", "SERVICE_CONTAINER_CREDS": "", "VOLUME_MOUNT": "/mms-shared", "MMS_SHARED_VOLUME": "mms_shared_volume", - "MMS_OBJECT_TYPE": "object_detection", - "MMS_OBJECT_ID": "config.json", + "MMS_OBJECT_TYPE": "mms_agent_config", + "MMS_OBJECT_ID": "mms_agent_config_json", "MMS_OBJECT_FILE": "config/config.json", "MMS_CONTAINER_CREDS": "", "MMS_CONTAINER_NAME": "mms-service", diff --git a/build/common/src/hzn-config/object.policy.json b/build/common/src/hzn-config/object.policy.json index f15abdb..25dcc4a 100644 --- a/build/common/src/hzn-config/object.policy.json +++ b/build/common/src/hzn-config/object.policy.json @@ -3,9 +3,9 @@ "objectType": "$MMS_OBJECT_TYPE", "destinationOrgID": "$HZN_ORG_ID", "destinationPolicy": { - "constrints": [ + "constraints": [ { - "name": "workersafety", + "name": "worker-safety", "value": "Worker Safety" } ], diff --git a/build/common/src/hzn-config/services/top-level-service/service.definition.json b/build/common/src/hzn-config/services/top-level-service/service.definition.json index b52917a..1f918c8 100644 --- a/build/common/src/hzn-config/services/top-level-service/service.definition.json +++ b/build/common/src/hzn-config/services/top-level-service/service.definition.json @@ -9,13 +9,6 @@ "public": true, "sharable": "singleton", "requiredServices": [ - { - "org": "$HZN_ORG_ID", - "url": "$SERVICE_NAME", - "version": "$SERVICE_VERSION_RANGE_UPPER", - "versionRange": "$SERVICE_VERSION_RANGE_LOWER", - "arch": "$ARCH" - } ], "userInput": [ { "name": "MMS_OBJECT_TYPE", "label": "", "type": "string", "defaultValue": "$MMS_OBJECT_TYPE" }, diff --git a/build/common/src/hzn.js b/build/common/src/hzn.js index 083a7db..532e3e9 100644 --- a/build/common/src/hzn.js +++ b/build/common/src/hzn.js @@ -65,6 +65,7 @@ class Hzn { console.log(err.message); this.envVar.setOrgId(); if (err.message.indexOf('hzn:') >= 0) { + console.log('here:', cliBypass, cliOptional); if (cliBypass) { this.updateConfigFile() .subscribe(() => { diff --git a/build/common/src/hzn.js.map b/build/common/src/hzn.js.map index 0ff8765..38bbe51 100644 --- a/build/common/src/hzn.js.map +++ b/build/common/src/hzn.js.map @@ -1 +1 @@ -{"version":3,"file":"hzn.js","sourceRoot":"","sources":["../../../src/common/src/hzn.ts"],"names":[],"mappings":";;;AAAA,2BAAgC;AAChC,+BAAsC;AAEtC,+BAA4B;AAC5B,2CAAkE;AAClE,mCAAgC;AAEnB,QAAA,KAAK,GAAG,IAAI,aAAK,EAAE,CAAC;AAEjC,MAAa,GAAG;IA4Bd,YAAY,KAAgB;QAf5B,mBAAc,GAAW,EAAE,CAAC;QAC5B,yBAAoB,GAAW,EAAE,CAAC;QAClC,iCAA4B,GAAW,EAAE,CAAC;QAC1C,sBAAiB,GAAW,EAAE,CAAC;QAC/B,qBAAgB,GAAW,EAAE,CAAC;QAC9B,sBAAiB,GAAW,EAAE,CAAC;QAC/B,0BAAqB,GAAW,EAAE,CAAC;QACnC,uBAAkB,GAAW,EAAE,CAAC;QAS9B,IAAI,CAAC,KAAK,GAAG,aAAK,CAAC;QACnB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,GAAG,GAAG,KAAK,CAAC,GAAG,CAAC;QACrB,IAAI,CAAC,MAAM,GAAG,IAAI,SAAG,CAAC,KAAK,CAAC,GAAG,EAAE,aAAK,CAAC,YAAY,EAAE,CAAC,CAAC;QACvD,IAA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AAC;IACD,kBAAkB;QAChB,OAAO,aAAK,CAAC,kBAAkB,EAAE,CAAC;IACpC,CAAC;IACD,WAAW;QACT,OAAO,IAAI,iBAAU,CAAC,CAAC,QAAQ,EAAE,EAAE;YACjC,aAAK,CAAC,OAAO,EAAE;iBACd,SAAS,CAAC;gBACT,IAAI,EAAE,CAAC,MAAU,EAAE,EAAE;oBACnB,IAAG,MAAM,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE;wBAC9C,aAAK,CAAC,KAAK,CAAC;;kFAE0D,CAAC;6BACtE,SAAS,CAAC;4BACT,QAAQ,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,QAAQ,EAAE;4BACnC,KAAK,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC;yBACpC,CAAC,CAAA;qBACH;yBAAM;wBACL,OAAO,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAA;wBAC/B,QAAQ,CAAC,QAAQ,EAAE,CAAC;qBACrB;gBACH,CAAC;aACF,CAAC,CAAA;QACJ,CAAC,CAAC,CAAA;IACJ,CAAC;IACD,YAAY;QACV,OAAO,IAAI,iBAAU,CAAC,CAAC,QAAQ,EAAE,EAAE;YACjC,IAAI,MAAM,GAAG,aAAK,CAAC,YAAY,EAAE,CAAA;YACjC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAA;YACnB,QAAQ,CAAC,QAAQ,EAAE,CAAA;QACrB,CAAC,CAAC,CAAA;IACJ,CAAC;CACF;AAnnBD,kBAmnBC"} \ No newline at end of file diff --git a/package.json b/package.json index 851557e..ebbefec 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hzn-cli", - "version": "0.8.6", + "version": "0.8.7", "description": "Open Horizon CLI toolkit helps streamline the process of preparing node agents and perform tasks between orgs environments", "main": "./build/index.js", "bin": { @@ -39,7 +39,8 @@ "MMS", "Model", "Management", - "Service" + "Service", + "Workload Placement" ], "author": "ljeff@us.ibm.com", "license": "ISC", diff --git a/src/common/src/hzn.ts b/src/common/src/hzn.ts index 85ac777..e7808d6 100644 --- a/src/common/src/hzn.ts +++ b/src/common/src/hzn.ts @@ -88,6 +88,7 @@ export class Hzn { console.log(err.message); this.envVar.setOrgId() if(err.message.indexOf('hzn:') >= 0) { + console.log('here:', cliBypass, cliOptional) if(cliBypass) { this.updateConfigFile() .subscribe(() => { diff --git a/src/env-hzn.json b/src/env-hzn.json index 6983546..92dbfa2 100644 --- a/src/env-hzn.json +++ b/src/env-hzn.json @@ -2,16 +2,16 @@ "biz": { "envVars": { - "SERVICE_NAME": "saved-model-service", - "SERVICE_CONTAINER_NAME": "saved-model-service", + "SERVICE_NAME": "mms-agent", + "SERVICE_CONTAINER_NAME": "mms-agent", "SERVICE_VERSION": "1.0.0", "SERVICE_VERSION_RANGE_UPPER": "1.0.0", "SERVICE_VERSION_RANGE_LOWER": "1.0.0", "SERVICE_CONTAINER_CREDS": "", "VOLUME_MOUNT": "/mms-shared", "MMS_SHARED_VOLUME": "mms_shared_volume", - "MMS_OBJECT_TYPE": "object_detection", - "MMS_OBJECT_ID": "config.json", + "MMS_OBJECT_TYPE": "mms_agent_config", + "MMS_OBJECT_ID": "mms_agent_config_json", "MMS_OBJECT_FILE": "config/config.json", "MMS_CONTAINER_CREDS": "", "MMS_CONTAINER_NAME": "mms-service", diff --git a/src/hzn-config/object.policy.json b/src/hzn-config/object.policy.json index f15abdb..25dcc4a 100644 --- a/src/hzn-config/object.policy.json +++ b/src/hzn-config/object.policy.json @@ -3,9 +3,9 @@ "objectType": "$MMS_OBJECT_TYPE", "destinationOrgID": "$HZN_ORG_ID", "destinationPolicy": { - "constrints": [ + "constraints": [ { - "name": "workersafety", + "name": "worker-safety", "value": "Worker Safety" } ], diff --git a/src/hzn-config/services/top-level-service/service.definition.json b/src/hzn-config/services/top-level-service/service.definition.json index b52917a..1f918c8 100644 --- a/src/hzn-config/services/top-level-service/service.definition.json +++ b/src/hzn-config/services/top-level-service/service.definition.json @@ -9,13 +9,6 @@ "public": true, "sharable": "singleton", "requiredServices": [ - { - "org": "$HZN_ORG_ID", - "url": "$SERVICE_NAME", - "version": "$SERVICE_VERSION_RANGE_UPPER", - "versionRange": "$SERVICE_VERSION_RANGE_LOWER", - "arch": "$ARCH" - } ], "userInput": [ { "name": "MMS_OBJECT_TYPE", "label": "", "type": "string", "defaultValue": "$MMS_OBJECT_TYPE" },