diff --git a/.github/workflows/manual-deploy-testnet-validator.yml b/.github/workflows/manual-deploy-testnet-validator.yml index cad73d3bda..639c758b95 100644 --- a/.github/workflows/manual-deploy-testnet-validator.yml +++ b/.github/workflows/manual-deploy-testnet-validator.yml @@ -23,6 +23,10 @@ on: required: true default: 3 type: number + node_id: + description: 'Node id' + required: true + type: string node_account_address: description: 'Node Account Address' required: true @@ -100,34 +104,34 @@ jobs: with: creds: ${{ secrets.AZURE_CREDENTIALS }} - - name: 'Create VM for Obscuro node-${{ matrix.host_id }} on Azure' + - name: 'Create VM for Obscuro node-${{ github.event.inputs.node_id }} on Azure' uses: azure/CLI@v1 with: inlineScript: | - az vm create -g Testnet -n "${{ vars.AZURE_RESOURCE_PREFIX }}-${{ matrix.host_id }}-${{ GITHUB.RUN_NUMBER }}" \ + az vm create -g Testnet -n "${{ vars.AZURE_RESOURCE_PREFIX }}-${{ github.event.inputs.node_id }}-${{ GITHUB.RUN_NUMBER }}" \ --admin-username obscurouser --admin-password "${{ secrets.OBSCURO_NODE_VM_PWD }}" \ - --public-ip-address-dns-name "obscuronode-${{ matrix.host_id }}-${{ github.event.inputs.testnet_type }}-${{ GITHUB.RUN_NUMBER }}" \ + --public-ip-address-dns-name "obscuronode-${{ github.event.inputs.node_id }}-${{ github.event.inputs.testnet_type }}-${{ GITHUB.RUN_NUMBER }}" \ --tags deploygroup=ObscuroNode-${{ github.event.inputs.testnet_type }}-${{ GITHUB.RUN_NUMBER }} ${{ vars.AZURE_DEPLOY_GROUP_L2 }}=true \ --vnet-name ${{ github.event.inputs.testnet_type }}-virtual-network --subnet ${{ github.event.inputs.testnet_type }}-sub-network \ --size Standard_DC8_v2 --storage-sku StandardSSD_LRS --image ObscuroConfUbuntu \ --public-ip-sku Standard --authentication-type password - - name: 'Open Obscuro node-${{ matrix.host_id }} ports on Azure' + - name: 'Open Obscuro node-${{ github.event.inputs.host_id }} ports on Azure' uses: azure/CLI@v1 with: inlineScript: | - az vm open-port -g Testnet -n "${{ vars.AZURE_RESOURCE_PREFIX }}-${{ matrix.host_id }}-${{ GITHUB.RUN_NUMBER }}" --port 80,81,6060,6061,10000 + az vm open-port -g Testnet -n "${{ vars.AZURE_RESOURCE_PREFIX }}-${{ github.event.inputs.node_id }}-${{ GITHUB.RUN_NUMBER }}" --port 80,81,6060,6061,10000 # To overcome issues with critical VM resources being unavailable, we need to wait for the VM to be ready - name: 'Allow time for VM initialization' shell: bash run: sleep 60 - - name: 'Start Obscuro node-${{ matrix.host_id }} on Azure' + - name: 'Start Obscuro node-${{ github.event.inputs.node_id }} on Azure' uses: azure/CLI@v1 with: inlineScript: | - az vm run-command invoke -g Testnet -n "${{ vars.AZURE_RESOURCE_PREFIX }}-${{ matrix.host_id }}-${{ GITHUB.RUN_NUMBER }}" \ + az vm run-command invoke -g Testnet -n "${{ vars.AZURE_RESOURCE_PREFIX }}-${{ github.event.inputs.node_id }}-${{ GITHUB.RUN_NUMBER }}" \ --command-id RunShellScript \ --scripts 'mkdir -p /home/obscuro \ && git clone --depth 1 -b ${{ env.BRANCH_NAME }} https://github.com/ten-protocol/go-ten.git /home/obscuro/go-obscuro \ @@ -157,7 +161,7 @@ jobs: -l1_start=${{ github.event.inputs.L1_START_HASH }} \ -private_key=${{ secrets.ADD_NEW_NODE_PRIVATE_KEY }} \ -sequencer_id=${{ vars.ACCOUNT_ADDR_NODE_0 }} \ - -host_public_p2p_addr=obscuronode-${{ matrix.host_id }}-${{ github.event.inputs.testnet_type }}-${{ GITHUB.RUN_NUMBER }}.uksouth.cloudapp.azure.com:10000 \ + -host_public_p2p_addr=obscuronode-${{ github.event.inputs.node_id }}-${{ github.event.inputs.testnet_type }}-${{ GITHUB.RUN_NUMBER }}.uksouth.cloudapp.azure.com:10000 \ -host_p2p_port=10000 \ -enclave_docker_image=${{ vars.L2_ENCLAVE_DOCKER_BUILD_TAG }} \ -host_docker_image=${{ vars.L2_HOST_DOCKER_BUILD_TAG }} \