In this lab, you will set up an Office365 trial subscription, an Azure trial subscription, configure your Azure subscription for the DevCamp, and provision a virtual machine in the subscription to use for development of further labs.
In this hands-on lab, you will set up an Office365 developer subscription, and Azure trial subscription, and an Azure-based virtual machine for the development environment for subsequent labs in the DevCamp. To expedite the process, we've prepared Windows and Linux images that you will copy into your own environment, start the virtual machine and connect to it. You will then configure the components for Azure development.
- Set up an Office365 trial subscription
- Set up an Azure trial subscription
- Configure your Azure subscription for DevCamp
- Create an Azure Virtual Machine for development
- Connect to the Azure Virtual Machine and configure it for development.
- Review the features of the Azure Portal
- Review the Resource group that we created in Exercise 3
You will need a cell phone and credit card for identity verification. The credit card will not be charged unless you remove the spending cap on the subscription you will create.
This hands-on-lab has the following exercises:
- Exercise 1: Set up Office 365 trial subscription
- Exercise 2: Set up Azure trial subscription
- Exercise 3: Start your VSTS trial subscription
- Exercise 4: Configure your Azure subscription for DevCamp
- Exercise 5: Create an Azure Virtual Machine for development
- Exercise 6: Connect to the Azure Virtual Machine and configure it for development
- Exercise 7: Azure Portal walkthrough
- Exercise 8: View the resources you created
-
In your browser, go to
https://products.office.com/en-us/business/office-365-enterprise-e3-business-softwareand click the link that says "Free Trial", which will take you to this page: -
Enter the information requested, and click
Just one more stepwhich will take you to the following page: -
Choose a userid and a
tenant namefor your trial. In this case I chosedevcampross, but you can choose anything you'd like, as long as it is unique. You'll also have to choose a password, and clickCreate my account. Next you will see this page, which asks for a phone verification: -
After this process is complete, your O365 trial will be set up, and you'll see this page:
Make note of your user id, which will be used to sign onto the Azure portal later. Click
You're ready to go, which will take you to the following screen:Click on the
adminapp icon, which will open the Office365 admin center page in your browser. It will look like this:If you'd like to see the welcome tour click
Next, or simply close the dialog box.
Stay on this page until the next exercise.
-
Next, we want to set up an Azure subscription, which can be accessed via the Azure Active Directory. At the bottom of the screen, click
Admin centers, and then clickAzure AD. This will open up a new browser tab showing this page: -
Click on
Azure subscription, that will take you to the page for creating a new trial subscription:Enter the requested information and click
next. -
Enter the information about you, and verify your identity by phone. Also you'll need to verify via credit card. Your credit card will not be charged unless you remove the spending cap from your subscription.
-
Finally after the verification process, you'll have to agree to the terms of the trial subscription:
-
it will take a few moments to set up your azure subscription.
-
When the subscription set up process is done, you can click on
Start managing my serviceto open the Azure portal, which will look like this:
-
In your browser, go to
http://www.visualstudio.com/team-services, and click onsign inin the upper right corner. This should take you to a screen that looks like this:click on
Use your benefits, and this window will pop up:Click Accept to access your Visual Studio Dev Essentials benefits.
-
We have created an Azure Resource Group template that will configure the resources you need in Azure for the DevCamp. To deploy these resources in your Azure subscription, do
control-clickon this button: -
You should see a new tab open in your browser and open the Azure portal, with a blade that looks like this:
Name your resource group
DevCamp, choose a location for your deployment, check the box that indicates you agree to the terms and conditions, and click thePurchasebutton.The Resource Group template will start deploying, and the portal will pin a tile to the dashboard showing the status:
-
This will take approximately 20 minutes to complete. While it is working, it is useful to understand what this process is doing. In a later session, we will take a look at Azure Resource Group templates, and how to manage your infrastructure the same way you manage your code. As a short introduction, a template is a JSON file that contains definitions for the resources you want in your resource group. When you apply the resource group template, Azure will apply the template to your Azure resource group, and create the resources you have specified in the template. This makes it easy to maintain the infrastructure definition in the JSON text file.
In the resource group template we have created for DevCamp, there are several types of resources including Web Apps and Virtual Machines. The whole list of resources deployed is detailed in Exercise 8 of this Hands-On-Lab. Resource Group Templates are usually fairly quick to apply - the reason this one takes so long is that we are creating a Windows Virtual machine and installing all the tools you will need for the DevCamp.
When the Resource Group creation is done, go visit the resource group by clicking `resource groups on the left:
Then click your Resource group
-
The Azure resource group template will have created two virtual machines - one for Windows development, and the other for Linux development. In these instructions, we will focus on the Windows machine setup. Feel free to use the Linux machine instead, or to stop or delete it.
Find the Windows virtual machine in your resource group, it's name will start with
windev:
-
click the virtual machine, and then click
Connectto connect to the machine using Remote Desktop:This will download a remote desktop connection file, and when you open it, remote desktop on your local machine will attempt to attach to your virtual machine. When the windows security dialog pops up, click on the
more choices link, then chooseuse a different accountUse the credentials
l-adminwith passwordDevc@mp2016!to log on to the machine. It would be wise to change the password in the virtual machine.When remote desktop is connected, you will see server manager initially. We will want to turn of IE enhanced security, to make accessing the web within the virtual machine easier. First click local server;
then click the
onnext toA dialog box pops up - choose to turn enhanced security off for administrators.
-
We are going to use git to clone the DevCamp github repository to this development machine. Open
cmd, change directory to the root usingcd c:\, and dogit clone https://github.com/AzureCAT-GSI/DevCamp.git:All of the content for this DevCamp will now be located in
c:\DevCamp\.Start
visual studio 2015, and in the sign in screen, clicksign inand use the credentials you used earlier for Office 365.You can create a VSTS repository now, choose an appropriate repository name and click continue:
Create your first team project, and name it
DevCamp:Finally click close, and you are done with the Visual Studio setup.
-
We are now going to deploy our .NET API to an Azure App Service. In the command window change the directory too the root with
cd \, and clone the github repository for the API withgit clone https://github.com/AzureCAT-GSI/DevCampSharedDotNetAPI.git. -
Switch back to Visual Studio and open the API solution with File > Open > Project/Solution:
and open the API solution located at
C:\DevCampSharedDotNetAPI\src>.right click on the DevCamp API project, and choose
publish:In the publish wizard, click
Microsoft Azure App Servicefor the publish target:Next select
DevCampand then theincidentapi...app service, and clickOKIn the next step, leave all the defaults and click
Publish:After a short time, you should see the
publish succeededmessage in the output window: -
In a browser windows inside your development Virtual Machine, open a browser window and go to
http://nodejs.org, and click on theOther Downloadslink under v6.9.0:In the next page, click on
32 bitnext toWindows Installer (.msi), download the MSI and run the installation. -
Install the azure command line interface. Go to a terminal window and do this command:
node -vVerify that the version is v6 or greater.npm install azure-cli -g -
For Java developers, we have already installed the Java JDK. We will be using the gradle build manager - to install that using the chocolatey package manager, go to a command window and type:
choco install gradleAlso install maven with:
choco install mavenGo to the root directory using
cd \, and performgit clone https://github.com/swagger-api/swagger-codegen.git cd swagger-codegen mvn clean packageAlso Eclipse Mars is installed in
C:\Program Files\Eclipse Foundation\4.5.1\eclipse.
If you would like to download a newer version (eg. Neon), Eclipse is available here:http://www.eclipse.org/downloads/and Spring Tool Suite is available here:
http://spring.io/tools/stsFor example, after downloading the Eclipse install, run it and you'll get this screen:
choose
Eclipse IDE for Java EE developers. In the next screen, leave the defaults and chooseInstall:When that is done, click
Launchto start the IDE and choose a directory for your workspace. You will end up with the initial Eclipse screen:Click
Helpin the menu bar, and chooseinstall new software:In the window that pops up, choose
All Available Sitesfor theWork withdropdown, typegradlein the search box, and when the search is complete, chooseBuildshop: Eclipse Plug-ins for Gradleclick through the dialog and install the package. Go back to
help/install new software, and click theAdd..button next to thework withdropdown. In the Add Repository dialog box, git the repository a name, and typehttp://dl.microsoft.com/eclipsefor the Location, and clickOK:Choose both of the packages in the list, and complete the package installation:
Also, install the spring tool suite package by using the menu item
Help/Eclipse Marketplace..., typespringin the Find: box and chooseGo. in the list of packages, scroll down toSpring Tool Suite (STS) for Eclipse 3.8.2.RELEASEand clickInstall.
-
On your local machine or the virtual machine in Azure, open a browser window and go to the main Azure portal page, http://portal.azure.com. Log in with the credentials you supplied in the subscription signup exercise. You should see the Azure portal, similar to this:
There is a lot to notice on this screen. At the upper left corner, the icon under the
Microsoft Azurebanner allows you to shrink and expand the left bar:Under that, clicking on the
+ Newitem will allow you to create new deployments, virtual machines, databases, etc: -
On the left you will see a list of the Azure services that you can use on the left hand side. Notice that this list will scroll up and down to reveal more services, and finally an item that says
More Services >:You can click on any of these and see what items are deployed, and easily create new deployments.
At the top of the window you have a search box where you can search for any resources:
-
The bell icon is for notifications, and in this screenshot, it indicates that there are two notifications pending:
Clicking on the bell will show you the notifications:
If you click on one of the notifications, you can go to the list of all current notifications:
-
The gear at the top of the screen lets you set the color palate for the portal, whether or not there will be animations, and other options for the portal itself:
-
The "smiley face" button allows you to send feedback to Microsoft:
Clicking on the icon will give you a form to let us know about your experience:
-
The Question icon will give you the ability to enter a support case, manage support requests, or get further information on Azure.
-
Your login name and company name on the upper left hand corner has two functions:
If you hover the mouse over your name, you'll get information about your login, the directory and subscription:
If you click on your name, you can sign out, change your password, view your permissions, and view your bill:
-
Next we will look at the resource group we set up with the template. Click on
Resource Groupson the left hand side:then, click on the resource group that you created:
A new blade will open with the overview of all of the contents of the resource group listed:
You can click on any of the items on the left hand side which will view or manipulate settings for the resource group as a whole. If you click on any of the individual resources in the center, you will get more information on that resource.
-
Azure automatically logs changes to resource group and who made those changes. Clicking
Activity logon the left of the blade will allow you to query the log, and clicking on any logged items will give you additional information on that entry: -
Clicking on
Automation scriptwill allow you to view, edit or download the resource group template that would create this resource group.
it is particularly useful to create resources in the Azure portal, then save or edit the resource group template. Resource group templates will be explained further in a later lab.
Going back to the list of resources in the resource group, we'll go through the list of each resource, with a description. Feel free to click on the resource and view its detail blade.
Also, our resource group template has added a random string to the end of many of the resources. In this description, we'll replace that string with ....
-
incidentcache....:This is the Redis cache that we use from the application to make data access faster. The modern-cloud-apps hands on lab adds support to the application to be able to leverage the cache. -
ubudev....:This is an Ubuntu linux virtual machine, meant to be for development in a non Windows server environment. If you are doing development in Windows only or in an on-premisses machine, you can safely delete this virtual machine. -
windev....:This is the Windows server virtual machine that we are using as a development machine for these hands-on-labs. You can delete this machine after the developer-environment lab if you are using Linux or an on-premisses machine for development. -
incidentdb....:This is the documentDB database that will hold the JSON incident documents stored by the application. -
ubdev....NetworkInterface:This is a network interface that will allow the Ubuntu linux virtual machine to communicate on the network. If you delete the Ubuntu virtual machine, you can safely delete this. -
windev...NetworkInterface:This is a public network interface that will allow the Windows development virtual machine to communicate on the network. If you delete the Windows virtual machine, you can safely delete this. -
UbuntuDevPip:This is a public IP that will allow the Ubuntu linux virtual machine to communicate with the Internet (eg. via Putty). If you delete the Ubuntu virtual machine, you can safely delete this. -
WindowsDevPip:This is a public IP that will allow the Windows development virtual machine to communicate with the Internet (eg. via Remote Desktop). If you delete the Windows virtual machine, you can safely delete this. -
DevCampVnet:This is an Azure Virtual Network, which will allow components of the resource group to communicate as they were on the same physical network. -
incidentblobstg....:Storage account for storing the uploaded images and the Azure Queue, from the modern-cloud-apps lab. -
incidentdiagstg....:Storage account for storing diagnostics from the services in the resource group. -
vmstorage....:Storage account for storing the virtual hard disk images for the virtual machines in the resource group. -
incidentappplan....:App Service Plan, which defines how the app services in the resource group will be configured. -
dotnetapp....:App service for running the .NET application when deployed to the cloud. If you are not using .NET in the labs, you can safely delete this. -
incidentapi.....:App service for running the API service that provides a REST API to the web applications. -
javaapp....:App service for running the Java application when deployed to the cloud. If you are not using Java in the labs, you can safely delete this. -
nodejsapp....:App service for running the Node.js application when deployed to the cloud. If you are not using Node.js in the labs, you can safely delete this.
In this hands-on lab, you learned how to:
- Set up an Office365 developer subscription
- Set up an Azure trial subscription
- Configure your Azure subscription for DevCamp
- Create an Azure Virtual Machine for development
- Connect to the Azure Virtual Machine and configure it for development
- Use the Azure portal to view the resources that you created
Copyright 2016 Microsoft Corporation. All rights reserved. Except where otherwise noted, these materials are licensed under the terms of the MIT License. You may use them according to the license as is most appropriate for your project. The terms of this license can be found at https://opensource.org/licenses/MIT.






























































