Service Sets

This page has dedicated information on service sets, its creation methods, and deployment commands.

Introduction

Service set is defined as a group of services which are required to completely run a feature or flow. A service set, thus, contains more than one services with their versions specified. Service sets also help the users to deploy multiple services at one go.

In this document, we are going to cover the following items:

  1. Service set definition

  2. Creating a service set

  3. Deploying a service set

Service set definition

A service set definition contains two components:

  1. Service Set Name: This is the service set name. In this following service set, the name is Gameplay which defines the service set. All the services to execute the gameplay flow can be part of this service set.

  2. Services: This part contains the list of services to define the service set. Within this one has to include the following:

    1. Service Name: This is the field that contains the service name. In this service set service1, service2, and service3 are service names.

    2. Version: Against each service, the service version has to be mentioned.

{
    "name": "gameplay",
    "services": [
        {
            "name": "service_1",
            "version": "1.0.0"
        },
        {
            "name": "service_2",
            "version": "1.1.0"
        },
        {
            "name": "service_3",
            "version": "2.1.0"
        }
    ]
}

Deploying a service set

Method 1 : Service Set Deployment by Creating a Service Set

The first method of deploying a service-set is a two step method. The first step is to Create a Service Set and the next step is to then deploy the service set using the name.

Step 1 - Creating a service set

Once the service set definition is decided, users can use the following command to create the service set within Odin:

odin create service-set --file gameplay.json

In the above command, gameplay.json is a file that contains the service set definition similar to this.

Step 2- Deploy

Once the service set is created, users can deploy the service set with the help of the following command:

odin deploy service-set --name gameplay --env dev-0001 

In the above command, a user is deploying a service with the name gameplay in the environment dev-0001. Please note, if you have a default environment set, then you may not pass the environment name and default environment will be picked for deployment.

Method 2 : Service Set Deployment using a File

The second method of deploying a service set is by directly passing the service set json file to odin. The following command can be used for the same:

odin deploy service-set --file FILENAME.json --env ENV_NAME

If the version mentioned for a service in the service-set definition is different from the one which is available in that particular environment, Odin will intelligently identify and request the user for the sync in the version. The user can also skip including that service from the service set definition if not willing to change the version.

More Information

To find out more on what can be done with service-set, please refer to the document - All CLI Commands within Odin.

Last updated