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
5600334f
Commit
5600334f
authored
Dec 10, 2014
by
Carson Gee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reorder and use deploy.yml tasks
parent
c1840813
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
61 additions
and
67 deletions
+61
-67
playbooks/roles/gitreload/tasks/deploy.yml
+56
-0
playbooks/roles/gitreload/tasks/main.yml
+5
-67
No files found.
playbooks/roles/gitreload/tasks/deploy.yml
0 → 100644
View file @
5600334f
-
name
:
create ssh dir for the content repos key
file
:
path=~/.ssh state=directory mode=0700
sudo_user
:
"
{{
common_web_user
}}"
-
name
:
install ssh key for the content repos
copy
:
content="{{ GITRELOAD_GIT_IDENTITY }}" dest=~/.ssh/id_rsa mode=0600
sudo_user
:
"
{{
common_web_user
}}"
-
include
:
course_pull.yml
when
:
GITRELOAD_COURSE_CHECKOUT|bool
tags
:
course_pull
-
name
:
install gitreload
pip
:
>
name=git+{{ gitreload_repo }}@{{ gitreload_version }}#egg=gitreload
virtualenv={{ gitreload_venv }}
extra_args="--exists-action w"
sudo_user
:
"
{{
gitreload_user
}}"
notify
:
restart gitreload
-
name
:
copy configuration
template
:
src=edx/app/gitreload/gr.env.json.j2 dest={{ gitreload_dir }}/gr.env.json
sudo_user
:
"
{{
gitreload_user
}}"
notify
:
restart gitreload
-
name
:
"
writing
supervisor
script"
template
:
>
src=edx/app/supervisor/conf.available.d/gitreload.conf.j2 dest={{ supervisor_available_dir }}/gitreload.conf
owner={{ supervisor_user }} group={{ common_web_user }} mode=0644
-
name
:
"
enable
supervisor
script"
file
:
>
src={{ supervisor_available_dir }}/gitreload.conf
dest={{ supervisor_cfg_dir }}/gitreload.conf
owner={{ supervisor_user }} group={{ common_web_user }} mode=0644
state=link force=yes
when
:
not disable_edx_services
# call supervisorctl update. this reloads
# the supervisorctl config and restarts
# the services if any of the configurations
# have changed.
#
-
name
:
update supervisor configuration
shell
:
"
{{
supervisor_ctl
}}
-c
{{
supervisor_cfg
}}
update"
register
:
supervisor_update
changed_when
:
supervisor_update.stdout is defined and supervisor_update.stdout != ""
when
:
not disable_edx_services
-
name
:
ensure gitreload is started
supervisorctl_local
:
>
name=gitreload
supervisorctl_path={{ supervisor_ctl }}
config={{ supervisor_cfg }}
state=started
when
:
not disable_edx_services
playbooks/roles/gitreload/tasks/main.yml
View file @
5600334f
...
...
@@ -33,6 +33,9 @@
# grab edxapp vars without being dependent on its tasks
-
include_vars
:
../../edxapp/defaults/main.yml
tags
:
-
course_pull
-
deploy
-
name
:
create gitreload user
user
:
>
...
...
@@ -55,18 +58,6 @@
owner={{ common_web_user }}
group={{ common_web_group }}
-
name
:
create ssh dir for the content repos key
file
:
path=~/.ssh state=directory mode=0700
sudo_user
:
"
{{
common_web_user
}}"
tags
:
-
deploy
-
name
:
install ssh key for the content repos
copy
:
content="{{ GITRELOAD_GIT_IDENTITY }}" dest=~/.ssh/id_rsa mode=0600
sudo_user
:
"
{{
common_web_user
}}"
tags
:
-
deploy
-
name
:
grab ssh host keys
shell
:
ssh-keyscan {{ item }}
sudo_user
:
"
{{
common_web_user
}}"
...
...
@@ -81,61 +72,6 @@
sudo_user
:
"
{{
common_web_user
}}"
with_items
:
gitreload_repo_host_keys.results
-
name
:
install gitreload
pip
:
>
name=git+{{ gitreload_repo }}@{{ gitreload_version }}#egg=gitreload
virtualenv={{ gitreload_venv }}
extra_args="--exists-action w"
sudo_user
:
"
{{
gitreload_user
}}"
notify
:
restart gitreload
tags
:
-
deploy
-
name
:
copy configuration
template
:
src=edx/app/gitreload/gr.env.json.j2 dest={{ gitreload_dir }}/gr.env.json
sudo_user
:
"
{{
gitreload_user
}}"
notify
:
restart gitreload
tags
:
-
deploy
-
include
:
course_pull.yml
when
:
GITRELOAD_COURSE_CHECKOUT|bool
tags
:
course_pull
-
name
:
"
writing
supervisor
script"
template
:
>
src=edx/app/supervisor/conf.available.d/gitreload.conf.j2 dest={{ supervisor_available_dir }}/gitreload.conf
owner={{ supervisor_user }} group={{ common_web_user }} mode=0644
-
name
:
"
enable
supervisor
script"
file
:
>
src={{ supervisor_available_dir }}/gitreload.conf
dest={{ supervisor_cfg_dir }}/gitreload.conf
owner={{ supervisor_user }} group={{ common_web_user }} mode=0644
state=link force=yes
when
:
not disable_edx_services
# call supervisorctl update. this reloads
# the supervisorctl config and restarts
# the services if any of the configurations
# have changed.
#
-
name
:
update supervisor configuration
shell
:
"
{{
supervisor_ctl
}}
-c
{{
supervisor_cfg
}}
update"
register
:
supervisor_update
changed_when
:
supervisor_update.stdout is defined and supervisor_update.stdout != ""
when
:
not disable_edx_services
-
name
:
ensure gitreload is started
supervisorctl_local
:
>
name=gitreload
supervisorctl_path={{ supervisor_ctl }}
config={{ supervisor_cfg }}
state=started
when
:
not disable_edx_services
tags
:
-
deploy
-
name
:
create a symlink for venv python
file
:
>
src="{{ gitreload_venv_bin }}/{{ item }}"
...
...
@@ -144,3 +80,5 @@
with_items
:
-
python
-
pip
-
include
:
deploy.yml tags=deploy
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