Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split unit files up into chained steps #30

Open
lukebond opened this issue Mar 4, 2015 · 3 comments
Open

Split unit files up into chained steps #30

lukebond opened this issue Mar 4, 2015 · 3 comments
Labels

Comments

@lukebond
Copy link
Contributor

lukebond commented Mar 4, 2015

I picked up this tip from the Giantswarm guys.

Currently our unit files do docker pull, docker kill, docker run, docker stop etc. all in messy multi-line bash statements in one unit file. If we separate these into separate unit files, eg. one for pulling, one for starting, one for stopping, etc., and chain them together with systemd requires/after directives then it makes neater unit files as well as making it easier to insert steps in between, such as mounting an EBS volume, starting/connecting to a weave network, etc. It will also unroll on stop/kill and allow you to disconnect these things in reverse order.

@rimusz
Copy link

rimusz commented Mar 4, 2015

cool, it looks as a nice tip 👍

@tomgco
Copy link
Member

tomgco commented Mar 4, 2015

@lukebond Sounds good, do you have any examples lying around?

@lukebond
Copy link
Contributor Author

lukebond commented Nov 9, 2015

This is described well by Timo at 13:49 here: https://www.youtube.com/watch?v=OeVMu-1Au78

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants