# Server Roles
This tool is only available to the ‘Master Organisation’
# About
Each role (also known as a service) provided by Enhance is containerised, this allows for each server within you cluster to provide all or a combination of Application, Email, database, Backup and/or DNS role.
TIP
The Enhance role is specific to your control panel server. It cannot be removed or uninstalled. Only one control server is possible within an Enhance cluster. Automatic failover of this role to a subordinate server is an upcoming feature.
# Install a Role
When a new role is installed it will provision a number of docker containers to the target server.
These containers are managed by Enhance and will be destroyed, restarted and re-created automatically as required. All data which is required to be persistent is stored within persistent volumes or mounts to the host system.
To add a role to a server:
- Open Servers in the left side bar
- Select Manage on the server you’d like to add the service to
- Scroll to Roles and click the Add Role tab
- Select the roles you would like to enable and click Add services to finish
TIP
You can navigate away from the server page when a service is being installed and you will be notified when the installation is completed.
WARNING
New roles will not automatically be mapped to websites. If you are installing a role which did not previously exist on your Enhance cluster and you want to map existing websites to it so they can use the new functionality, use the "move server" option from the left hand menu.
# Override Global Role Settings
By default all services installed on a server role automatically inherit the global Service settings configured in your ‘Service settings'. Once installed some global service settings can be overridden on a per server basis.
Email role
SMTP Settings - You can configure the server to relay through a designated smart host - potentially an outbound SMTP filtering/scrubbing service.
Application role
PHP FPM settings - These settings affect every website's default PHP FPM but can be overridden on a per-website basis. You can learn more about php FPM configuration here.
PHP INI settings - These settings affect every website's default php.ini but can be overridden on a per website basis by the master organisation, reseller or end user. You can learn more about php.ini configuration here.
Database role
my.cnf- You can set custom my.cnf directives. Be careful, incorrect settings can cause data corruption. Enhance will verify that the settings are valid and that MySQL will restart with them enabled but no further checks are carried out.
To override global service settings on an individual role:
Open ‘Servers’ in the left side bar Select ‘Manage’ on the server Navigate to the ‘Role’ you’d like to configure custom settings for Click ‘Settings’
# Delete a Role
Deleting a role will remove it from the server. All relevant containers and their data will be removed.
TIP
You cannot delete a role which has websites mapped to it. You must delete all websites or migrate them to other servers (see 'move server' in the main menu) first.
To delete a role from a server:
- Open Servers in the left side bar
- Select the role you want to remove
- Click Remove Service
# Disable/Enable a Role
Disabling a service will prevent any new websites from being placed on that service.
Existing websites relying on that service will not be affected. A disabled service can be enabled at any point.
To disable a role:
- Open Servers in the left side bar
- Select Manage on the server that hosts the service you’d like to disable
- Navigate to Roles and click on the tab of the service you would like to disable
- Click Disable roles
- Click Disable to finish
To enable a service:
- Open Servers in the left side bar
- Select Manage on the server that hosts the service you’d like to enable
- Navigate to Roles and click on the tab of the service you would like to enable
- Click Enable role
- Click Enable to finish
# Restart a Role
There are two different types of role restarts:
A Graceful restart will wait for all processes to finish before restarting each service on the server. Websites relying on a service that is restarting will be offline. You will be notified when a graceful restart starts and finishes.
A Forceful restart will immediately kill all processes running on the service. Websites relying on a service that is restarting will be offline.
You will be notified when a graceful restart starts and finishes.
To restart a role:
- Open Servers in the left side bar
- Select Manage on the server that host the service you’d like to reboot
- Navigate to Services and click on the tab of the service you would like to enable
- Click either Graceful restart or Forceful restart
- Click Restart now to finish
You can navigate away from the server page when a service restart is taking place and you will be notified when the restart is complete.