https://github.com/dnephin/compose-swarm-sandbox
A sandboxed swarm cluster - using compose
https://github.com/dnephin/compose-swarm-sandbox
Last synced: about 2 months ago
JSON representation
A sandboxed swarm cluster - using compose
- Host: GitHub
- URL: https://github.com/dnephin/compose-swarm-sandbox
- Owner: dnephin
- Created: 2015-09-04T21:32:00.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-02-25T00:56:30.000Z (about 9 years ago)
- Last Synced: 2025-01-26T00:14:43.897Z (3 months ago)
- Language: Shell
- Size: 7.81 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
Awesome Lists containing this project
README
Docker Compose+Swarm using dind
===============================A sandboxed swarm cluster.
.. contents::
:backlinks: noneSetup
-----.. code:: sh
docker-compose up -d
eval "$(./bin/env)"Running ``docker`` or ``docker-compose`` commands in the shell will run them
on the ``swarm`` sandbox.Features
--------Scale the number of swarm slaves or masters
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~To increase or decrease the number of swarm slaves, run ``docker-compose scale``.
They will auto-join the cluster... code:: sh
docker-compose scale swarm.slave=3
To scale the number of master replicas:
.. code:: sh
docker-compose scale swarm.master=3
Discovery Backends
------------------The default discovery backend is ``zookeeper``. To use ``etcd`` or ``consul``
as the discovery backends you can run ``docker-compose`` with one of the extra
``with-*.yml`` files... note::
This requires features only available in the (upcoming) docker-compose 1.5
release... code:: sh
docker-compose -f docker-compose.yml -f with-etcd.yml up
Troubleshooting
---------------Docker-in-docker and storage drivers
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~If the ``swarm.slave`` containers fail to start with an error about
``Error starting daemon: error initializing graphdriver: driver not supported``
you can adjust the storage in ``docker-compose.yml`` with the ``DOCKER_ARGS``
environment variable.The default storage driver is ``overlay``, but it may not be available on your
kernel.