Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/clusterdock/clusterdock
clusterdock is a framework for creating Docker-based container clusters
https://github.com/clusterdock/clusterdock
big-data docker hadoop
Last synced: about 2 months ago
JSON representation
clusterdock is a framework for creating Docker-based container clusters
- Host: GitHub
- URL: https://github.com/clusterdock/clusterdock
- Owner: clusterdock
- License: apache-2.0
- Created: 2016-10-18T21:56:48.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2023-05-16T18:05:45.000Z (over 1 year ago)
- Last Synced: 2024-10-01T15:39:51.756Z (3 months ago)
- Topics: big-data, docker, hadoop
- Language: Python
- Homepage: http://clusterdock.rtfd.io
- Size: 268 KB
- Stars: 29
- Watchers: 5
- Forks: 9
- Open Issues: 12
-
Metadata Files:
- Readme: README.rst
- Changelog: HISTORY.rst
- Contributing: CONTRIBUTING.rst
- License: LICENSE.txt
- Authors: AUTHORS.rst
Awesome Lists containing this project
- awesome-docker - clusterdock - Docker container orchestration to enable the testing of long-running cluster deployments (Container Operations / Orchestration)
- awesome-docker - clusterdock - Docker container orchestration to enable the testing of long-running cluster deployments (Container Operations / Orchestration)
README
===========
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 and install
clusterdock:.. code-block:: console
$ pip3 install clusterdock
Next, clone a clusterdock topology to your machine. For this example, we'll use the
`nodebase topology`_. 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 list cluster nodes:
.. code-block:: console
$ clusterdock ps
For cluster `famous_hyades` on network cluster the node(s) are:
CONTAINER ID HOST NAME PORTS STATUS CONTAINER NAME VERSION IMAGE
a205d88beb node-2.cluster running nervous_sinoussi 1.3.3 clusterdock/topology_nodebase:centos6.6
6f2825c596 node-1.cluster 8080->80/tcp running priceless_franklin 1.3.3 clusterdock/topology_nodebase:centos6.6To 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 ~]# exitTo see full usage instructions for the ``start`` action, use ``-h``/``--help``:
.. 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 ...]]
topologyStart a nodebase cluster
positional arguments:
topology A clusterdock topology directoryoptional 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 clusterdock containers ...
2017-08-03 10:06:30 PM clusterdock.actions.manage INFO Removed user-defined networks ...To see full usage instructions for the ``build`` action, use ``-h``/``--help``:
.. code-block:: console
$ clusterdock build topology_nodebase -h
usage: clusterdock build [--network nw] [-o sys] [--repository repo] [-h]
topologyBuild images for the nodebase topology
positional arguments:
topology A clusterdock topology directoryoptional arguments:
--network nw Docker network to use (default: cluster)
-o sys, --operating-system sys
Operating system to use for cluster nodes (default:
None)
--repository repo Docker repository to use for committing images
(default: docker.io/clusterdock)
-h, --help show this help message and exit