Skip to content
This repository has been archived by the owner on Oct 10, 2020. It is now read-only.

Using systemd unit file for apps shouldn't be considered best practice #151

Closed
vpavlin opened this issue Sep 9, 2015 · 8 comments
Closed

Comments

@vpavlin
Copy link

vpavlin commented Sep 9, 2015

After discussion with @sctweedie we agreed that atomic install example should be rewritten without suggesting to copy the systemd unit file to the host filesystem.

Although this is ok for SPCs which should serve as atomic host extension, it shouldn't be used for applications (like databases) and using docker run ... --restart=always in RUN label should be recommended instead.

@hhorak
Copy link
Contributor

hhorak commented Sep 9, 2015

There is one issue with this approach, that in case you for example misconfigure container and it exits early during initialization, then what you get with --restart=always is a forever restarting container. We can limit this by using something like --restart=on-failure:5 which says try restart only 5 times, then give up.

@rhatdan
Copy link
Member

rhatdan commented Sep 9, 2015

I think we should have multiple examples. Including a k8s example.

@rhatdan
Copy link
Member

rhatdan commented Sep 14, 2015

Where are the documents written describing best practices?

@hhorak
Copy link
Contributor

hhorak commented Sep 16, 2015

@rhatdan I took the following file as the best practice guide: https://github.com/projectatomic/atomic/blob/master/README.md

@vpavlin
Copy link
Author

vpavlin commented Sep 16, 2015

There is a Container Best Practices project which should cover those, though it seems a bit frozen (Any comments, @scollier ?:)

@rhatdan
Copy link
Member

rhatdan commented Sep 16, 2015

Ok I guess we need to update this to show example of using k8s and docker for starting containers.

@rhatdan
Copy link
Member

rhatdan commented Sep 16, 2015

Does anyone have examples of these use cases that I could steal, or even better wanted to send me a pull request to update the examples.

@rhatdan
Copy link
Member

rhatdan commented Aug 16, 2016

Never received any other examples so I will close this issue.

@rhatdan rhatdan closed this as completed Aug 16, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants