Adding instructions to clone the repository, deploy-to-azure button
This commit is contained in:
Родитель
52c4276b5a
Коммит
84f83f8fee
|
@ -1,5 +1,18 @@
|
|||
# 00 - Setup your environment
|
||||
|
||||
## Creating Azure Resources
|
||||
|
||||
To save time, we provide an ARM template for creating all the Azure resources you will need for this lab other than the Azure Spring Cloud instance itself. Use the Deploy to Azure button below.
|
||||
|
||||
> 💡 Use the following settings for deploying the Azure Template:
|
||||
> * Create a new resource group
|
||||
> * Set West US2 as the location
|
||||
> * Save password you specify in this step, if you do not use the default. You will need it later in the workshop.
|
||||
|
||||
[![Deploy to Azure](media/deploybutton.svg)](https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2Fmicrosoft%2Fmigrate-spring-apps-to-azure-training%2Fmaster%2F00-setup-your-environment%2Fazuredeploy.json)
|
||||
|
||||
>💡 The resource provisioning will take some time. Continue with the workshop.
|
||||
|
||||
## Setting up your local environment
|
||||
|
||||
To complete the lab in the time allotted, you should have all the pre-requisites ready. The easiest way to get all the pre-requisites is to use the provided docker image (see ["Using Docker"](#using-docker) below). Alternatively, you can install all the pre-requisites on your own machine (see ["Local System Prerequisites"](#local-system-prerequisites) below).
|
||||
|
@ -82,19 +95,3 @@ This training lab requires the following to be installed on your machine:
|
|||
The environment variable `JAVA_HOME` should be set to the path of `javac` in the JDK installation.
|
||||
|
||||
You can then use Visual Studio Code or an IDE of your choice.
|
||||
|
||||
## Creating Azure Resources
|
||||
|
||||
To save time, we provide an ARM template for creating all the Azure resources you will need for this lab other than the Azure Spring Cloud instance itself.
|
||||
|
||||
>🛑Be sure to substitute or assign a valid resource group name for `$RESOURCE_GROUP_NAME`.
|
||||
|
||||
```bash
|
||||
az login # Log into your Azure account if necessary
|
||||
|
||||
az group create -g $RESOURCE_GROUP_NAME --location westus2 # Create a new resource group for this lab
|
||||
|
||||
az group deployment create -g $RESOURCE_GROUP_NAME --template-file azuredeploy.json --no-wait --parameters 'password=super$ecr3t' # Substitute something else for the password parameter
|
||||
```
|
||||
|
||||
>💡 The resource provisioning will take some time. Once you have run the Docker image or installed all the pre-requisites, proceed to the next section.
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"parameters": {
|
||||
"location": {
|
||||
"value": "westus2"
|
||||
},
|
||||
"password": {
|
||||
"value": "super$ecr3t"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -103,7 +103,19 @@ While waiting for the creation to complete, you can move on to the next section,
|
|||
|
||||
## Building the apps
|
||||
|
||||
Run
|
||||
### Get PiggyMetrics
|
||||
|
||||
Now that we have provisioned and configured our Azure Spring Cloud instance and the apps on it, we need some code to deploy. Run the following in your container:
|
||||
|
||||
```bash
|
||||
git clone https://github.com/microsoft/migrate-spring-apps-to-azure-training
|
||||
mv migrate-spring-apps-to-azure-training/01-migrate-spring-cloud-application/piggymetrics .
|
||||
rm -fR migrate-spring-apps-to-azure-training
|
||||
```
|
||||
|
||||
### Build PiggyMetrics
|
||||
|
||||
Next, we need to build the microservices comprising the PiggyMetrics application into deployable JAR files. Run:
|
||||
|
||||
```bash
|
||||
cd piggymetrics
|
||||
|
|
|
@ -14,11 +14,11 @@ Let's first create a build pipeline for `auth-service` using the classic UI, as
|
|||
|
||||
In Azure DevOps, navigate to "Builds" under "Pipelines", and click "New Pipeline". Click on the "Use the classic editor" link at the bottom.
|
||||
|
||||
Select the repository you created in the previous step as the source, and on the "Select a Tempalte" pane, click "Maven".
|
||||
Select the repository you created in the previous step as the source, and on the "Select a Template" pane, click "Maven".
|
||||
|
||||
![Select the Maven build template](media/02-select-maven-template.png)
|
||||
|
||||
The build pipeline will be created.
|
||||
The build pipeline will be created.
|
||||
|
||||
Click on the "Pipeline" header at the top. Change the pipeline name to "auth-service-build". Under parameters, change "Maven POM file" to `auth-service/pom.xml`
|
||||
|
||||
|
@ -54,7 +54,7 @@ Under "Artifacts", click "Add an Artifact". From the "Source" dropdown, select
|
|||
|
||||
![Adding an artifact](media/04-add-an-artifact.png)
|
||||
|
||||
Click on the lightning bolt icon on the newly-added build artifact. On the "Continuous deployment trigger" pannel, toggle the first switch to enable automatic deployment whenever a build completes.
|
||||
Click on the lightning bolt icon on the newly-added build artifact. On the "Continuous deployment trigger" panel, toggle the first switch to enable automatic deployment whenever a build completes.
|
||||
|
||||
![Continuous deployment trigger](media/05-continuous-deployment-trigger.png)
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче