TECHZEN Zenoss User Community ARCHIVE  

Automating Script That Updates a Container

Subject: Automating Script That Updates a Container
Author: Larry
Posted: 2020-08-27 18:49

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
------------------------------


Subject: RE: Automating Script That Updates a Container
Author: Arthur
Posted: 2020-09-16 13:09

Hi Larry

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

Regards,

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


Subject: RE: Automating Script That Updates a Container
Author: Larry
Posted: 2020-09-29 19:28

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
------------------------------


Subject: RE: Automating Script That Updates a Container
Author: Arthur
Posted: 2020-10-07 03:23

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
------------------------------

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
------------------------------


Subject: RE: Automating Script That Updates a Container
Author: Larry
Posted: 2020-10-07 03:30

Thanks! Will let you know what I find out.

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


< Previous
Reverse lookups
  Next
Northbound
>