کار با vCloud Service Provider

کار با vCloud Service Provider

The goal of this post is to convey just how easy it is to work with virtual machines in a public cloud that is using VMware vCloud Director software. This post will assume that you have already signed up with a VMware vCloud Service Provider and have been given your URL and login credentials. While this post is vCloud vendor neutral, it will feature screen shots from the demo vCloud implementation I have been setting up at SMSproTech (my day job). Sometime in the fairly near future this demo lab will also be opened up for potential customers who are looking to sign up with an account at SMSproTech as well, so if you in the market for public cloud shoot me an email and I’ll put you on the update list.

Anyhow, lets get started.

Every vCloud customer is given a unique, case-sensitive, URL that only works for them. This URL is in the form of:

https://vcloud.provider.com/cloud/org/OrgNameHere/

You are also given an organization administrator username and password, from this account you can also create more user accounts for your organization. To login to your cloud simply go to your unique URL (in my case https://192.168.126.5/cloud/org/jpaul) and login with your credentials.

After logging in the first screen you come to is your home screen, this screen will show you all of your vApps as well as give you access to your Catalogs and other administration stuff. (More on catalogs later) Oh by the way, a vApp is not a new thing VMware just created for the cloud, vApps have been around since vSphere 4, simply put a vApp is a group of virtual machines that work together. In this how-to we will create a web application vApp… meaning that we will have a front end Apache web server VM, and a MySQL backend database VM. Both VM’s will be in a vApp which will allow for easy power off and power on operations (cause we can set the order for each VM) and cool features like exporting a vApp.

My home screen is what any new account will look like when you just sign up… I have no vApps to show on the main screen. Lets change this by created our first vApp which will be for a PHP/MySQL web application. The first thing to do is click the “Build New vApp” link on the home screen.

After clicking the Build New vApp Link you run through a wizard to provision your virtual machines. On the first page you name the vApp and select the amount of time that you expect to use this vApp. If this is a real world workload and it needs to be online “forever” you would select “Never Expire” for both options so that the vApp can run indefinitely. However for development use, or for simple lab purposes you can select a number of days to hold a “runtime lease”. This means that if you forgot about your vApp it will automatically be powered off after the number of days selected. This allows resources to be released for other users in case you forget to power off your VM’s. (Also if using a “Pay as You Go” method this will also power off the vApp and save you money if you forget to). The second option “storage lease” is the number of days the vApp should be kept after it is powered down. In both cases you can always extend out the lease after provisioning. So if you select 7 days, but it turns out you need another week to work, you can simply “renew” the lease later.

On the next page of the wizard we can add virtual machines to our new vApp. We have three options to do so:

  1. Use an existing VM from your other vApps as a clone
  2. Use an existing VM from a public vApp as a clone
  3. Create a new VM from scratch.

For this example we will create two new VM’s from scratch. Click the “New Virtual Machine…” button to proceed.

After clicking the New Virtual machine button a new wizard takes over to allow you to set variables for your new VM. For this example I am going to create a VM called “web1” for my Apache Web server front end.

After clicking OK you are brought back to the vApp wizard. From here you can repeat the previous steps as needed to create however many VM’s that your vApp requires. In the screenshot below I have went ahead and created my “db1” MySQL server as well. Click Next once you have all of the VM’s you need.

The next page lists out all of the new virtual machines so that you can select which network they are connected to as well as how they are allocated an IP address. One thing that I have found is that if you are creating new VM’s the IP allocation method that you select is ignored. But when you deploy a clone it is taken into consideration. For this example I will connect both of my VM’s to my Organizations “External” network.

An external network in “vCloud speak”is a virtual network that has access to devices outside of the vCloud. This could be the internet (which is the case in this example) or it could just be the company LAN. After setting all of the VM’s networks click Next to see a summary page, or just click Finish to provision your new virtual machines. After clicking Finish you will be returned to the home screen where you should now see your new vApp. You can click the “Open” link to drill down into it and see the individual VM’s.

Once the vApp is opened up we can click the VM’s individually and interact with them. Remember right now we just have blank VM’s, so the next step is to upload an ISO image so that we can mount it and start the OS installation. I will save that for tomorrows post since this one is already rather lengthy.

Here is what your new vApp looks like:

 

 

In the first part of this article I showed you how to get a vApp provisioned with two virtual machines. However we did not load the operating systems in them or do anything else, this article will show you how to upload media to your vCloud and how to get some basic networking setup. Let’s start with uploading media to your vCloud.

In the last article I mentioned that there were three ways to provision virtual machines. We picked the build from scratch option, because of this we will need to upload an ISO image to our vCloud Media Catalog. Think of this as the same as uploading an ISO to a datastore… the idea is the same… the process is a little different.

Uploading ISO installation media

After logging into your vCloud you will see several tabs across the upper area of the home screen, one of them is called “Catalog”, click that tab to enter the Catalog. The catalog will list all of your vApps as well as give you the ability to upload ISO’s and FLP images into your Media Catalog.

After entering the catalog screen click on the “Media” tab, then you will see a small hard drive icon with a green up arrow. This is the icon for uploading media to your catalog, click it.

After clicking the upload icon a new box will appear and allow you to select an ISO or FLP image from your PC. You will want to upload media from a machine with a fast upload speed, or if your provider offers it… use a remote desktop, VMware View desktop located at the datacenter. (The other option would be to contact your provider and see if they will upload it for you)

On this page you also need to enter a Name for the ISO, this is just a name that is significant to you. Then click upload, after doing so you will see one (maybe two) new boxes open up. One is an upload manager, and the other (if the providers SSL certificate is self signed) is asking you to accept the SSL certificate… name sure to look for this one and click Yes if it appears.

After clicking yes the ISO or FLP will start to upload and eventually the status (which says “Ready” in the above image) will say Completed. After all uploads have completed you can close the upload manager.

After completing the upload you can click on the “My Cloud” tab and then click on your vApp on the left. In this case mine is called WebApp1. After getting to the area where you can see your VM’s inside of the vApp, click on the blank area of the VM you want to load the OS on, then click the “CD” icon in the toolbar to select an ISO image to insert.

The box that pops up should list the ISO image that you just uploaded, select it and then click Insert.

One thing that I have noticed is that after inserting media your VM will say busy. Obviously it does take some time to insert the ISO, but not as long as it sits at busy. So to manually refresh the page click the blue circle arrow icon in the upper right area of the screen. After the VM no longer reads as busy you can click the green “Play” icon to power on the VM.

After powering on the VM and letting the web interface refresh you can click on the black screen thumbnail area and the VM’s console will open and allow you to interact with your new VM, just like you would if you were working with vSphere directly.

One last note: Once you have installed your guest OS you still need to install VMware Tools just like you did with your local vSphere VM’s. To do this go back to your vApp interface and high light the VM you want to install on by clicking once on it, then click the blue gear beside of the CD icon on the toolbar. From this menu you can select the option to install VMware Tools.

On to some basic networking

By default a vCloud External network (which if you read part one in the series is what I connected my two VM’s to in this vApp) can be either directly connected to the external network… or routed with a vShield Edge router. Most of the time in the public cloud space this will be a routed network. So inside of that routed network you will have no DHCP and will need to do one of two things.

  1. Assign your IP addresses manually
  2. Enable the vShield Edge router’s DHCP service

If we want to assign our IP addresses manually to our VM we can check to see what our subnet information is by clicking on the “Administration” tab and then clicking “Networks” on the left side.

After clicking on Networks you will see a list of the networks available to you, and it will also show you what the default gateway is along with the subnet mask. From that information we can assume that we can use any address in the 192.168.0.2-254 range and we can use 192.168.0.1 as our default gateway. As for DNS we can use any public DNS server, maybe your provider has already given you their preferred DNS server IP’s too.

Now for the second thing we can do… which is to enable the DHCP service on vShield Edge. To do this make sure you are still looking at the above screen (Administration->Networks). Now right click on the external network and select “Configure Services”

After clicking on “Configure Services” a box will appear and on the first tab we have the option to enable the DHCP server. Also make note of how you got to this area because if you want to do NAT’ing or configure firewall rules this is the area where you will do that (see the other tabs?).

At this point you should be able to do the following on your new vCloud:

  • Upload new installation media to your Catalog
  • Mount media to a virtual machine
  • Configure basic vShield Edge Services
  • Install your Virtual Machine operating systems and interact with guest OS’s

 

 

 

دیدگاهتان را بنویسید

نشانی ایمیل شما منتشر نخواهد شد. بخش‌های موردنیاز علامت‌گذاری شده‌اند *