Showing posts with label SmartCloud Entry. Show all posts
Showing posts with label SmartCloud Entry. Show all posts

Tuesday, 21 February 2012

SmartCloud Entry - Projects, Users and Accounts

Now we have everything the way we want, we can think about working with our projects, users and accounts.   From this we can manage our usage of the SmartCloud and the workloads we are going to be deploying, creating, managing and re-sizing.
First begin by creating the users that you want, all users are created equal until you put them in the relavant accounts and projects.

Users
Select Users -> Select New User ->  
  • Fill in the details as you require.   
 If you select 'admin privileges' then they have visibility of advanced features like networking and users creation.

Projects
Once you have your users you need to create a project for them to belong to -
Select Projects -> Select New Project -> 
  • Give a name and description. 
Once its created you can select the users to add to the project and there 'Role' in that project.
Accounts
Now we just need to create a account for this project and users so that we can control the billing further.
Select Accounts -> Select New Account -> 
  • Give a name and description
  • Select the Account owner.
  • Give a starting balance and low balance alert threshold.
  •  Then add further account member's, this is generated from the project members added earlier.  
Now this is set-up any new workloads to that project will get billed to the relvant selected accounts and the cost taken from their funding. If the users make changes, the project owner will be able to see, amaned and approve/deny these and the account get charges relating to those.  If notifications have been set and e-mail set-up then e-mails will be sent about events on the SmartCloud relevant to those users.
 

SmartCloud Entry - Further Configuration

Billing and Metering

Now that we have the our SmartCloud up, we need to get familiar with how it works and what we can do with it.  Now most of us will be interested in setting up request approval, billing, and user/project control. But before we do those things we need to enable them and check the values are what we require.  Now in the previous blog entry we mentioned how to turn these on -


To turn on billing, configure these in the properties files in the .skc dir in the user home dir

.skc/approval.properties -> com.ibm.cfs.request.lifecycle.enabled=true

.skc/billing.properties -> com.ibm.cfs.billing.enabled=true

To turn on metering, configure these in the properties files in the .skc dir in the user home dir

.skc/approval.properties -> com.ibm.cfs.request.lifecycle.enabled=true

.skc/metering.properties -> com.ibm.cfs.metering.enabled=true


Once this is enabled we can also look at changing and update the cpu, memory, disk value.

This is the directory tht is used by IBM SmartCloud Entry as a product catalog -
.skc/products

Three files that effecgt billing charges rates - 
.skc/products/ram.xml
.skc/products/cpu.xml
.skc/products/disk.xml
 (taken from the readme) -
The default collector will look at a specific virtual machine property (as defined by the Cloud) and use the value of the property as the units of product to buy, at the products price. For example, IBM VMControl 2.3.x exposes a VM property called "Processor.VirtualQuantity", this property can be used to know the amount of CPUs allocated to a VM, and hence used to charge the VM for a "CPU Cloud product."
For example take a look at the following product:

<cloudProduct id="com.ibm.cfs.services.billing.products.cpu">
<name>CPU</name>
<description>The amount of CPUs used in a virtual machine at a rate of $1 per hour.</description>
<pricing currency="USD" interval="60" price="0.0167"/>
<collector property="Processor.VirtualQuantity"/>
</cloudProduct>

The product above specifies that the default SKC collector will collect charges on virtual machines using the amount of CPUs assigned to them, exposed via the "Processor.VirtualQuantity" property, at a rate of 0.0167 cents every 60 seconds or roughly $1 per hour. The reason why it is important to collect at an interval less than the actual described rate (i.e., seconds instead of hours), is so that users looking at their bills get a higher resolution approximation of their actual charges, having an accurate look at the charges might be important for accounting purposes, or in situations where account credit is limited.

E-mail
SmartCloud Entry can send e-mail notification for several user and admin related events, such as the completion of a workload, account creation, and more.  In order to get these notifications it is necessary to configure a properties file in the home directory.
To setup notification for SmartCloud Entry follow the steps described below:
  1. Open the email.properties file in the SCE home directory.
  2. Set the com.ibm.cfs.email.relay.host property to the hostname of the relay host that IBM Starter Kit for Cloud should use for outgoing SMTP emails.
  3. Optionally, you can set the e-mail subject prefix for all SmartCloud Entry e-mails and the “from” name, by setting the following properties respectively:
    • com.ibm.cfs.email.subject.prefix
    • com.ibm.cfs.email.from.name
    • com.ibm.cfs.email.from.address
  4. Save the email.properties file and restart the SmartCloud Entry server.
You can globally disable e-mail notifications in SmartCloud Entry completely by setting the com.ibm.cfs.email.default.notifications property in the email.properties file to false.

Configuring Advanced Features
Virtual Appliances   
The administrator can pre-configure the appliances to simplify its deployment for the users. Configuration the properties can be made through the SmartCloud Entry web user interface or through the deployment.properties file in the SCE home directory.

In order to simplify the deployment process for the
users, it is recommended that an administrator configures all of the virtual appliances prior to making SmartCloud Entry available to its users. Virtual appliance customisation often requires knowledge of the low level details of the environment or having advanced knowledge of the data centre of which the user may not be familiar.  
Configuring a staging project
By default, SmartCloud Entry will scan the cloud for new appliances periodically.  When SCE finds a new appliance it places it in the Public project where anyone can deploy it.  SCE also allows configuring of a 'Staging' project where newly discovered appliances will show up rather than having them put directly into the Public project.  This allows the adminstrator to configure the the appliances and to then move them to a different project (Public or a specific project) to give the correct visibility to the users.  
So to configure this staging project add or uncomment this line in the deployment.properties file: 
com.ibm.cfs.staging.project=Staging   
Deployment Visibility
You can also choose whether you want your users to see the advanced deployment options or just the basic options.
The advanced options gives the user a finer-grained level of control over the level of resources consumed by the appliance. You may or may not want to show this advanced panel to the end-user, so to configure the visibility of the advanced deployment options, please follow these steps:
 
  • Open the deployment.properties file in the SCE home directory.
  • Set the deployment.advanced.form.enabled property to false. This will disable the advanced deployment option and it will not be shown to the end user. However, administrators will continue to see the advanced deployment option in the user interface. The default value of this property is true.
  • Save the deployment.properties file and restart the SmartCloud Entry server. 
These are by no means all the advanced features of SmartCloud Entry, if you want to know more then I would recommend that you take a look at the Administrators Guide
 
 

Monday, 13 February 2012

IBM SmartCloud Entry on POWER.


These are my build notes take from work that I have done, along with this I have tried to include any important information from the build guides and other information that I have found. From this you should be able to deploy a working POWER SmartCloud Entry.

First you will need to deploy the basic VMControl, IBM Systems Director on POWER frame work. The details of this are covered in my other blogs, So make sure you have that working before you go further else you could spend time debuging a issue that is nothing to do with SmartCloud Entry.

Installation -

Ensure you have Java 1.6 installed (from the command line issue java -version and verify it is 1.6.x)
JRE is min required, A full SmartCloud Entry will work as well;
For power (AIX) installs, a 32-bit JRE is requied; for x86 (windows or linux) 64-bit JRE is required and can be checked with -
# java -version

Obtain the installation package and copy it over to the server that you wish to run SmartCloud Entry on, in this example we are running it on our Systems Director/NIM sever.
# cd /tmp/sce
# ls
skc220_aix_installer.bin

Then issue a chmod for execute authority on the installer
Chmod +x skc220_aix_installer.bin

  • Install IBM SmartCloud Entry as follows:
    ./skc220_aix_installer.bin
  • Select your Locale and press Enter.
  • Then accept the license once you have paged through all the screens.
  • Keep the default option or for example enter option 3 for another location such as - /SCE
  • Type Y to verify the details if changed.
  • Press Enter to accept the default to Install File Sets.
  • Choose install folder. Press Enter and Y to verify.
  • Note: If accepting default - /opt/ibm/SCE
  • Enter a location for the Property File Install Folder if you changed it above.
  • Verify the Pre-Installation Summary, Press Enter.
  • Verify the Installer finished successfully. To enter configuration options through the wizard, press Enter. This is the default for the installer.
    Note: You will not be able to connect to the cloud until the hostname of the target cloud is defined.
  • Accept the default for the initial admin user of admin. Press Enter.
  • Enter the password twice for the admin user. Press Enter.
  • Accept the default value for cloud properties of IBM Systems Director, VMControl. Press Enter.
  • Enter Cloud hostname of your IBM Systems Director VMControl Server. Press Enter.
  • Enter the cloud username and password. Default is root. Press Enter to accept that default and then enter the password twice for verification. Press Enter.
  • Verify the installation completed successfully. Press Enter to exit the Installer.

Setting up SmartCloud Entry -

Now before we start SKC edit the /opt/ibm/SCE/skc.ini file to update the very first line -console, as follows and save it -
-console
7777 ← Add this line
-clean
-vmargs

Now when you want to get to the SCE console just run this from a command prompt on the skc server -
# tn localhost 7777

If you want to enable approvals and billing (and metering), which are off by default then do the following -

To turn on billing, configure these in the properties files in the .skc dir in the user home dir
.skc/approval.properties -> com.ibm.cfs.request.lifecycle.enabled=true
.skc/billing.properties -> com.ibm.cfs.billing.enabled=true

To turn on metering, configure these in the properties files in the .skc dir in the user home dir
.skc/approval.properties -> com.ibm.cfs.request.lifecycle.enabled=true
.skc/metering.properties -> com.ibm.cfs.metering.enabled=true

Starting SmartCloud Entry -

Now all this is complete we can look at starting the service.

Or you can used - http://localhost:8080/cloud/web/index.html?preventCache=true
Note: this is to keep the browser from caching objects for SmartCloud Entry - useful during development drivers.

Login as admin using the default password you set earlier.

Once you have logged in you will need to set the 'Cloud Status' on the right hand side, so select – Edit Cloud connection. Then enter the relvant details, be this hostname or IP address, user id and password of the system, in our case it was the root user. If the test comes back OK then you can update the settings with those entries.

Updates to SmartCloud Entry -

Now it is installed we can download the update package (zip file) from IBM Fix Central to the computer running the IBM Starter Kit for Cloud application. Create a directory on the local file system of the computer running the IBM SmartCloud Entry application. For example in - /tmp/sce and then extract the update package (zip) to the directory created. Once completed run the following from the IBM SmartCloud Entry OSGi console:
# addrepo file:PATH_TO_DIRECTORY
Where PATH_TO_DIRECTORY is the full file path to the directory the update zip was extracted to. From the example directory given above, type: addrepo file:/tmp/sce
# installupdates
Then CLI output from the installupdates command should indicate installation success.

After installing the updates to the application, IBM SmartCloud Entry should be restarted. To restart:
Type close into the OSGi console in which the application is running.
Once the application ends, the console window will close indicating the application has stopped.
Start IBM SmartCloud Entry, and the installed fixes should now be active.

Updates for IBM Systems Director -

Once the updates above have been completed we can add further updates to IBM Systems Director that are specific for SCE. So once again download the packages to a directory on the servers and extract them from the zip. When extracted run the following -

# smcli importupd -vr /tmp/sce/ISDskc9
.ATKUSC206I Generating SDDs for path: "/tmp/sce/ISDskc9".
..ATKUPD293I Update "com.ibm.director.core.database.feature_6.2.1.2-20111009-LAFix" was successfully imported to the library......
ATKUPD573I Running compliance for all new updates that were found.
..ATKUPD286I The import updates task has completed successfully.

This will import all the fixes in to the system to allow you to update them as follows –

# smcli installupd -v -n pclm2_sdnim -u com.ibm.director.core.database.feature_6.2.1.2-20111009-LAFix

Which you can do for each fix, then as below for the next set of fixes -

# smcli importupd -vr /tmp/sce/VMCUpdate2312
.ATKUSC206I Generating SDDs for path: "/tmp/sce/VMCUpdate2312".
.ATKUPD293I Update "com.ibm.director.mgr.virtualization.server.feature_6.2.1.2-e20110803-LAFix" was successfully imported to the library......
ATKUPD573I Running compliance for all new updates that were found.
.....ATKUPD286I The import updates task has completed successfully.

# smcli installupd -v -n pclm2_sdnim -u com.ibm.director.mgr.virtualization.server.feature_
6.2.1.2-e20110803-LAFix

Now this is all complete you will need to stop SmartCloud Entry and then restart Systems Director.

I will deal with the Cloud tasks and options in a later update.