Skip to content

Commit

Permalink
Update docker instructions (#295)
Browse files Browse the repository at this point in the history
  • Loading branch information
begriffs committed Mar 1, 2017
1 parent b19fbfe commit 566ae14
Showing 1 changed file with 29 additions and 8 deletions.
37 changes: 29 additions & 8 deletions installation/single_machine_docker.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,44 @@ Docker

This section describes setting up a Citus cluster on a single machine using docker-compose.

**1. Install docker and docker-compose**
1. Install Docker Engine and docker-compose
-------------------------------------------

Follow the installation instructions for `Docker Engine <https://docs.docker.com/engine/installation/>`_ and `Docker Compose <https://docs.docker.com/compose/install/>`_ on your platform.
Mac
~~~

**2. Start the Citus Cluster**
* Install the `Docker Platform <https://www.docker.com/products/overview#/install_the_platform>`_.
* Start Docker by clicking on the application's icon.

Linux
~~~~~

.. code-block:: bash
curl -sSL https://get.docker.com/ | sudo bash
sudo usermod -aG docker $USER && newgrp docker
sudo systemctl start docker
sudo curl -L https://github.com/docker/compose/releases/download/1.11.1/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
(This docker-compose version is fine for running Citus, or you can install the latest version by following instructions `here <https://github.com/docker/compose/releases/latest>`_.)

2. Start the Citus Cluster
--------------------------

Citus uses docker-compose to run and connect containers holding the database master node, workers, and a persistent data volume. To create a local cluster download our docker-compose configuration file and run it

.. code-block:: bash
wget https://raw.githubusercontent.com/citusdata/docker/master/docker-compose.yml
curl -L https://raw.githubusercontent.com/citusdata/docker/master/docker-compose.yml > docker-compose.yml
docker-compose -p citus up -d
The first time you start the cluster it builds its containers. Subsequent startups take a matter of seconds.

.. note::

If you have PostgreSQL running on your machine you may encounter this error when starting the Docker containers:
If you already have PostgreSQL running on your machine you may encounter this error when starting the Docker containers:

.. code::
Expand All @@ -36,8 +56,8 @@ The first time you start the cluster it builds its containers. Subsequent startu
- ports: ['5432:5432']
+ ports: ['5433:5432']
**3. Verify that installation has succeeded**

3. Verify that installation has succeeded
-----------------------------------------

To verify that the installation has succeeded we check that the master node has picked up the desired worker configuration. First start the psql shell on the master node:

Expand All @@ -56,7 +76,8 @@ You should see a row for each worker node including the node name and port.
Once you have the cluster up and running, you can visit our :ref:`multi-tenant tutorial <multi_tenant_tutorial>` to
get started with a sample dataset on Citus in minutes.
**4. Shut down the cluster when ready**
4. Shut down the cluster when ready
-----------------------------------
When you wish to stop the docker containers, use docker-compose:
Expand Down

0 comments on commit 566ae14

Please sign in to comment.