Chapter 12. Pegasus Service

12.1. Service Administration

12.1.1. Service Configuration

Create a file called service.py in $HOME/.pegasus/ OR modify the lib/pegasus/python/Pegasus/service/defaults.py file. The servuce can be configured using the properties described below.

Table 12.1. Pegasus Service Configuration Options

Property Default Value Description
SERVER_HOST 127.0.0.1 SERVER_HOST specifies the hostname/network interface on which the service listens for requests.
SERVER_PORT 5000 SERVER_PORT specifies the port number on which the service listens for requests.
CERTIFICATE None SSL certificate file used to encrypt sessions. If no certificate, key files are provided the service will generate and use self-signed certificates.
PRIVATE_KEY None SSL key file used to encrypt connections. If no certificate, key files are provided the service will generate and use self-signed certificates.
AUTHENTICATION PAMAuthentication By default the service uses PAM authentication i.e. When prompted for a username and password users can use the credentials that they use to login to the machine. Users can specify NoAuthentication to disable username/password prompt.
ADMIN_USERS None ADMIN_USERS can be used to specify which users have the ability to access other users workflow info. If ADMIN_USERS is None, False, or '' then users can only access their own workflow information. If ADMIN_USERS is '*' then all users are admin users and can access everyones workflow information. If ADMIN_USERS = {'u1', .., 'un'} OR ['u1', .., 'un'] then only users u1, .., un can access other users workflow information.
PROCESS_SWITCHING True File created by running Pegasus workflows have permissions as per user configuration. So one user migt not be able to view workflow information of other users. Setting PROCESS_SWITCHING to True makes the service change the process UID to the UID of the user whose information is being requested. pegasus-service must be started as root for PROCESS_SWITCHING to work. PROCESS_SWITCHING can be set to False.
USERNAME '' The username which pegasus-em client uses to connect to the pegasus-em server.
PASSWORD '' The password which pegasus-em client uses to connect to the pegasus-em server.


All clients that connect to the web API will require the USERNAME and PASSWORD settings in the configuration file.

12.1.2. Running the Service

Pegasus Service can be started using the pegasus-service command as follows

$ pegasus-service

By default, the server will start on https://localhost:5000. You can set the host and port in the configuration file OR pass it as a command line switch to pegasus-service as follows.

$ pegasus-service --host <SERVER_HOSTNAME> --port <SERVER_PORT>