Skip to content

Commit

Permalink
Fixed location of mutation scripts in migration docker and added flag…
Browse files Browse the repository at this point in the history
… to not use cache while refreshing cassandra
  • Loading branch information
abhishekjain88 committed Apr 11, 2017
1 parent 39db850 commit 490af79
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions bin/container.sh
Original file line number Diff line number Diff line change
Expand Up @@ -184,15 +184,15 @@ start_cassandra() {
IS_IMAGE_AVAILABLE=$?
if [ "${migration}" = true ] || ! [ ${IS_IMAGE_AVAILABLE} -eq 0 ]; then
echo "${green}${project}: [Start] Building wasabi keyspace image${reset}"
docker build -t wasabi-keyspace:latest -f "${CURRENT_DIR}/./docker/cqlsh.docker" "${CURRENT_DIR}/./docker/"
docker build --force-rm --no-cache -t wasabi-keyspace:latest -f "${CURRENT_DIR}/./docker/cqlsh.docker" "${CURRENT_DIR}/./docker/"
fi
docker run -it --rm -e CASSANDRA_KEYSPACE_PREFIX=${project} -e CQLSH_HOST=${project}-cassandra -e CASSANDRA_PORT=9042 --net=${docker_network} --name wasabi_create_keyspace wasabi-keyspace

docker inspect wasabi-migration >/dev/null 2>&1
IS_IMAGE_AVAILABLE=$?
if [ "${migration}" = true ] || ! [ ${IS_IMAGE_AVAILABLE} -eq 0 ]; then
echo "${green}${project}: [Start] Building wasabi migration image${reset}"
docker build -t wasabi-migration:latest -f "${CURRENT_DIR}/./docker/migration.docker" "${CURRENT_DIR}/../"
docker build --force-rm --no-cache -t wasabi-migration:latest -f "${CURRENT_DIR}/./docker/migration.docker" "${CURRENT_DIR}/../"
fi
docker run -it --rm -e CQLSH_HOST=${project}-cassandra -e CASSANDRA_PORT=9042 --net=${docker_network} --name wasabi_migration wasabi-migration
echo "${green}${project}: [DONE] creating keyspace and migration schemas${reset}"
Expand Down
2 changes: 1 addition & 1 deletion bin/docker/migration.docker
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM openjdk:jre-alpine


ADD https://oss.sonatype.org/content/repositories/public/com/builtamont/cassandra-migration/0.9/cassandra-migration-0.9-jar-with-dependencies.jar /wasabi/cassandra-migration.jar
ADD modules/repository-datastax/db/mutation /wasabi/mutation
ADD modules/repository-datastax/src/main/resources/com/intuit/wasabi/repository/impl/cassandra/migration /wasabi/mutation
ADD bin/docker/schema_migration.sh /wasabi/migration.sh

ENTRYPOINT ["/wasabi/migration.sh"]

0 comments on commit 490af79

Please sign in to comment.