Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
devstack
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
devstack
Commits
1ab0663c
Commit
1ab0663c
authored
Sep 12, 2017
by
Brian Beggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
move db provisioning to it's own script
parent
58306c11
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
21 deletions
+27
-21
provision-db.sh
+24
-0
provision.sh
+3
-21
No files found.
provision-db.sh
0 → 100755
View file @
1ab0663c
set
-e
set
-o
pipefail
set
-x
# Bring the databases online.
docker-compose up
-d
mysql mongo
# Ensure the MySQL server is online and usable
echo
"Waiting for MySQL"
until
docker
exec
-i
edx.devstack.mysql mysql
-uroot
-se
"SELECT EXISTS(SELECT 1 FROM mysql.user WHERE user = 'root')"
&> /dev/null
do
printf
"."
sleep 1
done
# In the event of a fresh MySQL container, wait a few seconds for the server to restart
# This can be removed once https://github.com/docker-library/mysql/issues/245 is resolved.
sleep 20
echo
-e
"MySQL ready"
echo
-e
"
${
GREEN
}
Creating databases and users...
${
NC
}
"
docker
exec
-i
edx.devstack.mysql mysql
-uroot
mysql < provision.sql
docker
exec
-i
edx.devstack.mongo mongo < mongo-provision.js
provision.sh
View file @
1ab0663c
...
@@ -17,29 +17,11 @@ GREEN='\033[0;32m'
...
@@ -17,29 +17,11 @@ GREEN='\033[0;32m'
YELLOW
=
'\033[0;33m'
YELLOW
=
'\033[0;33m'
NC
=
'\033[0m'
# No Color
NC
=
'\033[0m'
# No Color
# Bring the databases online.
# before provisioning steps
docker-compose up
-d
mysql mongo
./provision-db.sh
# Ensure the MySQL server is online and usable
echo
"Waiting for MySQL"
until
docker
exec
-i
edx.devstack.mysql mysql
-uroot
-se
"SELECT EXISTS(SELECT 1 FROM mysql.user WHERE user = 'root')"
&> /dev/null
do
printf
"."
sleep 1
done
# In the event of a fresh MySQL container, wait a few seconds for the server to restart
# This can be removed once https://github.com/docker-library/mysql/issues/245 is resolved.
sleep 20
echo
-e
"MySQL ready"
echo
-e
"
${
GREEN
}
Creating databases and users...
${
NC
}
"
docker
exec
-i
edx.devstack.mysql mysql
-uroot
mysql < provision.sql
docker
exec
-i
edx.devstack.mongo mongo < mongo-provision.js
# Provisioning steps
./provision-lms.sh
./provision-lms.sh
# Nothing special needed for studio
# Nothing special needed for studio
docker-compose
$DOCKER_COMPOSE_FILES
up
-d
studio
docker-compose
$DOCKER_COMPOSE_FILES
up
-d
studio
./provision-ecommerce.sh
./provision-ecommerce.sh
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment