diff --git a/installer/build/bootable/build-main.sh b/installer/build/bootable/build-main.sh index 3b9f5d4ba5..293381b3c1 100755 --- a/installer/build/bootable/build-main.sh +++ b/installer/build/bootable/build-main.sh @@ -86,6 +86,11 @@ function build_app { SOURCE=$(jq '.['$LINE_NUM'] | .source' "${MANIFEST}" | tr -d '"') DESTINATION=$(echo "${ROOT}/$(cat "${MANIFEST}" | jq '.['$LINE_NUM'] | .destination')" | tr -d '"' ) mkdir -p "$(dirname "$DESTINATION")" && cp -R $SOURCE "$DESTINATION" + if [[ "$DESTINATION" == *"fileserver/html"* ]]; then + pushd $DESTINATION + rm -fr .gitignore karma* package* js/fixtures js/specs + popd + fi fi LINE_NUM=$((LINE_NUM+1)) done diff --git a/installer/build/build-ova.sh b/installer/build/build-ova.sh index 84fd6af60e..fd13928116 100755 --- a/installer/build/build-ova.sh +++ b/installer/build/build-ova.sh @@ -146,6 +146,7 @@ drone deploy --param VICENGINE=${BUILD_VICENGINE_URL:-} \\ --param VIC_MACHINE_SERVER=${BUILD_VIC_MACHINE_SERVER_REVISION:-} \\ --param ADMIRAL=${BUILD_ADMIRAL_REVISION:-} \\ --param HARBOR=${BUILD_HARBOR_URL:-} \\ + --param VICUI=${BUILD_VICUI_URL:-} \\ vmware/vic-product ${DRONE_BUILD_NUMBER:-} staging EOF elif [ "deployment" == "${DRONE_BUILD_EVENT}" -a "staging" == "${DRONE_DEPLOY_TO}" ]; then @@ -156,6 +157,7 @@ drone deploy --param VICENGINE=${BUILD_VICENGINE_URL:-} \\ --param VIC_MACHINE_SERVER=${BUILD_VIC_MACHINE_SERVER_REVISION:-} \\ --param ADMIRAL=${BUILD_ADMIRAL_REVISION:-} \\ --param HARBOR=${BUILD_HARBOR_URL:-} \\ + --param VICUI=${BUILD_VICUI_URL:-} \\ vmware/vic-product ${DRONE_BUILD_NUMBER:-} release EOF fi diff --git a/installer/build/scripts/upgrade/upgrade.sh b/installer/build/scripts/upgrade/upgrade.sh index ea72d14316..dec3382cba 100755 --- a/installer/build/scripts/upgrade/upgrade.sh +++ b/installer/build/scripts/upgrade/upgrade.sh @@ -46,6 +46,7 @@ DESTROY_ENABLED="" MANUAL_DISK_MOVE="" EMBEDDED_PSC="" INSECURE_SKIP_VERIFY="" +UPGRADE_UI_PLUGIN="" TIMESTAMP=$(date +"%Y-%m-%d %H:%M:%S %z %Z") export REDIRECT_ENABLED=0 @@ -93,11 +94,13 @@ function callPluginUpgradeEndpoint { local preset=$1 local vc='{"target":"'"${VCENTER_TARGET}"'","user":"'"${VCENTER_USERNAME}"'","password":"'"${VCENTER_PASSWORD}"'","thumbprint":"'"${VCENTER_FINGERPRINT}"'"}' local plugin='{"preset":"'"${preset}"'","force":true}' - local payload='{"vc":'${vc}',"plugin":'${plugin}'}' + local payload='{"vc":"${vc}","plugin":"${plugin}"}' echo "register payload - ${payload}" | sed -e 's/'${VCENTER_PASSWORD}'/***/g' >> $upgrade_log_file 2>&1 /usr/bin/curl \ -k \ - --write-out '%{http_code}' \ + -s \ + -o /dev/null \ + --write-out "%{http_code}\\n" \ --header "Content-Type: application/json" \ -X POST \ --data "${payload}" \ @@ -140,10 +143,12 @@ function upgradeAppliancePlugin { function callRegisterEndpoint { local payload='{"target":"'"${VCENTER_TARGET}"'","user":"'"${VCENTER_USERNAME}"'","password":"'"${VCENTER_PASSWORD}"'","thumbprint":"'"${VCENTER_FINGERPRINT}"'","externalpsc":"'"${EXTERNAL_PSC}"'","pscdomain":"'"${PSC_DOMAIN}"'"}' - echo "register payload - ${payload}" | sed -e 's/'${VCENTER_PASSWORD}'/***/g' >> $upgrade_log_file 2>&1 + echo "register payload - ${payload}" | sed -e 's/"${VCENTER_PASSWORD}"/***/g' >> $upgrade_log_file 2>&1 /usr/bin/curl \ -k \ - --write-out '%{http_code}' \ + -s \ + -o /dev/null \ + --write-out "%{http_code}\\n" \ --header "Content-Type: application/json" \ -X POST \ --data "${payload}" \ @@ -538,6 +543,9 @@ function main { --ssh-insecure-skip-verify) INSECURE_SKIP_VERIFY="1" ;; + --upgrade-ui-plugin) + UPGRADE_UI_PLUGIN="y" + ;; -h|--help|*) usage exit 0 @@ -582,6 +590,7 @@ function main { export GOVC_DATACENTER="$VCENTER_DATACENTER" [ -z "${APPLIANCE_TARGET}" ] && read -p "Enter old VIC appliance IP: " APPLIANCE_TARGET [ -z "${APPLIANCE_USERNAME}" ] && read -p "Enter old VIC appliance username: " APPLIANCE_USERNAME + [ -z "${UPGRADE_UI_PLUGIN}" ] && read -p "Upgrade VIC UI Plugin? (y/n):" UPGRADE_UI_PLUGIN if [ -n "${DESTROY_ENABLED}" ] ; then local resp="" @@ -626,8 +635,10 @@ function main { ### -------------------- ### ### Component Upgrades ### ### -------------------- ### - log "\n-------------------------\nStarting VIC UI Plugin Upgrade ${TIMESTAMP}\n" - upgradeAppliancePlugin + if [ "$UPGRADE_UI_PLUGIN" == "y" ]; then + log "\n-------------------------\nStarting VIC UI Plugin Upgrade ${TIMESTAMP}\n" + upgradeAppliancePlugin + fi log "\n-------------------------\nStarting Admiral Upgrade ${TIMESTAMP}\n" upgradeAdmiral @@ -658,7 +669,11 @@ function finish() { if [ "$rc" -eq 0 ]; then log "" log "-------------------------" - log "Upgrade completed successfully. Exiting." + if [ "$UPGRADE_UI_PLUGIN" == "y" ]; then + log "Upgrade completed successfully. Exiting. Please logout and login vCenter Server twice to view the upgraded ui plugin." + else + log "Upgrade completed successfully. Exiting." + fi log "-------------------------" log "" else diff --git a/installer/fileserver/html/index.html b/installer/fileserver/html/index.html index 3d81137f69..39d48fea3f 100644 --- a/installer/fileserver/html/index.html +++ b/installer/fileserver/html/index.html @@ -150,7 +150,7 @@

Infrastructure Deployment Tools