зеркало из https://github.com/Azure/sterling.git
returning to inline cloud-init
This commit is contained in:
Родитель
661650062c
Коммит
ca27cf4469
|
@ -13,7 +13,7 @@ runcmd:
|
|||
- echo '{"subscriptionId":"${subscriptionID}","clientId":"${clientID}","clientSecret":"${clientSecret}","tenantId":"${tenantID}","resourceGroup":"${resourceGroupName}"}' > ~/.azure/osServicePrincipal.json
|
||||
- sudo yum -y install libstdc++.i686 libXmu.i686 libacl.i686 ncurses-libs.i686 ncurses-compat-libs.i686 motif.i686 xterm libmount.i686 libgcc.i686 libnsl.i686 libXdmcp.i686 libxcrypt.i686 libXdmcp libnsl psmisc elfutils-libelf-devel make pam-devel
|
||||
- sudo yum -y install ksh mksh
|
||||
- sudo yum -y jq
|
||||
- sudo yum -y install jq
|
||||
- sudo yum -y install java-1.8.0-openjdk
|
||||
- sudo dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
|
||||
- sudo dnf install -y python3-dnf-plugin-versionlock
|
||||
|
|
|
@ -34,7 +34,7 @@ var tenantID = tenant().tenantId
|
|||
//var nsgId = resourceId(resourceGroup().name, 'Microsoft.Network/networkSecurityGroups', networkSecurityGroupName)
|
||||
var vnetId = resourceId(resourceGroup().name, 'Microsoft.Network/virtualNetworks', virtualNetworkName)
|
||||
var subnetRef = '${vnetId}/subnets/${subnetName}'
|
||||
var cloudInitData = '#cloud-config\n\nruncmd:\n - export ADMIN_USERNAME=${adminUsername}\n - export DB2_ADMIN_PASSWORD=${adminPassword}\n - export DB2_FENCED_PASSWORD=${adminPassword}\n - export RESOURCE_GROUP=${resourceGroupName}\n - export VM_NAME=${virtualMachineName}\n - export ANF_ACCOUNT_NAME=${anfAccountName}\n - export ANF_POOL_NAME=${anfPoolName}\n - export BRANCH_NAME=${branchName}\n - mkdir ~/.azure/\n - echo \'{"subscriptionId":"${subscriptionID}","clientId":"${clientID}","clientSecret":"${clientSecret}","tenantId":"${tenantID}","resourceGroup":"${resourceGroupName}"}\' > ~/.azure/osServicePrincipal.json\n - sudo yum -y install libstdc++.i686 libXmu.i686 libacl.i686 ncurses-libs.i686 ncurses-compat-libs.i686 motif.i686 xterm libmount.i686 libgcc.i686 libnsl.i686 libXdmcp.i686 libxcrypt.i686 libXdmcp libnsl psmisc elfutils-libelf-devel make pam-devel\n - sudo yum -y install ksh mksh\n - sudo yum -y jq\n - sudo yum -y install java-1.8.0-openjdk\n - sudo dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm\n - sudo dnf install -y python3-dnf-plugin-versionlock\n - sudo yum install -y nfs-utils\n - sudo wget https://aka.ms/downloadazcopy-v10-linux -O /tmp/azcopy.tar.gz\n - sudo tar -xvf /tmp/azcopy.tar.gz -C /tmp\n - sudo mv /tmp/azcopy_linux* /tmp/azcopy\n - sudo sed -i \'s/enforcing/disabled/g\' /etc/selinux/config /etc/selinux/config\n - [ wget, -nv, "https://raw.githubusercontent.com/Azure/sterling/${branchName}/config/db2/configure-db2-anf-storage.sh", -O, /tmp/install-db2-from-storageaccount.sh ]\n - chmod +x /tmp/install-db2-from-storageaccount.sh\n - sudo -E /tmp/install-db2-from-storageaccount.sh\n'
|
||||
var cloudInitData = '#cloud-config\n\nruncmd:\n - export ADMIN_USERNAME=${adminUsername}\n - export DB2_ADMIN_PASSWORD=${adminPassword}\n - export DB2_FENCED_PASSWORD=${adminPassword}\n - export RESOURCE_GROUP=${resourceGroupName}\n - export VM_NAME=${virtualMachineName}\n - export ANF_ACCOUNT_NAME=${anfAccountName}\n - export ANF_POOL_NAME=${anfPoolName}\n - export BRANCH_NAME=${branchName}\n - mkdir ~/.azure/\n - echo \'{"subscriptionId":"${subscriptionID}","clientId":"${clientID}","clientSecret":"${clientSecret}","tenantId":"${tenantID}","resourceGroup":"${resourceGroupName}"}\' > ~/.azure/osServicePrincipal.json\n - sudo yum -y install libstdc++.i686 libXmu.i686 libacl.i686 ncurses-libs.i686 ncurses-compat-libs.i686 motif.i686 xterm libmount.i686 libgcc.i686 libnsl.i686 libXdmcp.i686 libxcrypt.i686 libXdmcp libnsl psmisc elfutils-libelf-devel make pam-devel\n - sudo yum -y install ksh mksh\n - sudo yum -y install jq\n - sudo yum -y install java-1.8.0-openjdk\n - sudo dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm\n - sudo dnf install -y python3-dnf-plugin-versionlock\n - sudo yum install -y nfs-utils\n - sudo wget https://aka.ms/downloadazcopy-v10-linux -O /tmp/azcopy.tar.gz\n - sudo tar -xvf /tmp/azcopy.tar.gz -C /tmp\n - sudo mv /tmp/azcopy_linux* /tmp/azcopy\n - sudo sed -i \'s/enforcing/disabled/g\' /etc/selinux/config /etc/selinux/config\n - [ wget, -nv, "https://raw.githubusercontent.com/Azure/sterling/${branchName}/config/db2/configure-db2-anf-storage.sh", -O, /tmp/install-db2-from-storageaccount.sh ]\n - chmod +x /tmp/install-db2-from-storageaccount.sh\n - sudo -E /tmp/install-db2-from-storageaccount.sh\n'
|
||||
|
||||
|
||||
resource networkInterfaceName_resource 'Microsoft.Network/networkInterfaces@2018-10-01' = {
|
||||
|
|
|
@ -18,7 +18,7 @@ param branchName string
|
|||
var nsgId = resourceId(resourceGroup().name, 'Microsoft.Network/networkSecurityGroups', networkSecurityGroupName)
|
||||
var vnetId = resourceId(resourceGroup().name, 'Microsoft.Network/virtualNetworks', virtualNetworkName)
|
||||
var subnetRef = '${vnetId}/subnets/${subnetName}'
|
||||
//var cloudInitData = '#cloud-config\n\nruncmd:\n - sudo apt-get update -y \n - sudo apt-get install -y ca-certificates curl gnupg lsb-release\n - curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg\n - echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null\n - sudo apt-get update -y\n - sudo apt-get -y install docker-ce docker-ce-cli containerd.io\n - curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3\n - chmod 700 get_helm.sh\n - ./get_helm.sh\n - sudo usermod -aG docker $USER\n'
|
||||
var cloudInitData = '#cloud-config\n\nruncmd:\n - sudo apt-get update -y \n - sudo apt-get install -y ca-certificates curl gnupg lsb-release\n - curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg\n - echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null\n - sudo apt-get update -y\n - sudo apt-get -y install docker-ce docker-ce-cli containerd.io\n - curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3\n - chmod 700 get_helm.sh\n - ./get_helm.sh\n - sudo usermod -aG docker $USER\n - mkdir /tmp/OCPInstall\n - [ wget, -nv, "https://mirror.openshift.com/pub/openshift-v4/clients/ocp/latest/openshift-client-linux.tar.gz", -O, /tmp/OCPInstall/openshift-client-linux.tar.gz ]\n - tar xvf /tmp/OCPInstall/openshift-client-linux.tar.gz -C /tmp/OCPInstall\n - sudo cp /tmp/OCPInstall/oc /usr/bin'
|
||||
|
||||
|
||||
resource networkInterfaceName_resource 'Microsoft.Network/networkInterfaces@2018-10-01' = {
|
||||
|
@ -97,8 +97,8 @@ resource virtualMachineName_resource 'Microsoft.Compute/virtualMachines@2021-03-
|
|||
computerName: virtualMachineName
|
||||
adminUsername: adminUsername
|
||||
adminPassword: adminPassword
|
||||
//customData: base64(cloudInitData)
|
||||
customData: base64(loadTextContent('cloud-init-jumpbox.yaml'))
|
||||
customData: base64(cloudInitData)
|
||||
//customData: base64(loadTextContent('cloud-init-jumpbox.yaml'))
|
||||
linuxConfiguration: {
|
||||
disablePasswordAuthentication: false
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ var subnetRef = '${vnetId}/subnets/${subnetName}'
|
|||
var subscriptionID = subscription().subscriptionId
|
||||
var resourceGroupName = resourceGroup().name
|
||||
var tenantID = tenant().tenantId
|
||||
//var cloudInitData = '#cloud-config\n\nruncmd:\n - echo "Setting environment variables..."\n - export OMS_NAMESPACE=${omsNamespace}\n - export ARO_CLUSTER=${aroName}\n - export WHICH_OMS=${whichOMS}\n - export BRANCH_NAME=${branchName}\n - export LOCATION=${location}\n - export ADMIN_PASSWORD=${adminPassword}\n - export IBM_ENTITLEMENT_KEY=${ibmEntitlementKey}\n - export ACR_NAME=${acrName}\n - mkdir ~/.azure/\n - echo \'{"subscriptionId":"${subscriptionID}","clientId":"${clientID}","clientSecret":"${clientSecret}","tenantId":"${tenantID}","resourceGroup":"${resourceGroupName}"}\' > ~/.azure/osServicePrincipal.json\n - echo "Running system update..."\n - sudo dnf update -y\n - echo "System update completed!"\n - echo "Getting latest configuration script..."\n - [ wget, -nv, "https://raw.githubusercontent.com/Azure/sterling/${branchName}/config/installers/configure-aro-and-requirements.sh", -O, /tmp/configure-aro-and-requirements.sh ]\n - chmod +x /tmp/configure-aro-and-requirements.sh\n - echo "Running configuration script..."\n - sudo -E /tmp/configure-aro-and-requirements.sh\n'
|
||||
var cloudInitData = '#cloud-config\n\nruncmd:\n - echo "Setting environment variables..."\n - export OMS_NAMESPACE=${omsNamespace}\n - export ARO_CLUSTER=${aroName}\n - export WHICH_OMS=${whichOMS}\n - export BRANCH_NAME=${branchName}\n - export LOCATION=${location}\n - export ADMIN_PASSWORD=${adminPassword}\n - export IBM_ENTITLEMENT_KEY=${ibmEntitlementKey}\n - export ACR_NAME=${acrName}\n - mkdir ~/.azure/\n - echo \'{"subscriptionId":"${subscriptionID}","clientId":"${clientID}","clientSecret":"${clientSecret}","tenantId":"${tenantID}","resourceGroup":"${resourceGroupName}"}\' > ~/.azure/osServicePrincipal.json\n - echo "Running system update..."\n - sudo dnf update -y\n - echo "System update completed!"\n - echo "Getting latest configuration script..."\n - [ wget, -nv, "https://raw.githubusercontent.com/Azure/sterling/${branchName}/config/installers/configure-aro-and-requirements.sh", -O, /tmp/configure-aro-and-requirements.sh ]\n - chmod +x /tmp/configure-aro-and-requirements.sh\n - echo "Running configuration script..."\n - sudo -E /tmp/configure-aro-and-requirements.sh\n - echo "Getting pgsql tools/configuration script..."\n - [ wget, -nv, "https://raw.githubusercontent.com/Azure/sterling/${branchName}/config/installers/setup-pgsql-tools.sh", -O, /tmp/setup-pgsql-tools.sh ]\n - echo "Running pgsql installation script..."\n - sudo -E /tmp/setup-pgsql-tools.sh'
|
||||
|
||||
|
||||
resource networkInterfaceName_resource 'Microsoft.Network/networkInterfaces@2018-10-01' = {
|
||||
|
@ -105,8 +105,8 @@ resource virtualMachineName_resource 'Microsoft.Compute/virtualMachines@2021-03-
|
|||
computerName: virtualMachineName
|
||||
adminUsername: adminUsername
|
||||
adminPassword: adminPassword
|
||||
customData: base64(loadTextContent('cloud-init-jumpbox.yaml'))
|
||||
//customData: base64(cloudInitData)
|
||||
//customData: base64(loadTextContent('cloud-init-jumpbox.yaml'))
|
||||
customData: base64(cloudInitData)
|
||||
linuxConfiguration: {
|
||||
disablePasswordAuthentication: false
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ param branchName string
|
|||
var nsgId = resourceId(resourceGroup().name, 'Microsoft.Network/networkSecurityGroups', networkSecurityGroupName)
|
||||
var vnetId = resourceId(resourceGroup().name, 'Microsoft.Network/virtualNetworks', virtualNetworkName)
|
||||
var subnetRef = '${vnetId}/subnets/${subnetName}'
|
||||
//var cloudInitData = '#cloud-config\nruncmd:\n - export INSTALLER_STORAGEACCOUNT_NAME=${installerStorageAccountName}\n - export INSTALLER_STORAGECONTAINER_NAME=${installerContainerName}\n - export INSTALLER_SAS_TOKEN="${installerSASToken}"\n - export MQ_INSTALLER_ARCHIVE_FILENAME=${mqInstallerArchiveName}\n - sudo yum update\n - sudo yum install -y nfs-utils\n - sudo yum install -y java-1.8.0-openjdk\n - sudo mkdir /MQHA\n - sudo mount -t nfs ${storageNamePrefix}prm.file.core.windows.net:/${storageNamePrefix}prm/${mqsharename} /MQHA -o vers=4,minorversion=1,sec=sys\n - sudo echo "${storageNamePrefix}prm.file.core.windows.net:/${storageNamePrefix}prm/${mqsharename} /MQHA nfs rw,hard,noatime,nolock,vers=4,tcp,_netdev 0 0" >> /etc/fstab \n - sudo mkdir -p /MQHA/logs\n - sudo mkdir -p /MQHA/qmgrs\n - sudo groupadd mqclient\n - sudo useradd app\n - sudo wget https://aka.ms/downloadazcopy-v10-linux -O /tmp/azcopy.tar.gz\n - sudo tar -xvf /tmp/azcopy.tar.gz -C /tmp\n - sudo mv /tmp/azcopy_linux* /tmp/azcopy\n - [ wget, -nv, "https://raw.githubusercontent.com/Azure/sterling/${branchName}/config/installers/install-mq-from-storageaccount.sh", -O, /tmp/install-mq-from-storageaccount.sh ]\n - chmod +x /tmp/install-mq-from-storageaccount.sh\n - sudo -E /tmp/install-mq-from-storageaccount.sh\n'
|
||||
var cloudInitData = '#cloud-config\n\nruncmd:\n - sudo yum update\n - sudo yum install -y nfs-utils\n - sudo yum install -y java-1.8.0-openjdk\n - sudo mkdir /MQHA\n - sudo mount -t nfs ${storageNamePrefix}prm.file.core.windows.net:/${storageNamePrefix}prm/${mqsharename} /MQHA -o vers=4,minorversion=1,sec=sys\n - sudo echo "${storageNamePrefix}prm.file.core.windows.net:/${storageNamePrefix}prm/${mqsharename} /MQHA nfs rw,hard,noatime,nolock,vers=4,tcp,_netdev 0 0" >> /etc/fstab \n - sudo mkdir -p /MQHA/logs\n - sudo mkdir -p /MQHA/qmgrs\n - sudo groupadd mqclient\n - sudo useradd app\n - sudo wget https://aka.ms/downloadazcopy-v10-linux -O /tmp/azcopy.tar.gz\n - sudo tar -xvf /tmp/azcopy.tar.gz -C /tmp\n - sudo mv /tmp/azcopy_linux* /tmp/azcopy'
|
||||
|
||||
|
||||
resource networkInterfaceName_resource 'Microsoft.Network/networkInterfaces@2018-10-01' = {
|
||||
|
@ -102,8 +102,8 @@ resource virtualMachineName_resource 'Microsoft.Compute/virtualMachines@2021-03-
|
|||
computerName: virtualMachineName
|
||||
adminUsername: adminUsername
|
||||
adminPassword: adminPassword
|
||||
//customData: base64(cloudInitData)
|
||||
customData: base64(loadTextContent('cloud-init-mq.yaml'))
|
||||
customData: base64(cloudInitData)
|
||||
//customData: base64(loadTextContent('cloud-init-mq.yaml'))
|
||||
linuxConfiguration: {
|
||||
disablePasswordAuthentication: false
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче