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

Migrate to Swarmkit #100

Closed
MichaelRoeder opened this issue Aug 30, 2017 · 11 comments
Closed

Migrate to Swarmkit #100

MichaelRoeder opened this issue Aug 30, 2017 · 11 comments

Comments

@MichaelRoeder
Copy link
Contributor

The migration from the container based swarm to Swarmkit should give use

@yamalight Could you please figure out what we have to do to prepare a migration?

@yamalight
Copy link
Contributor

@MichaelRoeder The way I see it, the following steps should do it:

  1. Gather all used docker functions in current codebase (from quick search it seems to be: pull, network create, container create, container start, network add container and list container)
  2. Find analogues in swarm mode (from quick glance at API, latest version should have all we need)
  3. Migrate code and tests (tests would probably take most time, from what I've seen usage within code is quite limited)
  4. Test with local swarm with 1 node (e.g. useful for local deployments)
  5. Test with local swarm with 2-3 nodes
  6. Once everything works - tear down old swarm, reconfigure new swarm on our server and re-deploy new version (that would probably mean ~1 day of downtime for system)

Changing code itself would probably be the easiest thing here.

@MichaelRoeder
Copy link
Contributor Author

That means that Docker swarm or Swarmkit will become a prerequesite to run the HOBBIT platform, right?

@yamalight
Copy link
Contributor

@MichaelRoeder swarmkit will, but it's been integrated into docker for quite some time

@denkv
Copy link
Collaborator

denkv commented Nov 17, 2017

Docker networks would need to be overlay ones:

docker network remove hobbit
docker network remove hobbit-core
docker network create --driver overlay hobbit
docker network create --driver overlay hobbit-core

@MichaelRoeder
Copy link
Contributor Author

MichaelRoeder commented Nov 17, 2017

Creating overlay networks is not possible in a local setup, is it? I think they are bound to a Docker swarm cluster.

@yamalight
Copy link
Contributor

I think you can have one-node swarm and overlay network on it, so should work locally too.

@MichaelRoeder
Copy link
Contributor Author

Sure but wouldn't that create additional effort for the user?
I do not really see why we now have to care about the type of the network. Before, we could work with the networks regardless of their type, right?

@yamalight
Copy link
Contributor

docker swarm init && docker create network --driver overlay hobbit is not that much effort IMO :P

@MichaelRoeder
Copy link
Contributor Author

MichaelRoeder commented Nov 17, 2017

I simply don't know how good swarm is now integrated into Docker. If the user has to take care of adding stuff like docker-compose -H :4000 as we have to do it now, I would try to avoid this ;)

Apart from that, I still haven't got an answer why always using overlay networks should be necessary.

@denkv
Copy link
Collaborator

denkv commented Nov 17, 2017

That's necessary because docker services use overlay networks instead of regular ones, more info: https://docs.docker.com/engine/swarm/networking/

Such network setup would be the default because as currently planned platform will only work with swarm.

In a local setup swarm is being initialized as just docker swarm init without any other dependencies.

@yamalight
Copy link
Contributor

New swarm just has different CLI commands, no need to specify different endpoint AFAIK.

MichaelRoeder added a commit that referenced this issue Feb 28, 2018
Developed version 2.0.0 of the platform. Moved to Docker swarm (using Docker services instead of docker-compose) (#100, #158, makes #24 obsolete). Updated VOS version and made sure that future updates of the version can be done easily (#48). Added cluster health checks (#97). Added support for gathering statistics about the usage of resources (#98). Added the visualization of complex data as diagrams (#125). Cleaned up deployment process (#162).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants