Saturday 27 June 2015

HP Cloud Service Automation - Part 7

HP Cloud Service Automation - Part 7


Operations is the last section we haven't dealt with. In case you're wondering Cloud Analytics is an add-on and needs additional software to be installed and configured. Marketplace just redirects you to the Marketplace Portal. Be aware that the Marketplace Portal URL is Organization specific. So if you can't log in with LDAP credentials, double check you're trying the right portal URL! That's caught me out more than once!

Operations shows the CSA administrators what's going on for each Organization and each user within the Organization that has been configured or logged in at one stage or another. The status of each Subscription is clearly shown.

Clicking on a particular user will show more details about their Subscriptions

And you can click on the individual subscriptions for more details

There is the ability to transfer a subscription to another user within the same Organization should this be necessary (user has left the Organization or there's been a promotion / change in ownership).

I've only one other configured user so they are listed and clicking Transfer will move the subscription to them.

Now you can see the active subscription against the other user

Next you can test cancelling a subscription using the cancel button. This terminate the subscription in the case where doing it centrally may be necessary after a company closes or requests it specifically. Make sure you get the request in writing!!


Now the Service shows up as Offline. That's as far as you can take it from here. The VM is gone from vCenter, the OO undeploy operation has succeeded but until you log in as the owner of the subscription you can't delete it. My guess this is just in case the owner wants to Reorder the service perhaps. But after transferring the subscription back to the consumer user you can see the delete option is available there but we know it's not consuming resources at this point:

That's all for Operations!






Friday 19 June 2015

HP Cloud Service Automation - Part 6

HP Cloud Service Automation - Part 6


LDAP is a means to integrating a customers directory service with HP CloudSystem so that we can specify which groups of users are allowed to logon to CSA and the Marketplace Portal and do/see exactly what.

Edit the Organization as follows:

LDAP Server Information:
Hostname: FQDN of your Domain Controller / Directory Server
Port: 389 (I'm not using security but in Production you should. You will need however to address importing the customer's root SSL certificate into CSA to ensure it is trusted)
Base DN: DC=lab,DC=local (change to what is appropriate for your environment)
User ID: CN=cloudsystem_service,OU=Service Accounts,OU=Lab,DC=lab,DC=local (This is a service account with a long, non-expiring password to allow CSA to query the Directory Service)
 

LDAP Attributes:
User Email: mail
Group Membership: member
Manager Identifier: manager
Manager Identifier Value:dn
User Avatar: avatar

User Login Information:
User Name Attribute: sAMAccountName
User Search Base: OU=Users,OU=Lab
User Search Filter: sAMAccountName={0}
Search Option: Search Subtree - selected

Now, this is for Microsoft Active Directory, you may need to edit some values if using something else. When you are finished validate the settings via the Look Up User button in green shown above. Here is one with a search for a user jsoap2 and the successful result:


Now you can go to the Organization Access Control section and add in the groups to assign permissions as follows:

We can use these permissions in Catalog, Offerings and Approval flows. We'll look at Catalogs next:

Catalogs are one way to organise the offerings you are publishing. You can publish everything to the Global Shared Catalog but you may have times when you want more control. You may have a set of Developers or people who only need to see one particular Offering and no others. You ensure that the group is listed as a Service Consumer in the Organizational screen above and then add that group to the access control tab of the Offering and publish it. Only that group can then se it in Marketplace.



Now, Catalogs contain Categories. These are just for grouping similar designs. You get 14 default ones when you create a new Organization but these can be trimmed down / replaced with more appropriate ones if you wish.

Click Add Category to create a new one
 
You can Delete any other ones you don't need here. If an offering has already been published to a Category the Delete option will be unavailable. Again, best do thinking up front and Organize things in advance as much as possible.

Approval workflows require LDAP integration. There are four types:
  • Delegated Template - provides access to custom OO workflow for more advanced scenarios
  • Named Approver Template - can point to list of specified users in LDAP
  • Named Group Template - can point to a single LDAP Group that has up to 10 users in it
  • User Context Template - can use the LDAP manager's field to determine who has approval rights

You usually select a list of users or a group and choose how many people much approve the request before it is passed (any 2 or 3 for example). You also specify what happens if no one is around to approve it, does it get automatically approved or not and what is the defined waiting period.

Here is a Named Approver example. You type in the username and click Add Approver and it should resolve and add the user in.

Here is an example of a Named Group Template. You have to enter in the DN of the group (you can specify an OU and it shows all the group DNs in that part of the LDAP structure).

Now we set the number of approvers slightly higher.

When a new subscription request is made for this offering, the named approvers are emailed to say they have pending approvals waiting. They log into CSA (not the marketplace) and approve the pending request. The Requestor gets an email to say their request has been approved and another when the VM/instance is build and ready.

Now, when you publish an Offering to the Test Catalog you can change the Approval Policy and what actions it is used under.

You can also get more granular so approval to reboot etc has to be approved!

That is about enough to fill anyone's head so I'll leave it there! You will need an email server and SMTP integration in the Organization to see the notifications around approvals. There isn't a hyperlink to my knowledge to enable easier approvals but the custom OO flows could be used to generate one in the email at a guess.


Friday 12 June 2015

HP Cloud Service Automation - Part 5

HP Cloud Service Automation - Part 5

Customizing a Topology Design requires a degree of realism. Yes, you can push the design a bit but do you really want to?!! I've created a Topology Design previewed below that allows you a drop down list view during selection but you lose the ability to request multiple numbers of these at once and also you can't modify it afterwards! So there are drawbacks when you move away from using profiles in this way but gain individual flexibility over CPU / Memory / OS options.

The are 3 sets of options above, each fully priced and very flexible. I selected two vCPU nad deployed the VM below quite easily (although I've experienced issues with deployment/undeployment so this Post is more for curiosity than anything else - see end of post):

This also shows that the generated name in VMware is also used as the Computer Name. You get to choose the prefix but that's all.

So how to go about getting the list view? We've to start by editing the Provider Components for VMware vCenter. Creating a custom one to give us the options we need.

Note: You can't hide individual values within a list, the entire list is always shown so it's harder to add in more options later. We can't use Profiles as we have done earlier.

Profiles in the Topology designer are much like Openstack flavors. That's because the Topology Designer was written with Openstack in mind! It is easy to use Profiles but when you're trying to offer granular choices, all the permutations and combinations can get crazy! Each one needs a Profile and price. The list view is more flexible but it's reduces the overall flexibility of the Offering.

So to begin let's find the component we need to edit.
Go to Providers, select VMware vCenter on the left and click Components on the right.

Click on the vCenter Server component and then click the Save As button at the bottom.

Enter a name for the component and Click Save.

Click on the Properties Tab to edit the required properties. The ones I edited are cpuCount, vmTemplateReference and memorySize.

Click on the cpuCount edit button on the far right. Change the Type to List and enter in the list of values you wish to use!

Unfortunately if return here to add a new one AFTER referencing the component in a published design you will get an error like this:

You might consider creating versions of these components to allow you to distinguish them.
 
Add them to your List Palette if in use or the design won't see them.
 
Now edit the other two component properties.

And next, memorySize.

Finally, vmTemplateReference.

Pay attention to the Visible and Required fields. "Can be Modified" should be set to Yes (checked by default) which will save a small bit of time in the Design later. Although by not using profiles as we are here I haven't found a way to modify a deployed VM with this customization as yet!

Now if you were to try to use this straight away you would be frustrated by the fact that you can't link up the network with the server in the new Design view. It's because we need to tell the network component that it should be linkable with the new server list view component. So, save this component and go back to the list of components and open the one "vCenter Network Interface"

Click on Relationships. You will only have one listed, I've already created some more. Once you create them here and go to the vCenter List View component, Relationships select you should see it listed there to but as incoming. So when you drag a link between the two components in the designer it will work.
Click Create and select the Target Component "vCenter Server List View" modified earlier. Enter a Display Name (unique) such as "vCenter Network Interface To vCenter Server - List View" Click Create.

And check it's listed as above. You can now create a new design to reference it.
 
Click on Designs, Topology, Designer and create a layout as follows (it should be easy by now?!):
 
Then Save and Publish the Design.
 
You can now create an offering and set the Marketplace views and pricing

I've renamed some of the options to make them easier to understand

The pricing can be more granular now. Ensure you click "Show All Properties" or you won't see all your options which will end up un-priced in the Marketplace and very cheap to order as a result!!

If you check the modification pricing you will see as there's no Profiles, there's no way to set pricing!

Even if you add in a Profile you don't get the list options again! You could create a load of profiles I guess to provide some post deployment options but it's not as snazzy!

FYI - the VM deploys but I get an error in OO on the network side of things. So while you can certainly play around with the steps above you need to test and watch out for unexpected results. Again Topology is a good approach but now is a good time to look at the Sequence Designer as it's there that the full range of options expands but there's a LOT more to learn and the need to spend some time in OO Studio becomes necessary.

I hope this post has shown some of the possibilities you can reach with Topology Designer to give you ideas about customization. A Lab setup is essential I feel as the number of extra objects etc becomes unwieldy and harder to clean up over time. It's easier to wipe a Lab and start from scratch than repairing a live customer's cloud if something goes wrong!!

Note: Test Deploying and UnDeploying a server via Marketplace to ensure everything works as expected and look for any errors in CSA/OO. My custom VM deployed fine but with OO errors and undeployed fine without errors but the VM was left behind in vCenter! I tried creating a second custom network property but got similar results. There may be some embedded code / options I'm running into that is causing issues so I wouldn't recommend the above in Production, Test/Lab ONLY at this point.

I'll post this under "curiosity but venture no farther"! There is a way to get this working I'm told but I've not had time to experiment further. If I find the solution I'll gladly share!




Saturday 6 June 2015

HP Cloud Service Automation - Part 4

HP Cloud Service Automation - Part 4


Offerings take a Design and make it available to consumers. Like Designs, they can have different versions and they perform a number of purposes. From the CSA Help File:

Standard - A Standard offering can be created from a sequenced or topology design. Pricing is configured on a service offering and supports initial, recurring, and option-specific pricing. You can also attach documents to a standard service offering (e.g., service level agreements, terms and conditions) and screenshots, which are images and captions that provide the user with a visual representation of the offering in the Marketplace Portal.

Note: There are Flex Options (changing cpu & memory after deployment) included in the default Topology design components that are easier to remove very early on. We can use Palette's to create a new design with the Flex options hidden. This is to ensure pricing controls are respected as the Flex option doesn't update subscription pricing, we use Profiles to achieve that here later. Read on but this might save you time later on if you want to avoid having to redo work later!

So, set your Tags up and we will publish a Design and see how it operates. Start by Clicking Create.

Select a Design to Publish

Give it a Name and Version. You can also speed things up by selecting an existing Offering. All configuration settings from the selected offering will be copied into the new offering.

Now Click Create. We'll start by fixing up the pricing. Click on the Pricing Tab and set your currency. Next set the Base Initial Price and Base Recurring Price. Finally set your Recurring Period. If different customers require different periods you will need to consider how your Chargeback Product integrates so it fires off appropriate charges at the right interval. There is no Quarterly option so you may need to select Monthly and let your Chargeback Solution handle summarizing the costs.


Now we can examine Profiles. What if the Consumer chooses a larger VM, shouldn't they pay more for it than a smaller one? How do you make sure they pay the appropriate figure. What if they start small and want to resize later, you don't want a back door where they pay the same or Consumers will quickly realise you're easy to cheat (Flex would allow them to do this)!

Think of the Base pricing as the cost of providing the Cloud Service for a VM. So the things that aren't to do with the VM hardware footprint such as:
  • Cost of Managing a VM by your Organization
  • Cost of Backing up that VM
  • Cost of providing Disaster Recovery / Business Continuity
  • Cost of Capacity Analysis and Chargeback services in running Cloud
  • Cost of Operating System, Application Licensing, Agents such as Antivirus etc
Now you can see there is a fixed cost to supply the VM as a service. This needs to cover your overheads and then you price the underlying infrastructure. You take a standard VM size such as:
1 x vCPU, 4GB Ram, 50GB Hard Disk
Your Cloud solution is sized for say 1,000 VMs of this size. You know how much the Infrastructure Cost to buy and maintain so you want a return on investment within say 5 years.
Sample:
Infrastructure with 5 year support = €1,000,000 (random easy to use figure! Don't quote me!!)
Sized for 1,000 VMs
Need to get money back within 5 year term. €1,000 per VM for 5 years so let's charge a base price of €500 to setup a VM and a recurring price of €125 per year to operate it. That will bring in €1,125 in a simple world over the 5 years giving a small profit. Now we'll assume there will be a degree of building up and tearing down so the €500 base price will give us some extra return even if the VM is short lived.
This is just an example. If you go to most Public Cloud Providers you'll see a fixed monthly price based on the size / performance expected. You don't have to use a Base Price here, you can focus just on the Profile which is based on different sizes of VMs and there's your answer. You just have to work out that you get a similar return on investment if the VM lives the full 5 years, €225 a year or €18.75 a month for example.

Option 1:
Base Price & Recurring Price (€500 & €125 a year)

Option 2:
Recurring Price Only (€225 a year)

Now, if the Consumer requests a VM that is larger than the standard size, you need to increase the price accordingly. How you do it is up to you. A simple doubling of the VM to 2 vCPU, 8GB Ram and 100GB Hard Disk should cost at least twice or €450 a year in the Option 2 model. You may decide you can be generous and charge increments if only vCPU is increased etc but you need to decide what those increments are in advance and what your top limit will be. What is the maximum vCPU you will offer, the same in memory etc.

Chargeback products can greatly help here as they have samples of Chargeback costs and can provide both a Capacity model as shown above or a Usage model - you pay for what you use, heavy loads trigger more cost, lighter VMs are cheaper etc for VMs which have busy periods this may work out more cost effective. It's up to you how to factor this is or choose one model over the other.

Back to Profiles!! When in the Topology Designer there is the option to create Profiles. The Core Design will provide a particular set of virtual Hardware. The Profile is used to offer variants which we can then tag with pricing options in Offerings. Name the Profiles carefully or take screenshots of their properties as you need to align the right pricing with the right virtual hardware! Also deselect the Modifiable option. We're setting the choices here, we don't want to give a free text field to the Consumer to go wild with!

If we create a new version of our Topology Design we can go to the Editor and check the current default virtual hardware as shown above. Save the Design but don't publish this version yet and go to the Profiles Tab.

Click Create and give it a name such as the ones above. It then brings you to the editor to change the setting(s) that you want to have for this Profile.

Unselect the Modifiable options to ensure the price you set can't be undermined by the Consumer! Click Save and go back and create a few more to reflect the range of virtual hardware to want to have. The Disk size is determined by the Template so you don't have to use it in the name here, it's just an example! Once your new Design Version is ready, publish it and go the Offerings section.

We create a new Offering here and select the version of the Design we just published. We can speed things up by also selecting an existing Offering to base the new one on but we'll leave it for now. Go to the Options Tab and you'll see the various offerings. You can rename them here if you wish, you can also hide particular Profiles from Customers and unhide them at a later date.

You can change the order using the up/down arrows to the right. (You should also use the padlock to ensure the values can't be changed by the Consumer). Do this for the Initial Order AND Modification Profiles!

Now go to the Pricing Tab and we'll set up some prices to see them in action.


As you see the Options are all listed and as they are cleared defined you can enter in the pricing as required. I've selected a base price of €500 and then started at €125 for a 1 vCPU, 4GB Memory , 50GB Disk and incremented the costs from there (although I should have set the frequency to yearly!). The Modification Profiles should show the same values. The totals are shown to the right (offscreen above). Now Publish the offering on the Publish Tab.

 
The Offering is now visible under the Simple Server Category for all users as it's in the Global Catalog currently. You could publish an Offering just to one Customer/Organization and give them different pricing if you wanted.

The next step is to log into the Marketplace as the Consumer and view it here.

Start Shopping

Select the Offering you just published. You can see it defaults to the 1st Profile and you can still edit the No Profile Selected values, oh dear! But the pricing is intact and reflects the options you select at the bottom of the screen. So now we need to see what we can do to make this tidier.


Go back to the Offering, unpublish it and we'll make some changes! In the Options Tab we'll select the padlock on both options to prevent them being edited and ensure the No Profile Selected is chosen as the default with the radio button on the left.


Next publish the design and see how that looks?


Ok, so we've 4 options, the right one is default but the design isn't consistent. We should go back to the Design and create a new Profile to cater for the default of 1 vCPU, 4GB Ram and 50GB Disk so we can hide the No Profile Selected option in the offering with the icon that shows an eye. Do this for the Modification Profile also. Then we could present the following to the Consumer:


I've hidden the No profile selected option here as shown above.

Now we're getting somewhere! You can keep adding them to the Cart and Checkout just like any good commercial website and see your costs before committing.

That's Offerings covered. We can check out approvals and other elements later. Getting drop down lists of options is trickier and may require switching to Sequence Designer but Topology allows you to get a smart, simple Catalog up and running fairly quickly and you can develop it later (some aspects can't be easily changed such as removing Flex Operations covered later - so practice first!).

What do the operational post deployment views look like? Let's see how they operate before we finish. I'll order one small VM to play with. I can change the quantity here:


Next checkout and give the subscription a name. If you have multiple items in the order you are asked to give each Subscription a name & Description to make it easier to find them afterwards.



Then Continue, pick a subscription period and Submit the Cart.

Wait for a few minutes and when the Subscriptions are active we can go back and see what changes we're allowed make.

The subscriptions are both listed and active. We can now select a Subscription and Modify it.

Choose a different Profile. If your Modification settings aren't laid out correctly you can't change this once your subscription is active so make sure you test, test, test before go live! You can always unpublish an offering, fix the issue, then republish or do a new version. Once you have live subscriptions however, creating a new version is a safer practice.

Now you can switch to a different Profile and Price and see what happens to your VM! It initiates a Guest OS shutdown, configures the VM with the new Hardware and Powers it on. Takes 25 seconds or so, that's all! Original VM Details:
 Modified VM Details:
 Updated Subscription Pricing:

Now there is one more view worth mentioning in the Marketplace which provides details on your VM such as the IP Address. Go to My Services:

Next click on the subscription you want information on. You can use the search feature to help.

You can see lots of information

There is also a button you can click to control power functions and Flex the VM

The Flex option doesn't integrate with pricing so you can hide these options. As for the power controls they operate as follows:
  • Restart Server - performs Guest OS Shutdown and Powers on the Virtual Machine
  • Start Server - Powers on the Virtual Machine
  • Stop Server - Initiates Guest OS Shutdown
  • Suspend Server - Initiates Guest OS Standby, Follow up with a Start Server to exit Suspend Mode
You can refresh the My Service Details View with the Refresh button until the operation status returns to green and you can perform another operation.

Now we'll try using the Flex Options. They work quite nicely but aren't linked to pricing.

To start with let's up the vCPU count from 1 to 2. The VM is powered down in vCenter, the vCPU is changed to 2 and the VM is powered on again - 14 seconds for the OO Flow. The cpuCount will still show 1 but if you do another refresh it will show 2 and also the same value 2 in requestedCpuCount. Now let's check the subscription pricing!


The pricing hasn't changed and the same would hold true for memory. To hide these operations we can go to Providers, Select VMware vCenter on the left, Components Tab on the Right, Select vCenter Server, click the Operations Tab. now you can see Flex CPU & Flex Memory. Edit these and untick the Visible option and you'll get a warning saying it can't save this because you're already using it in the Topology Design! You can now see some changes are much harder to make the further you proceed so knowledge and testing is the key. Make sure those top level components are exactly as you need them!

You can create a Palette where you do a "Save As" on the vCenter Server Component to "vCenter Server - No Flex". Edit it to remove the two Flex options and create a new Design referencing that Palette. Then you can create the offering you wish and set pricing etc. That will certainly get you pricing controlled changes.
 

So you can see it's simple but complex at the same time?!! We've covered a great deal here and deployed a few VMs and played around with them but there's always some other request or tweak you or the customer will want to make. Is Topology suited to it? Will you have to take apart a whole Design to make a small change? Going in with the right questions, setting up a test design and getting critique reduces the risk that you'll have a lot of late night work to do just when you were finishing!!

Hope you didn't fall asleep and some of this will be of use to you!

Note: on reflection you could offer a standard list of Profiles but have a slightly larger list for Modifications. So start small and only after deployment allow Consumers to upsize the VM to the maximum limits. Just in case you want to control access to big VMs or focus minds on right sizing! You can use the hide function in this way to show the first three standard sizes on deployment but 5 or more for modification purposes later!