Commit 829857f3 authored by Balazs's avatar Balazs

layout updated

parent 8b868b40
# Run Service Manager and instantiate Service Orchestrator Instances # Run Service Manager and instantiate Service Orchestrator Instances
# clone the necessary Git repositories clone the necessary Git repositories
git clone https://git.mobile-cloud-networking.eu/cloudcontroller/mcn_cc_sdk.git
git clone https://github.com/icclab/hurtle_sm.git
git clone https://gitlab.switch.ch/Verbaryerba/disco.git
# Docker needs to be installed if you would like to build the Docker image. git clone https://git.mobile-cloud-networking.eu/cloudcontroller/mcn_cc_sdk.git
# https://docs.docker.com/engine/installation/ git clone https://github.com/icclab/hurtle_sm.git
# The Docker image has to be built for the Cloud Controller. git clone https://gitlab.switch.ch/Verbaryerba/disco.git
# The bundle for the Docker image is within the disco Git repository.
# As the currently published image on Docker Hub (amnion/haas) is accepting all the system specific settings as attributes, this step might not be necessary.
# But for completeness' sake: The Dockerfile file for the instructions lies within the bundle directory. After configuring the bundle/wsgi/so.py file as well as the needed files within the bundle/data subdirectory (especially the service_manifest.json), the Docker image can be built and pushed to the Docker Hub.
# In the /bundle/data/service_manifest.json file, the optional attributes to the service orchestrator have to be declared. All the other files are specific to the individual service orchestrator's operation; in this case, those are Heat Orchestration Template (HOT) templates, bash scripts for setting up the cluster and the Hadoop configuration files. Docker needs to be installed if you would like to build the Docker image.
https://docs.docker.com/engine/installation/
The Docker image has to be built for the Cloud Controller. The bundle for the Docker image is within the disco Git repository. As the currently published image on Docker Hub (amnion/haas) is accepting all the system specific settings as attributes, this step might not be necessary. But for completeness' sake: The Dockerfile file for the instructions lies within the bundle directory. After configuring the bundle/wsgi/so.py file as well as the needed files within the bundle/data subdirectory (especially the service_manifest.json), the Docker image can be built and pushed to the Docker Hub.
# The service manager has to be configured as well, though this is only one config file. In this case, this file is located at etc/sm.cfg. The main entries that have to be changed are the following: in the section [service_manager], the entry manifest has to point to the service_manifest.json file of the service orchestrator. bundle_location is this case (OpenShift v3) the path to the Docker image on the Docker Hub. design_uri is the keystone endpoint where the HOT should be deployed. In the /bundle/data/service_manifest.json file, the optional attributes to the service orchestrator have to be declared. All the other files are specific to the individual service orchestrator's operation; in this case, those are Heat Orchestration Template (HOT) templates, bash scripts for setting up the cluster and the Hadoop configuration files.
# If the service shouldn't be registered in keystone, the entry register_service in subsection [service_manager_admin] can be set to False and the further settings are not important.
# Under the section [cloud_controller], the access configuration to the cloud controller API has to be set. Currently, this has to be an OpenShift installation; in this case, it's an OpenShift v3 instance.
# create virtual environment if you want to have a contained environment The service manager has to be configured as well, though this is only one config file. In this case, this file is located at etc/sm.cfg. The main entries that have to be changed are the following: in the section [service_manager], the entry manifest has to point to the service_manifest.json file of the service orchestrator. bundle_location is this case (OpenShift v3) the path to the Docker image on the Docker Hub. design_uri is the keystone endpoint where the HOT should be deployed.
virtualenv /tmp/mcn
source /tmp/mcn/bin/activate
# maybe some dependencies won't be met - I had to install python-monascaclient with pip for instance If the service shouldn't be registered in keystone, the entry register_service in subsection [service_manager_admin] can be set to False and the further settings are not important.
cd mcn_cc_sdk && python setup.py install && cd ..
cd hurtle_sm && python setup.py install && cd ..
# For starting the service manager, only the config file has to be given. Under the section [cloud_controller], the access configuration to the cloud controller API has to be set. Currently, this has to be an OpenShift installation; in this case, it's an OpenShift v3 instance.
service_manager -c /path/to/disco/etc/sm.cfg
# As the SM is blocking the terminal, in a new terminal, the commands to the SM can be executed. create virtual environment if you want to have a contained environment
export URL="http://127.0.0.1:8888" # URL & port of executed SM
export OTERM="haas" # name of the service
export KID=xxx # keystone token
export TENANT=xxx # OpenStack tenant name
# check for the service type virtualenv /tmp/mcn
curl -v -X GET -H 'Content-type: text/occi' -H 'X-Auth-Token: '$KID -H 'X-Tenant-Name: '$TENANT $URL/-/ source /tmp/mcn/bin/activate
# create a service orchestrator instance - will return instance URL in the Location header; in this example, also the attribute icclab.haas.slave.number will be set to 2 maybe some dependencies won't be met - I had to install python-monascaclient with pip for instance
curl -v -X POST $URL/$OTERM/ -H 'Category: '$OTERM'; scheme="http://schemas.cloudcomplab.ch/occi/sm#"; class="kind";' -H 'Content-type: text/occi' -H 'X-Auth-Token: '$KID -H 'X-Tenant-Name: '$TENANT -H 'X-OCCI-Attribute: icclab.haas.slave.number="2"'
# $ID is the last part of the url above returned cd mcn_cc_sdk && python setup.py install && cd ..
curl -v -X GET -H 'Content-type: text/occi' -H 'X-Auth-Token: '$KID -H 'X-Tenant-Name: '$TENANT $URL/$OTERM/$ID cd hurtle_sm && python setup.py install && cd ..
# delete service orchestrator instance For starting the service manager, only the config file has to be given.
curl -v -X DELETE -H 'Content-type: text/occi' -H 'X-Auth-Token: '$KID -H 'X-Tenant-Name: '$TENANT $URL/$OTERM/$ID
\ No newline at end of file service_manager -c /path/to/disco/etc/sm.cfg
As the SM is blocking the terminal, in a new terminal, the commands to the SM can be executed.
export URL="http://127.0.0.1:8888" # URL & port of executed SM
export OTERM="haas" # name of the service
export KID=xxx # keystone token
export TENANT=xxx # OpenStack tenant name
check for the service type
curl -v -X GET -H 'Content-type: text/occi' -H 'X-Auth-Token: '$KID -H 'X-Tenant-Name: '$TENANT $URL/-/
create a service orchestrator instance - will return instance URL in the Location header; in this example, also the attribute icclab.haas.slave.number will be set to 2
curl -v -X POST $URL/$OTERM/ -H 'Category: '$OTERM'; scheme="http://schemas.cloudcomplab.ch/occi/sm#"; class="kind";' -H 'Content-type: text/occi' -H 'X-Auth-Token: '$KID -H 'X-Tenant-Name: '$TENANT -H 'X-OCCI-Attribute: icclab.haas.slave.number="2"'
$ID is the last part of the url above returned
curl -v -X GET -H 'Content-type: text/occi' -H 'X-Auth-Token: '$KID -H 'X-Tenant-Name: '$TENANT $URL/$OTERM/$ID
delete service orchestrator instance
curl -v -X DELETE -H 'Content-type: text/occi' -H 'X-Auth-Token: '$KID -H 'X-Tenant-Name: '$TENANT $URL/$OTERM/$ID
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment