MQ

 View Only
  • 1.  MQ Appliance Automation - Ansible playbook

    Posted Fri May 20, 2022 01:39 PM
    Hi 
    I have a question regarding MQ Appliance automation with Ansible.

    Is it possible to automate the installation and configuration of MQ appliance using the Ansible playbook. I would like to achieve the following: 
    1. Configure appliance i.e. network interface, SSH, WebGUI etc
    2. Configure QMGR, QUEUE? 
    3. Configure clustering and failover approach etc,

    Q1- Automation is possible for MQ Appliance via any available tool?
    Q2- Is there any plugin/approach where we can leverage Ansible to achieve the above tasks? 

    ------------------------------
    Marina Lee Philip
    ------------------------------


  • 2.  RE: MQ Appliance Automation - Ansible playbook

    Posted Mon May 23, 2022 10:21 PM
    I don't think Ansible has any specific modules for MQ administration.  Ansible can easily use SSH remote login to run commands or scripts on a UNIX server, and supports sudo switch to other userids. It can also upload and download files and do many other file system operations.  Login can use userid / password, or SSH authorized keys (private key on Ansible server, public key on target servers). We use Ansible to build queue managers, MFT agents and MQ client configuration, but sorry, we can't share the playbooks and scripts.

    ------------------------------
    Glenn Baddeley
    Senior Middleware Software Engineer
    Coles Supermarkets Australia Pty Ltd
    ------------------------------



  • 3.  RE: MQ Appliance Automation - Ansible playbook

    IBM Champion
    Posted Tue May 24, 2022 06:33 AM
    I do not think Ansible supports.
    The best possible option to automate is:
    - Use expect scripting to configure the webUI + SSH ( base setup )
    - Then use the REST component against the appliance to automate Appliance setup

    And now using expect build the queue manager
    - using REST component automate the queue manager other objects, etc.

    ------------------------------
    om prakash
    WI
    ------------------------------



  • 4.  RE: MQ Appliance Automation - Ansible playbook

    Posted Tue May 24, 2022 09:12 AM

    Ansible can be used to run generic scripts and execute REST commands, which is the only aspects of Ansible I think you will mostly end up relying on. I do not know of any plugins that would help.

    1. If you are referring to the initial startup wizard configuration, then it would probably be a bit of a pain to code and execute, as you would need to connect to the serial port and use something like Expect. We do have some Expect examples (but for over SSH) for inspiration here: https://github.com/ibm-messaging/mq-appliance
      However, if you are referring to configuring an appliance that is already configured (at least minimally) and on the network, then you could use the REST management API to achieve these tasks. https://www.ibm.com/docs/en/mq-appliance/9.2?topic=reference-rest-management-interface
    2. Probably best to use MQSC to configure existing QMgrs and define queues, etc. You will find a lot of information searching for "MQSC" and "runmqsc". We have put out a Python and Perl client for connecting in and administering the MQ Appliance and these clients now support `runmqsc` too! https://github.com/ibm-messaging/mq-appliance/tree/master/mqcli-client We also provide an Expect script to use `runmqsc` over SSH if you'd prefer. https://github.com/ibm-messaging/mq-appliance/blob/master/config/samples/runmqsc.exp
    3. If you are referring to MQ clustering then MQSC again. If you are referring to the Appliance's HA and DR capabilities then you're back with Expect or the mqcli Python and Perl clients.


    ------------------------------
    Ben Durrans
    ------------------------------