Skip to content
This repository has been archived by the owner on Mar 11, 2020. It is now read-only.

Migrating to official DataStax Docker images #1

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
FROM luketillman/datastax-enterprise:5.1.0
FROM store/datastax/dse-server:5.1.4

# Copy schema files into /opt/killrvideo-data
COPY [ "lib/killrvideo-data/graph/killrvideo_video_recommendations_schema.groovy", "lib/killrvideo-data/schema.cql", "lib/killrvideo-data/search/*.xml", "keyspace.cql", "/opt/killrvideo-data/" ]

# Copy bootstrap script(s) and make executable
# Copy bootstrap script(s)
COPY [ "bootstrap-external-cluster.sh", "lib/wait-for-it/wait-for-it.sh", "/" ]
RUN chmod +x /bootstrap-external-cluster.sh /wait-for-it.sh

# Set the entrypoint to the bootstrap script
ENTRYPOINT [ "/bootstrap-external-cluster.sh" ]
4 changes: 2 additions & 2 deletions bootstrap-external-cluster.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ echo '=> Spoofing DSE Graph in ETCD'
curl http://$KILLRVIDEO_DOCKER_IP:2379/v2/keys/killrvideo/services/$SERVICE_8182_NAME/external_cluster -XPUT -d value="$EXTERNAL_CLUSTER_IP:8182"

# See if we've already completed bootstrapping
if [ ! -f /killrvideo_bootstrapped ]; then
if [ ! -f killrvideo_bootstrapped ]; then
echo 'Setting up KillrVideo on EXTERNAL cluster'

# Wait for port 9042 (CQL) to be ready for up to 120 seconds
Expand Down Expand Up @@ -78,7 +78,7 @@ curl http://$KILLRVIDEO_DOCKER_IP:2379/v2/keys/killrvideo/services/$SERVICE_8182
dse gremlin-console -e /opt/killrvideo-data/killrvideo_video_recommendations_schema.groovy

# Don't bootstrap next time we start
touch /killrvideo_bootstrapped
touch killrvideo_bootstrapped

# Now allow DSE to start normally below
echo 'KillrVideo has been setup, EXTERNAL DSE cluster ready to go'
Expand Down
2 changes: 1 addition & 1 deletion build/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
DOCKER_BUILD_TAG=3.0.0
DOCKER_BUILD_TAG=4.0.0