This template allows you to host an instance of Jenkins on a DS1_v2 size Linux Ubuntu 16.04 LTS VM in Azure.
- Click "Deploy to Azure" button. If you haven't got an Azure subscription, it will guide you on how to signup for a free trial.
- Enter a valid name for the VM, as well as a user name and password that you will use to login remotely to the VM via SSH.
- Remember these. You will need this to access the VM next.
By default the Jenkins instance is using the http protocol and listens on port 8080. Users shouldn't authenticate over unsecured protocols!
You need to setup port forwarding to view the Jenkins UI on your local machine. If you do not know the full DNS name of your instance, go to the Portal and find it in the deployment outputs here: Resource Groups > {Resource Group Name} > Deployments > {Deployment Name, usually 'Microsoft.Template'} > Outputs
Install Putty or use any bash shell for Windows (if using a bash shell, follow the instructions for Linux or Mac).
Run this command:
putty.exe -ssh -L 8080:localhost:8080 <User name>@<Public DNS name of instance you just created>
Or follow these manual steps:
- Launch Putty and navigate to 'Connection > SSH > Tunnels'
- In the Options controlling SSH port forwarding window, enter 8080 for Source port. Then enter 127.0.0.1:8080 for the Destination. Click Add.
- Click Open to establish the connection.
Run this command:
ssh -L 8080:localhost:8080 <User name>@<Public DNS name of instance you just created>
- After you have started your tunnel, navigate to http://localhost:8080/ on your local machine.
- Unlock the Jenkins dashboard for the first time with the initial admin password. To get this token, SSH into the VM and run
sudo cat /var/lib/jenkins/secrets/initialAdminPassword
- Your Jenkins instance is now ready to use! You can access a read-only view by going to http://< Public DNS name of instance you just created >.
- Go to http://aka.ms/azjenkinsagents if you want to build/CI from this Jenkins master using Azure VM agents.