GithubHelp home page GithubHelp logo

cloudworkshop's Introduction

Welcome to the Cloud Workshop!

Quick Links:

Demos Instructions:

  1. Create a Resource Group
  2. Create a Virtual Machine
  3. Deploy IIS
  4. Block HTTP
  5. Create an Azure Web App

Create a Resource Group

A resource group is a logical container that will be throughout the rest of this workshop.

  1. Login to the Azure Portal with your company email address.
  2. Click on "Cloud Shell" Icon at the top right of the Azure portal Open Cloud Shell
  3. Select PowerShell as your default language. select PowerShell
  4. Select a subscription to store cloud shell data (less than 5 MB of data will be stored). set subscription
  5. After a few seconds Cloud Shell will initialize.
  6. Click into Cloud Shell and enter the command: az group create --name RG-<yourname> --location central-us and hit enter

command

  1. The command will return json if sucessfull ###Verify Resource Group Creation
  2. On the left menu bar click the Resource Groups button and search for your Resource Group search

Create a VM

A Virtual Machine is the core resource of Infrastructure as a Service (IaaS). Let's create a Windows Server VM using the Azure Portal. You could also do this using Cloud Shell code here or ARM Template.

  1. Click on the + New Resource
  2. Search for Windows Server
  3. Select Server 2019 Datacenter and click Create
  4. Chose the following options: VM Name: VM-<yourname> Administartor name: <yourname> Password: This is a strong password! Inbound ports: HTTP, HTTPS, RDP
  5. Click Review and Create and then Create
  6. Click Resource Groups on the left, then click your Resource Group (RG-<yourname>)
  7. Click on the Virtual Machine (note the computer icon to the left of the VM)
  8. Find the VM's Publick IP
  9. On your laptop open Remote Desktop Connection
  10. Enter your VM's public IP into the "Computer" text box of the Remote Desktop Connection box
  11. On the username/password screen choose More Options and select "Other account"
  12. Login with the admin username and password you created before

Deploy IIS

  1. Open cloud shell
  2. Type in the following (Please remember to change VMName and ResourceGroupName):
Set-AzVMExtension `
    -ResourceGroupName "RG-sdoshi" `
    -VMName "VM-sdoshi" `
    -ExtensionName "IIS" `
    -Location "CentralUS" `
    -Publisher Microsoft.Compute `
    -ExtensionType CustomScriptExtension `
    -TypeHandlerVersion 1.8 `
    -SettingString '{"commandToExecute":"powershell Add-WindowsFeature Web-Server; powershell Add-Content -Path \"C:\\inetpub\\wwwroot\\Default.htm\" -Value $($env:computername)"}'
  1. Find the VM's public IP
  2. Open a new tab and go to http://<publicip>

Block HTTP

Firewall rules in Azure are easy to create and manage. Let's go back and block port 80 on the VM we created earlier.

  1. Click on Resource Groups in the left, and click on your Resource Group, then find the network security group for your VM vm-<yourname>-nsg
  2. Click on Inbound Security Rules
  3. Click on HTTP 80 to view the rules
  4. Flip the rule from ALLOW to DENY and click save
  5. Now try to hit your VM's website again and it will be inaccessible.

Deploy Web App

An Azure Web App is serverless way to quickly deploy applications to the web. Let's deploy a simple, static site.

  1. Click + New Resource and search for Web App and click create
  2. Select the following options Instance Name: WA-<yourname> Type: ASP Net 2.0
  3. Click on Resource Groups in the left, click your Resource Group and click on WA-<yourname>
  4. Click on Deployment Center to setup content for your site
  5. Select External Git as your repository and click continue
  6. Click continue (select kude console)
  7. For the repository enter https://github.com/SameerDoshi/CloudWorkshop.git and branch master
  8. Click save
  9. Click Overview in the left and find the site's URL
  10. Open the URL in a new window

Appendix:

VM Create Through Code

  1. Open CloudShell
  2. First grab an admin/password: $cred = Get-Credential
  3. Create a new VM
New-AzVm `
    -ResourceGroupName "RG-sdoshi" `
    -Name "VM-sdoshi" `
    -Location "Central US" `
    -VirtualNetworkName "VM-sdoshi-vnet" `
    -SubnetName "mySubnet" `
    -SecurityGroupName "VM-sdoshi-nsg" `
    -PublicIpAddressName "VM-sdoshi-pip" `
    -OpenPorts 80,443,3389 `
    -Credential $cred

cloudworkshop's People

Contributors

sameerdoshi avatar adam-heigel-wwt avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.