on 09-Mar-2015 14:32
Problem this snippet solves:
People using VMWARE may need to replicate an instance in order to respond to an increase of traffic. The application we created will help the administrator to automatically handle that situation. The purpose of this document is to explain/present how to install the application. You can get the zip with the entire solution and source code here
This application will help the administrator to launch new vmware instance of an application when a CPU threshold is reached. Here is the method:
Here is the syntax of the application:
Clone_Templatev2.exe < virtual center uri> < virtual center login> < virtual center passwd> \ < virtual_machine name > < datacenter> < bigip uri> < bigip login> < bigip passwd> < pool name> < service port>
Where:
< virtual center uri>: this is the uri to connect to the sdk of the virtual center: ex: https://192.168.155.92/sdk/ < virtual machine name>: name of the virtual machine that will be replicated < datacenter name>: name of the datacenter where is located this virtual machine < bigip uri>: this is the uri to connect to the iControl API. Ex: 192.168.155.91 < pool name>: name of the pool where we want to add the new pool member < service port>: port number of the service we want to load balance for this new member.
Here is some information you need to be aware for this current version:
First thing will be to push our application on the VMware Virtual Center. We will consider that we pushed the application in c:\Vmware-iControl\ and the application name is Clone_template.exe
We need to configure our VMware instance with a new alarm (we will use Hackme instance in this example):
Then we set the custom action for this trigger. In our case it will be to execute the application. We type the following in the action:
Clonetemplatev2.exe https://192.168.155.92/sdk/ administrator MyPassword Hackme LabFR 192.168.155.215 admin admin pool_test 8080
You need to adapt the parameters to your environment!
Once the alarm is configured, the application is ready to be executed by the trigger. On the next screenshot you can see new vmware instances have been created:
Code :
# no snippet