hobbit-project / platform

HOBBIT benchmarking platform
GNU General Public License v2.0
24 stars 9 forks source link

Migrate to Swarmkit #100

Closed MichaelRoeder closed 6 years ago

MichaelRoeder commented 7 years ago

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 commented 7 years ago

@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 commented 7 years ago

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

yamalight commented 7 years ago

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

denkv commented 6 years ago

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 commented 6 years ago

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

yamalight commented 6 years ago

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

MichaelRoeder commented 6 years ago

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 commented 6 years ago

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

MichaelRoeder commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

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