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
02f25f61
Commit
02f25f61
authored
Jul 07, 2016
by
Arbab Nazar
Committed by
GitHub
Jul 07, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3219 from edx/arbab/go-server-rewrite
using proper YAML syntax
parents
7940b562
32eaf470
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
14 deletions
+18
-14
playbooks/roles/go-server/tasks/download_backup.yml
+9
-9
playbooks/roles/go-server/tasks/main.yml
+4
-1
playbooks/roles/go-server/tasks/restore_backup.yml
+2
-1
playbooks/roles/go-server/tasks/setup_regular_backup.yml
+3
-3
No files found.
playbooks/roles/go-server/tasks/download_backup.yml
View file @
02f25f61
...
...
@@ -33,7 +33,7 @@
-
name
:
install system packages needed for downloading backup
apt
:
pkg
:
"
{{
item
}}"
name
:
"
{{
item
}}"
state
:
present
update_cache
:
true
cache_valid_time
:
3600
...
...
@@ -52,19 +52,19 @@
mode
:
0755
-
name
:
get s3 one time url
s3
:
>
bucket
=
"{{ GO_SERVER_BACKUP_S3_BUCKET }}"
object
=
"{{ GO_SERVER_BACKUP_S3_OBJECT }}"
mode
=
"geturl"
expiration
=
30
s3
:
bucket
:
"
{{
GO_SERVER_BACKUP_S3_BUCKET
}}"
object
:
"
{{
GO_SERVER_BACKUP_S3_OBJECT
}}"
mode
:
"
geturl"
expiration
:
30
when
:
GO_SERVER_BACKUP_S3_BUCKET and GO_SERVER_BACKUP_S3_OBJECT
register
:
s3_one_time_url
-
name
:
download from one time url
get_url
:
url
=
"{{ s3_one_time_url.url }}"
dest
=
"{{ GO_SERVER_TEMP_RESTORE_DIRECTORY }}/{{ GO_SERVER_BACKUP_FILENAME }}"
mode
=0600
url
:
"
{{
s3_one_time_url.url
}}"
dest
:
"
{{
GO_SERVER_TEMP_RESTORE_DIRECTORY
}}/{{
GO_SERVER_BACKUP_FILENAME
}}"
mode
:
"
0600"
when
:
GO_SERVER_BACKUP_S3_BUCKET and GO_SERVER_BACKUP_S3_OBJECT
register
:
download_backup_s3
...
...
playbooks/roles/go-server/tasks/main.yml
View file @
02f25f61
...
...
@@ -33,19 +33,22 @@
-
name
:
install go-server aptitude repository
apt_repository
:
repo
:
"
{{
GO_SERVER_APT_SOURCE
}}"
state
:
present
-
name
:
install aptitude key for go-server/go-server
apt_key
:
url
:
"
{{
GO_SERVER_APT_KEY_URL
}}"
state
:
present
-
name
:
install go-server using apt-get
apt
:
name
:
"
{{
GO_SERVER_APT_NAME
}}={{
GO_SERVER_VERSION
}}"
update_cache
:
yes
state
:
present
-
name
:
install other needed system packages
apt
:
pkg
:
"
{{
item
}}"
name
:
"
{{
item
}}"
state
:
present
update_cache
:
true
cache_valid_time
:
3600
...
...
playbooks/roles/go-server/tasks/restore_backup.yml
View file @
02f25f61
...
...
@@ -27,7 +27,8 @@
#
-
name
:
check if H2 db exists
stat
:
"
path={{
GO_SERVER_H2DB_LOCATION
}}"
stat
:
path
:
"
{{
GO_SERVER_H2DB_LOCATION
}}"
register
:
h2db_stat
-
name
:
create the db backup directory
...
...
playbooks/roles/go-server/tasks/setup_regular_backup.yml
View file @
02f25f61
...
...
@@ -29,17 +29,17 @@
-
name
:
install required pkgs
apt
:
pkg
:
"
{{
item
}}"
name
:
"
{{
item
}}"
state
:
present
update_cache
:
true
cache_valid_time
:
3600
with_items
:
GO_SERVER_BACKUP_APT_PKGS
with_items
:
"
{{
GO_SERVER_BACKUP_APT_PKGS
}}"
-
name
:
install required Python modules
pip
:
name
:
"
{{
item
}}"
state
:
present
with_items
:
GO_SERVER_BACKUP_PIP_PKGS
with_items
:
"
{{
GO_SERVER_BACKUP_PIP_PKGS
}}"
-
name
:
create backup shell script
template
:
...
...
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