Configuration & Administration

Expand all | Collapse all

Automating Script That Updates a Container

  • 1.  Automating Script That Updates a Container

    Posted 08-27-2020 05:49 PM
    Greetings!

    We are trying to automate the commands below as part of a script. We're not able to run any of the commands after the first one though:


    # serviced service shell -s PIP -i zope
    # su - zenoss
    $ pip install boto botocore boto3 jira
    $ exit
    # exit
    # serviced snapshot commit PIP

    Any ideas?

    Thanks,

    ------------------------------
    Larry
    ------------------------------


  • 2.  RE: Automating Script That Updates a Container

    Posted 09-16-2020 12:09 PM
    Hi Larry

    Did you made any progress or is it still an open issue?

    Regards,

    ------------------------------
    Arthur
    ------------------------------



  • 3.  RE: Automating Script That Updates a Container

    Posted 23 days ago
    Hi Arthur,
       Thanks for your message. We made a lot of progress and *almost* have this working. We have a minor glitch though. We're using this method:

    https://help.zenoss.com/zsd/cc/command-line-interface-reference/serviced-script

    Thanks,

    ------------------------------
    Larry
    ------------------------------



  • 4.  RE: Automating Script That Updates a Container

    Posted 16 days ago
    Edited by Arthur 15 days ago
      |   view attached
    Hi Larry

    Thanks for you replay. I've attached my basic idea how to achieve this. It uses the fact, that the current directory is mountent into the conatiner under /mnt/pwd. I had some issues to get the correct environment if I switch to the zenoss user. That's why I had to break the script into 3 parts (scripts). In addition not a lot of checks are done. So take it at your own risk and just as an idea how it could work.

    If you don't mind I would also be interested in your solution (some basic starting code lines).

    Thanks in advance.

    ------------------------------
    Arthur
    ------------------------------

    Attachment(s)



  • 5.  RE: Automating Script That Updates a Container

    Posted 16 days ago
    Thanks! Will let you know what I find out.

    ------------------------------
    Larry
    ------------------------------