Skip to content

Commit

Permalink
Migrated mongodb and mysql containers to volume-less versions so that…
Browse files Browse the repository at this point in the history
… data contents are saved when checkpoints are performed.
  • Loading branch information
silvae86 committed May 6, 2018
1 parent f45b68e commit c034294
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 4 deletions.
5 changes: 5 additions & 0 deletions conf/scripts/docker/container_names.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,8 @@ ELASTICSEARCH_HOSTNAME="127.0.0.1"
VIRTUOSO_HOSTNAME="127.0.0.1"
MYSQL_HOSTNAME="127.0.0.1"
MONGODB_HOSTNAME="127.0.0.1"

ELASTICSEARCH_VERSION_AND_TAG="docker.elastic.co/elasticsearch/elasticsearch:6.2.2"
MONGODB_VERSION_AND_TAG="joaorosilva/mongodb:3.7-no-volumes"
MYSQL_VERSION_AND_TAG="joaorosilva/mysql:8.0-no-volumes"
VIRTUOSO_VERSION_AND_TAG="joaorosilva/virtuoso:7.2.4-for-dendro-0.3"
4 changes: 4 additions & 0 deletions conf/scripts/docker/create_checkpoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ docker exec "$VIRTUOSO_CONTAINER_NAME" /bin/bash -c "sync && /usr/local/virtuoso
docker commit -p "$VIRTUOSO_CONTAINER_NAME" "$VIRTUOSO_CONTAINER_NAME:dendro-tests_$CHECKPOINT_NAME"
# docker start "$VIRTUOSO_CONTAINER_NAME"


docker commit -p "$MYSQL_CONTAINER_NAME" "$MYSQL_CONTAINER_NAME:dendro-tests_$CHECKPOINT_NAME"

# Commit pending operations to hard drive and commit
docker exec "$MONGODB_CONTAINER_NAME" /bin/bash -c "mongo --eval \"db.adminCommand( { fsync: 1, async: true } )\""
docker commit -p "$MONGODB_CONTAINER_NAME" "$MONGODB_CONTAINER_NAME:dendro-tests_$CHECKPOINT_NAME"

echo "Checkpoint create script for checkpoint $CHECKPOINT_NAME finished."
8 changes: 4 additions & 4 deletions conf/scripts/docker/start_containers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ then
-e "transport.host=${ELASTICSEARCH_HOSTNAME}" \
--name="$ELASTICSEARCH_CONTAINER_NAME" \
--hostname="$ELASTICSEARCH_HOSTNAME" \
docker.elastic.co/elasticsearch/elasticsearch:6.2.2 > "$DIR/elasticsearch.log" &
"$ELASTICSEARCH_VERSION_AND_TAG" > "$DIR/elasticsearch.log" &

# -v "$RUNNING_FOLDER/elasticsearch:/usr/share/elasticsearch/data" \

Expand All @@ -98,7 +98,7 @@ then
-e "VIRT_Parameters_CheckpointSyncMode=2" \
--name="$VIRTUOSO_CONTAINER_NAME" \
--hostname="$VIRTUOSO_HOSTNAME" \
joaorosilva/virtuoso:7.2.4-for-dendro-0.3 > "$DIR/virtuoso.log" &
"$VIRTUOSO_VERSION_AND_TAG" > "$DIR/virtuoso.log" &


# -e "VIRT_Parameters_PageMapCheck=1" \
Expand Down Expand Up @@ -129,7 +129,7 @@ then
-e MYSQL_ROOT_PASSWORD=r00t \
--name="$MYSQL_CONTAINER_NAME" \
--hostname="$MYSQL_HOSTNAME" \
-d mysql:8.0.3 > "$DIR/mysql.log" &
"$MYSQL_VERSION_AND_TAG" > "$DIR/mysql.log" &

# -v "$RUNNING_FOLDER/mysql:/var/lib/mysql" \

Expand All @@ -151,7 +151,7 @@ then
-p 27017:27017 \
--name="$MONGODB_CONTAINER_NAME" \
--hostname="$MONGODB_HOSTNAME" \
-d mongo:3.4.10 > "$DIR/mongodb.log" &
"$MONGODB_VERSION_AND_TAG" > "$DIR/mongodb.log" &

# -v "$RUNNING_FOLDER/mongo:/data/db" \

Expand Down
9 changes: 9 additions & 0 deletions test/index.Test.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,15 @@ global.Config = Config;

global.tests = {};

// EDIT USERS
require(Pathfinder.absPathInTestsFolder("/routes/user/edit/routes.user.edit.Test.js"));
require(Pathfinder.absPathInTestsFolder("/routes/user_avatar/routes.user_avatar.Test.js"));
require(Pathfinder.absPathInTestsFolder("/routes/user/demouser1/avatar/routes.user.demouser1.avatar.Test.js"));
require(Pathfinder.absPathInTestsFolder("/routes/user/demouser2/avatar/routes.user.demouser2.avatar.Test.js"));
require(Pathfinder.absPathInTestsFolder("/routes/user/demouser3/avatar/routes.user.demouser3.avatar.Test.js"));

return;

require(Pathfinder.absPathInTestsFolder("/routes/project/metadata_only_project/data/testFolder1/__ls_by_name/routes.project.metadataOnlyProject.data.testFolder1.__ls_by_name.Test.js"));

// PRIVATE PROJECT FOLDER LEVEL ?metadata&deep
Expand Down

0 comments on commit c034294

Please sign in to comment.