-
Notifications
You must be signed in to change notification settings - Fork 5
Installation
This document describes the two installation alternatives that an administrator may need to carry out to set up and maintain BO4CO:
We provide an automated installation of the BO4CO via a Chef cookbook.
In a dedicated Ubuntu 14.04 host, first install the Chef Development Kit, e.g.:
$ wget https://packages.chef.io/stable/ubuntu/12.04/chefdk_0.15.16-1_amd64.deb
$ sudo dpkg -i chefdk_0.15.16-1_amd64.deb
Then obtain this cookbook repository:
$ git clone https://github.com/dice-project/DICE-Chef-Repository.git
$ cd DICE-Chef-Repository
Before we run the installation, we just need to provide the configuration,
pointing to the external services that the Configuration Optimization relies
on. We provide this configuration in a json
file. Let us name it
configuration-optimization.json
:
{
"dice-h2020": {
"conf-optim": {
"ds-container": "4a7459f7-914e-4e83-ab40-b04fd1975542"
},
"deployment-service": {
"url": "http://10.10.50.3:8000",
"username": "admin",
"password": "LetJustMeIn"
},
"d-mon": {
"url": "http://10.10.50.20:5001"
}
}
}
Here, the parameters represent:
-
ds-container
is the UUID of the DICE deployment service container dedicated to the application to run and optimize, -
deployment-service
contain the access point and credentials of the DICE Deployment Service to be used by the CO, -
d-mon
contains parameters used by the CO to connect to the DICE monitoring framework.
Now we can start the Chef process:
$ sudo chef-client -z \
-o recipe[apt::default],recipe[java::default],recipe[dice-h2020::deployment-service-tool],recipe[dice-h2020::conf-optim],recipe[storm::default] \
-j configuration-optimization.json
When the execution succeeds, the Configuration Optimization will be installed
in /opt/co/
by default. The command will also install the Storm client
(thanks to the recipe[storm-cluster::common]
provided at the end of the
runlist above).
Notes about tool configuration: the Chef recipe creates three configuration
files in the /opt/co/conf
folder. The config.yaml
contains the parameters
transferred from the configuration-optimization.json
listed above. The
app-config.yaml
is an example experiment declaration file like it should
be supplied with the application. The expconfig.yaml
is an assembled
configuration file as defined later in the document and
will be the one used by the BO4CO. The recipe employs
configuration merge tool to create the expconfig.yaml
.
The configuration tool works in deployed
and MATLAB
mode. The deployed
mode does not need any MATLAB installation and only is dependent on a royalty free MATLAB Runtime (MCR).
Regardless of the method, first download the tool using git, a package download, or a pre-compiled binary downloads.
Git:
$ mkdir -p ~/myrepos ; cd ~/myrepos
$ git clone https://github.com/dice-project/DICE-Configuration-BO4CO.git
$ cd DICE-Configuration-BO4CO
Package:
$ mkdir -p ~/myrepos ; cd ~/myrepos
$ wget https://github.com/dice-project/DICE-Configuration-BO4CO/archive/master.zip
$ unzip DICE-Configuration-BO4CO-master.zip
# This step is only to unify the result with the one from the git download
$ mv DICE-Configuration-BO4CO-master DICE-Configuration-BO4CO
$ cd DICE-Configuration-BO4CO
Binary releases:
$ wget https://github.com/dice-project/DICE-Configuration-BO4CO/releases/download/v0.1.1/bin.zip
$ unzip bin.zip
First, install MCR on the platform you intends to run the tool, e.g., here is the instructions for ubuntu
:
$ cd install/
$ ./install_mcr.sh
We already prepared the compiled versions for ubuntu64
and maci64
deployment target, for this you need to download the bin.zip
from the latest tool release. So only the compiled files needs to get copied into the target
folder, where BO4CO will be deployed:
$ cd DICE-Configuration-BO4CO/
$ wget https://github.com/dice-project/DICE-Configuration-BO4CO/releases/download/v0.1.1/bin.zip
$ unzip bin.zip
$ cp bin/ubuntu64/* target
$ cp deploy/run_bo4co.sh target
$ cp -r src/conf target
It is also possible to prepare a new compiled version for a new target architecture such as windows64
. You only need to run the following command in MATLAB on the target environment (i.e., target architecture and MCR version) in order to compile the source files:
cd DICE-Configuration-BO4CO/src
run compile.m
Note that it is essential to run compile.m
in the target environment otherwise the execution of the compiled version will fail. We are happy to provide compiled version for a target environment, you only need to drop us an email, see contact bellow.