CompatibleOne Cloud Broker Setup – CentOS
This article describes how CompatibleOne can be setup and executed within a locally-hosted CentOS x64 environment run under VMware Workstation.
Cloud Brokering
See the CompatibleOne site for details on how the authors solved cross-vendor cloud brokering in a completely opensource solution. We will use this for our testing.
Use Case: We want to take a hardened image running on an Amazon EC2 server and migrate it to Microsoft’s Azure Platform. This first article discusses the underlying setup for CompatibleOne. We verify using an OpenStack implementation running on the low-cost Digital Ocean cloud provider; we’ll get to EC2 and Azure in a future article.
OpenStack
The CompatibleOne documentation has a brief tutorial on OpenStack, so we have a separate article on OpenStack setup which you can review.
CompatibleOne Host Platform
CompatibleOne runs on various Linux distributions. You can get the CompatibleOne software from this link and the choices are CentOS, RedHat (RHEL), Fedor, Ubuntu, and Debian. We chose CentOS 6.5 x86_64.
Our preference is to install and run CompatibleOne locally so we can do offline testing. We first tried to get the package to build and install using Cygwin so we could run CompatibleOne on our local laptop but that failed. We ended up using VMware Workstation and downloading a minimal (“network”) 64-bit Centos 6.5 image so we could keep the footprint small.
- Create the VMware Workstation image with CentOS and installed using normal selections.
yum update
to get latest packages. The entire list is as follows:yum update yum install autoconf automake autotools yum install make gcc libtool yum install openssl uuid openssl-devel uuid-devel libuuid-devel yum install git wget
- Create user
c-one
(“Compatible-One”) and grantsudo
privileges. - CentOS 6 ships with Python 2.6.6 (with critical security patches). However, CompatibleOne wants Python2.7! Prepare yourself for this by following the steps at this blog article; for completeness here are the steps we used (as
root
):yum groupinstall "Development tools" yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel # Python 2.7.6: wget http://python.org/ftp/python/2.7.6/Python-2.7.6.tar.xz tar xf Python-2.7.6.tar.xz cd Python-2.7.6 ./configure --prefix=/usr/local --enable-unicode=ucs4 --enable-shared LDFLAGS="-Wl,-rpath /usr/local/lib" make && make altinstall
- Finally – for Python 2.7 above – do *not* forget to link it to a place where CompatibleOne will find it:
ln -fs /usr/local/bin/python2.7 /usr/bin
CompatibleOne Install
CompatibleOne comes with a reasonably complete documentation guide and we chose to build from source. Follow these steps:
Setup Folder. We used these commands logged-in as the c-one
user:
mkdir proj
cd proj
mkdir accords
cd accords/
git clone http://git.gitorious.ow2.org/ow2-compatibleone/accords-platform.git
autogen.sh
. There was a bug in testorga/Makefile.am
which causes autogen.sh
to fail. Open the file and replace orga_SOURCES
with testorga_SOURCES
. Then run the following:
[c-one@CompatibleOne accords-platform]$ ./autogen.sh
Clean autogen generated files
libtoolize: putting auxiliary files in `.'.
libtoolize: copying file `./ltmain.sh'
configure.ac:13: installing `./config.guess'
configure.ac:13: installing `./config.sub'
configure.ac:19: installing `./install-sh'
configure.ac:19: installing `./missing'
azprocci/Makefile.am: installing `./depcomp'
./configure
at this point. Run ./configure
:
[c-one@CompatibleOne accords-platform]$ ./configure
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
[...output cut...]
config.status: executing libtool commands
********************************************************************
CompatibleOne ACCORDS configuration is now complete
********************************************************************
- coxml : yes
[...output cut...]
- testsuite : no
- pyaccords : no
[c-one@CompatibleOne accords-platform]$ make
Making all in scripts
make[1]: Entering directory `/home/c-one/proj/accords/accords-platform/scripts'
rm -f accords accords.tmp
srcdir=''; \
test -f ./accords.in || srcdir=./; \
sed -e 's|@sitepath[@]|/usr/local/libexec/accords|g' -e 's|@bindir[@]|/usr/local/bin|g' -e 's|@pkgsysconfdir[@]|/usr/local/etc/accords|g' -e 's|@aliases[@]|co-start co-platform co-provision co-broker co-command co-parser co-provider co-resolver co-status co-stop run-azprocci run-broker run-cops run-coees run-coips run-comons run-conets run-coobas run-conagios run-coss run-ezvm run-fileserver run-onprocci run-osprocci run-paprocci run-parser run-procci run-cosched run-publisher run-osocciprocci run-dcprocci run-cnprocci run-eziprocci run-oaprocci run-slam run-cosacs run-copaas run-coeasy run-paasprocci run-ec2procci accords-config run-cool|g' ${srcdir}accords.in >accords.tmp
mv accords.tmp accords
rm -f co-check co-check.tmp
[...output cut...]
make[1]: Leaving directory `/home/c-one/proj/accords/accords-platform/testdc'
make[1]: Entering directory `/home/c-one/proj/accords/accords-platform'
make[1]: Nothing to be done for `all-am'.
make[1]: Leaving directory `/home/c-one/proj/accords/accords-platform'
sudo
which we *presume* is correct!
sudo make install
sudo ldconfig
CompatibleOne Configuration and First-Time Start
Once built and installed, configure CompatibleOne. This is not that bad; you basically create a configuration folder and provision all of the CompatibleOne configuration files within it. For our example, we had a dedicated user c-one
so we used /home/c-one/small-accords
as our starting point. Here are the set of steps:
cd /home/c-one
mkdir small-accords
cd small-accords
ACCORD_PLATFORM=/home/c-one/proj/accords/accords-platform
cp $ACCORD_PLATFORM/scripts/accords.ini .
cp $ACCORD_PLATFORM/scripts/cords_user.xml .
cp $ACCORD_PLATFORM/manifests/cords_price.xml .
cp $ACCORD_PLATFORM/scripts/style.css .
cp $ACCORD_PLATFORM/scripts/openssl.cnf .
cp $ACCORD_PLATFORM/coips.xml .
cp $ACCORD_PLATFORM/accounts.xml .
cp $ACCORD_PLATFORM/metrics.xml .
cp $ACCORD_PLATFORM/Certificates.crt .
The above prepares CompatibleOne for configuration, here goes!
[c-one@CompatibleOne small-accords]$ accords-config
Accords Security Not Required
Creating Accords Port Configuration : ports.xml
Creating Accords Nagios Configuration :
Creating Accords Global Configuration File: accords.xml
nagios is not required
Starting is easy; just run co-start
(which is auto-installed in /usr/local/bin
). For our first run we will see a lot of output, summarized below:
[c-one@CompatibleOne small-accords]$ co-start
Starting ACCORDS Platform
Starting accords publication services
Starting accords file services
Starting accords security services
Starting accords monitoring services
Starting accords accounting services
Starting accords scheduling services
Starting accords networking services
Starting accords placement services
Starting accords energy efficiency services
Starting accords image storage services
Starting accords image production services
Starting accords sla services
Starting accords paas services
Starting accords easiclouds services
Starting accords nagios services
Starting accords parser services
Starting accords broker services
Starting accords procci services
Please wait 20 seconds while starting the provisioning services agreements
....................
Rest Client Request : GET /-/ HTTP/1.1
Rest Client Request : GET /publication/ HTTP/1.1
Rest Client Request : GET /publication/eb7e3c6f-18ba-43b3-ae70-aa3ac6cc72ed HTTP/1.1
Rest Client Request : GET /-/ HTTP/1.1
Rest Client Request : GET /user/ HTTP/1.1
[...output cut...]
Rest Client Request : GET /account/b12d8390-3f58-4b51-b230-a65123fa9cf8 HTTP/1.1
Rest Client Request : PUT /agreement/faa02eb1-d623-4382-b42a-ffdcbeb29403 HTTP/1.1
Rest Client Request : DELETE /authorization/40f7b02f-b23b-4ee6-9dec-16ecca72deff HTTP/1.1
Starting accords software configuration services
ACCORDS Provisioning Started
nagios is not required
Next, use the co-check
script, which appears to be deprecated in the latest CompatibleOne release. At least, this script is not directly executable as installed by make install
. But it can be run as follows:
[c-one@CompatibleOne bin]$ sh co-check
-- Verification of Accords Platform Category Managers --
-- import : OK
-- manifest : OK
-- node : OK
-- infrastructure : OK
-- compute : OK
-- storage : OK
-- network : OK
-- port : OK
-- image : OK
-- system : OK
-- package : OK
-- configuration : OK
-- action : OK
-- release : OK
-- interface : OK
-- security : OK
-- account : OK
-- user : OK
-- plan : OK
-- service : OK
-- instance : OK
-- contract : OK
-- instruction : OK
-- firewall : OK
-- authorization : OK
-- provider : OK
-- profile : OK
-- monitor : OK
-- session : OK
-- consumer : OK
-- event : OK
-- alert : OK
-- placement : OK
-- quota : OK
-- algorithm : OK
-- schedule : OK
-- vm : OK
-- application : OK
-- price : OK
-- invoice : OK
-- agreement : OK
-- terms : OK
-- term : OK
-- variable : OK
-- guarantee : OK
-- business : OK
-- control : OK
-- penalty : OK
-- openstack : OK
-- opennebula : OK
-- windowsazure : OK
-- paas : OK
-- paas_application_deployable : OK
-- paas_application : OK
-- paas_application_manifest : OK
-- paas_application_version : OK
-- paas_application_version_instance : OK
-- paas_environment_configuration : OK
-- paas_environment : OK
-- paas_environment_link : OK
-- paas_environment_node : OK
-- paas_environment_relation : OK
-- paas_environment_template : OK
-- paas_environment_variable : OK
-- Verification Terminated --
All appears normal, or at least it's all "OK", right?
Finally, we can stop the system as we have fully built and configured it.
[c-one@CompatibleOne bin]$ co-stop
nagios is not required
Stopping service: cosacs
Stopping service: slam
Stopping service: paasprocci
Stopping service: oaprocci
Stopping service: onprocci
Stopping service: osocciprocci
Stopping service: cnprocci
Stopping service: eziprocci
Stopping service: dcprocci
Stopping service: osprocci
Stopping service: paprocci
Stopping service: azprocci
Stopping service: ec2procci
/usr/local/bin/co-stop: line 761: kill: (58545) - No such process
Stopping service: cosched
Stopping service: procci
Stopping service: broker
Stopping service: parser
Stopping service: copaas
Stopping service: coeasy
Stopping service: conagios
Stopping service: ezvm
Stopping service: coips
Stopping service: coees
Stopping service: cops
Stopping service: conets
Stopping service: coobas
Stopping service: comons
Stopping service: coss
Stopping service: fileserver
Stopping service: publisher
Other than the spurious-looking kill
error above, it all looks good. We have successfully deployed CompatibleOne. Great Job!
Now what?
For normal operations, because we built from source you actually have to login as c-one
and run co-start
from the $HOME/small-accords
folder. We may document how to create the /etc/init.d
entry in another post, but it would basically do exactly that...run as c-one
user and use the co-XXX
functions to support start, stop, status, and so on.
In the next post we'll look at getting our shiny new CompatibleOne deployment running on a public cloud service provider.
Until then, Happy Computing!
Leave a Reply