180 likes | 337 Views
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.
E N D
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 • OpenLogicCentOS: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
Demo: Create Linux VM • We’ll create our first VM from Windows using PowerShell. Set-AzureSubscription-SubscriptionName"free trial"-CurrentStorageAccountkloudblob $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-InstanceSizeSmall-LinuxUser$lxUser-Password$password
Azure Access Control - PowerShell $acl=New-AzureAclConfig Set-AzureAclConfig-AddRulePermit-RemoteSubnet"10.0.0.0/26"-Order1 ` -ACL$acl-Description"Lock down SSH" Get-AzureVM-ServiceName$vxName-Name$vxName| Set-AzureEndpoint-Namessh-Protocoltcp-PublicPort22 ` -LocalPort22-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 solutionshttp://vmdepot.msopentech.com/
Cross Platform Command Line • X-Plat command line tool is implemented in JavaScript powered by Node.jshttp://www.windowsazure.com/en-us/downloads/#cmd-line-tools
X-Plat CLI Linux Installation Guidance • Install the latest Node.jshttps://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager • NPM ( Node Package Manager ) • Install Azure CLI: npminstall 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 vmnameimagenameadminusernameadminpassword --location “image region” • Check the VM Azure VM Show vmname • Delete the VM Note : You don’t need to put –ssh as sshport 22 is automatically added