Skip to content
StefanRoss edited this page Sep 25, 2013 · 3 revisions

CO has a number of startup scripts which are all copies of scripts/accords.in with different names. Within the scripts, functionality is selected based on the filename.

The standard co-start script performs the following actions:

  1. Start accords platform (e.g. OCCI servers)
  2. Start Provisioning services
  3. Start Proccis
  4. (Optional) start Nagios

Steps 2 onwards depend on the backends having certain categories (e.g. user) initialised from xml files in the scripts and manifest directories.

Populating initial database

Many use-cases will want to start CO with some pre-population of the backends. A backend-independent way to do this is to use the OCCI interface once the platform has been initialised, and before any other accesses have been done. Examples can be found on the OnApp branch in the following files:

  • scripts/accords.in - in _co_start(), there is a call to a seed_backend script
  • scripts/seed_backend - uses xml_to_rest.py to populate two categories
  • tools/backend/xml_to_rest.py- simple Python script for populating categories based on xml files in the same format as the xml backend. This script relies on the Python requests module, which can be easy-installed.

These scripts are very rough-and-ready, but could help as examples in the creation of production-robust scripts.

Backend changes

The default method of creating a working directory involves copying the initialisation xml files to the working directory. In order to support alternate backends which do not work with xml files, the following changes have been made on the OnApp branch:

  1. Split the script co-platform which covers steps 1 and 2 above. co-platform now covers only 1. co-prov-services starts 2.
  2. Introduce new scripts to parse the xml files and insert them into the backend via the OCCI Rest interface. This operation is performed between steps 1. and 2. above.