« Back to projectatomic.io
Ask Your Question

Container lifecycle management on a single node

asked 2015-06-19 22:24:46 +0000

supahd gravatar image

Any recommendations for container lifecycle management on a single node ? I have a multi-container application that I'd like to run on an atomic host (no cluster). I want the containers to always be started on bootup and if automatically restarted if one ever goes down. From the docs it appears that kubernetes pods should be used for multi-container apps but I don't have a cluster so not sure if kubernetes is applicable or not. Without using kubernetes it looks like my options are..

  1. Use docker run with an appropriate restart policy
  2. Create a systemd unit file ExecStart=/usr/bin/docker run etc..

I'm thinking the systemd approach might be best. As an aside if kubernetes was used does it autostart pods on bootup ?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2015-06-23 17:04:56 +0000

razyr gravatar image

updated 2015-06-23 17:13:19 +0000

Heya Supahd.

I'm not sure what your use case is for running a single host docker env, but Kubernetes can manage a pod on a single machine, ensure failed containers are restarted, etc... Presuming that Kubernetes is configured to start on boot, the replication controller should auto-start your pod.

Many of the tutorials you'll find around the net begin with setting up a simple single host model, or at least a master with single minion. Again, not knowing your use case, but you should probably look at virtualization with at least two VMs for your Atomic hosts.

You might want to check out https://github.com/GoogleCloudPlatfor... , specifically the vagrant and local setup docs if it's a dev system you're setting up. Kubernetes has a better than average selection of getting started guides for various environments.

As you noted from the docs, "Clusters of Atomic hosts under control of a Kubernetes master server is the expected operating arrangement of an Atomic environment." I would start with Kubernetes with the assumption that your app/environment may need to scale going forward.

edit flag offensive delete link more


The use-case is migrating a typical linux-based product where multiple services are involved (e.g. webserver+database+messaging router+etc..) but there's no cluster, pretty average setup... systemd would take care of service dependencies and restarts.. migrate to atomic who takes care of that ?

supahd ( 2015-06-26 20:24:32 +0000 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]

Question Tools

1 follower


Asked: 2015-06-19 22:24:46 +0000

Seen: 653 times

Last updated: Jun 23 '15