Blogs

Running Platform Symphony service instances in Docker containers

By Archive User posted Thu March 31, 2016 01:10 AM

  

Originally posted by: ChaoHuiZhang


image

 

Starting with Platform Symphony 7.1.1, you can use Docker with Platform Symphony. This blog article focusses specifically on configuring your Platform Symphony service instances to run in Docker containers.

 

A Docker container allows an application to be packed together with its dependencies into a portable virtual package that can run with multi-platform support, isolation, and resource limits applied.

 

The main benefits of running a Platform Symphony service instance in a Docker container are as follows:

  • Deployment: Application can be packed together to a portable Docker image, that can run on different platforms.
  • Isolation: Containers isolate applications from each other and the underlying infrastructure while providing an added layer of protection for the application.

Platform Symphony service instances in Docker containers

The following diagram shows how Platform Symphony service instances run inside containers when Docker is enabled. The SIM starts the Docker containers instead of directly starting the service instance (SI) processes.

image

Platform Symphony supports Docker for both SOA and MapReduce applications. One Platform Symphony application can accept workload from multiple tenants where each tenant has its own OS user (the tenant OS user is not the same as the job or session OS submission user). Each tenant’s OS user has access to specific file mounts and should not be able to see other tenant’s mounts. Ideally, the Docker Container should be run as the tenant’s OS user to avoid modifying other tenants’ data.

 

Configuring Platform Symphony service instances to run in Docker containers

As a precondition, the Platform Symphony cluster should be installed with Platform Symphony Advanced Edition, and the application should be deployed in the Platform Symphony cluster.

 

Additionally, Platform Symphony will not deploy a Docker image; therefore, ensure that Platform Symphony compute hosts contain Docker images, or can get the Docker image from the Docker registry automatically.

 

Configuring Platform Symphony service instance to run in Docker containers is threefold:

  1. Add a new Docker container.
  2. Configure your application profile to run service instances in the Docker container.
  3. Submit workload and check the container ID.

Adding a new Docker container

You must first add a new Docker container before you can use it to run service instances. Refer to IBM Knowledge Center to complete this step:
http://www.ibm.com/support/knowledgecenter/SSGSMK_7.1.1/management_sym/docker_add_container.dita

 

The following screenshot illustrates adding a new Docker container:
image

Configuring application profile to run service instance in the Docker container

After you have added a new Docker container, you can configure the application profile to run service instances in the Docker container. Refer to IBM Knowledge Center to complete this step:
http://www.ibm.com/support/knowledgecenter/SSGSMK_7.1.1/management_sym/docker_configure.dita

The following screenshot illustrates configuring your application profile for the Docker container:

image

Submitting workload and checking the container ID

Once you have configured your application profile to run service instances in the Docker container, test your configuration.

  1. Run the client to submit workload and fetch the results from the application service. The following output shows successfully submit workload:

[root@example logs]#  /scratch/dev5/zch/symde/7.1.1/samples/Java/Logging/RunLoggingClient.sh
Connection ID: c4ba6414-f328-11e5-c000-525400e22cca-140638347392768-27891
Session ID:302
task submitted with ID : 1
task submitted with ID : 2
task submitted with ID : 3
task submitted with ID : 4
task submitted with ID : 5
task submitted with ID : 6
task submitted with ID : 7
task submitted with ID : 8
task submitted with ID : 9
task submitted with ID : 10

Task Succeeded[1]
Your Internal ID was : 0
Estimated runtime recorded as: Sat Mar 26 13:05:05 EDT 2016
Client Sent : Hello Grid!!
Symphony replied : Hello Client!! with common data("Common Data To Be Shared") for session(302)

  1. Each Docker container has a unique name. Run the Docker command docker ps to show the container name. Refer to the last (NAME) column in the following example docker ps output. The name is in the format application_name-service_name-SIM_PID-index:

[root@example logs]# docker ps
CONTAINER ID        IMAGE           COMMAND                  CREATED             STATUS          PORTS           NAMES
b07085967bac        rhel:7.2        "/opt/zch/sym711         4 seconds ago       Up 3 seconds                    LoggingJava-LoggingService-3555-1
adb7085967ba        rhel:7.2        "/opt/zch/sym711         5 seconds ago       Up 4 seconds                    LoggingJava-LoggingService-3555-2


#SpectrumComputingGroup
0 comments
0 views

Permalink