Deployment and Administration guide

⚠ This is the documentation for an old version of Synergy on INDIGO 1 ⚠

The Synergy package versions corresponding to this documentation are:

  • synergy-service v1.4.0

  • synergy-scheduler-manager v2.3.0

Manual installation and configuration

Repository

Install the INDIGO repository.

Install the Synergy packages

On CentOS7:

yum install python-synergy-service python-synergy-scheduler-manager

On Ubuntu:

apt-get install python-synergy-service python-synergy-scheduler-manager

They can be installed in the OpenStack controller node or on another node.

Updating the Synergy packages

The Synergy project makes periodic releases. As a system administrator you can get the latest features and bug fixes by updating Synergy.

This is done using the standard update commands for your OS, as long you have the INDIGO repository set up.

On Ubuntu:

On CentOS:

Once the update is complete remember to restart the service. Follow the instructions in "Configure and start Synergy" section of this guide to see how to do it.

Setup the Synergy database

Then use the database access client to connect to the database server as the root user:

Create the synergy database:

Grant proper access to the glance database:

Replace SYNERGY_DBPASS with a suitable password.

Exit the database access client.

Add Synergy as an OpenStack endpoint and service

Source the admin credentials to gain access to admin-only CLI commands:

Register the Synergy service and endpoint in the Openstack service catalog:

Adjust nova notifications

Make sure that nova notifications are enabled on the compute node. Edit the /etc/nova/nova.conf file. In the [DEFAULT] and [oslo_messaging_notifications] sections add the following attributes:

The topics parameter is used by Nova for informing listeners about the state changes of the VMs. In case some other service (e.g. Ceilometer) is listening on the default topic notifications, to avoid the competition on consuming the notifications, please define a new topic specific for Synergy (e.g. topics = notifications,synergy_notifications).

Configure Controller to use Synergy

In /etc/nova/ create a nova-conductor.conf file. Edit /etc/nova/nova-conductor.conf file and add the following to it:

Perform these steps on the controller node.

Restart nova

Then restart the nova services on the Controller and Compute nodes.

Verify operation

Run this command on the controller node to check whether your configuration is correct:

The output of the command should show something similar.

Configure and start Synergy

Configure the Synergy service, as explained in the following section.

Then start and enable the Synergy service. On CentOS:

On Ubuntu:

If Synergy complains about incompatibility with the version of installed oslo packages, e.g.:

please patch the the file /usr/lib/python2.7/site-packages/synergy_service-1.0.0-py2.7.egg-info/requires.txt by removing the versions after the dependencies.

The Synergy configuration file

Synergy must be configured properly filling the /etc/synergy/synergy.conf configuration file. To apply the changes of any configuration parameter, the Synergy service must be restarted.

This is an example of the synergy.conf configuration file:

The following describes the meaning of the attributes of the Synergy configuration file, for each possible section:

Section [Logger]

Attribute

Description

filename

The name of the log file

level

The logging level. Valid values are: CRITICAL, ERROR, WARNING, INFO, DEBUG, NOTSET

formatter

The format of the logged messages

maxBytes

The maximum size of a log file. When this size is reached, the log file is rotated

backupCount

The number of log files to be kept

Section [WSGI]

Attribute

Description

host

The hostname where the Synergy service is deployed

port

The port used by the Synergy service

threads

The number of threads used by the Synergy service

use ssl

Specify if the service is secured through SSL

ssl_ca_file

The CA certificate file to use to verify connecting clients

ssl_cert_file

The Identifying certificate PEM file to present to clients

ssl_key_file

The Private key PEM file used to sign cert_file certificate

max_header_line

The maximum size of message headers to be accepted (default: 16384)

retry_until_window

The number of seconds to keep retrying for listening (default: 30sec)

tcp_keepidle

The value of TCP_KEEPIDLE in seconds for each server socket

backlog

The number of backlog requests to configure the socket with (default: 4096). The listen backlog is a socket setting specifying that the kernel how to limit the number of outstanding (i.e. not yet accepted) connections in the listen queue of a listening socket. If the number of pending connections exceeds the specified size, new ones are automatically rejected

Section [SchedulerManager]

Attribute

Description

autostart

Specifies if the SchedulerManager manager should be started when Synergy starts

rate

the time (in minutes) between two executions of the task implementing this manager

projects

Defines the list of OpenStack projects entitled to access the dynamic resources

shares

Defines, for each project entitled to access the dynamic resources, the relevant share for the usage of such resources. If for a project the value is not specified, the value set for the attribute default_share in the FairShareManager section is used

default_TTL

Specifies the default maximum Time to Live for a Virtual Machine/container, in minutes (default: 2880)

TTLs

For each project, specifies the maximum Time to Live for a Virtual Machine/container, in minutes. VMs and containers running for more that this value will be killed by Synergy. If for a certain project the value is not specified, the value specified by the default_TTL attribute will be used

backfill_depth

The integer value expresses the max depth used by the backfilling strategy: this allows Synergy to not check the whole queue when looking for VMs to start (default: 100)

notification_topic

The notification topic used by Nova for informing listeners about the state changes of the VMs. In case some other service (e.g. Ceilometer) is listening on the default Nova topic (i.e. "notifications"), please define a new topic specific for Synergy (e.g. notification_topics = notifications,synergy_notifications)

Section [FairShareManager]

Attribute

Description

autostart

Specifies if the FairShare manager should be started when Synergy starts

rate

The time (in minutes) between two executions of the task implementing this manager

period_length

The time window considered for resource usage by the fair-share algorithm used by Synergy is split in periods having all the same length, and the most recent periods are given a higher weight. This attribute specifies the length, in days, of a single period (default: 7)

periods

The time window considered for resource usage by the fairshare algoritm used by Synergy is split in periods having all the same length, and the most recent periods are given a higher weight. This attribue specifies the number of periods to be considered (default: 3)

default_share

Specifies the default to be used for a project, if not specified in the shares attribute of the SchedulerManager section (default: 10)

decay_weight

Value between 0 and 1, used by the fairshare scheduler, to define how oldest periods should be given a less weight wrt resource usage (default: 0.5)

vcpus_weight

The weight to be used for the attribute concerning vcpus usage in the fairshare algorithm used by Synergy (default: 100)

age_weight

This attribute defines how oldest requests (and therefore with low priority) should have their priority increased so thay cam be eventaully served (default: 10)

memory_weight

The weight to be used for the attribute concerning memory usage in the fairshare algorithm used by Synergy (default: 70)

Section [KeystoneManager]

Attribute

Description

autostart

Specifies if the Keystone manager should be started when Synergy starts

rate

The time (in minutes) between two executions of the task implementing this manage

auth_url

The URL of the OpenStack identity service. Please note that the v3 API endpoint must be used

username

The name of the user with admin role

password

The password of the specified user with admin role

project_id

The project id to request authorization on

project_name

The project name to request authorization on

user_domain_name

The user domain name (default: "default")

project_domain_name

The project domain name (default: "default")

timeout

The http connection timeout (default: 60)

clock_skew

Forces the request for token, a delta time before the token expiration (default: 60 sec)

Section [NovaManager]

Attribute

Description

autostart

Specifies if the nova manager should be started when Synergy starts

rate

The time (in minutes) between two executions of the task implementing this manager

host

The hostname where the nova-conductor service runs (default: localhost)

timeout

The http connection timeout (default: 60)

amqp_backend

The AMQP backend tpye (rabbit or qpid)

amqp_hosts

The AMQP HA cluster host:port pairs

amqp_host

The server where the AMQP service runs (default: localhost)

amqp_port

The port used by the AMQP service

amqp_user

The AMQP userid

amqp_password

The password of the AMQP user

amqp_virtual_host

The AMQP virtual host

conductor_topic

The topic on which conductor nodes listen on (default: conductor)

compute_topic

The topic on which compute nodes listen on (default: compute)

scheduler_topic

The topic on which scheduler nodes listen on (default: scheduler)

cpu_allocation_ratio

The Nova CPU allocation ratio (default: 16)

ram_allocation_ratio

The Nova RAM allocation ratio (default: 1.5)

metadata_proxy_shared_secret

The Nova metadata_proxy_shared_secret

db_connection

The SQLAlchemy connection string to use to connect to the Nova database

Section [QueueManager]

Attribute

Description

autostart

Specifies if the Queue manager should be started when Synergy starts

rate

The time (in minutes) between two executions of the task implementing this manager

db_connection

The SQLAlchemy connection string to use to connect to the Synergy database

db_pool_size

The number of SQL connections to be kept open (default: 10)

db_pool_recycle

The number of seconds after which a connection is automatically recycled (default: 30)

db_max_overflow

The max overflow with SQLAlchemy (default: 5)

Section [QuotaManager]

Attribute

Description

autostart

Specifies if the Quota manager should be started when Synergy starts

rate

The time (in minutes) between two executions of the task implementing this manager

Installation and configuration using puppet

We provide a Puppet module for Synergy so users can install and configure Synergy with Puppet. The module provides both the synergy-service and synergy-scheduler-manager components.

The module is available on the Puppet Forge : vll/synergy.

Install the puppet module with:

Usage example:

The Synergy command line interface

The Synergy service provides a command-line client, called synergy, which allows the Cloud administrator to control and monitor the Synergy service.

Before running the Synergy client command, you must create and source the admin-openrc.sh file to set the relevant environment variables. This is the same script used to run the OpenStack command line tools.

Note that the OS_AUTH_URL variables must refer to the v3 version of the keystone API, e.g.:

export OS_AUTH_URL=https://cloud-areapd.pd.infn.it:35357/v3

synergy usage

The synergy optional arguments:

-h, --help

--version

--debug

--os-username <auth-user-name>

--os-password <auth-password>

--os-project-name <auth-project-name>

--os-project-id <auth-project-id>

--os-project-domain-id <auth-project-domain-id>

--os-project-domain-name <auth-project-domain-name>

--os-user-domain-id <auth-user-domain-id>

--os-user-domain-name <auth-user-domain-name>

--os-auth-token <auth-token>

--os-auth-token-cache

--os-auth-url <auth-url>

--os-auth-system <auth-system>

--bypass-url <bypass-url>

--os-cacert <ca-bundle-file>

synergy manager

This command allows to get information about the managers deployed in the Synergy service and control their execution:

The command synergy manager list provides the list of all managers deployed in the Synergy service:

To get the status about managers, use:

To control the execution of a specific manager, use the start and stop sub-commands:

synergy quota

The overall cloud resources can be grouped in:

  • private quota: composed of resources statically allocated and managed using the 'standard' OpenStack policies

  • shared quota: composed of resources non statically allocated and fairly distributed among users by Synergy

The size of the shared quota is calculated as the difference between the total amount of cloud resources (considering also the over-commitment ratios) and the total resources allocated to the private quotas. Therefore for all projects it is necessary to specify the proper quota for instances, VCPUs and RAM so that their total is less than the total amount of cloud resources.

Since Synergy is installed, the private quota of projects cannot be managed anymore by using the Horizon dashboard, but only via command line tools using the following OpenStack command:

The private quota will be updated from Synergy after a few minutes without restart it. This example shows how the private quota of the project _prj_a (id=_a5ccbaf2a9da407484de2af881198eb9) has been modified:

To get information about the private and shared quotas you must use the synergy quota command :

To get the status about the shared quota, use the option --shared:

in this example the total amount of VCPUs allocated to the shared quota is 27 whereof have been used just 2 CPUs (similarly to the memory and instances number). The value -1 means that the Cloud administrator has not fixed the limit of the number of instances (i.e. VMs), so in this example the VMs can be unlimited.

The --all_projects option provides information about the private and shared quotas of all projects:

In this example the project prj_b is currently consuming just resources of its private quota (1 VCPU and 512MB of memory) while the shared quota is not used. By contrary, the prj_a is consuming just the shared quota (2 VCPUs and 1024MB of memory). The share values fixed by the Cloud administrator are 70% for prj_a and 30% prj_b (the attribute shares in synergy.conf) while for both projects the TTL has been set to 5 minutes (the TTL attribute). Remark, in this example, the VMs instantiated in the shared quota can live just 5 minutes while the ones created in the private quota can live forever.

synergy queue

This command provides information about the amount of user requests stored in the persistent priority queue:

synergy usage

To get information about the usage of shared resources at project or user level, use:

The project sub-command provides the resource usage information by the projects.

The following example shows the projects prj_a (share: 70%) and prj_b (share: 30%) have consumed in the last three days, respectively 70.40% and 29.40% of shared resources:

The time window is defined by Cloud administrator by setting the attributes period and period_length in synergy.conf.

It may happen that the prj_a (or prj_b) doesn't have the need to consume shared resources for a while: in this scenario the others projects (i.e. prj_b) can take advantage and so consume more resources than the fixed share (i.e. 30%):

However, as soon as the prj_a requires more shared resources, it will gain a higher priority than the prj_b, in order to balance their usage.

The user sub-command provides the resource usage information by the project users.

The following example shows the usage report of users belonging to the project prj_a. They have the same value for share (35%) but different priority (user_a1=80, user_a2=100) because the user_a1 has consumed too much with respect to user_a2 (51.90% VS 48.10%).

Open Ports

To interact with Synergy using the client tool, just one port needs to be open. This is the port defined in the Synergy configuration file (attribute port in the [WSGI] section). The default value is 8051.

Last updated