Using Docker compose for automated provisioning

Deploy multiple Docker containers using a script.

Use Docker Compose to automate bootstrapping a multi-node cluster with DataStax Enterprise (DSE), DSE OpsCenter, and DataStax Studio. Use the following links to get sample compose.yml files for different tools and services.

Three node configuration

When creating multiple nodes, use the node parameter to bootstrap one node at a time. For example, the first node is node=0, the second node is node=1, and the third node is node=2.

Wait for each node to finish bootstrapping before running docker-compose for the next node.

docker-compose -f docker-compose.yml up -d --scale node=0
docker-compose -f docker-compose.yml up -d --scale node=1
docker-compose -f docker-compose.yml up -d --scale node=2

Three node configuration with OpsCenter

docker-compose -f docker-compose.yml -f docker-compose.opscenter.yml \
up -d --scale node=0
docker-compose -f docker-compose.yml up -d --scale node=1
docker-compose -f docker-compose.yml up -d --scale node=2

Three node configuration with OpsCenter and Studio

docker-compose -f docker-compose.yml -f docker-compose.opscenter.yml \
-f docker-compose.studio.yml up -d --scale node=0
docker-compose -f docker-compose.yml up -d --scale node=1
docker-compose -f docker-compose.yml up -d --scale node=2

Single node configuration with Studio

docker-compose -f docker-compose.yml -f docker-compose.studio.yml \
up -d --scale node=0

Single node configuration

To bootstrap a single-node cluster, use the docker run command and specify the version of DSE to install, plus any additional options.

docker run -e DS_LICENSE=accept -d datastax/dse-server:version \
options