Skip to content
Snippets Groups Projects
Commit 23f5a32a authored by Andrea Michelotti's avatar Andrea Michelotti
Browse files

initialize db

parent 066b7e8f
No related branches found
No related tags found
No related merge requests found
Pipeline #
......@@ -40,7 +40,7 @@ macosx_x86_64:
script:
- export CHAOS_LIVE_SERVERS=localhost
- export CHAOS_DB_SERVERS=localhost
- ./scripts/dbinit.sh localhost
- ./scripts/dbinit.sh localhost localhost
- curl http://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
- chmod +x ~/bin/repo
- ~/bin/repo init -u git@baltig.infn.it:chaos-lnf-control/chaos_repo_bundle.git -b $CI_COMMIT_REF_NAME
......@@ -70,7 +70,7 @@ ubuntu1604_x86_64:
image: baltig.infn.it:4567/amichelo/chaos_bundle_compilation:1604
script:
- scripts/dbinit.sh couchbase
- scripts/dbinit.sh couchbase mongo
- mkdir -p $INSTALL_DIR
- repo init -u git@baltig.infn.it:chaos-lnf-control/chaos_repo_bundle.git -b $CI_COMMIT_REF_NAME
- repo sync
......@@ -96,9 +96,9 @@ ubuntu1604_static_x86_64:
tags:
- chaos
stage: build
image: baltig.infn.it:4567/amichelo/chaos_bundle_compilation:1404
image: baltig.infn.it:4567/amichelo/chaos_bundle_compilation:1604
script:
- scripts/dbinit.sh couchbase
- scripts/dbinit.sh couchbase mongo
- mkdir -p $INSTALL_DIR
- repo init -u git@baltig.infn.it:chaos-lnf-control/chaos_repo_bundle.git -b $CI_COMMIT_REF_NAME
- repo sync
......@@ -127,7 +127,7 @@ ubuntu1404_x86_64:
alias: mongo
script:
- scripts/dbinit.sh couchbase
- scripts/dbinit.sh couchbase mongo
- mkdir -p $INSTALL_DIR
- repo init -u git@baltig.infn.it:chaos-lnf-control/chaos_repo_bundle.git -b $CI_COMMIT_REF_NAME
- repo sync
......
......@@ -3,5 +3,11 @@ echo "* init couchbase server $1"
curl -u Administrator:password -v -X POST http://$1:8091/node/controller/setupServices -d 'services=data'
curl -v -X POST http://$1:8091/settings/web -d 'password=chaos2015&username=Administrator&port=SAME'
curl -X POST -u Administrator:chaos2015 -d 'name=chaos' -d 'ramQuotaMB=512' -d 'authType=sasl' -d 'replicaNumber=0' -d 'saslPassword=chaos' http://$1:8091/pools/default/buckets
exit 0
mongo chaos --eval 'db.createUser({user:"chaos", pwd:"chaos", roles:[ { role: "readWrite", db: "chaos" } ]})'
echo "* init couchbase server $2"
mongo $2/chaos --eval 'db.dropUser("chaos")'
mongo --host $2 admin --eval 'var schema = db.system.version.findOne({"_id" : "authSchema"}); schema.currentVersion = 3 ; db.system.version.save(schema)'
mongo $2/chaos --eval 'db.createUser({user:"chaos", pwd:"chaos", roles:[ { role: "readWrite", db: "chaos" } ]})'
mongo %2/chaos --eval 'db.daq.createIndex({"ndk_uid" : 1, "dpck_ats":1,"data.dpck_seq_id":1}, {name:"paged_daq_search_index",unique:1})'
mongo --host $2 admin --eval 'db.system.users.find().pretty();'
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment