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
0d4b1063
Commit
0d4b1063
authored
Oct 15, 2015
by
Kevin Falcone
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2360 from edx/jibsheet/tag-reporting-role
Refactoring and cleanups that resulted from DEVOPS-3068
parents
d4516917
1a41effe
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
65 additions
and
24 deletions
+65
-24
playbooks/roles/ad_hoc_reporting/defaults/main.yml
+5
-2
playbooks/roles/ad_hoc_reporting/tasks/main.yml
+60
-22
No files found.
playbooks/roles/ad_hoc_reporting/defaults/main.yml
View file @
0d4b1063
...
...
@@ -35,9 +35,12 @@ ad_hoc_reporting_debian_pkgs:
# includes mysqldump and others
-
mysql-client
-
libmysqlclient-dev
# for connecting to mongo
-
mongodb-clients
# mongo client is installed as a separate step so it comes from the 10gen repo
ad_hoc_reporting_pip_pkgs
:
# for running ansible mysql
-
mysql-python
MONGODB_APT_KEY
:
"
http://docs.mongodb.org/10gen-gpg-key.asc"
MONGODB_REPO
:
"
deb
http://downloads-distro.mongodb.org/repo/ubuntu-upstart
dist
10gen"
mongo_version
:
3.0.7
playbooks/roles/ad_hoc_reporting/tasks/main.yml
View file @
0d4b1063
...
...
@@ -21,28 +21,59 @@
# - user
-
name
:
install system packages
apt
:
>
pkg
={{ item }}
state
=
present
apt
:
pkg
:
"
{{
item
}}"
state
:
present
with_items
:
ad_hoc_reporting_debian_pkgs
tags
:
-
install:system-requirements
-
name
:
add the mongodb signing key
apt_key
:
id
:
7F0CEB10
url
:
"
{{
MONGODB_APT_KEY
}}"
state
:
present
tags
:
-
install:system-requirements
-
name
:
add the mongodb repo to the sources list
apt_repository
:
repo
:
"
{{
MONGODB_REPO
}}"
state
:
present
tags
:
-
install:system-requirements
-
name
:
install mongo shell
apt
:
pkg
:
mongodb-org-shell={{ mongo_version }}
state
:
present
install_recommends
:
yes
force
:
yes
update_cache
:
yes
tags
:
-
install:system-requirements
-
name
:
install python packages
pip
:
>
name="{{ item }}" state=present
extra_args="-i {{ COMMON_PYPI_MIRROR_URL }}"
pip
:
name
:
"
{{
item
}}"
state
:
present
extra_args
:
"
-i
{{
COMMON_PYPI_MIRROR_URL
}}"
with_items
:
ad_hoc_reporting_pip_pkgs
tags
:
-
install:app-requirements
-
name
:
create directories
file
:
>
path
=
"{{ item }}"
state
=
directory
owner
=
root
group
=
root
mode
=
0755
file
:
path
:
"
{{
item
}}"
state
:
directory
owner
:
root
group
:
root
mode
:
0755
with_items
:
-
/edx/bin
tags
:
-
scripts
-
install:base
#These templates rely on there being a global
# read_only mysql user, you must override the default
...
...
@@ -50,13 +81,17 @@
#Also, all of the *_REPLICA_DB_HOST vars are only defined
# in secure config files.
-
name
:
install common mysql replica scripts
template
:
>
src=edx/bin/mysql.sh.j2
dest=/edx/bin/{{ COMMON_ENVIRONMENT }}-{{ COMMON_DEPLOYMENT }}-{{ item.script_name }}
mode=0755 owner=root group=root
template
:
src
:
edx/bin/mysql.sh.j2
dest
:
/edx/bin/{{ COMMON_ENVIRONMENT }}-{{ COMMON_DEPLOYMENT }}-{{ item.script_name }}
mode
:
0755
owner
:
root
group
:
root
when
:
COMMON_MYSQL_READ_ONLY_PASS is defined and item.depends_on
tags
:
-
scripts
-
scripts:mysql
-
install:code
with_items
:
-
db_host
:
"
{{
EDXAPP_MYSQL_REPLICA_HOST
}}"
db_name
:
"
{{
EDXAPP_MYSQL_DB_NAME
}}"
...
...
@@ -93,10 +128,12 @@
# read_only mongo user, you must override the default
# in order for these templates to be written out
-
name
:
install mongodb replica scripts
template
:
>
src=edx/bin/mongo.sh.j2
dest=/edx/bin/{{ COMMON_ENVIRONMENT }}-{{ COMMON_DEPLOYMENT }}-{{ item.script_name }}
mode=0755 owner=root group=root
template
:
src
:
edx/bin/mongo.sh.j2
dest
:
/edx/bin/{{ COMMON_ENVIRONMENT }}-{{ COMMON_DEPLOYMENT }}-{{ item.script_name }}
mode
:
0755
owner
:
root
group
:
root
with_items
:
-
db_hosts
:
"
{{
EDXAPP_MONGO_HOSTS
}}"
db_name
:
"
{{
EDXAPP_MONGO_DB_NAME
}}"
...
...
@@ -108,4 +145,6 @@
script_name
:
forum-mongo.sh
when
:
COMMON_MONGO_READ_ONLY_PASS is defined
tags
:
-
scripts
\ No newline at end of file
-
scripts
-
scripts:mongo
-
install:code
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