forked from singnet/das-poc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request singnet#125 from singnet/senna-fixes-6
Allow creation of couchbase and mono DBs dynamically
- Loading branch information
Showing
14 changed files
with
147 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
FROM couchbase | ||
|
||
ENV PATH="${PATH}:${COUCHBASE_SETUP_DIR}" | ||
COPY ./scripts/couchbase_bucket_setup.sh ${COUCHBASE_SETUP_DIR} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/bin/bash | ||
|
||
while true | ||
do | ||
count=`ls -1 /opt/couchbase_setup/new_das/*.das 2>/dev/null | wc -l` | ||
if [ $count != 0 ] | ||
then | ||
flist=`ls /opt/couchbase_setup/new_das/*.das` | ||
for path in $flist | ||
do | ||
fname=$(basename -- "$path") | ||
das="${fname%.*}" | ||
echo "Setting new Couchbase bucket to DAS '$das'" | ||
couchbase-cli \ | ||
bucket-create \ | ||
-c localhost:8091 \ | ||
-u "${DAS_DATABASE_USERNAME}" \ | ||
-p "${DAS_DATABASE_PASSWORD}" \ | ||
--bucket ${das} \ | ||
--bucket-type couchbase \ | ||
--bucket-ramsize "${DAS_COUCHBASE_BUCKET_RAMSIZE:-4086}" | ||
rm -f $path | ||
done | ||
fi | ||
sleep 1 | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
docker-compose -f docker-compose-service.yml down | ||
docker volume rm das_couchbasedata | ||
docker volume rm das_mongodbdata | ||
docker volume rm das_couchbasesetup |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,2 @@ | ||
unset DAS_MONGODB_HOSTNAME | ||
unset DAS_COUCHBASE_HOSTNAME | ||
docker volume rm das_couchbasedata >& /dev/null | ||
docker volume rm das_mongodbdata >& /dev/null | ||
docker-compose -f docker-compose-service.yml up --detach --no-build | ||
docker-compose -f docker-compose-service.yml up --detach | ||
./scripts/couchbase_setup.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters