Create and start Docker containers
Use the following information to create DataStax Enterprise (DSE) server, DSE OpsCenter, and DataStax Studio containers in production and non-production environments.
Prerequisites
-
Download and install Docker CE/EE 17.03 or later. Supported platforms include Linux, macOS, and Windows.
-
Download the DataStax Docker images from Docker Hub.
Create a DataStax Enterprise (DSE) container
Create a DSE server container without advanced workloads:
docker run -e DS_LICENSE=accept --name my-dse \
-d cr.dtsx.io/datastax/dse-server:DSE_VERSION
For a list of required arguments and common options for DataStax containers, see Docker run options.
For a full list of options to run a command in a new container, see the docker run command reference.
Enable advanced functionality
By default, the DSE server image is configured as a transactional (database) node.
To configure the node with DSE advanced workloads, add the corresponding option that enables the intended feature to the end of the docker run
command.
Combine startup options to enable multiple advanced workloads.
Option | Description |
---|---|
|
Enable and start DSE Graph. |
|
Enable and start DSE Analytics. |
|
Enable and start DSE Search. |
Create a DSE server container with Graph enabled:
docker run -e DS_LICENSE=accept --name my-dse -d cr.dtsx.io/datastax/dse-server:DSE_VERSION -g
Create a DSE server container with Analytics enabled:
docker run -e DS_LICENSE=accept --name my-dse \
-d cr.dtsx.io/datastax/dse-server:DSE_VERSION -k
Create a DSE server container with Search enabled:
docker run -e DS_LICENSE=accept --name my-dse \
-d cr.dtsx.io/datastax/dse-server:DSE_VERSION -s
Create a DSE server container with all advanced workloads enabled:
docker run -e DS_LICENSE=accept --name my-dse -d cr.dtsx.io/datastax/dse-server:DSE_VERSION -g -k -s
Create an OpsCenter container
Create a DSE OpsCenter container and a connected DSE server container on the same Docker host.
For a list of required arguments and common options for DataStax containers, see Docker run options.
For a full list of options to run a command in a new container, see the docker run command reference.
-
Create an OpsCenter container:
docker run -e DS_LICENSE=accept -p 8888:8888 --name my-opscenter \ -d datastax/dse-opscenter
-
Create a DSE server container that is linked to the OpsCenter container:
docker run -e DS_LICENSE=accept --link my-opscenter:opscenter --name my-dse \ -d cr.dtsx.io/datastax/dse-server:DSE_VERSION
-
Get the DSE container IP address:
docker exec -it my-dse nodetool status
-
Open a browser and navigate to
http://DSE_CONTAINER_IP:8888
, whereDSE_CONTAINER_IP
is the IP address of the OpsCenter container. -
Click Manage existing cluster.
-
Enter the DSE container IP address in the host name field.
-
Click Install agents manually. The agent is already installed on the DSE image, so no installation is required.
OpsCenter is now ready to use with DSE.
Create a Studio container
Create a DataStax Studio container.
For a list of required arguments and common options for DataStax containers, see Docker run options.
For a full list of options to run a command in a new container, see the docker run command reference.
-
Create a Studio container, using
my-dse
as the hostname:docker run -e DS_LICENSE=accept \ -p 9091:9091 \ --link my-dse \ --name my-studio \ -d datastax/dse-studio
-
Open a browser and navigate to
http://STUDIO_CONTAINER_IP:9091
, whereSTUDIO_CONTAINER_IP
is the IP address of the container.
Studio is now ready to use with DSE.
Docker run options
The following options are the most commonly used when creating a DataStax container:
Option | Description | ||
---|---|---|---|
|
Recommended. Starts the container in the background. |
||
|
Required. Sets required and optional environment variables to accept the licensing agreement and change the initial configuration.
|
||
|
Publish container ports on the host to allow remote access to DSE, OpsCenter, and Studio. |
||
|
Bind mount a directory on the local host to a DSE Volume to manage configuration or preserve data. See Using the DSE configuration volume for more information. |
||
|
Link a DSE container to either OpsCenter or Studio.
For example, |
||
|
Assign a name to the container. |