Deploying an Azure Function Apps that loads a jenkins docker image
-
Login to Azure CLI (you will be prompted to do this during deployment if you forget this step)
az login
-
Create a new stack
pulumi stack init dev
-
Install dependencies
npm install
-
Configure the location to deploy the resources to. The Azure region to deploy to is pre-set to WestUS - but you can modify the region you would like to deploy to.
pulumi config set azure-native:location eastus2
-
Create that stack via
pulumi up
pulumi up -y
The Result will be
View Live: https://app.pulumi.com/shaht/azure-ts-jenkins/dev/updates/1 Type Name Status + pulumi:pulumi:Stack azure-ts-jenkins-dev created + ├─ azure-native:resources:ResourceGroup jenkins-rg created + ├─ azure-native:web:AppServicePlan jenkins-appserviceplan created + └─ azure-native:web:WebApp jenkins-webapp created Outputs: jenkinsEndpoint: "https://jenkins-webapp971ad904.azurewebsites.net" Resources: + 4 created Duration: 32s
-
Check the Outputs
pulumi stack output
Returns:
Current stack outputs (1): OUTPUT VALUE jenkinsEndpoint https://jenkins-webapp971ad904.azurewebsites.net
-
Load the URL in a browser. Wait about 60 seconds for jenkins to warm up the 1st time. Wait about another 60-90 seconds for the jenkins app to create the login page
Unlock Jenkins To ensure Jenkins is securely set up by the administrator, a password has been written to the log (not sure where to find it?) and this file on the server:
-
Destroy the Stack
pulumi destoy -y
-
Remove the stack
pulumi stack rm dev