Skip to main content

clusterdock is a framework for creating Docker-based container clusters

Project description

===========
clusterdock
===========

.. image:: https://img.shields.io/pypi/l/clusterdock.svg
:target: https://pypi.python.org/pypi/clusterdock

.. image:: https://img.shields.io/pypi/v/clusterdock.svg
:target: https://pypi.python.org/pypi/clusterdock

.. image:: https://readthedocs.org/projects/clusterdock/badge/?version=latest
:target: https://clusterdock.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status

.. image:: https://img.shields.io/pypi/pyversions/clusterdock.svg
:target: https://pypi.python.org/pypi/clusterdock

-------------------

**clusterdock** is a Python 3 project that enables users to build,
start, and manage Docker container-based clusters. It uses a pluggable
system for defining new types of clusters using folders called *topologies* and
is a swell project, if I may say so myself.

-------------------

"I hate reading, make this quick."
==================================

Before doing anything, install a recent version of `Docker`_ to your machine. Next,
clone a clusterdock topology to your machine. For this example,
we'll use the `nodebase topology`_.
Assuming that you've already installed **clusterdock**, you could start a 2-node cluster:

.. _Docker: https://www.docker.com/
.. _nodebase topology: https://github.com/clusterdock/topology_nodebase

.. code-block:: console

$ git clone https://github.com/clusterdock/topology_nodebase.git
$ clusterdock start topology_nodebase
2017-08-03 10:04:18 PM clusterdock.models INFO Starting cluster on network (cluster) ...
2017-08-03 10:04:18 PM clusterdock.models INFO Starting node node-1.cluster ...
2017-08-03 10:04:19 PM clusterdock.models INFO Starting node node-2.cluster ...
2017-08-03 10:04:20 PM clusterdock.models INFO Cluster started successfully (total time: 00:00:01.621).

To SSH into a node and look around:

.. code-block:: console

$ clusterdock ssh node-1.cluster
[root@node-1 ~]# ls -l / | head
total 64
dr-xr-xr-x 1 root root 4096 May 19 20:48 bin
drwxr-xr-x 5 root root 360 Aug 4 05:04 dev
drwxr-xr-x 1 root root 4096 Aug 4 05:04 etc
drwxr-xr-x 2 root root 4096 Sep 23 2011 home
dr-xr-xr-x 7 root root 4096 Mar 4 2015 lib
dr-xr-xr-x 1 root root 4096 May 19 20:48 lib64
drwx------ 2 root root 4096 Mar 4 2015 lost+found
drwxr-xr-x 2 root root 4096 Sep 23 2011 media
drwxr-xr-x 2 root root 4096 Sep 23 2011 mnt
[root@node-1 ~]# exit

To see the complete usage message for the topology:

.. code-block:: console

$ clusterdock start topology_nodebase -h
usage: clusterdock start [-h] [--node-disks map] [--always-pull]
[--namespace ns] [--network nw] [-o sys] [-r url]
[--nodes node [node ...]]
topology

Start a nodebase cluster

positional arguments:
topology A clusterdock topology directory

optional arguments:
-h, --help show this help message and exit
--always-pull Pull latest images, even if they're available locally
(default: False)
--namespace ns Namespace to use when looking for images (default:
clusterdock)
--network nw Docker network to use (default: cluster)
-o sys, --operating-system sys
Operating system to use for cluster nodes (default:
centos6.6)
-r url, --registry url
Docker Registry from which to pull images (default:
None)

nodebase arguments:
--node-disks map Map of node names to block devices (default: None)

Node groups:
--nodes node [node ...]
Nodes of the nodes group (default: ['node-1',
'node-2'])

When you're done and want to clean up:

.. code-block:: console

$ clusterdock manage nuke
2017-08-03 10:06:28 PM clusterdock.actions.manage INFO Stopping and removing all containers ...
2017-08-03 10:06:30 PM clusterdock.actions.manage INFO Removing all user-defined networks ...


=======
History
=======

1.0.2 (2017-08-04)
------------------

* Updated how Cluster and Node objects are initialized.
* Added project logo.
* Doc improvements.

1.0.1 (2017-08-03)
------------------

* First release on PyPI.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

clusterdock-1.0.2.tar.gz (31.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

clusterdock-1.0.2-py2.py3-none-any.whl (19.1 kB view details)

Uploaded Python 2Python 3

File details

Details for the file clusterdock-1.0.2.tar.gz.

File metadata

  • Download URL: clusterdock-1.0.2.tar.gz
  • Upload date:
  • Size: 31.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for clusterdock-1.0.2.tar.gz
Algorithm Hash digest
SHA256 2a57e69d274dcfce1ab699fb2c912db8505ba4dc4ec0cd1328137cb40b039c88
MD5 1d7da8b8731efe8043ab4832bcd1287a
BLAKE2b-256 cf7ebeafc9a70f01b731b1d390ada25136b09b1d7fcaa45488035052dd8ea056

See more details on using hashes here.

File details

Details for the file clusterdock-1.0.2-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for clusterdock-1.0.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 8a8077735dab168aae0a86ebb07b7d7b0476166e8a2931d3ae1389e3d585e43e
MD5 efa768fb09bed8040c6a01c1ae8ecee4
BLAKE2b-256 a42508a99b806dacd62362ed7a5959c75603c2974b723c3bf07ed9cbbdc9a91e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page