High Performance Computing

High Performance Computing Group

Connect with HPC subject matter experts and discuss how hybrid cloud HPC Solutions from IBM meet today's business needs.

 View Only

Community Edition: An IBM Spectrum Symphony cluster in Docker containers

By Archive User posted Fri October 05, 2018 10:33 AM

  

Originally posted by: Alexey Zubko


image
Did you know a Docker image of IBM Spectrum Symphony is available on the Docker Hub? Known as IBM Spectrum Symphony Community Edition, you can use this IBM Spectrum Symphony image to create a cluster conveniently in Docker containers and submit workload. This blog post describes what the Community Edition is all about and provides steps on how to deploy a Community Edition cluster. 

 

What is Community Edition...

The Community Edition of IBM Spectrum Symphony is a free offering that provides the full functionality of IBM Spectrum Symphony Advanced Edition, but only for a cluster of up to 64 cores. It also does not include IBM Support that is tied to licensed software.

The Community Edition is hosted on the public Docker repository at ibmcom/spectrum-symphony. Multi-platform images are supported: x86_64 (amd64) and ppc64le. The IBM Spectrum Symphony image is based on an Ubuntu 16.04 image. For all available tags, check the Docker Hub documentation.

 

Prerequisites to deploy a Community Edition cluster

  • Each cluster must have a common Docker network and a common shared directory (mount to /shared).
  • Most processes inside the container run as internal user egoadmin (id 1000), ensure that the shared directory has the correct permissions for this user.
  • The IBM Spectrum Symphony containers must run in privileged mode.
  • Optionally, limit a container's resources (CPU and memory).

 

Container configuration

Containers are configured using environment variables. You must define environment variable LICENSE=accept to indicate you agree to the licensing terms and conditions.

Environment variable HOST_ROLE defines the role of the container in the cluster either as MANAGEMENT, COMPUTE, or CLIENT host:

  • MANAGEMENT (default) starts an IBM Spectrum Symphony management host. The first container will be the master host, the others will serve as master candidate hosts. If the master host container is killed, a master candidate will take over cluster management. Management hosts expose several ports: WEBGUI (HTTPS on port 8443), SYMREST (HTTPS on port 8050), and EGOREST (HTTPS on port 8543). 
  • COMPUTE starts an IBM Spectrum Symphony compute host, where parallel calculations are executed.
  • CLIENT is used to provide SSH access (SSH on port 2222) to the cluster network for workload submission.

For a complete list of configurable environment variables, see the Installation Options section on Docker Hub.

 

Creating the cluster

To create a Community Edition cluster, you must create a Docker network for your cluster. You can have several clusters, but they must use different Docker networks.

Create a Docker network, called symcluster1:

$ docker network create symcluster1

 

Each cluster must have its own shared directory (for example, symcluster1) to store configuration, work files, and logs:

$ mkdir symcluster1

 

Make sure the egoadmin user (id 1000) has permissions to this symcluster1 directory:

$ chmod a+rwx symcluster1

 

Now, start a management host that will act as the master host; also accept the license and map the WEBGUI port:

$ docker run --privileged --rm -d --network symcluster1 -v $PWD/symcluster1:/shared -p 8443 -e LICENSE=accept ibmcom/spectrum-symphony

 

After that, start several compute hosts (HOST_ROLE=COMPUTE); no IP ports are mapped for those hosts:

$ docker run --privileged --rm -d --network symcluster1 -v $PWD/symcluster1:/shared -e HOST_ROLE=COMPUTE -e LICENSE=accept ibmcom/spectrum-symphony

$ docker run --privileged --rm -d --network symcluster1 -v $PWD/symcluster1:/shared -e HOST_ROLE=COMPUTE -e LICENSE=accept ibmcom/spectrum-symphony

 

Optionally (if you want to access to the cluster using SSH), start a client host. IP port 2222 must be mapped for SSH access:

$ docker run --privileged --rm -d --network symcluster1 -v $PWD/symcluster1:/shared -e HOST_ROLE=CLIENT -p 2222 -e LICENSE=accept ibmcom/spectrum-symphony

 

Managing the cluster

Use the "docker port" command to find out what IP ports were mapped.

The management (master) host hosts the WEBGUI (HTTPS) service for the IBM Spectrum Symphony cluster management console:

$ docker port 62bccfbee45d32f08367de7cfcf5e4b05427cf71e8c06d067a192cf208ea6ba8

8443/tcp -> 0.0.0.0:32839

 

Use a supported web browser to access the cluster management console at the URL: https://127.0.0.1:32839. Note that the HTTPS protocol is used and the port is mapped by Docker. When you access the console, the web browser warns that the connection is not secured because IBM Spectrum Symphony uses a self-signed SSL certificate; you can safely ignore this message. Then, log on as the built-in cluster administrator user (username Admin password Admin).

Once you log in, you can view cluster entitlement and host information:

System & Services > System Entitlement:

image

 

Resources > Hosts > All Hosts:

image

 

The client host hosts the SSH service:

$ docker port c96ba34a5a4bdbb1ba802d6f0a60f48ec19fc6feb51b5866db21a5880cef3298

2222/tcp -> 0.0.0.0:32840

 

Use any SSH client application to connect to the client host (note port argument -p) and log on as the egoadmin user with password Admin:

$ ssh egoadmin@127.0.0.1 -p 32840

The authenticity of host '[127.0.0.1]:32840 ([127.0.0.1]:32840)' can't be established.

RSA key fingerprint is SHA256:N9kKBmt9iDCGuVvSlXI/1kLryoq6EwAEaAbzWJ9HyPg.

RSA key fingerprint is MD5:f9:ea:d5:7e:f3:af:af:8d:0f:0e:23:9b:7b:15:f7:d0.

Are you sure you want to continue connecting (yes/no)? yes

Warning: Permanently added '[127.0.0.1]:32840' (RSA) to the list of known hosts.

Password: 

 

From the client machine, source the IBM Spectrum Symphony environment and log on to the cluster:

egoadmin@c96ba34a5a4b:~$ . /opt/ibm/spectrumcomputing/profile.platform 

egoadmin@c96ba34a5a4b:~$ egosh user logon -u Admin -x Admin

Logged on successfully

 

You can then manage the cluster using IBM Spectrum Symphony commands. For example, here is your resource information, one management host and two compute hosts. The client host does not have IBM Spectrum Symphony running on it and is used only to submit workload.

egoadmin@c96ba34a5a4b:~$ egosh resource list -l

NAME                   status        mem    swp    tmp   ut    it    pg   r1m  r15s  r15m  ls

62bccfbee45d           ok             0M      -    57G   6%    25 158.6   0.3   1.6   0.3   0

3f1cc98238fc           ok             0M      -    57G   6%    20 158.4   0.3   0.0   0.3   0

aa6a3ccee30f           ok             0M      -    57G   6%    20 158.6   0.3   0.8   0.3   0

 

Submit sample workload to test the cluster by running the built-in symping utility:

egoadmin@c96ba34a5a4b:~$ symping -d

------------------------------------------------------------

IBM Spectrum Symphony Ping Utility.

 

...

 

------------------------------------------------------------

Client connecting to IBM Spectrum Symphony... 

Connected to Session Director.

Connection information:

User                  : Admin

Application           : symping7.2.1

 

------------------------------------------------------------

Connected to Session Manager.

Creating 1 session...

Session created. ID: 5

 

------------------------------------------------------------

Test Run 1.

Test for: Complete Workload Cycle

Sending 20 tasks and retrieving replies...

 

 

Number of tasks completed: 20

Connection to compute hosts OK. 

SIs and SIMs OK.

Test Run 1 done. 

Test Roundtrip: 2.733 seconds

 

------------------------------------------------------------

Workload Summary:

First task input sent    : 10/04/2018, 16:52:34.709

Last task output received: 10/04/2018, 16:52:37.424

 

Total Task Roundtrip:         2.714 seconds

    [Last task output received - First task input sent]

 

Number of compute hosts used: 2

Number of service instances used: 8

 

------------------------------------------------------------

Task Roundtrip Summary:

Shortest       2.554462   ms (task 5  on host 3f1cc98238fc )

Longest        2.652677   ms (task 19  on host 3f1cc98238fc )

Average        2.594424   ms

 

------------------------------------------------------------

Host Summary:

Compute Host                    SI-PID    Number of Tasks     

3f1cc98238fc                    31693     3                   

3f1cc98238fc                    31694     3                   

3f1cc98238fc                    31695     2                   

3f1cc98238fc                    31696     2                   

aa6a3ccee30f                    31863     3                   

aa6a3ccee30f                    31864     2                   

aa6a3ccee30f                    31865     3                   

aa6a3ccee30f                    31866     2                   

 

------------------------------------------------------------

Configuration Summary:

Application: symping7.2.1     Session ID: 5

 

Running IBM Spectrum Symphony samples in the cluster

The Community Edition comes with IBM Spectrum Symphony API samples for different programming languages. The following example shows how to compile a C++ sample and install it to the cluster.

First, you need to attach to the client Docker container as root user to install the C++ compiler:

[azubko@azubkov3 ~/tmp/1]$ docker exec -ti -u 0 c96ba34a5a4bdbb1ba802d6f0a60f48ec19fc6feb51b5866db21a5880cef3298 bash

root@c96ba34a5a4b:/home/egoadmin# apt-get update

...

root@c96ba34a5a4b:/home/egoadmin# apt-get install make g++ -y

Reading package lists... Done

....

root@c96ba34a5a4b:/home/egoadmin# g++ -v

Using built-in specs.

COLLECT_GCC=g++

COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper

Target: x86_64-linux-gnu

Configured with: ../src/configure -v --with-pkgversion='Ubuntu 5.4.0-6ubuntu1~16.04.10' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-5 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu

Thread model: posix

gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.10) 

 

Source the environment and log on to the cluster:

root@c96ba34a5a4b:/home/egoadmin# . /opt/ibm/spectrumcomputing/profile.platform 

root@c96ba34a5a4b:/home/egoadmin# egosh user logon -u Admin -x Admin

Logged on successfully

 

Compile the C++ SampleApp application:

root@c96ba34a5a4b:~# cd /opt/ibm/spectrumcomputing/soam/7.2.1/samples/CPP/SampleApp

root@c96ba34a5a4b:/opt/ibm/spectrumcomputing/soam/7.2.1/samples/CPP/SampleApp# make

cd Common; make all

make[1]: Entering directory '/opt/ibm/spectrumcomputing/soam/7.2.1/samples/CPP/SampleApp/Common'

g++  -Wno-deprecated -Wall -pthread -g -DGCC34 -DLINUX -I ../../../../src -I ../../../../include -c -o MyMessage.o MyMessage.cpp 

ar cru ../Output/libsampleCommon.a MyMessage.o ; 

ar: `u' modifier ignored since `D' is the default (see `U')

make[1]: Leaving directory '/opt/ibm/spectrumcomputing/soam/7.2.1/samples/CPP/SampleApp/Common'

cd Service; make all

make[1]: Entering directory '/opt/ibm/spectrumcomputing/soam/7.2.1/samples/CPP/SampleApp/Service'

...

make[1]: Leaving directory '/opt/ibm/spectrumcomputing/soam/7.2.1/samples/CPP/SampleApp/SyncClient'

cd AsyncClient; make all

make[1]: Entering directory '/opt/ibm/spectrumcomputing/soam/7.2.1/samples/CPP/SampleApp/AsyncClient'

g++  -Wno-deprecated -Wall -pthread -g -DGCC34 -DLINUX -I ../../../../include -I ../Common -c -o AsyncClient.o AsyncClient.cpp;

g++  -Wno-deprecated -Wall -pthread -o ../Output/AsyncClient AsyncClient.o  -L ../Output -L ../../../../linux-x86_64/lib64 -lsampleCommon -lsoambase -lsoamapi 

make[1]: Leaving directory '/opt/ibm/spectrumcomputing/soam/7.2.1/samples/CPP/SampleApp/AsyncClient'

 

Create the service package:

root@c96ba34a5a4b:/opt/ibm/spectrumcomputing/soam/7.2.1/samples/CPP/SampleApp# cd Output/

root@c96ba34a5a4b:/opt/ibm/spectrumcomputing/soam/7.2.1/samples/CPP/SampleApp/Output# tar czf SampleServiceCPP.tgz SampleServiceCPP

 

Create a consumer for the sample, deploy the package, and register the application:

root@c96ba34a5a4b:/opt/ibm/spectrumcomputing/soam/7.2.1/samples/CPP/SampleApp/Output# egosh consumer add /SampleAppCPP -e egoadmin -u Guest -g ComputeHosts,ManagementHosts

Consumer </SampleAppCPP> added.

root@c96ba34a5a4b:/opt/ibm/spectrumcomputing/soam/7.2.1/samples/CPP/SampleApp/Output# soamdeploy add SampleServiceCPP -p SampleServiceCPP.tgz -c /SampleAppCPP

Logging on to RS server with user Admin and consumer /SampleAppCPP.

Successfully logged on to RS server.

Verifying the service package, SampleServiceCPP.tgz.

/opt/ibm/spectrumcomputing/3.7/linux-x86_64/bin/utils/pcgunzip "SampleServiceCPP.tgz"

tar -tf "SampleServiceCPP.tar"

Successfully verified the service package.

Starting to upload the package SampleServiceCPP with file name SampleServiceCPP.tgz.

Successfully uploaded the package.

root@c96ba34a5a4b:/opt/ibm/spectrumcomputing/soam/7.2.1/samples/CPP/SampleApp/Output# soamreg ../SampleApp.xml 

Application "SampleAppCPP" registered and enabled.

root@c96ba34a5a4b:/opt/ibm/spectrumcomputing/soam/7.2.1/samples/CPP/SampleApp/Output# soamview app SampleAppCPP 

APPLICATION                   STATUS    SSM HOST      SSM PID CONSUMER         

SampleAppCPP                  enabled   -             -       /SampleAppCPP    

 

Finally, run the sample:

root@c96ba34a5a4b:/opt/ibm/spectrumcomputing/soam/7.2.1/samples/CPP/SampleApp/Output# ./AsyncClient 

connection ID=ccde7986-c7fc-11e8-c000-0242ac150002-139885344515840-2221

Callback created ... 

Session ID:1

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 [5]

Integer Value : 4

Data block size: 500

you sent : Hello Grid !!

we replied : Hello Client !!

>>> Asynchronously.

 

Task Succeeded [4]

Integer Value : 3

Data block size: 400

you sent : Hello Grid !!

we replied : Hello Client !!

>>> Asynchronously.

 

Task Succeeded [7]

Integer Value : 6

Data block size: 700

you sent : Hello Grid !!

we replied : Hello Client !!

>>> Asynchronously.

 

Task Succeeded [1]

Integer Value : 0

Data block size: 100

you sent : Hello Grid !!

we replied : Hello Client !!

>>> Asynchronously.

 

...

 

Task Succeeded [10]

Integer Value : 9

Data block size: 1000

you sent : Hello Grid !!

we replied : Hello Client !!

>>> Asynchronously.

 

Task Succeeded [9]

Integer Value : 8

Data block size: 900

you sent : Hello Grid !!

we replied : Hello Client !!

>>> Asynchronously.

 

 

All Done !!

 

You can now submit workload from outside the cluster using SSH:

$ ssh egoadmin@127.0.0.1 -p 32840 "source /opt/ibm/spectrumcomputing/profile.platform && /opt/ibm/spectrumcomputing/soam/7.2.1/samples/CPP/SampleApp/Output/AsyncClient"

Password: 

connection ID=662d6f3e-c7fd-11e8-c000-0242ac150002-139885344515840-2221

Callback created ... 

Session ID:2

task submitted with ID : 1

task submitted with ID : 2

task submitted with ID : 3

...

task submitted with ID : 10

Task Succeeded [1]

Integer Value : 0

Data block size: 100

you sent : Hello Grid !!

we replied : Hello Client !!

>>> Asynchronously.

...

Task Succeeded [9]

Integer Value : 8

Data block size: 900

you sent : Hello Grid !!

we replied : Hello Client !!

>>> Asynchronously.

 

 

All Done !!

 

Stopping the cluster

To stop the cluster, kill all created containers, delete the shared directory, and the Docker network.

 

imageConnect with us...

We hope this post was useful to help you get started with the Community Edition. Download it today and let us know how it goes. If you’ve got comments or questions, add a comment below. You can also start a topic in our forum.

image 
Read more...

https://hub.docker.com/r/ibmcom/spectrum-symphony/

https://www.ibm.com/support/knowledgecenter/SSZUMP_7.2.1/install_grid_sym/symphony_community_edition.html


#SpectrumComputingGroup
0 comments
5 views

Permalink