User Tools

Site Tools


admin:controller-configuration

Controller configuration

Once you have finished the installation of the Controller, you need to provide some first-time configuration items that must be placed in the Controller settings file by the time its software services are started.

Log into the controller server (e.g. via SSH) as the system user created for running the Controller software. Then open with your favourite editor the settings file of the Controller. For instance, for the testbed named mytestbed (use your own system user and testbed name if different):

$ ssh confine@controller.example.com  # in your computer
$ vim ~/mytestbed/mytestbed/settings.py  # in the controller

Then update the following settings in order to have a fully functional Controller:

  • Customize your site name and URL (they will be used in user registration and notification emails):
    SITE_URL = 'https://controller.example.com'
    SITE_NAME = 'My Testbed'
    SITE_VERBOSE_NAME = 'My Testbed Management Site'
  • If the local MTA is not able to send messages to arbitrary email addresses, you may want to configure delivery via an external SMTP server:
    EMAIL_HOST = 'smtp.example.com'
    EMAIL_PORT = 465  # 25 by default
    EMAIL_HOST_USER = 'mytestbed'  # if authentication is needed
    EMAIL_HOST_PASSWORD = 's3cr3t'  # if authentication is needed
    EMAIL_USE_TLS = True  # False by default
  • Configure the source address for normal Controller emails and notifications:
    DEFAULT_FROM_EMAIL = 'mytestbed@example.com'
  • Configure the recipients and source of administrative emails. The recipients will get code error or malfunction notifications (e.g. when some testbed service breaks or is down), and they should be able to act directly on the Controller installation; superusers use the web interface instead and may not be part of this group. See Monitor Application for more details.
    ADMINS = (('George', 'george@example.com'), ('Mary', 'mary@example.com'))
    SERVER_EMAIL = 'mytestbed@example.com'  # mail address error messages come from
  • Choose the user registration policy between 'OPEN', 'RESTRICTED' or 'CLOSED', and the account approval contact address (see User registration for more information):
    USERS_REGISTRATION_MODE = 'RESTRICTED'  # 'OPEN' by default
    EMAIL_REGISTRATION_APPROVE = 'mytestbed@example.com'
  • Define which node architectures are supported by the testbed and which one is the default (please note that the Confined release of Node software only supports 32-bit kernels, see Base images for more information):
    NODES_NODE_ARCHS = (
        ('i586', 'i586'),  # value and visible title
        ('i686', 'i686'),
    )
    NODES_NODE_ARCH_DFLT = 'i686'
  • Configure the default zoom and coordinates of the map where the nodes are shown based on their geoposition (if any):
    GIS_MAP_CENTER = {'lat': 0.0, 'lng': 0.0}
    GIS_MAP_ZOOM = 10  # value between 8 (farther) and 15 (nearer)

To conclude, just restart the Controller services to apply changes on the configuration:

$ sudo python ~/mytestbed/manage.py restartservices
admin/controller-configuration.txt · Last modified: 2015/09/04 16:03 by ivilata