Originally posted by: Moe Shalash
The host factory framework for cloud bursting in IBM Spectrum Symphony can provision hosts from cloud providers AWS, IBM Cloud, and Microsoft Azure. If you'd like to connect to any other cloud provider, you need to build your own provider plug-in. IBM Spectrum Symphony 7.2.1 provides a "custom" cloud provider plug-in, which is a generic implementation of a cloud provider interface for host provisioning. Use this sample as a starting point to build your own cloud provider plug-in for host factory and connect to your choice of cloud provider.
Here's how to get started with this custom cloud provider plug-in:
- Use the sample code to create a new plug-in (for example, mycloud). Look for the sample at:
- $EGO_TOP/3.7/samples/hostfactory/providers/custom/ on Linux.
- Installation_top\3.7\hostfactory\samples\providers\custom\ on Windows.
Follow the instructions in the README.txt file under the sample code directory. You can also use the comments in the code for reference. For details on the interface specification, refer to the online IBM Knowledge Center.
- Hook up the new provider plug-in to host factory in the hostProviders.json file, for example:
hostProviders.json file:
{
"name": “mycloud",
"enabled": 1,
"confPath": "${HF_CONFDIR}/providers/mycloud/conf/",
"scriptPath": "${HF_TOP}/providers/mycloud/scripts/"
-
Enable provisioning through the new provider plug-in in the hostRequestors.json file, for example:
hostRequestors.json file:
{
"name": "symA",
"confPath": "${HF_CONFDIR}/requestors/symA/conf/",
"scriptPath": "${HF_TOP}/requestors/symA/scripts/",
"providers": [ “mycloud" ],
"requestMode": "POLL"
Take note that the sample is based on Java code and requires Java and Ant to be installed in your environment and defined in your environment variables, as follows:
On Linux:
export ANT_HOME=/pcc/app/apache-ant-1.7.0
export JAVA_HOME=/home/java/jdk
export PATH=${HOME}/bin:${JAVA_HOME}/bin:${ANT_HOME}/bin:$PATH
On Windows:
set ANT_HOME=”c:\Program Files\ant\apache-ant-1.7.0”
set JAVA_HOME=”c:\Program Files\java\jdk”
set Path=%JAVA_HOME%\bin:%ANT_HOME%\bin:%Path%
It is your responsibility to find the libraries that support your cloud provider, use the functions provided by the provider, and translate the results properly into the plug-in objects.
Connect with us!
We’d love to hear from you. If you’ve got comments or questions, add a comment below. You can also start a topic in our forum.
#SpectrumComputingGroup