# Manage services

A service is a set of parameters required for a given processing type. Services can be manually started and stopped.

You can access services from the **Home** page dashboard or the left-side menu panel.

## Display services

Services are listed in a table and are associated to a specific processing type. Service parameters and options depend on the processing type.

Before you start: ensure at least one service is configured.

To display services, follow these steps:

1. Click **Services** in the left-side menu panel. The table of services displays.

2. To easily find a service or refine the display, you can then:
   - Use the [search bar](/beam/web-interface/navigation#use-the-search-bar);
   - Filter by specific fields (such as tag, status, processing types, resource, source, animation, alarm level);
   - Show/hide columns by clicking `Ellipsis` at the right of the table headings;
   - Sort the table using the up and down arrows next to each column heading.

## Edit a service

To edit a service, just click the name. It takes you to the service editing page.

## Create a service

Service configurations vary per processing type. See the specific component documentation for detailed information about service creation.

1. From the **Services** page, click **Add Service**.

2. Select a [processing type](/beam/web-interface/navigation#service-processing-types). The service parameter options display.

3. You can configure the service parameters.

4. Once you have completed the service configuration, click **Save and exit**.

5. You can [assign a server](/beam/web-interface/services#assign-a-server-to-run-the-service) to the service. Multiple servers may be assigned to a same service.

6. You can use the buttons in the action column to [start](/beam/web-interface/services#start-a-service) or [stop](/beam/web-interface/services#stop-a-service) the service.

## Assign a server to run the service

Services require a server to run. Select a server for each service before starting the service.

> **Info:** For failover configurations:
>
> - [Failover](/beam/system-admin/servers/failover) only applies to certain processing types and configurations.
> - Inactive backup servers (in a failover group) cannot be assigned to run a service.
> - A primary server (in a failover group) that is in failover, meaning that a backup server has taken over and it is no longer running services, cannot be assigned to run services.

### Typical use case, a service is assigned to one or more servers

1. From the **Services** page, click **Add Server** in the **Resources** column to display the available servers.

2. Tick one or more servers from the list then click **Save**. The selected servers are shown in the **Resources** column.

3. You can start the service.

### In case of redundant outputs (Live Encoder)

1. From the **Services** page, go to the **Resources** column then click **Add Server** to display the available servers.

2. Select a server from the list then select either **Set Primary** or **Set Secondary**.

**Related information**\
[Create redundancy variants](/beam/live-encoder/configure#create-redundancy-variants)

### In case of variants (Live Encoder)

1. From the **Services** page, go to the **Resources** column.

2. Only servers that match the server tags for subsets are offered.

3. Select a server from the list.

**Related information**\
[Create server variants](/beam/live-encoder/configure#create-subset-variants)

### In case of variants and redundant outputs (Live Encoder)

1. From the **Services** page, go to the **Resources** column.

2. Only servers that match the server tags for subsets are offered.

3. Select a server from the list then select either **Set Primary** or **Set Secondary**.

**Related information**\
[Create server variants](/beam/live-encoder/configure#create-subset-variants)\
[Create redundancy variants](/beam/live-encoder/configure#create-redundancy-variants)

## Unassign a server from a service

1. From the **Services** page, go to the **Resources** column.

2. Select a server then click **X** next to the server name. The server is removed and is unassigned from the service.

> **Info:** Jobs that are running on an unassigned server are canceled and put back in the queue to be started again on another server.

## Export a service configuration

Exported service configurations are for importing onto a **different MediaKind** system. This is useful for component or production support, or testing (parameters and expected function).

> **Info:** Exports exclude the service state (started or stopped). Importing service configurations may require manually starting or stopping other services.

From the **Services** page, click `Ellipsis` in the **Actions** column then click `Download` to export. A file will download in your browser's default location.

> **Info:** The download date in the file name is in the following format: YYYY/MM/DD.

Multiple services can be exported at once (See the [Bulk Actions](/beam/web-interface/services#bulk-actions) section). The services selected do not need to all be of the same type.  Once you have selected your services click  `Ellipsis` in the **Actions** column of any service then click `Download` to export.  This will download a tar.gz file containing all the configurations of the selected services.

> **Info:** The download tar.gz file will always be called service\_exports\_YYYY-MM-DD.tar.gz.

## Import a service

You can import a single service, or multiple services to a different server where the service is not currently configured. Import files must match expected formatting requirements.

The supported files are:

| File extension | Description                                        |
| :------------- | :------------------------------------------------- |
| json           | A single service configuration                     |
| tar            | An archive containing several json files           |
| tar.gz / tgz   | A compressed archive containing several json files |
| zip            | A zipped archive containing several json files     |

> **Info:** Archives must only contain json files.

Before you start, ensure that the exported configuration files for the services are available. (See the [Export a service configuration](/beam/web-interface/services#export-a-service-configuration) section)

> **Warning:** Services on a same server require unique ids. Only import the service to a server where the service DOES NOT currently exist.
> If there is a conflict detected during import, you will be given the option to overwrite the existing service.

1. From the **Services** page, click the **Import services...** button.

2. Click **Select files** to browse for the .json or .tar.gz file previously exported for this service or services.  You may select multiple files.

3. Click **Import**. The services are imported and appear in the list of services.

4. Click **Close** to close the import dialog.

If there are any errors during the import, you will be given the option to ignore, continue or ignore all.

> **Warning:** If you select to ignore all errors, the import process will continue to completion without stopping on future errors.

> **Warning:** Importing a lot of files can take several minutes to complete.  During the import process DO NOT navigate away from the import page.

## Start a service

Services can be started and stopped manually from the **Services** page.

Before you start: At least one service has been created and is available in the list of services, and at least one server is assigned to run the service.

From the **Services** page, click `Play outline`  in the **Actions** column to launch the service. The **Status** changes to **started**.

> **Info:** If an alarm is raised, click `Alarm` to display all alarms. Alarm colors are based on severity.

## Stop a service

Stop a service manually for support, testing or for general system administration purposes. Once stopped, the assigned server no longer executes the service.

> **Warning:** Stopping a service cancels any jobs in progress.

1. From the **Services** page, click `Stop outline` in the **Actions** column to stop the service. You are prompted to confirm.

2. Click **Yes, Stop it!**. The service status changes to **stopped**. The service stops running.

## Copy a service

From the **Services** page, click `Ellipsis` in the **Actions** column then select `Clone` to copy the service. A "-copy" suffix is added to the name of the duplicated service.

> **Info:** You can simultaneously select and copy several services at once (see [Bulk actions](/beam/web-interface/services#bulk-actions)).

## Delete a service

Deleting a service removes a service from the list of available services.

> **Info:** For detailed information regarding a Live Packaging service deletion, see [Deleting a Live Packaging service and managing DVR](/beam/packager/live-packaging-service#deleting-a-live-packaging-service-and-managing-dvr).

1. From the **Services** page, click `Ellipsis` in the **Actions** column then select `Delete` to delete the service.

2. Click **Yes, delete it!** to confirm. The service is removed from the services table and is no longer available.

## Failover or revert a service

If a service is running on a server that is in a service-level failover group, a manual failover/revert can be triggered.  For information on this, please refer to the [Request a failover or a revert between servers manually](/beam/system-admin/servers/failover#request-a-failover-or-a-revert-between-servers-manually) section.

## Bulk actions

Some operations support bulk actions. You can select multiple services by ticking the corresponding boxes, or you can select all services on the page by ticking the box next to the **Name** column. Then, you can apply bulk operations such as start, stop, copy, and delete. Stopping or deleting multiple services will prompt a warning message.

> **Info:** You can use the search bar, filter by specific fields, or sort the table using the up and down arrows to refine the services displayed before performing a bulk action..

## Configure advanced parameters for an existing service

1. From the **Services** page, click the service name to edit the service then click the **Advanced parameters** tab.

2. Click **Add** then enter the parameter name and value. You can add multiple advanced parameters to the service.

3. Click **Save and continue** before continuing in order to avoid losing the configuration.
