From 7ce411c9937966a129e05a9e594ee63fcad075d8 Mon Sep 17 00:00:00 2001 From: "Xavier Pillons (MSFT)" Date: Fri, 16 Feb 2024 16:31:30 +0100 Subject: [PATCH 01/11] vmsize and number of nodes are required for partitions --- .../cc-slurm-workspace/ui_definition.json | 32 +++++++++++++------ 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/marketplace/solution/cc-slurm-workspace/ui_definition.json b/marketplace/solution/cc-slurm-workspace/ui_definition.json index d80ce5a23..0658d96de 100644 --- a/marketplace/solution/cc-slurm-workspace/ui_definition.json +++ b/marketplace/solution/cc-slurm-workspace/ui_definition.json @@ -478,8 +478,10 @@ "hideDiskTypeFilter": true }, "osPlatform": "Linux", - "visible": true - }, + "visible": true, + "required": true, + "validationMessage": "VMSize is required." + }, { "name": "NodeNumber", "type": "Microsoft.Common.Slider", @@ -490,7 +492,9 @@ "min": 0, "max": 512, "step": 4, - "visible": true + "visible": true, + "required": true, + "validationMessage": "Number of nodes is required" }, { "name": "ImageName", @@ -514,7 +518,7 @@ } ], "required": true, - "validationMessage": "A choice is required." + "validationMessage": "Image Name is required." } } ] @@ -536,7 +540,9 @@ "hideDiskTypeFilter": true }, "osPlatform": "Linux", - "visible": true + "visible": true, + "required": true, + "validationMessage": "VMSize is required." }, { "name": "NodeNumber", @@ -548,7 +554,9 @@ "min": 0, "max": 100, "step": 2, - "visible": true + "visible": true, + "required": true, + "validationMessage": "Number of nodes is required" }, { "name": "ImageName", @@ -572,7 +580,7 @@ } ], "required": true, - "validationMessage": "A choice is required." + "validationMessage": "Image Name is required." } } ] @@ -596,7 +604,9 @@ "hideDiskTypeFilter": true }, "osPlatform": "Linux", - "visible": true + "visible": true, + "required": true, + "validationMessage": "VMSize is required." }, { "name": "NodeNumber", @@ -608,7 +618,9 @@ "min": 0, "max": 100, "step": 2, - "visible": true + "visible": true, + "required": true, + "validationMessage": "Number of nodes is required" }, { "name": "ImageName", @@ -632,7 +644,7 @@ } ], "required": true, - "validationMessage": "A choice is required." + "validationMessage": "Image Name is required." } } ] From 73ca3cb995f3ce7002ced33ef0df03b0e005c3af Mon Sep 17 00:00:00 2001 From: "Xavier Pillons (MSFT)" Date: Fri, 16 Feb 2024 18:28:13 +0100 Subject: [PATCH 02/11] remove extra) --- marketplace/solution/cc-slurm-workspace/marketplace_config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/marketplace/solution/cc-slurm-workspace/marketplace_config.yml b/marketplace/solution/cc-slurm-workspace/marketplace_config.yml index fcd2f9773..202d0696b 100644 --- a/marketplace/solution/cc-slurm-workspace/marketplace_config.yml +++ b/marketplace/solution/cc-slurm-workspace/marketplace_config.yml @@ -145,7 +145,7 @@ autoscale: queues: - name: htc vm_size: "[steps('Partitions').HTCSection.vmsize]" - max_count: "[steps('Partitions').HTCSection.NodeNumber)]" + max_count: "[steps('Partitions').HTCSection.NodeNumber]" image: "[steps('Partitions').HTCSection.ImageName]" ColocateNodes: false - name: hpc From f5172a9ba4cf23b7e61b4b61521a9d7bdf69b2e8 Mon Sep 17 00:00:00 2001 From: "Xavier Pillons (MSFT)" Date: Mon, 19 Feb 2024 12:46:57 +0100 Subject: [PATCH 03/11] ssh port is 22 when using bastion --- marketplace/solution/cc-slurm-workspace/ui_definition.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/marketplace/solution/cc-slurm-workspace/ui_definition.json b/marketplace/solution/cc-slurm-workspace/ui_definition.json index 0658d96de..4752fd8b4 100644 --- a/marketplace/solution/cc-slurm-workspace/ui_definition.json +++ b/marketplace/solution/cc-slurm-workspace/ui_definition.json @@ -677,7 +677,7 @@ "name": "deployerSshPort", "type": "Microsoft.Common.TextBox", "label": "Deployer SSH Port", - "defaultValue": "[if(steps('network').publicIp,8822,22)]", + "defaultValue": "[if(steps('network').publicIp,if(steps('network').bastion, 22, 8822),22)]", "toolTip": "SSH port for the deployer VM.", "constraints": { "required": true, From 879b6bf7b8c4b5d16f9245ea32ebfedf6b689aea Mon Sep 17 00:00:00 2001 From: "Xavier Pillons (MSFT)" Date: Mon, 19 Feb 2024 15:02:25 +0100 Subject: [PATCH 04/11] fix wrong bastion ports --- bicep/azhop.bicep | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bicep/azhop.bicep b/bicep/azhop.bicep index 78a00c41d..1ba627a63 100644 --- a/bicep/azhop.bicep +++ b/bicep/azhop.bicep @@ -442,7 +442,7 @@ var config = { service_ports: { All: ['0-65535'] - Bastion: (incomingSSHPort == 22) ? ['22, 3389'] : ['22', string(incomingSSHPort), '3389'] + Bastion: (incomingSSHPort == 22) ? ['22', '3389'] : ['22', string(incomingSSHPort), '3389'] Web: ['443', '80'] Ssh: ['22'] HubSsh: [string(incomingSSHPort)] From a995df2c1bc64f282958f3c8044dca36ad20752b Mon Sep 17 00:00:00 2001 From: "Xavier Pillons (MSFT)" Date: Mon, 19 Feb 2024 15:39:12 +0100 Subject: [PATCH 05/11] use Standard_D4as_v4 for ccportal and scheduler --- marketplace/solution/cc-slurm-workspace/ui_definition.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/marketplace/solution/cc-slurm-workspace/ui_definition.json b/marketplace/solution/cc-slurm-workspace/ui_definition.json index 4752fd8b4..9993091df 100644 --- a/marketplace/solution/cc-slurm-workspace/ui_definition.json +++ b/marketplace/solution/cc-slurm-workspace/ui_definition.json @@ -22,7 +22,7 @@ "label": "CycleCloud VM Size", "toolTip": "Select a size for the CycleCloud VM", "recommendedSizes": [ - "Standard_B2ms" + "Standard_D4as_v4" ], "options": { "hideDiskTypeFilter": true @@ -393,7 +393,7 @@ "label": "Size", "toolTip": "Select a size for the Scheduler VM", "recommendedSizes": [ - "Standard_B2ms" + "Standard_D4as_v4" ], "options": { "hideDiskTypeFilter": true From 3a28d3a54065da01173de5daf2de9954a3652612 Mon Sep 17 00:00:00 2001 From: "Xavier Pillons (MSFT)" Date: Mon, 19 Feb 2024 18:59:47 +0100 Subject: [PATCH 06/11] toolset on alma --- toolset/scripts/azhop-dependencies.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/toolset/scripts/azhop-dependencies.yml b/toolset/scripts/azhop-dependencies.yml index 2322595a7..ef2b0e2bb 100644 --- a/toolset/scripts/azhop-dependencies.yml +++ b/toolset/scripts/azhop-dependencies.yml @@ -210,7 +210,7 @@ dest: "{{ build_dir.path }}/{{ linux_azcopy_file }}" mode: 0755 - - name: "AzCopy: Download and extract (Ubuntu)" + - name: "AzCopy: Download and extract (CentOS)" shell: | # Install azcopy cd /usr/bin @@ -266,7 +266,7 @@ mode: 0755 become: true - when: ansible_distribution == "centos" + when: ansible_distribution == "centos" || ansible_distribution == 'AlmaLinux' - block: - name: "Check if homebrew is installed for (macOS)" From 0ef23a22a3aacd92b50d512ea1fed02626473b0f Mon Sep 17 00:00:00 2001 From: "Xavier Pillons (MSFT)" Date: Mon, 19 Feb 2024 19:02:24 +0100 Subject: [PATCH 07/11] fix syntax --- toolset/scripts/azhop-dependencies.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toolset/scripts/azhop-dependencies.yml b/toolset/scripts/azhop-dependencies.yml index ef2b0e2bb..8edd26c1c 100644 --- a/toolset/scripts/azhop-dependencies.yml +++ b/toolset/scripts/azhop-dependencies.yml @@ -266,7 +266,7 @@ mode: 0755 become: true - when: ansible_distribution == "centos" || ansible_distribution == 'AlmaLinux' + when: (ansible_distribution == "centos") or (ansible_distribution == 'AlmaLinux') - block: - name: "Check if homebrew is installed for (macOS)" From 76ea24588e091db01ada23c61a40731fb8c9e91d Mon Sep 17 00:00:00 2001 From: "Xavier Pillons (MSFT)" Date: Mon, 19 Feb 2024 19:13:49 +0100 Subject: [PATCH 08/11] fix alma test --- toolset/scripts/azhop-dependencies.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/toolset/scripts/azhop-dependencies.yml b/toolset/scripts/azhop-dependencies.yml index 8edd26c1c..368794f53 100644 --- a/toolset/scripts/azhop-dependencies.yml +++ b/toolset/scripts/azhop-dependencies.yml @@ -57,12 +57,6 @@ state: present become: true - - name: debug - debug: - var: ansible_architecture - var: ansible_distribution - var: ansible_distribution_release - - name: "AzureCLI: Add Microsoft repository (Ubuntu: kinetic-22.10)" apt_repository: # Following directions from https://docs.microsoft.com/en-us/cli/azure/install-azure-cli-apt?view=azure-cli-latest @@ -266,7 +260,7 @@ mode: 0755 become: true - when: (ansible_distribution == "centos") or (ansible_distribution == 'AlmaLinux') + when: (ansible_distribution == "centos") or (ansible_distribution == 'almalinux') - block: - name: "Check if homebrew is installed for (macOS)" From 63cd61c783379fb3a3d69d8935770bbc3fbd8a70 Mon Sep 17 00:00:00 2001 From: "Xavier Pillons (MSFT)" Date: Tue, 20 Feb 2024 10:07:46 +0100 Subject: [PATCH 09/11] fix installation script on CentOS --- toolset/scripts/azhop-dependencies.yml | 61 -------------------------- toolset/scripts/install.sh | 2 +- 2 files changed, 1 insertion(+), 62 deletions(-) diff --git a/toolset/scripts/azhop-dependencies.yml b/toolset/scripts/azhop-dependencies.yml index 368794f53..d8f88b9e9 100644 --- a/toolset/scripts/azhop-dependencies.yml +++ b/toolset/scripts/azhop-dependencies.yml @@ -89,38 +89,6 @@ chmod 755 /usr/bin/azcopy become: true - # - name: "AzCopy: Download (Ubuntu)" - # get_url: - # url: "http://aka.ms/{{ linux_azcopy_file }}" - # dest: "{{ build_dir.path }}/{{ linux_azcopy_file }}" -# mode: 0755 - - # - name: "AzCopy: Extract (Ubuntu)" - # # Unable to use the unarchive module to extract the azcopy binary equivalent to below: - # shell: | - # tar -xvf {{ build_dir.path }}/{{ linux_azcopy_file }} --strip-components=1 --wildcards '*/azcopy' -C /usr/bin - # chmod +x /usr/bin/azcopy - # become: true - # unarchive: - # src: "{{ build_dir.path }}/{{ linux_azcopy_file }}" - # dest: "{{ build_dir.path }}" - # mode: 0755 - - # - name: "AzCopy: Find azcopy (Ubuntu)" - # find: - # paths: "{{ build_dir.path }}" - # patterns: "azcopy" - # file_type: file - # recurse: true - # register: azcopy_file_path - - # - name: "AzCopy: Install (Ubuntu)" - # copy: - # src: "{{ azcopy_file_path.files[0].path }}" - # dest: /usr/bin/azcopy - # mode: 0755 - # become: true - - name: "Terraform: Download the signing key to a new keyring (Ubuntu)" apt_key: url: https://apt.releases.hashicorp.com/gpg @@ -198,12 +166,6 @@ state: present become: true - - name: "AzCopy: Download (CentOS)" - get_url: - url: "http://aka.ms/{{ linux_azcopy_file }}" - dest: "{{ build_dir.path }}/{{ linux_azcopy_file }}" - mode: 0755 - - name: "AzCopy: Download and extract (CentOS)" shell: | # Install azcopy @@ -212,29 +174,6 @@ chmod 755 /usr/bin/azcopy become: true - # - name: "AzCopy: Extract (CentOS)" - # # Unable to use the unarchive module to extract the azcopy binary equivalent to below: - # #command: tar -xvf {{ build_dir.path }}/{{ linux_azcopy_file }} --strip-components=1 --wildcards '*/azcopy' - # unarchive: - # src: "{{ build_dir.path }}/{{ linux_azcopy_file }}" - # dest: "{{ build_dir.path }}" - # mode: 0755 - - # - name: "AzCopy: Find azcopy (CentOS)" - # find: - # paths: "{{ build_dir.path }}" - # patterns: "azcopy" - # file_type: file - # recurse: true - # register: azcopy_file_path - - # - name: "AzCopy: Install (CentOS)" - # copy: - # src: "{{ azcopy_file_path.files[0].path }}" - # dest: /usr/bin/azcopy - # mode: 0755 - # become: true - - name: "Terraform: Add Hashicorp repo (CentOS)" get_url: url: "https://rpm.releases.hashicorp.com/RHEL/hashicorp.repo" diff --git a/toolset/scripts/install.sh b/toolset/scripts/install.sh index 94af70a6a..c2aa84e3a 100755 --- a/toolset/scripts/install.sh +++ b/toolset/scripts/install.sh @@ -75,7 +75,7 @@ printf -- "--------------------------------------------------------------------- printf "$columns" Python `python3 --version | awk '{ print $2 }'` printf "$columns" Ansible `ansible --version | head -n 1 | awk '{ print $3 }' | sed 's/]//'` printf "$columns" Terraform `terraform --version | head -n 1 | awk '{ print $2 }' | sed 's/v//'` -printf "$columns" Packer `packer --version` +printf "$columns" Packer `/usr/bin/packer --version | awk '{ print $2 }'` printf "$columns" az-cli `az --version 2> /dev/null | head -n 1 | awk '{ print $2 }'` printf "$columns" azcopy `azcopy --version | awk '{ print $3 }'` printf "$columns" yq `yq --version | awk '{ print $4 }'` From 0906b2891aa7626cf078780114565ba4ef8ca0d2 Mon Sep 17 00:00:00 2001 From: "Xavier Pillons (MSFT)" Date: Tue, 20 Feb 2024 10:10:44 +0100 Subject: [PATCH 10/11] ccportal as deployer --- bicep/azhop.bicep | 27 ++++++++++++------ bicep/install.sh | 28 ++++++++++++++++--- config.schema.json | 9 ++++++ config.tpl.yml | 3 ++ .../cc-slurm-workspace/marketplace_config.yml | 5 ++-- 5 files changed, 56 insertions(+), 16 deletions(-) diff --git a/bicep/azhop.bicep b/bicep/azhop.bicep index 1ba627a63..ff9916684 100644 --- a/bicep/azhop.bicep +++ b/bicep/azhop.bicep @@ -39,7 +39,8 @@ var resourcePostfix = '${uniqueString(subscription().subscriptionId, azhopResour var enablePublicIP = contains(azhopConfig, 'locked_down_network') ? azhopConfig.locked_down_network.public_ip : true var jumpboxSshPort = deployJumpbox ? (contains(azhopConfig.jumpbox, 'ssh_port') ? azhopConfig.jumpbox.ssh_port : 22) : 22 var deployerSshPort = deployDeployer ? (contains(azhopConfig.deployer, 'ssh_port') ? azhopConfig.deployer.ssh_port : 22) : 22 -var incomingSSHPort = deployDeployer ? deployerSshPort : jumpboxSshPort +var ccportalSshPort = cycleCloudAsDeployer ? (contains(azhopConfig.cyclecloud, 'ssh_port') ? azhopConfig.cyclecloud.ssh_port : 22) : 22 +var incomingSSHPort = deployDeployer ? deployerSshPort : (cycleCloudAsDeployer ? ccportalSshPort : jumpboxSshPort ) var deployLustre = contains(azhopConfig, 'lustre') && contains(azhopConfig.lustre, 'create') ? azhopConfig.lustre.create : false @@ -47,6 +48,7 @@ var deployJumpbox = contains(azhopConfig, 'jumpbox') ? true : false var deployDeployer = contains(azhopConfig, 'deployer') ? true : false var deployGrafana = contains(azhopConfig, 'monitoring') && contains(azhopConfig.monitoring, 'grafana') ? azhopConfig.monitoring.grafana : true var deployOnDemand = contains(azhopConfig, 'ondemand') ? true : false +var cycleCloudAsDeployer = contains(azhopConfig, 'cyclecloud') && contains(azhopConfig.cyclecloud, 'use_as_deployer') ? azhopConfig.cyclecloud.use_as_deployer : false var useExistingAD = contains(azhopConfig, 'domain') ? azhopConfig.domain.use_existing_dc : false var userAuth = contains(azhopConfig, 'authentication') && contains(azhopConfig.authentication, 'user_auth') ? azhopConfig.authentication.user_auth : 'ad' @@ -317,6 +319,8 @@ var config = { osdisksku: 'StandardSSD_LRS' image: 'cyclecloud_base' pip: enablePublicIP && !deployOnDemand + sshPort: cycleCloudAsDeployer ? incomingSSHPort : 22 + deploy_script: cycleCloudAsDeployer ? replace(replace(loadTextContent('install.sh'), '__INSERT_AZHOP_BRANCH__', branchName), '__SSH_PORT__', string(incomingSSHPort)) : '' datadisks: [ { name: '${vmNamesMap.ccportal}-datadisk0' @@ -327,12 +331,16 @@ var config = { } ] identity: { + keyvault: cycleCloudAsDeployer ? { + secret_permissions: [ 'All' ] + } : {} roles: [ 'Contributor' ] } asgs: union( [ 'asg-ssh', 'asg-cyclecloud' ], + cycleCloudAsDeployer ? [ 'asg-jumpbox', 'asg-deployer' ] : [], (userAuth == 'ad') ? ['asg-ad-client'] : [], deployGrafana ? ['asg-telegraf'] : [] ) @@ -432,12 +440,12 @@ var config = { ) asg_names: union([ 'asg-ssh', 'asg-jumpbox', 'asg-sched', 'asg-cyclecloud', 'asg-cyclecloud-client', 'asg-nfs-client' ], - deployLustre ? [ 'asg-lustre-client' ] : [], - deployGrafana ? [ 'asg-grafana', 'asg-telegraf' ] : [], - (userAuth == 'ad') ? ['asg-rdp', 'asg-ad', 'asg-ad-client'] : [], - deployOnDemand ? ['asg-ondemand']: [], - createDatabase ? ['asg-mariadb-client']: [], - deployDeployer ? ['asg-deployer']: [] + deployLustre ? [ 'asg-lustre-client' ] : [], + deployGrafana ? [ 'asg-grafana', 'asg-telegraf' ] : [], + (userAuth == 'ad') ? ['asg-rdp', 'asg-ad', 'asg-ad-client'] : [], + deployOnDemand ? ['asg-ondemand']: [], + createDatabase ? ['asg-mariadb-client']: [], + deployDeployer || cycleCloudAsDeployer ? ['asg-deployer']: [] ) service_ports: { @@ -1052,13 +1060,14 @@ output azhopInventory object = { ansible_ssh_port: incomingSSHPort ansible_ssh_common_args: '' } - } : { + } : {}, + deployDeployer ? { deployer : { ansible_host: azhopVm[indexOf(map(vmItems, item => item.key), 'deployer')].outputs.privateIp ansible_ssh_port: incomingSSHPort ansible_ssh_common_args: '' } - }, + } : {}, config.deploy_grafana ? { grafana: { ansible_host: azhopVm[indexOf(map(vmItems, item => item.key), 'grafana')].outputs.privateIp diff --git a/bicep/install.sh b/bicep/install.sh index b385b0e2e..173031df7 100644 --- a/bicep/install.sh +++ b/bicep/install.sh @@ -1,6 +1,13 @@ #!/bin/bash set -eo pipefail +read_os() +{ + os_release=$(cat /etc/os-release | grep "^ID\=" | cut -d'=' -f 2 | xargs) + os_maj_ver=$(cat /etc/os-release | grep "^VERSION_ID\=" | cut -d'=' -f 2 | xargs) + full_version=$(cat /etc/os-release | grep "^VERSION\=" | cut -d'=' -f 2 | xargs) +} + retry_command() { local cmd=$1 local retries=${2:-5} @@ -26,16 +33,29 @@ retry_command() { set -eo pipefail return 1 } +read_os -echo "* apt updating" -retry_command "apt update" +# echo "* apt updating" +# retry_command "apt update" echo "* Update SSH port" sed -i 's/^#Port 22/Port __SSH_PORT__/' /etc/ssh/sshd_config systemctl restart sshd -echo "* Installing git" -retry_command "apt install -y git" +case $os_release in + centos|rhel|almalinux) + echo "* Installing git" + retry_command "yum install -y git" + ;; + ubuntu) + echo "* Installing git" + retry_command "apt install -y git" + ;; + *) + echo "Unsupported OS" + ;; +esac + echo "* Cloning az-hop repo" if [ -e az-hop ]; then diff --git a/config.schema.json b/config.schema.json index de6303546..d454805af 100644 --- a/config.schema.json +++ b/config.schema.json @@ -607,6 +607,15 @@ "plan": { "description": "Image plan specification (when needed for the image). Terms must be accepted prior to deployment", "type": "string" + }, + "ssh_port": { + "description": "Defaults to 22. Change this to, e.g., 2222, if security policies (like 'zero trust') in your tenant automatically block access to port 22 from the internet", + "type": "integer" + }, + "use_as_deployer": { + "description": "If set to true, will use the CycleCloud VM as the deployer VM", + "type": "boolean", + "default": false } }, "required": [ diff --git a/config.tpl.yml b/config.tpl.yml index 394658a71..8b0e52a9c 100644 --- a/config.tpl.yml +++ b/config.tpl.yml @@ -259,6 +259,9 @@ cyclecloud: # Optional: use Ubuntu for the CycleCloud VM (default: linux_base_image) # image: "canonical:0001-com-ubuntu-server-focal:20_04-lts-gen2:latest" # plan: publisher:product:name + # Change this to, e.g., 2222, if security policies (like "zero trust") in your tenant automatically block access to port 22 from the internet + # ssh_port: 2222 + # use_as_deployer: true # default to false - to be used when deploying without a deployer VM # Lustre cluster is optional and can be used to create a Lustre cluster in the environment. lustre: diff --git a/marketplace/solution/cc-slurm-workspace/marketplace_config.yml b/marketplace/solution/cc-slurm-workspace/marketplace_config.yml index 202d0696b..9e3abc0d0 100644 --- a/marketplace/solution/cc-slurm-workspace/marketplace_config.yml +++ b/marketplace/solution/cc-slurm-workspace/marketplace_config.yml @@ -93,9 +93,6 @@ linux_base_image: almalinux:almalinux-x86_64:8_7-gen2:latest # publisher:offer:s bastion: create: "[steps('network').bastion]" -deployer: - vm_size: Standard_B2ms - ssh_port: "[int(steps('otherSettings').deployerSshPort)]" scheduler: vm_size: "[steps('scheduler').vmsize]" cyclecloud: @@ -103,6 +100,8 @@ cyclecloud: image: azurecyclecloud:azure-cyclecloud:cyclecloud8-gen2:8.4.220231009 # az vm image terms accept --publisher azurecyclecloud --offer azure-cyclecloud --plan cyclecloud8-gen2 plan: azurecyclecloud:azure-cyclecloud:cyclecloud8-gen2 + ssh_port: "[int(steps('otherSettings').deployerSshPort)]" + use_as_deployer: true users: - { name: hpcuser, uid: 10001 } From 2380304b9e9c44bbecfdfc3f0ed752ad1ae368d0 Mon Sep 17 00:00:00 2001 From: "Xavier Pillons (MSFT)" Date: Tue, 20 Feb 2024 10:29:38 +0100 Subject: [PATCH 11/11] install in /opt and not root --- bicep/install.sh | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/bicep/install.sh b/bicep/install.sh index 173031df7..94a4b1316 100644 --- a/bicep/install.sh +++ b/bicep/install.sh @@ -58,6 +58,7 @@ esac echo "* Cloning az-hop repo" +cd /opt if [ -e az-hop ]; then rm -rf az-hop fi @@ -131,16 +132,6 @@ sed -i "s/__ADMIN_PASSWORD__/$(sed 's/[&/\]/\\&/g' <<< $admin_pass)/g" $azhop_ro jq .azhopPackerOptions.value azhopOutputs.json > $azhop_root/packer/options.json -# We probably don't want to build custom images as part of the cloud-init step -# if [ "$(jq -r .azhopConfig.value.features.sig azhopOutputs.json)" == "true" ]; then -# echo "* Building images" -# cd $azhop_root/packer -# ./build_image.sh -i azhop-compute-centos-7.9.json -# ./build_image.sh -i azhop-desktop-centos-7.9.json -# fi - - - echo "* Generating passwords" cd $azhop_root ./create_passwords.sh