A catalog in FABuloso is a collection of components with certain characteristics in common to deploy an OpenStack architecture. For example, a sample catalog could be folsom which would contain all the components needed to deploy OpenStack Folsom.
Currently we only manage catalogs as git repositories. In the future more options will be supported.
A component is the most fundamental configuration element in FABuloso. It’s just a python module defining some functions and a component.yml (yaml) defining some metadata and services. A service is a list of functions from that python module that will be executed in the given order.
Components are written in Python using Fabric and can be used to install software, edit its configuration files, create users, enable and start system services, and in short, do anything you could do through Fabric.
To see how a component looks like we’re going to use the nova component from https://github.com/StackOps/fabuloso-catalog/tree/master/nova.
name: nova file: nova.py description: Operations over OpenStack Nova service Services: - name: install description: Install OpenStack Nova from ubuntu packages methods: - install - set_config_file - name: nova_properties description: Set properties of the Nova service methods: - nova_properties - name: start description: Start Nova Service methods: - start - name: validate description: Validates nova to operate with it methods: - validate_database - validate_credentials - validate_rabbitmq
Required fields are:
A service requires the following fields:
def install(cluster=False): """Generate nova configuration. Execute on both servers""" package_ensure('nova-api') package_ensure('nova-cert') package_ensure('nova-common') # ... def set_config_file(management_ip, user='nova', password='stackops', auth_host='127.0.0.1', auth_port='35357', auth_protocol='http', mysql_username='nova', mysql_password='stackops', mysql_schema='nova', tenant='service', mysql_host='127.0.0.1', mysql_port='3306'): f = '/etc/nova/api-paste.ini' sudo('sed -i "/volume/d" %s' % f) sudo("sed -i 's/admin_password.*$/admin_password = %s/g' %s" % (password, f)) # ...
During the component initialization FABuloso will ask you for the values of properties. Properties are the arguments of the services methods.
A service is the smallest element in a FABuloso component. A component should have atleast one service. Services are defined in the component metadata and could accept properties. To learn more about how to write a component you would take a look at the component structure.
Environments contain the information used by FABuloso to securely connect over SSH to a target host.