ansible with singularity?

248 views
Skip to first unread message

Samy

unread,
Oct 22, 2018, 4:15:31 PM10/22/18
to singularity
Hello,

I'm wondering if anyone uses ansible to manage multiple singularity containers? Any playbook example? 

Thank you!

Alexander Huang

unread,
Oct 22, 2018, 4:19:16 PM10/22/18
to singu...@lbl.gov
I am interested in this as well.

FWIW I cobbled together a local connection plugin a while ago, you can find it here: https://github.com/alexhrescale/singularity-ansible-plugin

it worked with a very basic setup; the playbook example is in the readme.

Alex

--
You received this message because you are subscribed to the Google Groups "singularity" group.
To unsubscribe from this group and stop receiving emails from it, send an email to singularity...@lbl.gov.


--

ALEXANDER HUANG

Applications Engineer

▬▬▬▬▬▬▬▬▬▬

Rescale ▪ Cloud HPC Platform ▪ www.rescale.com

944 Market St., Suite 300 ▪ San Francisco, CA 94102

al...@rescale.com1-855-737-2253


rescalelogo250.png



v

unread,
Oct 22, 2018, 4:45:46 PM10/22/18
to singu...@lbl.gov
If you want control of Singularity from Python, instead of rolling your own you can use Singularity Python --> https://singularityhub.github.io/singularity-cli/commands-images. If ansible is Python, this would be fun to have a little set of Singularity playbooks.


If there are any issues, or missing functionality, please don't hesitate to post an issue. If Github is working, that is :)

--
You received this message because you are subscribed to the Google Groups "singularity" group.
To unsubscribe from this group and stop receiving emails from it, send an email to singularity...@lbl.gov.


--
Vanessa Villamia Sochat
Stanford University '16

Samy

unread,
Oct 22, 2018, 5:49:58 PM10/22/18
to singularity
Alex thank you for the sharing your work. I will give it a try.
Vanessa, I have multiple containers (and adding more as we go). Each container has multiple apps and runs with different arguments/numcores... I'm trying to find the best way to automate re-building and running these collection of containers across multiple clusters for performance analysis. 

Quickly looking at the your links above, it seems that the usage is to control a single container at a time correct?

v

unread,
Oct 22, 2018, 6:25:22 PM10/22/18
to singu...@lbl.gov
Yes, Singularity Python does not offer the docker-compose equivalent for Singularity, it's just a wrapper to the software so you can use it in Python (logical since Python == language of scientific programming, for the most part). Orchestration of multiple containers is not in scope of this.

Lars Bilke

unread,
Oct 23, 2018, 3:22:51 AM10/23/18
to singularity
Hi Alex,

I use HPC-Container-Maker (https://github.com/NVIDIA/hpc-container-maker) in combination with a CI server for automate the building of containers.

Rupert Nash

unread,
Oct 30, 2018, 8:16:13 AM10/30/18
to singularity
Coincidence! I did the same thing 2 weeks ago. I have just pushed this to GitHub and was going to see if there was any interest here

My version works with instances so the workflow is 

singularity build -s BUILD_TMP docker://centos:7

singularity instance start -w BUILD_TMP WIP

ansible-playbook -i hosts provision.yml

singularity instance stop WIP

singularity build artefact.simg BUILD_TMP


Obviously that's crying out to be automated further but it's where I'm at for now. A makefile is probably enough so the user can just "sudo make"

Rupe
Reply all
Reply to author
Forward
0 new messages