Skip to content

Commit

Permalink
Update tutorial to conform to future guidelines (pulumi#375)
Browse files Browse the repository at this point in the history
* Update tutorial to conform to future guidelines

Related to pulumi/docs#1636

* Remove deploy button

* Address feedback
  • Loading branch information
bermudezmt committed Sep 11, 2019
1 parent 776eb98 commit f2259b4
Showing 1 changed file with 42 additions and 37 deletions.
79 changes: 42 additions & 37 deletions azure-ts-appservice-springboot/README.md
Original file line number Diff line number Diff line change
@@ -1,53 +1,58 @@
[![Deploy](https://get.pulumi.com/new/button.svg)](https://app.pulumi.com/new?template=https://github.com/pulumi/examples/tree/master/azure-ts-appservice-springboot/infrastructure)

# Deploy a Spring Boot App using Jenkins and Pulumi

This example shows how you can deploy a Spring Boot app to an Azure App Service instance using Pulumi in a Jenkins Pipeline. The Spring Boot app is packaged into a container image that is automatically (and conveniently!) built as part of the Pulumi app. The container image is pushed up to a private Azure Container Registry and then used as the source for an App Service instance.
This example shows how you can deploy a Spring Boot app to an Azure App Service instance using Pulumi in a Jenkins Pipeline. The Spring Boot app is packaged into a container image that is conveniently built as part of the Pulumi app. The container image is pushed up to a private Azure Container Registry and then used as the source for an App Service instance.

## Prerequisites

1. [Install Pulumi](https://www.pulumi.com/docs/get-started/install)
1. [Configure Azure credentials](https://www.pulumi.com/docs/intro/cloud-providers/azure/setup)

## Running the App
## Steps

1. Create a new stack:
### Step 1: Create a new stack

```
$ pulumi stack init dev
```
```
$ cd infrastructure
$ pulumi stack init dev
```

1. Login to Azure CLI (you will be prompted to do this during deployment if you forget this step):
### Step 2: Log in to the Azure CLI

```
$ az login
```
You will be prompted to do this during deployment if you forget this step.

1. Restore NPM dependencies:
```
$ az login
```

```
$ cd infrastructure
$ npm install
```
### Step 3: Install NPM dependencies

1. Run `pulumi up` to preview and deploy changes:
```
$ npm install
```

```
$ pulumi up
Previewing changes:
+ pulumi:pulumi:Stack jenkins-tutorial-dev create
+ docker:image:Image spring-boot-greeting-app create
+ azure:core:ResourceGroup jenkins-tutorial-group create
+ azure:containerservice:Registry myacr create
+ azure:appservice:Plan appservice-plan create
+ azure:appservice:AppService spring-boot-greeting-app create
+ pulumi:pulumi:Stack jenkins-tutorial-dev create
### Step 4: Deploy your changes

...
```
Run `pulumi up` to preview and deploy changes:

1. Check the deployed website endpoint:
```
$ pulumi up
Previewing changes:
+ pulumi:pulumi:Stack jenkins-tutorial-dev create
+ docker:image:Image spring-boot-greeting-app create
+ azure:core:ResourceGroup jenkins-tutorial-group create
+ azure:containerservice:Registry myacr create
+ azure:appservice:Plan appservice-plan create
+ azure:appservice:AppService spring-boot-greeting-app create
+ pulumi:pulumi:Stack jenkins-tutorial-dev create
...
```

```
$ pulumi stack output appServiceEndpoint
https://azpulumi-as0ef47193.azurewebsites.net
### Step 5: Check the deployed website endpoint

$ curl "$(pulumi stack output appServiceEndpoint)/greeting"
{"id":1, "content": "Hello, World"}
```
```
$ pulumi stack output appServiceEndpoint
https://azpulumi-as0ef47193.azurewebsites.net
$ curl "$(pulumi stack output appServiceEndpoint)/greeting"
{"id":1, "content": "Hello, World"}
```

0 comments on commit f2259b4

Please sign in to comment.