Created
April 17, 2023 05:07
-
-
Save nikeasyanzi/e22ea6be8fec5f17f36bb2e4c45b7d73 to your computer and use it in GitHub Desktop.
VMware_agent_init.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Changelog | |
# --------------------------------------------------------------------------------------------- | |
# | Release | Date | Description | |
# --------------------------------------------------------------------------------------------- | |
# | v3 | 20221111 | Add function for differnt runlist input. | |
# --------------------------------------------------------------------------------------------- | |
# | v2 | 20211125 | Updated to fix failed to initialize STAF issue for Agent 8.0. | |
# --------------------------------------------------------------------------------------------- | |
# | v1 | 20210928 | Update for fixing addon-cert docker image download issue. | |
# --------------------------------------------------------------------------------------------- | |
proxy=proxy.houston.hpecorp.net | |
port=8080 | |
runlist=$1 | |
#set -e | |
pull_docker_image(){ | |
cat <<EOF > /vmware/input/runlist.json | |
{"numHosts":1,"postcert":{"estimatedTime":0,"skippableIfLastPass":false,"visible":false,"dependsOn":null,"name":null,"checked":false,"requiredOnce":false,"testType":null,"cmd":null,"id":null,"group":null},"agent":{"mode":"offline-ui","version":"6.0"},"environment":{"hosts":[{"hostname":"192.168.100.52","password":"VMware12!","hosttype":"esx","user":"root"}]},"selectedTestList":[{"estimatedTime":20,"skippableIfLastPass":true,"visible":true,"dependsOn":null,"name":"Addon::Upgrade_Component","checked":true,"requiredOnce":true,"testType":null,"cmd":"\/certs\/addon-cert\/addon70\/addonlauncher.sh \/certs\/addon-cert\/addon70\/addOnLauncher.py TestClass=certification.addon.UpgradeComponent","id":"ed438533-7f25-4e66-bc91-32f81770dd9c","group":"AddOn"}],"session":{"runUuid":"44f04c9a-788a-4b3d-a11d-e2191441e9ca","name":"7.0U1 addon p02patch","category":"addon","type":"addon-cert70","uuid":"dca4d8cb-5c01-49c3-9b3f-3da1dbcd1212"},"precert":{"estimatedTime":0,"skippableIfLastPass":false,"visible":false,"dependsOn":null,"name":null,"checked":false,"requiredOnce":false,"testType":null,"cmd":null,"id":null,"group":null},"preSignedURL":"https:\/\/caas-prod-tm.s3-accelerate.amazonaws.com\/tmp\/WUIIhYu4q315vHKX?X-Amz-Security-Token=IQoJb3JpZ2luX2VjEBAaCXVzLXdlc3QtMSJHMEUCIFZnJjhdT9KjSTOA2Teohgp7C6oC0sIwgo6Rpa4LHjMRAiEAngjzlJ%2FkQuRVd0c79%2Bazzj546lo8fASwTQsETC5Ei5UqvQMIuf%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FARADGgwzOTE4MTUxNDE3NDEiDMuHPQ73CzzZCzYA5yqRA9uVM9CM%2FjoFGZDt1AselEO3x8N%2FgQpFb7Ru4IPWkvWO5z0osvk%2FaroSmQJS2g3YC%2FM0etMhhtfpmc7VcU9bpR5xHN6aw5Oxa98tCRufIGL746%2BM7ZJWvJJIEQczKgB%2FdxhRivZQaV%2Bc%2FEOCP2nhI3VbabwYVSSnL4XlipWCpPf5G3uWVU71XoO1AA5DVwTWtXXQAy1mHmxuBAEIsNrut0B950Wu%2FMth0g754NfgpgR%2FnDYsF%2FYDOBSaRhlId1ryYluX8bZdxl9WxqNg8BFy%2B0XoXXfEWLNU8%2F9vmlntysPG0bLKsulYrlN0KApjepn2z5a5YFk44eXV%2FsNSHvBnCrQXw7N7gdMBtPN5sFK%2F%2FFo3Xz9mlyJzUTMTnhXSsFjJedVS0BRT7vCw%2FGFDNNdjqWkdZbFkAq2ArhHLrIiiQZ%2FaJbkEUeK%2BqN90P9eA7tOy%2BCcJQ4wJXgqYywiwy2Y9IASsB%2F%2F7MfyhvQOQiLy0aqylaJqVXmqwsoADKtkr%2BlgiR%2BraUnY%2F60NzlSVyxeOPyiyUMPPmi%2F8FOusBfG%2B8Jo%2Br1Q7LU5GSw%2F2XJFCPVvj%2BM71FjIEVj7eMmIKV25BW%2BgT3vKWTrflaf9v7o71GXTgnVXmpe%2FmKY0Mi6snbjcvkxt5x1hTf1Swnde3vCb5JQ74fS866KuoleJWfIQEC%2BJf7ILfqj4OameSUqR%2FNFuayClZGZxa7GXpZmkTsD1fcHXE0UH%2FbUYyUmCFzy1opw9R%2BAwKXWpMGS73K24wZ%2BE36oODRpA0BjXJInjS91o1GDjPT9FFNGoKnLNUSQ464fEtM6gBH5O9FiAOHmeUUPyCU5QOQUUlfrxzo9rHHc2F7x8upxN0UuA%3D%3D&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20201223T075345Z&X-Amz-SignedHeaders=host&X-Amz-Expires=16649&X-Amz-Credential=ASIAVWOQATFWXK4KG3V3%2F20201223%2Fus-west-1%2Fs3%2Faws4_request&X-Amz-Signature=2a029d25d209c3bb2095d649c6ceff029abdb09226f02e8d29e7cd1e9351d18d","userSelection":{"Quickboot_yes":"true","ESXRelease_7.0P02_17325551":"true","CertifiedAddon_no":"true","CertifiedComponent_yes":"true"},"params":{"testParams":[{"params_display":{"05_ADDON_URL":{"Description":"Enter the Addon URL:","type":"textbox","value":"http:\/\/service.os1.tw:8080\/iso\/vmware\/CraigImage\/cert\/","info":null},"01_VC_USER":{"Description":"Enter the Username for the VC:","type":"textbox","value":"administrator@vsphere.local","info":null},"03_VC_IP":{"Description":"Enter the VC IP","type":"textbox","value":"192.168.103.61","info":null},"02_VC_PWD":{"Description":"Enter the Password for the VC:","type":"password","value":"certVCSA@123","info":null}},"name":"Addon::Name_and_version_check","params":{"05_ADDON_URL":"http:\/\/service.os1.tw:8080\/iso\/vmware\/CraigImage\/cert\/","01_VC_USER":"administrator@vsphere.local","03_VC_IP":"192.168.103.61","02_VC_PWD":"certVCSA@123"}},{"params_display":{"05_ADDON_URL":{"Description":"Enter the Addon URL of addon under test:","type":"textbox","value":"http:\/\/service.os1.tw:8080\/iso\/vmware\/CraigImage\/cert\/","info":null},"01_VC_USER":{"Description":"Enter the Username for the VC:","type":"textbox","value":"administrator@vsphere.local","info":null},"03_VC_IP":{"Description":"Enter the VC IP","type":"textbox","value":"192.168.103.61","info":null},"02_VC_PWD":{"Description":"Enter the Password for the VC:","type":"password","value":"certVCSA@123","info":null}},"name":"Addon::Install_Addon","params":{"05_ADDON_URL":"http:\/\/service.os1.tw:8080\/iso\/vmware\/CraigImage\/cert\/","01_VC_USER":"administrator@vsphere.local","03_VC_IP":"192.168.103.61","02_VC_PWD":"certVCSA@123"}},{"params_display":{"COMPVERSION":{"Description":"Enter the component version (e.g 3.17.13.2-1vmw.687.0.0.13394445)","type":"textbox","value":"701.0.0.10.6.3.2-1","info":null},"05_ADDON_URL":{"Description":"Enter the Addon URL of addon under test:","type":"textbox","value":"http:\/\/service.os1.tw:8080\/iso\/vmware\/CraigImage\/cert\/","info":null},"01_VC_USER":{"Description":"Enter the Username for the VC:","type":"textbox","value":"administrator@vsphere.local","info":null},"03_VC_IP":{"Description":"Enter the VC IP","type":"textbox","value":"192.168.103.61","info":null},"02_VC_PWD":{"Description":"Enter the Password for the VC:","type":"password","value":"certVCSA@123","info":null},"VIBVERSION":{"Description":"Enter the Vib Version (e.g 3.17.13.2-1vmw.687.0.0.13394445)","type":"textbox","value":"701.0.0.10.6.3.2-1OEM.15843807","info":null},"COMPONENTNAME":{"Description":"Enter the component name (e.g nmlx4_rdma)","type":"textbox","value":"oem-build-component","info":"Enter the component details which is part of the Addon under test."},"COMPPATH":{"Description":"Enter the component path (e.g \/vmfs\/volumes\/datastore\/nmlx4_rdma-3.17.13.2-1vmw.687.0.0.13394445.zip)","type":"textbox","value":"\/vmfs\/volumes\/datastore115\/oem-build-component_701.0.0.10.6.3.2-1_17101688.zip","info":null},"VIBMODS":{"Description":"Enter the Vib Module(e.g nmlx4-rdma)","type":"textbox","value":"oem-build","info":"Enter the vib details which is part of the Addon under test."}},"name":"Addon::PreCheck_Component","params":{"COMPVERSION":"701.0.0.10.6.3.2-1","05_ADDON_URL":"http:\/\/service.os1.tw:8080\/iso\/vmware\/CraigImage\/cert\/","01_VC_USER":"administrator@vsphere.local","03_VC_IP":"192.168.103.61","02_VC_PWD":"certVCSA@123","VIBVERSION":"701.0.0.10.6.3.2-1OEM.15843807","COMPONENTNAME":"oem-build-component","COMPPATH":"\/vmfs\/volumes\/datastore115\/oem-build-component_701.0.0.10.6.3.2-1_17101688.zip","VIBMODS":"oem-build"}},{"params_display":{"COMPVERSION":{"Description":"Enter the component version (e.g 3.17.13.2-1vmw.687.0.0.13394445)","type":"textbox","value":"701.0.0.10.6.3.2-1","info":null},"05_ADDON_URL":{"Description":"Enter the Addon URL of addon under test:","type":"textbox","value":"http:\/\/service.os1.tw:8080\/iso\/vmware\/CraigImage\/cert\/","info":null},"01_VC_USER":{"Description":"Enter the Username for the VC:","type":"textbox","value":"administrator@vsphere.local","info":null},"03_VC_IP":{"Description":"Enter the VC IP","type":"textbox","value":"192.168.103.61","info":null},"02_VC_PWD":{"Description":"Enter the Password for the VC:","type":"password","value":"certVCSA@123","info":null},"VIBVERSION":{"Description":"Enter the Vib Version (e.g 3.17.13.2-1vmw.687.0.0.13394445)","type":"textbox","value":"701.0.0.10.6.3.2-1OEM.15843807","info":null},"COMPONENTNAME":{"Description":"Enter the component name (e.g nmlx4_rdma)","type":"textbox","value":"oem-build-component","info":"Enter the component details which is part of the Addon under test."},"ACCEPTANCELEVEL":{"Description":"Enter the acceptancelevel of the component(e.g VMwareCertified)","type":"textbox","value":"PartnerSupported","info":null},"COMPPATH":{"Description":"Enter the component path (e.g \/vmfs\/volumes\/datastore\/nmlx4_rdma-3.17.13.2-1vmw.687.0.0.13394445.zip)","type":"textbox","value":"\/vmfs\/volumes\/datastore115\/oem-build-component_701.0.0.10.6.3.2-1_17101688.zip","info":"The component zip should be present in local ESXi datastore"},"VIBMODS":{"Description":"Enter the Vib Module(e.g nmlx4-rdma)","type":"textbox","value":"oem-build","info":"Enter the vib details which is part of the Addon under test."}},"name":"Addon::Install_Component","params":{"COMPVERSION":"701.0.0.10.6.3.2-1","05_ADDON_URL":"http:\/\/service.os1.tw:8080\/iso\/vmware\/CraigImage\/cert\/","01_VC_USER":"administrator@vsphere.local","03_VC_IP":"192.168.103.61","02_VC_PWD":"certVCSA@123","VIBVERSION":"701.0.0.10.6.3.2-1OEM.15843807","COMPONENTNAME":"oem-build-component","ACCEPTANCELEVEL":"PartnerSupported","COMPPATH":"\/vmfs\/volumes\/datastore115\/oem-build-component_701.0.0.10.6.3.2-1_17101688.zip","VIBMODS":"oem-build"}},{"params_display":{"01_VC_USER":{"Description":"Enter the Username for the VC:","type":"textbox","value":"administrator@vsphere.local","info":null},"ACCEPTANCELEVEL":{"Description":"Enter the acceptancelevel of the component (e.g VMwareCertified)","type":"textbox","value":"PartnerSupported","info":null},"BASECOMPPATH":{"Description":"Enter the base component paths (e.g \/vmfs\/volumes\/datastore\/nmlx4_rdma-3.17.13.2-1vmw.687.0.0.13394445.zip)","type":"textbox","value":"\/vmfs\/volumes\/datastore115\/oem-build-component_701.0.0.10.6.3.2-1_17101688.zip","info":"The already certified component zip should be present in local ESXi datastore"},"VIBMODS":{"Description":"Enter the Vib Module(e.g nmlx4-rdma)","type":"textbox","value":"oem-build","info":"Enter the vib details which is part of the Addon under test."},"BASECOMPVERSION":{"Description":"Enter the base component version (e.g 3.17.13.2-1vmw.687.0.0.13394445)","type":"textbox","value":"701.0.0.10.6.3.2-1","info":null},"COMPVERSION":{"Description":"Enter the upgraded component version (e.g 3.17.13.2-1vmw.687.0.0.13394445)","type":"textbox","value":"701.0.0.10.6.3.2-1","info":"Enter the upgraded component details which is part of the Addon under test."},"05_ADDON_URL":{"Description":"Enter the Addon URL of addon under test:","type":"textbox","value":"http:\/\/service.os1.tw:8080\/iso\/vmware\/CraigImage\/cert\/","info":null},"03_VC_IP":{"Description":"Enter the VC IP","type":"textbox","value":"192.168.103.61","info":null},"02_VC_PWD":{"Description":"Enter the Password for the VC:","type":"password","value":"certVCSA@123","info":null},"VIBVERSION":{"Description":"Enter the upgraded Vib Version (e.g 3.17.13.2-1vmw.687.0.0.13394445)","type":"textbox","value":"701.0.0.10.6.3.2-1OEM.15843807","info":"Enter the upgraded vib details which is part of the Addon under test."},"BASEVIBVERSION":{"Description":"Enter the base Vib Version (e.g 3.17.13.2-1vmw.687.0.0.13394445)","type":"textbox","value":"701.0.0.10.6.3.2-1OEM.15843807","info":null},"COMPONENTNAME":{"Description":"Enter the component name (e.g nmlx4_rdma)","type":"textbox","value":"oem-build-component","info":"Enter the component details which is part of the Addon under test."},"COMPPATH":{"Description":"Enter the upgraded component path (e.g \/vmfs\/volumes\/datastore\/nmlx4_rdma-3.17.13.2-1vmw.687.0.0.13394445.zip)","type":"textbox","value":"\/vmfs\/volumes\/datastore115\/oem-build-component_701.0.0.10.6.3.2-1_17101688.zip","info":"The component zip should be present in local ESXi datastore"}},"name":"Addon::Upgrade_Component","params":{"01_VC_USER":"administrator@vsphere.local","ACCEPTANCELEVEL":"PartnerSupported","BASECOMPPATH":"\/vmfs\/volumes\/datastore5\/oem-build-component_700.0.0.10.5.6.1-1_16586500.zip","VIBMODS":"oem-build","BASECOMPVERSION":"700.0.0.10.5.6.1-1","COMPVERSION":"701.0.0.10.6.3.2-1","05_ADDON_URL":"http:\/\/service.os1.tw:8080\/iso\/vmware\/CraigImage\/cert\/HPE-701.0.0.10.6.3.9-Jan2021-Addon-depot.zip","03_VC_IP":"192.168.103.62","02_VC_PWD":"certVCSA@123","VIBVERSION":"701.0.0.10.6.3.2-1OEM.15843807","BASEVIBVERSION":"700.0.0.10.5.6.1-1OEM.15843807","COMPONENTNAME":"oem-build-component","COMPPATH":"\/vmfs\/volumes\/datastore5\/oem-build-component_701.0.0.10.6.3.2-1_17101688.zip"}},{"params_display":{"COMPVERSION":{"Description":"Enter the component version (e.g 3.17.13.2-1vmw.687.0.0.13394445)","type":"textbox","value":"701.0.0.10.6.3.2-1","info":null},"05_ADDON_URL":{"Description":"Enter the Addon URL of addon under test:","type":"textbox","value":"http:\/\/service.os1.tw:8080\/iso\/vmware\/CraigImage\/cert\/","info":null},"01_VC_USER":{"Description":"Enter the Username for the VC:","type":"textbox","value":"administrator@vsphere.local","info":null},"03_VC_IP":{"Description":"Enter the VC IP","type":"textbox","value":"192.168.103.61","info":null},"02_VC_PWD":{"Description":"Enter the Password for the VC:","type":"password","value":"certVCSA@123","info":null},"VIBVERSION":{"Description":"Enter the Vib Version (e.g 3.17.13.2-1vmw.687.0.0.13394445)","type":"textbox","value":"701.0.0.10.6.3.2-1OEM.15843807","info":null},"COMPONENTNAME":{"Description":"Enter the component name (e.g nmlx4_rdma)","type":"textbox","value":"oem-build-component","info":"Enter the component details which is part of the Addon under test."},"COMPPATH":{"Description":"Enter the component path (e.g \/vmfs\/volumes\/datastore\/nmlx4_rdma-3.17.13.2-1vmw.687.0.0.13394445.zip)","type":"textbox","value":"\/vmfs\/volumes\/datastore115\/oem-build-component_701.0.0.10.6.3.2-1_17101688.zip","info":"The component zip should be present in local ESXi datastore"},"VIBMODS":{"Description":"Enter the Vib Module(e.g nmlx4-rdma)","type":"textbox","value":"oem-build","info":"Enter the vib details which is part of the Addon under test."}},"name":"Addon::Uninstall_Component","params":{"COMPVERSION":"701.0.0.10.6.3.2-1","05_ADDON_URL":"http:\/\/service.os1.tw:8080\/iso\/vmware\/CraigImage\/cert\/","01_VC_USER":"administrator@vsphere.local","03_VC_IP":"192.168.103.61","02_VC_PWD":"certVCSA@123","VIBVERSION":"701.0.0.10.6.3.2-1OEM.15843807","COMPONENTNAME":"oem-build-component","COMPPATH":"\/vmfs\/volumes\/datastore115\/oem-build-component_701.0.0.10.6.3.2-1_17101688.zip","VIBMODS":"oem-build"}},{"params_display":{"MD5SUMADDON":{"Description":"Enter the MD5SUM of the Addon","type":"textbox","value":"","info":null},"01_VC_USER":{"Description":"Enter the Username for the VC:","type":"textbox","value":"administrator@vsphere.local","info":null},"ADDONPATH":{"Description":"Enter the local datastore path of the Addon (e.g. \/vmfs\/volumes\/datastore\/<addonZipName>.zip)","type":"textbox","value":"\/vmfs\/volumes\/datastore115\/","info":null},"03_VC_IP":{"Description":"Enter the VC IP","type":"textbox","value":"192.168.103.61","info":null},"02_VC_PWD":{"Description":"Enter the Password for the VC:","type":"password","value":"certVCSA@123","info":null}},"name":"Addon::ChecksumOfAddon","params":{"MD5SUMADDON":"","01_VC_USER":"administrator@vsphere.local","ADDONPATH":"\/vmfs\/volumes\/datastore115\/","03_VC_IP":"192.168.103.61","02_VC_PWD":"certVCSA@123"}},{"params_display":{"01_VC_USER":{"Description":"Enter the Username for the VC:","type":"textbox","value":"administrator@vsphere.local","info":null},"03_VC_IP":{"Description":"Enter the VC IP","type":"textbox","value":"192.168.103.61","info":null},"02_VC_PWD":{"Description":"Enter the Password for the VC:","type":"password","value":"certVCSA@123","info":null}},"name":"Addon::VerifyLicenseLevel","params":{"01_VC_USER":"administrator@vsphere.local","03_VC_IP":"192.168.103.61","02_VC_PWD":"certVCSA@123"}},{"params_display":{"05_ADDON_URL":{"Description":"Enter the Addon URL of addon under test:","type":"textbox","value":"http:\/\/service.os1.tw:8080\/iso\/vmware\/CraigImage\/cert\/","info":null},"01_VC_USER":{"Description":"Enter the Username for the VC:","type":"textbox","value":"administrator@vsphere.local","info":null},"03_VC_IP":{"Description":"Enter the VC IP","type":"textbox","value":"192.168.103.61","info":null},"02_VC_PWD":{"Description":"Enter the Password for the VC:","type":"password","value":"certVCSA@123","info":null}},"name":"Addon::QuickBoot","params":{"05_ADDON_URL":"http:\/\/service.os1.tw:8080\/iso\/vmware\/CraigImage\/cert\/","01_VC_USER":"administrator@vsphere.local","03_VC_IP":"192.168.103.61","02_VC_PWD":"certVCSA@123"}},{"params_display":{"05_ADDON_URL":{"Description":"Enter the Addon URL of addon under test:","type":"textbox","value":"http:\/\/service.os1.tw:8080\/iso\/vmware\/CraigImage\/cert\/","info":null},"01_VC_USER":{"Description":"Enter the Username for the VC:","type":"textbox","value":"administrator@vsphere.local","info":null},"06_ADDON_NAME":{"Description":"Enter the Addon name:","type":"textbox","value":"","info":null},"07_ADDON_VERSION":{"Description":"Enter the Addon version:","type":"textbox","value":"","info":null},"03_VC_IP":{"Description":"Enter the VC IP","type":"textbox","value":"192.168.103.61","info":null},"02_VC_PWD":{"Description":"Enter the Password for the VC:","type":"password","value":"certVCSA@123","info":null}},"name":"Addon::PreCheck_Addon_setup","params":{"05_ADDON_URL":"http:\/\/service.os1.tw:8080\/iso\/vmware\/CraigImage\/cert\/","01_VC_USER":"administrator@vsphere.local","06_ADDON_NAME":"","07_ADDON_VERSION":"","03_VC_IP":"192.168.103.61","02_VC_PWD":"certVCSA@123"}},{"params_display":{"01_VC_USER":{"Description":"Enter the Username for the VC:","type":"textbox","value":"administrator@vsphere.local","info":null},"06_ADDON_NAME":{"Description":"Enter the Addon name:","type":"textbox","value":"","info":null},"07_ADDON_VERSION":{"Description":"Enter the Addon version:","type":"textbox","value":"","info":null},"ADDONPATH":{"Description":"Enter the local datastore path of the Addon (e.g. \/vmfs\/volumes\/datastore\/<addonZipName>.zip)","type":"textbox","value":"\/vmfs\/volumes\/datastore115\/","info":null},"03_VC_IP":{"Description":"Enter the VC IP","type":"textbox","value":"192.168.103.61","info":null},"02_VC_PWD":{"Description":"Enter the Password for the VC:","type":"password","value":"certVCSA@123","info":null}},"name":"Addon::CollectFeatureValues","params":{"01_VC_USER":"administrator@vsphere.local","06_ADDON_NAME":"","07_ADDON_VERSION":"","ADDONPATH":"\/vmfs\/volumes\/datastore115\/","03_VC_IP":"192.168.103.61","02_VC_PWD":"certVCSA@123"}}]},"tmSysMode":"PROD","unselectedTestList":[{"estimatedTime":10,"skippableIfLastPass":true,"visible":true,"dependsOn":null,"name":"Addon::PreCheck_Addon_setup","checked":true,"requiredOnce":true,"testType":null,"cmd":"\/certs\/addon-cert\/addon70\/addonlauncher.sh \/certs\/addon-cert\/addon70\/addOnLauncher.py TestClass=certification.addon.PreCheckAddonSetup","id":"4d870950-2bef-4c89-87b9-00b015c78c54","group":"AddOn"},{"estimatedTime":5,"skippableIfLastPass":true,"visible":true,"dependsOn":null,"name":"Addon::Name_and_version_check","checked":true,"requiredOnce":true,"testType":null,"cmd":"\/certs\/addon-cert\/addon70\/addonlauncher.sh \/certs\/addon-cert\/addon70\/addOnLauncher.py TestClass=certification.addon.NamingCheck","id":"3ec68682-995b-4856-b004-229ea7948b68","group":"AddOn"},{"estimatedTime":15,"skippableIfLastPass":true,"visible":true,"dependsOn":null,"name":"Addon::Install_Addon","checked":true,"requiredOnce":true,"testType":null,"cmd":"\/certs\/addon-cert\/addon70\/addonlauncher.sh \/certs\/addon-cert\/addon70\/addOnLauncher.py TestClass=certification.addon.InstallAddon","id":"1de6037e-2b11-4b03-81e3-936e13cc83e3","group":"AddOn"},{"estimatedTime":10,"skippableIfLastPass":true,"visible":true,"dependsOn":["Addon::UpgradeAddon_RegularBoot","Addon::Install_Addon"],"name":"Addon::QuickBoot","checked":true,"requiredOnce":true,"testType":null,"cmd":"\/certs\/addon-cert\/addon70\/addonlauncher.sh \/certs\/addon-cert\/addon70\/addOnLauncher.py TestClass=certification.addon.Quickboot","id":"763ae219-3734-4d3d-957e-2bea044a4910","group":"AddOn"},{"estimatedTime":5,"skippableIfLastPass":true,"visible":true,"dependsOn":null,"name":"Addon::PreCheck_Component","checked":true,"requiredOnce":true,"testType":null,"cmd":"\/certs\/addon-cert\/addon70\/addonlauncher.sh \/certs\/addon-cert\/addon70\/addOnLauncher.py TestClass=certification.addon.PreCheckComponent","id":"4573e561-5680-4939-ac5c-8826027abb6c","group":"AddOn"},{"estimatedTime":10,"skippableIfLastPass":true,"visible":true,"dependsOn":null,"name":"Addon::Uninstall_Component","checked":true,"requiredOnce":true,"testType":null,"cmd":"\/certs\/addon-cert\/addon70\/addonlauncher.sh \/certs\/addon-cert\/addon70\/addOnLauncher.py TestClass=certification.addon.UninstallComponent","id":"af7c8b19-3195-4b31-b109-921e83d577d2","group":"AddOn"},{"estimatedTime":10,"skippableIfLastPass":true,"visible":true,"dependsOn":null,"name":"Addon::Install_Component","checked":true,"requiredOnce":true,"testType":null,"cmd":"\/certs\/addon-cert\/addon70\/addonlauncher.sh \/certs\/addon-cert\/addon70\/addOnLauncher.py TestClass=certification.addon.InstallComponent","id":"8d7ea3db-a630-4477-97e7-efded86c1926","group":"AddOn"},{"estimatedTime":5,"skippableIfLastPass":true,"visible":true,"dependsOn":null,"name":"Addon::ChecksumOfAddon","checked":true,"requiredOnce":true,"testType":null,"cmd":"\/certs\/addon-cert\/addon70\/addonlauncher.sh \/certs\/addon-cert\/addon70\/addOnLauncher.py TestClass=certification.addon.ChecksumAddon","id":"b46f263d-03d2-40cb-acee-688aa1cbc502","group":"AddOn"},{"estimatedTime":5,"skippableIfLastPass":true,"visible":true,"dependsOn":null,"name":"Addon::VerifyLicenseLevel","checked":true,"requiredOnce":true,"testType":null,"cmd":"\/certs\/addon-cert\/addon70\/addonlauncher.sh \/certs\/addon-cert\/addon70\/addOnLauncher.py TestClass=certification.addon.VerifyHostLicence","id":"ba5797ac-6c5c-4a37-9646-ece54c601077","group":"AddOn"},{"estimatedTime":45,"skippableIfLastPass":true,"visible":true,"dependsOn":null,"name":"Addon::VM_Support_Log_Collection","checked":true,"requiredOnce":true,"testType":null,"cmd":"\/certs\/addon-cert\/addon70\/addonlauncher.sh '\/certs\/common\/vmsupport.py'","id":"e0786d04-f15e-4f5c-8fe3-47b3f2062440","group":"AddOn"},{"estimatedTime":5,"skippableIfLastPass":true,"visible":true,"dependsOn":null,"name":"Addon::CollectFeatureValues","checked":true,"requiredOnce":true,"testType":null,"cmd":"\/certs\/addon-cert\/addon70\/addonlauncher.sh \/certs\/addon-cert\/addon70\/addOnLauncher.py TestClass=certification.addon.CollectFeatureValues","id":"e6d2727e-a6ef-4a1a-b801-f54149d3a3e4","group":"AddOn"}]} | |
EOF | |
AgentLauncher -i | |
cat <<EOF > /vmware/input/runlist.json | |
{"numHosts":1,"postcert":{"estimatedTime":0,"skippableIfLastPass":false,"visible":false,"dependsOn":null,"name":null,"checked":false,"requiredOnce":false,"testType":null,"cmd":null,"id":null,"group":null},"agent":{"mode":"offline-ui","version":"6.0"},"environment":{"hosts":[{"hostname":"192.168.100.115","password":"VMware12!","hosttype":"esx","user":"root"}]},"selectedTestList":[{"estimatedTime":30,"skippableIfLastPass":true,"visible":true,"dependsOn":null,"name":"Asyncdriver::ChecksumOfISO","checked":true,"requiredOnce":true,"testType":null,"cmd":"\/certs\/common\/customimage\/Launcher70\/commonlauncher.sh \/certs\/common\/customimage\/Launcher70\/IOVPLauncher.py Asyncdriver::ChecksumOfISO","id":"ce93f141-4907-4cd8-b751-cd15ead8d169","group":"CustomImage"},{"estimatedTime":30,"skippableIfLastPass":true,"visible":true,"dependsOn":null,"name":"Asyncdriver::VMPowerOn","checked":true,"requiredOnce":true,"testType":null,"cmd":"\/certs\/common\/customimage\/Launcher70\/commonlauncher.sh \/certs\/common\/customimage\/Launcher70\/IOVPLauncher.py Asyncdriver::VMPowerOn","id":"5702bf11-9f23-4345-9d41-c6f277c8d78f","group":"CustomImage"}],"session":{"runUuid":"6c460248-2ba2-4af1-b30f-2ef00c631b0d","name":"7.0U1 p02patch","category":"server","type":"customimage-cert70","uuid":"fb6483eb-63f5-4ed2-b787-5d1fa0c27b5c"},"precert":{"estimatedTime":0,"skippableIfLastPass":false,"visible":false,"dependsOn":null,"name":null,"checked":false,"requiredOnce":false,"testType":null,"cmd":null,"id":null,"group":null},"preSignedURL":"https:\/\/caas-prod-tm.s3-accelerate.amazonaws.com\/tmp\/4f6OiVJYnslMFeY8?X-Amz-Security-Token=IQoJb3JpZ2luX2VjEAoaCXVzLXdlc3QtMSJIMEYCIQCkUWprkjgD8Jo47%2BjnwdLFED0hFjLSMd85wOSJoOoYsgIhAPaYTN68b%2FC3cwP9BnG0p1PP311IPAI8YEaZZ6hApwOwKr0DCLP%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEQAxoMMzkxODE1MTQxNzQxIgyNaGVg1T6DgXVHMR8qkQO00P1M%2F99o%2FQTpJo2jjfT%2FCbfXfOzzDGuZ5tOX4%2FuxsJkwj9r9S6jbtAK9yooXDdq25LGoDv1bkkIP%2FbfIsV4PXgxWBfxS5ZnIGB8B6DGGVMZKwBuIEPUEFsOn2UG9d7GMADYhb1sMSLENxMoOSrWX9bQcnp%2F7EN5%2FQK%2Bl5KkoIw0%2FAbhLd36N67rAsjPihoNkQ09UtjFX3m8u0fLaPbmC7txowDChK56JCP6s3a1GkIvQ2WWcOskYIePLdiVBe72xkJxdSgXKXiGWXfkFMr9viTFPiQSnyaUhWkORntEe1l0RNYT30kEM4IfuGIbp7GuMfE5FruPNDM2RzDclfHCSrNvLab3oPO76lo5II3l3lVY4lllXBZ6x%2Fmdpu9c%2FTM7wlmNjMiF0TreFmlmUNC7Ji8PYqs%2BObm1QAW%2BROpIiTdxbCqPVSInQkrjLg8yW4d6Yl7gVulAKh%2BLrkHc3%2Bk6XoxeiNGzpyHu%2FR94AqFDJyK5Bx9aJxcyH9P3ip1ekJSNCXs63cZcsfo7eBXXxX974ozCevor%2FBTrqAT202k4FO0Dw2xOaGxHmT0uaYMP11y%2FpPmw6BEa0qXlEh3T2Z68OLc3mZC3T6Eh24p%2FR0eOuU%2FoN3nXTwcdBg%2FC2wy3L3L6PjD%2BLl8hrRJvTvXvepeQrCuqzolP%2BDKiWgKRA2Nly%2F5Yl8IF0mRPOIX%2BNafNBvKM0ij4RUvYvyYULQLCK6ovjKazqCtYNVV8N%2BDtGGKo0L5fyyLMxSR0lRrjDhR7m2Lj47gpDXBGSSjcW8p54wPPogSkUyhL1XhEwrRYLPFyFWN93T3c5nho3Aj5yPwOnc8MsKhMs%2F1ojKJplwCfOj%2FxT0tQ%2B2w%3D%3D&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20201223T021652Z&X-Amz-SignedHeaders=host&X-Amz-Expires=31950&X-Amz-Credential=ASIAVWOQATFWUK6ZDRUM%2F20201223%2Fus-west-1%2Fs3%2Faws4_request&X-Amz-Signature=16dbabd2f8eea2b3c1315a435e9de05efbc20a1ab1a6ce0c94258307f0c4f58a","userSelection":{"ESXRelease_7.0P02_17325551":"true"},"params":{"testParams":[{"params_display":{"COMPVERSION":{"Description":"Enter the component version(e.g 3.17.13.2-1vmw.687.0.0.21194445)","type":"textbox","value":"701.0.0.10.6.3.2-1","info":null},"VIBVERSION":{"Description":"Enter the Vib Version (e.g 3.17.13.2-1vmw.687.0.0.21194445)","type":"textbox","value":"701.0.0.10.6.3.2-1OEM.15843807","info":null},"COMPONENTNAME":{"Description":"Enter the component name (e.g nmlx_rdma)","type":"textbox","value":"oem-build-component","info":null},"ACCEPTANCELEVEL":{"Description":"Enter the acceptancelevel of the component(e.g VMwareCertified)","type":"textbox","value":"PartnerSupported","info":null},"COMPPATH":{"Description":"Enter the component path (e.g \/vmfs\/volumes\/datastore\/nmlx_rdma-3.17.13.2-1vmw.687.0.0.21194445.zip)","type":"textbox","value":"\/vmfs\/volumes\/datastore52\/oem-build-component_701.0.0.10.6.3.2-1_17101688.zip","info":null},"VIBMODS":{"Description":"Enter the Vib Module (e.g nmlx-rdma)","type":"textbox","value":"oem-build","info":null},"FQDNHost":{"Description":"Enter FQDN of host under test","type":"textbox","value":"daviddl360g10.os1.tw","info":null}},"name":"Asyncdriver::PreCheck_Component","params":{"COMPVERSION":"701.0.0.10.6.3.2-1","VIBVERSION":"701.0.0.10.6.3.2-1OEM.15843807","COMPONENTNAME":"oem-build-component","ACCEPTANCELEVEL":"PartnerSupported","COMPPATH":"\/vmfs\/volumes\/datastore52\/oem-build-component_701.0.0.10.6.3.2-1_17101688.zip","VIBMODS":"oem-build","FQDNHost":"daviddl360g10.os1.tw"}},{"params_display":{"COMPVERSION":{"Description":"Enter the component version (e.g 3.17.13.2-1vmw.687.0.0.21194445)","type":"textbox","value":"701.0.0.10.6.3.2-1","info":null},"VIBVERSION":{"Description":"Enter the Vib Version (e.g 3.17.13.2-1vmw.687.0.0.21194445)","type":"textbox","value":"701.0.0.10.6.3.2-1OEM.15843807","info":null},"COMPONENTNAME":{"Description":"Enter the component name (e.g nmlx_rdma)","type":"textbox","value":"oem-build-component","info":null},"ACCEPTANCELEVEL":{"Description":"Enter the acceptancelevel of the component (e.g VMwareCertified)","type":"textbox","value":"PartnerSupported","info":null},"COMPPATH":{"Description":"Enter the component path (e.g \/vmfs\/volumes\/datastore\/nmlx_rdma-3.17.13.2-1vmw.687.0.0.21194445.zip)","type":"textbox","value":"\/vmfs\/volumes\/datastore52\/oem-build-component_701.0.0.10.6.3.2-1_17101688.zip","info":null},"VIBMODS":{"Description":"Enter the Vib Module (e.g nmlx-rdma)","type":"textbox","value":"oem-build","info":null},"FQDNHost":{"Description":"Enter FQDN of host under test","type":"textbox","value":"daviddl360g10.os1.tw","info":null}},"name":"Asyncdriver::Install_Component","params":{"COMPVERSION":"701.0.0.10.6.3.2-1","VIBVERSION":"701.0.0.10.6.3.2-1OEM.15843807","COMPONENTNAME":"oem-build-component","ACCEPTANCELEVEL":"PartnerSupported","COMPPATH":"\/vmfs\/volumes\/datastore52\/oem-build-component_701.0.0.10.6.3.2-1_17101688.zip","VIBMODS":"oem-build","FQDNHost":"daviddl360g10.os1.tw"}},{"params_display":{"UPGRADEVIBVERSION":{"Description":"Enter the Upgrade Vib Version (e.g 3.17.13.2-1vmw.687.0.0.21194445)","type":"textbox","value":"790.0.0.10.5.0.4-1OEM.15525992","info":null},"BASEVIBVERSION":{"Description":"Enter the base Vib Version (e.g 3.17.13.2-1vmw.687.0.0.21194445)","type":"textbox","value":"701.0.0.10.6.3.2-1OEM.15843807","info":null},"COMPONENTNAME":{"Description":"Enter the component name (e.g nmlx_rdma)","type":"textbox","value":"oem-build-component","info":null},"UPGRADECOMPVERSION":{"Description":"Enter Upgrade component version (e.g 3.17.13.2-1vmw.687.0.0.21194445)","type":"textbox","value":"790.0.0.10.5.0.4-1","info":null},"ACCEPTANCELEVEL":{"Description":"Enter the acceptancelevel of the component (e.g VMwareCertified)","type":"textbox","value":"PartnerSupported","info":null},"BASECOMPPATH":{"Description":"Enter the base component path (e.g \/vmfs\/volumes\/datastore\/nmlx_rdma-3.17.13.2-1vmw.687.0.0.21194445.zip)","type":"textbox","value":"\/vmfs\/volumes\/datastore52\/syn-oem-build-component_701.0.0.10.6.5.5-1_17102044.zip","info":null},"UPGRADECOMPPATH":{"Description":"Enter Upgrade component path (e.g \/vmfs\/volumes\/datastore\/nmlx_rdma-3.17.13.2-1vmw.687.0.0.21194445.zip)","type":"textbox","value":"\/vmfs\/volumes\/datastore52\/oem-build-component_790.0.0.10.5.0.4-1-signed_component-15852884.zip","info":null},"VIBMODS":{"Description":"Enter the Vib Module (e.g nmlx-rdma)","type":"textbox","value":"oem-build","info":null},"BASECOMPVERSION":{"Description":"Enter the base component version (e.g 3.17.13.2-1vmw.687.0.0.21194445)","type":"textbox","value":"701.0.0.10.6.3.2-1","info":null},"FQDNHost":{"Description":"Enter FQDN of host under test","type":"textbox","value":"daviddl360g10.os1.tw","info":null}},"name":"Asyncdriver::Upgrade_Component","params":{"UPGRADEVIBVERSION":"790.0.0.10.5.0.4-1OEM.15525992","BASEVIBVERSION":"701.0.0.10.6.3.2-1OEM.15843807","COMPONENTNAME":"oem-build-component","UPGRADECOMPVERSION":"790.0.0.10.5.0.4-1","ACCEPTANCELEVEL":"PartnerSupported","BASECOMPPATH":"\/vmfs\/volumes\/datastore52\/syn-oem-build-component_701.0.0.10.6.5.5-1_17102044.zip","UPGRADECOMPPATH":"\/vmfs\/volumes\/datastore52\/oem-build-component_790.0.0.10.5.0.4-1-signed_component-15852884.zip","VIBMODS":"oem-build","BASECOMPVERSION":"701.0.0.10.6.3.2-1","FQDNHost":"daviddl360g10.os1.tw"}},{"params_display":{"COMPVERSION":{"Description":"Enter the component version (e.g 3.17.13.2-1vmw.687.0.0.21194445)","type":"textbox","value":"701.0.0.10.6.3.2-1","info":null},"VIBVERSION":{"Description":"Enter the Vib Version (e.g 3.17.13.2-1vmw.687.0.0.21194445)","type":"textbox","value":"701.0.0.10.6.3.2-1OEM.15843807","info":null},"COMPONENTNAME":{"Description":"Enter the component name (e.g nmlx_rdma)","type":"textbox","value":"oem-build-component","info":null},"ACCEPTANCELEVEL":{"Description":"Enter the acceptancelevel of the component (e.g VMwareCertified)","type":"textbox","value":"PartnerSupported","info":null},"COMPPATH":{"Description":"Enter the component path (e.g \/vmfs\/volumes\/datastore\/nmlx_rdma-3.17.13.2-1vmw.687.0.0.21194445.zip)","type":"textbox","value":"\/vmfs\/volumes\/datastore52\/oem-build-component_701.0.0.10.6.3.2-1_17101688.zip","info":null},"VIBMODS":{"Description":"Enter the Vib Module (e.g nmlx-rdma)","type":"textbox","value":"oem-build","info":null},"FQDNHost":{"Description":"Enter FQDN of host under test","type":"textbox","value":"daviddl360g10.os1.tw","info":null}},"name":"Asyncdriver::Uninstall_Component","params":{"COMPVERSION":"701.0.0.10.6.3.2-1","VIBVERSION":"701.0.0.10.6.3.2-1OEM.15843807","COMPONENTNAME":"oem-build-component","ACCEPTANCELEVEL":"PartnerSupported","COMPPATH":"\/vmfs\/volumes\/datastore52\/oem-build-component_701.0.0.10.6.3.2-1_17101688.zip","VIBMODS":"oem-build","FQDNHost":"daviddl360g10.os1.tw"}},{"params_display":{"MD5SUM":{"Description":"Enter the MD5SUM of the Custom ISO","type":"textbox","value":"e9f2cc87307c403f32d3d5a76fdb2c1f","info":null},"FILEPATH":{"Description":"Enter the local datastore path of the Custom ISO","type":"textbox","value":"\/vmfs\/volumes\/datastore52\/VMware-ESXi-7.0.1-17325551-HPE-701.0.0.10.6.3.9-Jan2021.iso","info":null},"FQDNHost":{"Description":"Enter FQDN of host under test","type":"textbox","value":"daviddl360g10.os1.tw","info":null}},"name":"Asyncdriver::ChecksumOfISO","params":{"MD5SUM":"2394abb6f1fcee973c17b744527932be","FILEPATH":"\/vmfs\/volumes\/datastore115\/VMware-ESXi-7.0.1-17325551-HPE-701.0.0.10.6.3.9-Jan2021.iso","FQDNHost":"daviddl360g10os.os1.tw"}},{"params_display":{"FQDNHost":{"Description":"Enter FQDN of host under test","type":"textbox","value":"daviddl360g10.os1.tw","info":null}},"name":"Asyncdriver::VerifyLicenseLevel","params":{"FQDNHost":"daviddl360g10.os1.tw"}},{"params_display":{"FQDNHost":{"Description":"Enter FQDN of host under test","type":"textbox","value":"daviddl360g10.os1.tw","info":null}},"name":"Asyncdriver::CollectLogs","params":{"FQDNHost":"daviddl360g10.os1.tw"}},{"params_display":{"VCSPWD":{"Description":"Enter The VCenter server password","type":"textbox","value":"certVCSA@123","info":null},"VCSUSER":{"Description":"Enter The VCenter server User name","type":"textbox","value":"administrator@vsphere.local","info":null},"VCSERVER":{"Description":"Enter the VCenter server IP address","type":"textbox","value":"192.168.103.50","info":null},"DATASTORE":{"Description":"Enter the local datastore name (Ex:datastore1)","type":"textbox","value":"datastore52","info":null},"FQDNHost":{"Description":"Enter FQDN of host under test","type":"textbox","value":"daviddl360g10.os1.tw","info":null},"VM_NAME":{"Description":"Enter the VM name (Ex: rhel7)","type":"textbox","value":"rhel7","info":null}},"name":"Asyncdriver::VMPowerOn","params":{"VCSPWD":"certVCSA@123","VCSUSER":"administrator@vsphere.local","VCSERVER":"192.168.103.62","DATASTORE":"datastore115","FQDNHost":"daviddl360g10os.os1.tw","VM_NAME":"rhel7"}},{"params_display":{"VCSPWD":{"Description":"Enter The VCenter server Password","type":"textbox","value":"certVCSA@123","info":null},"SSOUSER":{"Description":"Enter the vCenter root Username (Ex:root)","type":"textbox","value":"root","info":null},"SSOPASS":{"Description":"Enter the vCenter root Password","type":"textbox","value":"certVCSA@123","info":null},"VCSUSER":{"Description":"Enter The VCenter server User name","type":"textbox","value":"administrator@vsphere.local","info":null},"VCSERVER":{"Description":"Enter the VCenter server IP address","type":"textbox","value":"192.168.103.50","info":null},"OFFLINEBUNDLE":{"Description":"Enter the Customized Image Offline Bundle URL (Ex:http:\/\/xxx.xxx.xxx.xxx\/OEM_offline_bundle.zip)","type":"textbox","value":"http:\/\/service.os1.tw:8080\/iso\/vmware\/CraigImage\/cert\/VMware-ESXi-7.0.1-17325551-HPE-701.0.0.10.6.3.9-Jan2021-depot.zip","info":null},"FQDNHost":{"Description":"Enter FQDN of host under test","type":"textbox","value":"daviddl360g10.os1.tw","info":null}},"name":"Asyncdriver::VUM_to_vLCM_Transition","params":{"VCSPWD":"certVCSA@123","SSOUSER":"root","SSOPASS":"certVCSA@123","VCSUSER":"administrator@vsphere.local","VCSERVER":"192.168.103.50","OFFLINEBUNDLE":"http:\/\/service.os1.tw:8080\/iso\/vmware\/CraigImage\/cert\/VMware-ESXi-7.0.1-17325551-HPE-701.0.0.10.6.3.9-Jan2021-depot.zip","FQDNHost":"daviddl360g10.os1.tw"}}]},"tmSysMode":"PROD","unselectedTestList":[{"estimatedTime":30,"skippableIfLastPass":true,"visible":true,"dependsOn":null,"name":"Asyncdriver::VUM_to_vLCM_Transition","checked":true,"requiredOnce":true,"testType":null,"cmd":"\/certs\/common\/customimage\/Launcher70\/commonlauncher.sh \/certs\/common\/customimage\/Launcher70\/IOVPLauncher.py Asyncdriver::VUM_to_vLCM_Transition","id":"9bb5ea97-460b-473c-9fe3-d33a7425334c","group":"CustomImage"},{"estimatedTime":30,"skippableIfLastPass":true,"visible":true,"dependsOn":null,"name":"Asyncdriver::PreCheck_Component","checked":true,"requiredOnce":true,"testType":null,"cmd":"\/certs\/common\/customimage\/Launcher70\/commonlauncher.sh \/certs\/common\/customimage\/Launcher70\/IOVPLauncher.py Asyncdriver::PreCheck_Component","id":"02edc84f-53b0-4b10-9d48-5fb9db8b5594","group":"CustomImage"},{"estimatedTime":30,"skippableIfLastPass":true,"visible":true,"dependsOn":null,"name":"Asyncdriver::Install_Component","checked":true,"requiredOnce":true,"testType":null,"cmd":"\/certs\/common\/customimage\/Launcher70\/commonlauncher.sh \/certs\/common\/customimage\/Launcher70\/IOVPLauncher.py Asyncdriver::Install_Component","id":"fcb58b28-4c11-4f16-8cae-1516202f33b9","group":"CustomImage"},{"estimatedTime":30,"skippableIfLastPass":true,"visible":true,"dependsOn":null,"name":"Asyncdriver::Upgrade_Component","checked":true,"requiredOnce":true,"testType":null,"cmd":"\/certs\/common\/customimage\/Launcher70\/commonlauncher.sh \/certs\/common\/customimage\/Launcher70\/IOVPLauncher.py Asyncdriver::Upgrade_Component","id":"c3ace883-92f3-4ca6-b4c3-4fa4f2af5c9b","group":"CustomImage"},{"estimatedTime":30,"skippableIfLastPass":true,"visible":true,"dependsOn":null,"name":"Asyncdriver::VerifyLicenseLevel","checked":true,"requiredOnce":true,"testType":null,"cmd":"\/certs\/common\/customimage\/Launcher70\/commonlauncher.sh \/certs\/common\/customimage\/Launcher70\/IOVPLauncher.py Asyncdriver::VerifyLicenceLevel","id":"9b214980-78c9-499d-8c4c-f14989ead39d","group":"CustomImage"},{"estimatedTime":30,"skippableIfLastPass":true,"visible":true,"dependsOn":null,"name":"Asyncdriver::CollectLogs","checked":true,"requiredOnce":true,"testType":null,"cmd":"\/certs\/common\/customimage\/Launcher70\/commonlauncher.sh \/certs\/common\/customimage\/Launcher70\/IOVPLauncher.py Asyncdriver::CollectLogs","id":"a5c95687-eb22-47f0-8ef5-e34a7abcc771","group":"CustomImage"},{"estimatedTime":30,"skippableIfLastPass":true,"visible":true,"dependsOn":null,"name":"Asyncdriver::Uninstall_Component","checked":true,"requiredOnce":true,"testType":null,"cmd":"\/certs\/common\/customimage\/Launcher70\/commonlauncher.sh \/certs\/common\/customimage\/Launcher70\/IOVPLauncher.py Asyncdriver::Uninstall_Component","id":"c51925b5-c0df-4c46-8adf-84a1afe74444","group":"CustomImage"},{"estimatedTime":45,"skippableIfLastPass":true,"visible":true,"dependsOn":null,"name":"VM_Support_Log_Collection","checked":true,"requiredOnce":true,"testType":null,"cmd":"\/certs\/common\/customimage\/Launcher70\/commonlauncher.sh '\/certs\/common\/vmsupport.py'","id":"f66cd8d4-f989-4a1f-b789-a188f743946e","group":"Support Logs"}]} | |
EOF | |
AgentLauncher -i | |
} | |
enable_proxy(){ | |
export https_proxy=$proxy:$port | |
export http_proxy=$proxy:$port | |
export no_proxy=localhost,127.0.0.1,.os1.tw | |
# printf -v no_proxy '%s,' 172.16.{1..255}.{1..255}; | |
# export no_proxy =$no_proxy:"${no_proxy%,}" | |
} | |
enable_repo(){ | |
sed -i 's/enabled=0/enabled=1/g' /etc/yum.repos.d/photon.repo | |
sed -i 's/enabled=0/enabled=1/g' /etc/yum.repos.d/photon-updates.repo | |
} | |
configure-docker() { | |
echo "Configuring docker service proxy" | |
mkdir -p /etc/systemd/system/docker.service.d | |
cat > /etc/systemd/system/docker.service.d/proxy.conf << EOF | |
[Service] | |
Environment="HTTP_PROXY=http://$proxy:$port" "NO_PROXY=localhost,os1.tw,127.0.0.1,192.168.*.*,172.16.*.*" | |
Environment="HTTPS_PROXY=http://$proxy:$port" "NO_PROXY=localhost,os1.tw,127.0.0.1,192.168.*.*,172.16.*.*" | |
EOF | |
# Restart docker service | |
systemctl daemon-reload | |
systemctl restart docker | |
[[ "$(docker system info | grep Proxy)" == "" ]] && echo "Failed to configure proxy of Docker daemon" | |
} | |
configure-tomcat() { | |
echo "Configuring java service proxy for tomcat" | |
mkdir -p /etc/systemd/system/tomcat.service.d | |
cat > /etc/systemd/system/tomcat.service.d/proxy.conf << EOF | |
[Service] | |
Environment=JAVA_OPTS="-DproxyHost=$proxy -DproxyPort=$port -Dhttp.nonProxyHosts='localhost|os1.tw|127.0.0.1|192.168.*.*|172.16.*.*'" | |
EOF | |
# Restart tomcat service | |
systemctl daemon-reload | |
systemctl restart tomcat | |
} | |
configure_hostname() { | |
HOSTNAME=`cat /etc/hostname` | |
if [[ "$HOSTNAME" != *"os1.tw"* ]]; then | |
echo "$HOSTNAME.os1.tw" > /etc/hostname | |
cat /etc/hosts | grep ipv6-localhost | sed -i "s/`awk '{print $NF}'`/$HOSTNAME.os1.tw/" /etc/hosts | |
cat /etc/hosts | grep "127.0.0.1" | sed -i "s/`awk '{print $(NF-1)}'`/$HOSTNAME.os1.tw/" /etc/hosts | |
cat /etc/hosts | grep "127.0.0.1" | sed -i "s/`awk '{print $NF}'`/$HOSTNAME/" /etc/hosts | |
hostnamectl set-hostname "$HOSTNAME.os1.tw" | |
fi | |
} | |
install() { | |
echo "Check and configure hostname" | |
configure_hostname | |
echo "Export hpe corp proxy to env variable" | |
enable_proxy | |
env | |
echo "Enable vmware photon repo and photon-updates repo" | |
enable_repo | |
echo "Set up agent VM" | |
configure-tomcat | |
configure-docker | |
echo " pull docker image" | |
if [ -e "$runlist" ]; then | |
echo "Take $runlist as runlist here ..." | |
cp $runlist /vmware/input/runlist.json | |
AgentLauncher -i | |
else | |
pull_docker_image & | |
fi | |
echo "Showing status of services" | |
systemctl status docker | |
systemctl status tomcat | |
echo -e "\n\n\n\n================================================\n" | |
echo "Completed!! It takes about 10 seconds for the server to be up again" | |
echo "Run the following command to view the status of tomcat:" | |
echo " watch -n 1 'tail -n 20 /opt/tomcat/logs/catalina.out'" | |
echo -e "\n\n\n\n================================================\n" | |
} | |
uninstall() { | |
echo "Unset agent VM" | |
rm -f /etc/systemd/system/docker.service.d/proxy.conf | |
rm -f /etc/systemd/system/tomcat.service.d/proxy.conf | |
# Restart services | |
systemctl daemon-reload | |
systemctl restart docker tomcat | |
echo -e "\n\n\n\n================================================\n" | |
echo "Completed!! It takes about 10 seconds for the server to be up again" | |
echo "Run the following command to view the status of tomcat:" | |
echo " watch -n 1 'tail -n 20 /opt/tomcat/logs/catalina.out'" | |
echo -e "\n\n\n\n================================================\n" | |
echo "DO NOT forget to add cert target ip in NO_PROXY before cert starts!!!!" | |
echo -e "\n\n\n\n================================================\n" | |
} | |
print_help() { | |
echo "usage: $0 [-h] set/unset/runlist.json" | |
echo "==========" | |
echo "Setup/Unset the proxy and misc. in VIVA agent VM" | |
echo "runlist.json: can load runlist directly." | |
echo " ex: $0 runlist.json" | |
echo "==========" | |
echo "This script is designed for HPE internal use only." | |
echo -e "\n" | |
echo "optional arguments:" | |
echo " -h, --help show this help message and exit" | |
echo "required arguments:" | |
echo " set Set up proxy and necessary configuration files" | |
echo " unset Clean up the modified proxy and configuration files" | |
} | |
case $1 in | |
unset|uninstall ) | |
uninstall | |
;; | |
-h|--help ) | |
print_help | |
;; | |
* ) | |
# Default is to set up for convenience of executing this script remotely | |
install | |
;; | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment