1
0
Форкнуть 0
migrate-spring-apps-to-azur.../00-setup-your-environment
Yev Bronshteyn 19d370a9f1 Merge branch 'master' of github.com:microsoft/migrate-spring-apps-to-azure-training 2020-02-04 23:42:25 -08:00
..
media Adding deploy button 2020-01-30 15:27:04 -08:00
Dockerfile Adding dependencies for other labs to dockerfile 2020-01-28 15:11:00 -05:00
README.md Merge branch 'master' of github.com:microsoft/migrate-spring-apps-to-azure-training 2020-02-04 23:42:25 -08:00
azuredeploy.json Consistency clean-up, removing tight coupling to artificial environment variables that prevents service bindings from working. 2020-01-27 20:59:01 -05:00
azuredeploy.parameters.json Adding instructions to clone the repository, deploy-to-azure button 2020-01-30 15:22:57 -08:00

README.md

Setup your environment

This guide is part of the Azure Spring Cloud Migration Lab

Prerequisites and environment setup.


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

💡 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" below). Alternatively, you can install all the pre-requisites on your own machine (see "Local System Prerequisites" below).

💡 All commands in this lab are formatted for the Bash shell. While Azure CLI should behave identically on all environments, some semantics may need to be modified if you use other shells.

A docker image containing all of the pre-requisites is available. You'll need:

With Docker installed, run (in bash or PowerShell with administrator privileges)

docker run -d azurejavalab.azurecr.io/azurejavalab

Preparing Visual Studio Code

Visual Studio code makes it easy to edit files and run commands inside a container all in one single, fluid interface. If you don't have VS Code installed, install it now.

With Visual Studio Code installed, open the page for the Remote - Containers extension, and click "Install". If prompted to allow the browser to open Visual Studio Code, allow it.

Visual Studio Code will open, showing the description of the Remote Containers extension. Click on the green install button on that page to install the extension:

Visual Studio Code extension page

If an "uninstall" button appears in place of the "Install" button, then the extension is already installed and you can continue.

Connecting to the Container

With the container running on your machine, click on the "Remote Explorer" button on the left toolbar in Visual Studio Code:

Remote explorer button

The Remote Explorer pane will appear, and you should see the lab container in it. Right-click on the container and click "Connect to Container".

Remote explorer pane

A new window will open. Press CTRL+SHIFT+P (Mac: ⇧⌘P) to open the command bar and Enter "Open Folder". In the subsequent dialog, enter /lab:

Open Folder

Select the remote folder

Click Ok.

You should now see the contents of the lab folder on the left side pane. There isn't much to see (yet), as the folder is empty.

Last, press CTRL+SHIFT+` (Mac: ⌃⇧`) or choose "Terminal: Create New Integrated Terminal" from the command pallete.

Your Visual Studio Code window should now look like this:

Visual Studio Code - Remote

You can use the integrated shell on the bottom right for any command you need to run as part of this lab. Any files you need to edit, you can open from the panel on the left or by pressing CTRL+P.

Local System Prerequisites (Only if you can't use Docker)

This training lab requires the following to be installed on your machine:

  • JDK 1.8

  • A text editor or an IDE. If you do not already have an IDE for Java development, we recommend using Visual Studio Code with the Java Extension Pack.

  • Azure CLI version 2.0.80 or later. You can check the version of your current Azure CLI installation by running:

    az --version
    
  • 🚧 The spring-cloud extension for Azure CLI. You can install this extension after installing Azure CLI by running az extension add -n spring-cloud -y.

  • MySQL CLI

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.


➡️ Next Section: Migrate a Spring Cloud Application