Linux on Windows Azure Andreas Wasita
Today’s Session Supported Linux Distributions. Setting up and accessing a new Linux VM. Securing your access to the VM. Managing Windows Azure (any service) from a Linux shell. Other Linux options on Azure (VMDepot).
Supported Distributions SUSE and Open SUSE: http://www.suse.com/suse-linux-enterprise-server-on-azure Canonical Ubuntu: http://www.ubuntu.com/cloud/azure OpenLogic CentOS: http://www.openlogic.com/azure Subject to Azure SLA and Azure support can manage break/fix tickets. Vendors above will work to rectify OS-level challenges. http://support.microsoft.com/kb/2805216
Runtime Costs for Linux VMs Instance Name Cores RAM AUD / PH Extra Small (A0) Shared 768 MB $0.0202 (~$15.14/month) Small (A1) 1 1.75GB $0.0606 (~$45.41/month) Medium (A2) 2 3.5GB $0.1211 (~$89.81/month) Large (A3) 4 7GB $0.2422 (~$180.63/month) Extra Large (A4) 8 14GB $0.4844 (~$360.25/month) A6 28GB $0.8275 (~$615.56/month) A7 56GB $1.655 (~$1,231.11/month)
Demo: Create Linux VM We’ll create our first VM from Windows using PowerShell. Set-AzureSubscription -SubscriptionName "free trial" -CurrentStorageAccount kloudblob $Images = Get-AzureVMImage | Where-Object { $_.PublisherName -eq 'OpenLogic'} $affinityGroup = 'kloudnet' $vxName = Read-Host -Prompt 'Enter virtual machine name' $lxUser = Read-Host -Prompt 'Enter Admin UserName' $password = Read-Host -Prompt 'Enter Password' –AsSecureString New-AzureQuickVM -Linux -ServiceName $vxName -Name $vxName -ImageName $Images[0].ImageName -AffinityGroup $affinityGroup -InstanceSize Small -LinuxUser $lxUser -Password $password
Azure Access Control - PowerShell $acl = New-AzureAclConfig Set-AzureAclConfig -AddRule Permit -RemoteSubnet "10.0.0.0/26" -Order 1 ` -ACL $acl -Description "Lock down SSH" Get-AzureVM -ServiceName $vxName -Name $vxName | Set-AzureEndpoint -Name ssh -Protocol tcp -PublicPort 22 ` -LocalPort 22 -ACL $acl | Update-AzureVM
Securing access to a Linux VM Certificate-based security with SSH (hint: use openssl). Set an appropriate ACL on the Azure Cloud Service. Use a non-standard SSH port on your Cloud Service Endpoint. Use a bastion (or jump) host. Does this VM need to be publicly visible?
Management Cross-platform command line (node.js commandline). https://www.windowsazure.com/en-us/manage/linux/other-resources/command-line-tools/ PowerShell. Azure Management Portal.
Other Linux Options on Azure VMDepot provides a rich set of pre-packaged Linux-based solutions http://vmdepot.msopentech.com/
Demo
Managing Windows Azure from Linux
Cross Platform Command Line X-Plat command line tool is implemented in JavaScript powered by Node.js http://www.windowsazure.com/en-us/downloads/#cmd-line-tools
X-Plat CLI Linux Installation Guidance Install the latest Node.js https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager NPM ( Node Package Manager ) Install Azure CLI: npm install azure-cli -g
Configuring X-Plat CLI for Azure Azure Account Download Azure Account Import Note: You need to have a browser on the machine before you run Azure account download command.
X-Plat CLI to Create Azure Objects Azure Account Affinity-Group Azure Storage Account Azure Website Create Azure VM Disk Attach Azure SQL Server Create Node.JS Developer Center http://www.windowsazure.com/en-us/develop/nodejs/
Create and Delete Azure VM with CLI Show VM Image Azure VM Image List Create VM Azure VM Create vmname imagename adminusername adminpassword --location “image region” Check the VM Azure VM Show vmname Delete the VM Note : You don’t need to put –ssh as ssh port 22 is automatically added
Demo