Topic
IC4NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
4 replies Latest Post - ‏2013-01-04T22:09:45Z by SystemAdmin
SystemAdmin
SystemAdmin
1485 Posts
ACCEPTED ANSWER

Pinned topic Linux startup script for Containers/Catalogs?

‏2012-12-28T17:33:16Z |
Did anyone get a chance to create a start/stop/status script for WXS?

Also, is it a problem if using a java wrapper to run wxs?

Thanks!
Updated on 2013-01-04T22:09:45Z at 2013-01-04T22:09:45Z by SystemAdmin
  • lisaw
    lisaw
    101 Posts
    ACCEPTED ANSWER

    Re: Linux startup script for Containers/Catalogs?

    ‏2013-01-02T19:32:24Z  in response to SystemAdmin
    Hello mycroft1, can you expand your question a little bit what you are looking for?

    If you are looking at scripts for starting/stopping/getting status for catalog and container servers, in a WebSphere Application Server, you can use wsadmin and write jython scripts to do this. If you are on standalone or even with the app server, you can write a java client that connects to it, or have shell scripts that can run against xscmd for status or check out the shell scripts in the <standalone_install>/ObjectGrid/gettingstarted directory as a sample.

    Your next question is yes, you may use a java wrapper to run wxs, in fact you may programmatically run catalog and container servers through the eXtreme Scale Server API.

    Let me know if you have more questions.

    • Lisa

    Websphere eXtreme Scale Development
    • SystemAdmin
      SystemAdmin
      1485 Posts
      ACCEPTED ANSWER

      Re: Linux startup script for Containers/Catalogs?

      ‏2013-01-03T02:57:06Z  in response to lisaw
      Hi Lisa,

      What I'm looking for is a script I can add a service in /etc/init.d which supports start/stop/status/restart

      Thanks!
      • lisaw
        lisaw
        101 Posts
        ACCEPTED ANSWER

        Re: Linux startup script for Containers/Catalogs?

        ‏2013-01-03T16:55:56Z  in response to SystemAdmin
        Starting eXtreme Scale as a service...

        There are multiple ways to start/stop a server, (1) invoke java and pass in required classpaths, (2) invoke the startOgServer command, or (3) programmatically start in a java process.

        1) Check out the shell scripts in <standalone_install>/ObjectGrid/gettingstarted/ for examples: runcat.sh and runcontainer.sh will be useful.

        2) You can also just call the startOgServer or stopOgServer commands in the <standalone_install>/ObjectGrid/bin directory from /etc/init.d. You can invoke startOgServer.sh or startXsServer.sh -script yourScriptName.sh, and that will create a new script called youScriptName.sh that will own the JVM when called. That basically turns your script into option #1. You could then put some logic around that making sure you are still up and running because you'll know your pid, etc.

        3) The other option I can think of is if you write a java client that starts catalog or containers programmatically. Check out how to run a java client through a shell script in <standalone_install>/ObjectGrid/gettingstarted/runclient.sh for an example of that. You'd have control to stop/start/restart servers by using the API.

        Add whichever way works for you to your /etc/init.d startup script. Hope that helps!

        • Lisa

        Websphere eXtreme Scale Development
        • SystemAdmin
          SystemAdmin
          1485 Posts
          ACCEPTED ANSWER

          Re: Linux startup script for Containers/Catalogs?

          ‏2013-01-04T22:09:45Z  in response to lisaw
          Thanks Lisa!