Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
configuration
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
edx
configuration
Commits
00c06102
Commit
00c06102
authored
Oct 21, 2013
by
Feanil Patel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move mongo tasks to the mongo role.
parent
342941d5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
65 deletions
+35
-65
playbooks/roles/edxlocal/tasks/main.yml
+0
-54
playbooks/roles/mongo/defaults/main.yml
+8
-3
playbooks/roles/mongo/tasks/main.yml
+27
-8
No files found.
playbooks/roles/edxlocal/tasks/main.yml
View file @
00c06102
...
...
@@ -13,13 +13,6 @@
-
name
:
edxlocal| install packages needed for single server
apt
:
pkg={{','.join(edxlocal_debian_pkgs)}} install_recommends=yes state=present
-
name
:
edxlocal | install python pymongo for mongo_user ansible module
pip
:
>
name=pymongo
state=present
version=2.6.3
extra_args="-i {{ PYPI_MIRROR_URL }}"
-
name
:
edxlocal | create a database for edxapp
mysql_db
:
>
db=edxapp
...
...
@@ -38,52 +31,5 @@
state=present
encoding=utf8
-
name
:
edxlocal | add the mongodb signing key
apt_key
:
>
id=7F0CEB10
url=http://docs.mongodb.org/10gen-gpg-key.asc
state=present
-
name
:
edxlocal | add the mongodb repo to the sources list
apt_repository
:
>
repo='deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen'
state=present
-
name
:
edxlocal | install mongo server and recommends
apt
:
>
pkg=mongodb-10gen
state=present
install_recommends=yes
update_cache=yes
-
name
:
edxlocal | stop mongo service
service
:
name=mongodb state=stopped
-
name
:
edxlocal | move mongodb to {{ storage_base_dir }}
command
:
mv /var/lib/mongodb {{ storage_base_dir }}/. creates={{ storage_base_dir }}/mongodb
-
name
:
edxlocal | create mongodb symlink
file
:
src={{ storage_base_dir }}/mongodb dest=/var/lib/mongodb state=link
-
name
:
edxlocal | start mongo service
service
:
name=mongodb state=started
-
name
:
edxlocal | wait for mongo server to start
wait_for
:
port=27017 delay=2
-
name
:
edxlocal | create a mongodb user for edxapp
mongodb_user
:
>
database=edxapp
name=edxapp
password=password
state=present
-
name
:
edxlocal | create a mongodb user for forums
mongodb_user
:
>
database=cs_comments_service
name=cs_comments_service
password=password
state=present
-
name
:
edxlocal | install memcached
apt
:
pkg=memcached state=present
playbooks/roles/mongo/defaults/main.yml
View file @
00c06102
cs_comments_mongo_user
:
cs_comments_service
cs_comments_mongo_password
:
password
cs_comments_database
:
cs_comments_service
mongo_dbpath
:
/var/lib/mongodb
mongo_logpath
:
/var/log/mongodb/mongodb.log
mongo_logappend
:
true
mongo_bind_ip
:
127.0.0.1
mongo_extra_conf
:
'
'
MONGO_USERS
:
-
user
:
cs_comments_service
password
:
password
database
:
cs_comments_service
-
user
:
exdapp
password
:
password
database
:
edxapp
playbooks/roles/mongo/tasks/main.yml
View file @
00c06102
---
-
name
:
mongo | install python-pymongo (req for ansible)
pip
:
name=pymongo
-
name
:
edxlocal | install python pymongo for mongo_user ansible module
pip
:
>
name=pymongo
state=present
version=2.6.3
extra_args="-i {{ PYPI_MIRROR_URL }}"
tags
:
mongo
-
name
:
mongo | install mongo server and recommends
apt
:
pkg=mongodb-server state=present install_recommends=yes
tags
:
mongo
-
name
:
edxlocal | add the mongodb signing key
apt_key
:
>
id=7F0CEB10
url=http://docs.mongodb.org/10gen-gpg-key.asc
state=present
-
name
:
edxlocal | add the mongodb repo to the sources list
apt_repository
:
>
repo='deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen'
state=present
-
name
:
edxlocal | install mongo server and recommends
apt
:
>
pkg=mongodb-10gen
state=present
install_recommends=yes
update_cache=yes
-
name
:
mongo | stop mongo service
service
:
name=mongodb state=stopped
...
...
@@ -35,8 +53,9 @@
-
name
:
mongo | create a mongodb user
mongodb_user
:
>
database={{
cs_comments_
database }}
name={{
cs_comments_mongo_
user }}
password={{
cs_comments_mongo_
password }}
database={{ database }}
name={{ user }}
password={{ password }}
state=present
with_items
:
{{
MONGO_USERS
}}
tags
:
mongo
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