-
Clone this repo
-
Create new repo on your GitHub account and push the contents up to it
-
Create a free Azure DevOps account (Click Start Free under Azure Pipelines) if you haven't already
-
Create a new Project
-
Once the project is created, you're taken to the New Pipeline page. Select GitHub
-
Select your GitHub repo
-
Configure your pipeline by choosing Existing Azure Pipelines YAML File and select the
azure-piplines.yaml
file in the menu that pops out on the right. -
On the Review page, use the drop down arrow next to Run and select Save. Don't run the pipeline just yet. This will create an environment for the next step.
-
Click on Environments and you should see an environment named ACDND-C4-Project. Click on it.
-
Once inside the environment, click on Add resource.
-
Select Virtual Machine.
-
Select Linux as the OS. You'll then need to copy the registration script to your clipboard and run this on the VM terminal.
-
You should see a similar output from the script in the screenshot below. You can skip entering environment VM resource tags by inputting N.
-
If everything was successful, you should see this output from the connection test. Note: Be sure to
cd ~
or disconnect from the VM once the registration script completes. If you are still in theazagent
directory during deployment, you'll most likely run into an issue.
NOTE: If the registration script shows sudo: ./svc.sh: command not found
, run the following command in your VM terminal and then try the registration script again.
sudo bin/installdependencies.sh
cd ..
sudo rm -rf azagent
-
Back on Azure DevOps portal in Environments, you can close out the Add resource menu and refresh the page. You should now see the newly added VM resource listed under Resources.
-
We're ready to deploy our application! Navigate to Pipelines and click Run pipeline.
This will go through the process of downloading the application files and zip them up as an artifact to be uploaded to the VM. Then it will run through the bash script in the pipelines.yaml
file, installing all dependencies and moving the artifact .zip file to an app
directory where it will unzip the contents. If you get all green checks, you're ready to head back to the VM.
- This should be the final step. Connect to the VM if you arent' aready.
cd
into the app directory and runpython3 main.py
.
If you visit the public IP address for the VMSS in your browser, you should see your deployed application.
Head back to the main README for further instructions.