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
276cd811
Commit
276cd811
authored
Sep 24, 2013
by
Sef Kloninger
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #275 from edx/sef/notifier-west
Notifier install fixes / seen while installing at Stanford
parents
0823ff88
d9f4c00a
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
50 additions
and
93 deletions
+50
-93
playbooks/edx-west/carnegie-prod-app.yml
+1
-4
playbooks/edx-west/prod-worker.yml
+17
-1
playbooks/edx-west/stage-worker.yml
+18
-0
playbooks/roles/notifier/defaults/main.yml
+2
-0
playbooks/roles/notifier/files/git_ssh.sh
+0
-2
playbooks/roles/notifier/files/opt/notifier/bin/forums_digest.sh
+0
-8
playbooks/roles/notifier/tasks/deploy.yml
+7
-60
playbooks/roles/notifier/tasks/main.yml
+5
-18
No files found.
playbooks/edx-west/carnegie-prod-app.yml
View file @
276cd811
# we never want to migrate from these machines, so note no vars_prompt
# section like other appservers
-
hosts
:
~tag_Name_app(10|20)_carn
-
hosts
:
~tag_Name_app(10|20)_carn
sudo
:
True
sudo
:
True
vars_prompt
:
vars_prompt
:
...
@@ -9,7 +6,7 @@
...
@@ -9,7 +6,7 @@
default
:
"
no"
default
:
"
no"
private
:
no
private
:
no
vars
:
vars
:
secure_dir
:
'
../../../
edx-secret
/ansible'
secure_dir
:
'
../../../
configuration-secure
/ansible'
# this indicates the path to site-specific (with precedence)
# this indicates the path to site-specific (with precedence)
# things like nginx template files
# things like nginx template files
#local_dir: '../../../edx-secret/ansible/local'
#local_dir: '../../../edx-secret/ansible/local'
...
...
playbooks/edx-west/prod-worker.yml
View file @
276cd811
#
this gets all running prod webserver
s
#
For all util machine
s
-
hosts
:
tag_environment_prod:&tag_function_util
-
hosts
:
tag_environment_prod:&tag_function_util
# or we can get subsets of them by name
# or we can get subsets of them by name
#- hosts: ~tag_Name_util(1|2)_prod
#- hosts: ~tag_Name_util(1|2)_prod
...
@@ -17,3 +17,19 @@
...
@@ -17,3 +17,19 @@
roles
:
roles
:
-
common
-
common
-
{
role
:
'
edxapp'
,
celery_worker
:
True
}
-
{
role
:
'
edxapp'
,
celery_worker
:
True
}
# run the notifier on the first util machine only
-
hosts
:
~tag_Name_util10_prod
sudo
:
True
vars
:
secure_dir
:
'
../../../configuration-secure/ansible'
migrate_db
:
"
no"
vars_files
:
-
"
{{
secure_dir
}}/vars/edxapp_prod_vars.yml"
-
"
{{
secure_dir
}}/vars/notifier_prod_vars.yml"
roles
:
-
role
:
virtualenv
virtualenv_user
:
"
notifier"
virtualenv_user_home
:
"
/opt/wwc/notifier"
virtualenv_name
:
"
notifier"
-
notifier
playbooks/edx-west/stage-worker.yml
View file @
276cd811
...
@@ -5,6 +5,8 @@
...
@@ -5,6 +5,8 @@
sudo
:
True
sudo
:
True
vars
:
vars
:
secure_dir
:
../../../edx-secret/ansible
secure_dir
:
../../../edx-secret/ansible
# this indicates the path to site-specific (with precedence)
# things like nginx template files
local_dir
:
../../../edx-secret/ansible/local
local_dir
:
../../../edx-secret/ansible/local
migrate_db
:
"
no"
migrate_db
:
"
no"
vars_files
:
vars_files
:
...
@@ -14,3 +16,19 @@
...
@@ -14,3 +16,19 @@
roles
:
roles
:
-
common
-
common
-
{
role
:
'
edxapp'
,
celery_worker
:
True
}
-
{
role
:
'
edxapp'
,
celery_worker
:
True
}
# run the notifier on the first util machine only
-
hosts
:
~tag_Name_util10_stage
sudo
:
True
vars
:
secure_dir
:
'
../../../configuration-secure/ansible'
migrate_db
:
"
no"
vars_files
:
-
"
{{
secure_dir
}}/vars/edxapp_stage_vars.yml"
-
"
{{
secure_dir
}}/vars/notifier_stage_vars.yml"
roles
:
-
role
:
virtualenv
virtualenv_user
:
"
notifier"
virtualenv_user_home
:
"
/opt/wwc/notifier"
virtualenv_name
:
"
notifier"
-
notifier
playbooks/roles/notifier/defaults/main.yml
View file @
276cd811
...
@@ -41,6 +41,8 @@ notifier_supervisor_log_dest: "/mnt/logs/supervisor"
...
@@ -41,6 +41,8 @@ notifier_supervisor_log_dest: "/mnt/logs/supervisor"
notifer_requests_ca_bundle
:
"
/etc/ssl/certs/ca-certificates.crt"
notifer_requests_ca_bundle
:
"
/etc/ssl/certs/ca-certificates.crt"
notifier_dd_api_key
:
"
NOT_USED"
# data dog
notifier_debian_pkgs
:
notifier_debian_pkgs
:
-
apparmor-utils
-
apparmor-utils
-
build-essential
-
build-essential
...
...
playbooks/roles/notifier/files/git_ssh.sh
deleted
100644 → 0
View file @
0823ff88
#!/bin/sh
exec
/usr/bin/ssh
-o
StrictHostKeyChecking
=
no
-i
/etc/git-identity
"
$@
"
playbooks/roles/notifier/files/opt/notifier/bin/forums_digest.sh
deleted
100644 → 0
View file @
0823ff88
#!/bin/bash
.
$HOME
/.bashrc
minutes
=
$1
digest_date
=
`
date
--utc
'+%Y-%m-%dT%H:%MZ'
`
cd
/opt/wwc/notifier/src
&&
/opt/wwc/notifier/virtualenvs/notifier/bin/python /opt/wwc/notifier/src/manage.py forums_digest
--to_datetime
=
${
digest_date
}
--minutes
=
${
minutes
}
playbooks/roles/notifier/tasks/deploy.yml
View file @
276cd811
#
---
# TODO: Needed while this repo is private
-
name
:
notifier | stop notifier-celery-beat
#
supervisorctl
:
name=notifier-celery-beat state=restarted
-
name
:
notifier | upload ssh script
ignore_errors
:
yes
copy
:
src=git_ssh.sh dest=/tmp/git_ssh.sh
force=yes owner=root group=adm mode=750
notify
:
-
notifier | restart notifier
tags
:
-
notifier
-
deploy
-
install
-
update
#
# TODO: Needed while this repo is private
#
-
name
:
notifier | install read-only ssh key required for checkout
copy
:
src={{ notifier_git_identity_path }} dest=/etc/git-identity
force=yes owner=ubuntu group=adm mode=60
tags
:
-
notifier
-
deploy
-
install
-
update
-
name
:
notifier | stop notifier-scheduler
supervisorctl
:
name=notifier-scheduler state=restarted
-
name
:
notifier | stop notifier-celery-workers
-
name
:
notifier | stop notifier-celery-workers
supervisorctl
:
name=notifier-celery-workers state=restarted
supervisorctl
:
name=notifier-celery-workers state=restarted
ignore_errors
:
yes
-
name
:
notifier | checkout code
-
name
:
notifier | checkout code
git
:
git
:
dest={{ notifier_code_dir }} repo={{ notifier_source_repo }}
dest={{ notifier_code_dir }} repo={{ notifier_source_repo }}
version={{ notifier_version }}
version={{ notifier_version }}
environment
:
GIT_SSH
:
/tmp/git_ssh.sh
notify
:
notify
:
-
notifier | restart notifier
-
notifier | restart notifier
tags
:
tags
:
...
@@ -46,35 +19,9 @@
...
@@ -46,35 +19,9 @@
-
install
-
install
-
update
-
update
#
-
name
:
notifier | source repo group perms
# TODO: Needed while this repo is private
#
-
name
:
notifier | update src permissions
file
:
file
:
path={{ notifier_code_dir }} state=directory owner={{ notifier_user }}
path={{ notifier_source_repo }} mode=2775 state=directory
group={{ notifier_user }} mode=2750 recurse=yes
tags
:
-
notifier
-
deploy
-
install
-
update
#
# TODO: Needed while this repo is private
#
-
name
:
notifier | remove read-only ssh key for the content repo
file
:
path=/etc/git-identity state=absent
tags
:
-
notifier
-
deploy
-
install
-
update
#
# TODO: Needed while this repo is private
#
-
name
:
notifier | remove ssh script
file
:
path=/tmp/git_ssh.sh state=absent
tags
:
tags
:
-
notifier
-
notifier
-
deploy
-
deploy
...
...
playbooks/roles/notifier/tasks/main.yml
View file @
276cd811
...
@@ -96,7 +96,6 @@
...
@@ -96,7 +96,6 @@
owner={{ notifier_user }}
owner={{ notifier_user }}
group={{ notifier_user }}
group={{ notifier_user }}
-
name
:
notifier | ensure .bashrc exists
-
name
:
notifier | ensure .bashrc exists
shell
:
touch {{ notifier_home }}/.bashrc
shell
:
touch {{ notifier_home }}/.bashrc
sudo
:
true
sudo
:
true
...
@@ -126,16 +125,17 @@
...
@@ -126,16 +125,17 @@
-
install
-
install
-
update
-
update
-
name
:
notifier | create notifier/
bin
directory
-
name
:
notifier | create notifier/
db
directory
file
:
file
:
path="{{ notifier_home }}/
bin
" mode=2775 state=directory
path="{{ notifier_home }}/
db
" mode=2775 state=directory
tags
:
tags
:
-
notifier
-
notifier
-
install
-
install
-
update
-
update
-
name
:
notifier | make the script executable
-
name
:
notifier | create notifier/bin directory
file
:
path={{ notifier_home }}/bin/forums_digest.sh state=file mode=2755
file
:
path="{{ notifier_home }}/bin" mode=2775 state=directory
tags
:
tags
:
-
notifier
-
notifier
-
install
-
install
...
@@ -168,17 +168,4 @@
...
@@ -168,17 +168,4 @@
-
install
-
install
-
update
-
update
-
name
:
notifier | add cron job
cron
:
name="forums digest" hour={{ notifier_cron_hour }}
minute="{{ notifier_cron_minute }}" job="$HOME/forums_digest.sh 1440"
state="absent"
sudo
:
true
sudo_user
:
"
{{
notifier_user
}}"
tags
:
-
notifier
-
install
-
update
-
clean
-
include
:
deploy.yml
-
include
:
deploy.yml
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