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
ef987361
Commit
ef987361
authored
Aug 19, 2014
by
John Jarvis
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1439 from edx/jarv/fix-log-sync
updates to syncing s3 logs and cron jobs
parents
c0854a19
3f7c256c
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
24 additions
and
14 deletions
+24
-14
playbooks/roles/aws/defaults/main.yml
+2
-2
playbooks/roles/aws/tasks/main.yml
+11
-10
playbooks/roles/aws/templates/etc/init/sync-on-stop.conf.j2
+5
-0
playbooks/roles/aws/templates/send-logs-to-s3.j2
+4
-0
playbooks/roles/rabbitmq/tasks/main.yml
+2
-2
No files found.
playbooks/roles/aws/defaults/main.yml
View file @
ef987361
...
...
@@ -27,12 +27,12 @@ AWS_S3_LOGS_FROM_EMAIL: dummy@example.com
# You should be overriding the environment and deployment vars
# Order of precedence is left to right for exclude and include options
AWS_S3_LOG_PATHS
:
-
bucket
:
"
edx-{{
COMMON_ENVIRONMENT
}}-{{
COMMON_DEPLOYMENT
}}/logs/tracking"
path
:
"
{{
COMMON_LOG_DIR
}}/tracking/*"
-
bucket
:
"
edx-{{
COMMON_ENVIRONMENT
}}-{{
COMMON_DEPLOYMENT
}}/logs/application"
path
:
"
{{
COMMON_LOG_DIR
}}/!(*tracking*)"
-
bucket
:
"
edx-{{
COMMON_ENVIRONMENT
}}-{{
COMMON_DEPLOYMENT
}}/logs/system"
path
:
"
/var/log/*"
-
bucket
:
"
edx-{{
COMMON_ENVIRONMENT
}}-{{
COMMON_DEPLOYMENT
}}/logs/tracking"
path
:
"
{{
COMMON_LOG_DIR
}}/tracking/*"
#
# vars are namespace with the module name.
...
...
playbooks/roles/aws/tasks/main.yml
View file @
ef987361
...
...
@@ -84,18 +84,19 @@
dest={{ COMMON_BIN_DIR }}/{{ aws_s3_sync_script|basename }}
when
:
AWS_S3_LOGS
-
name
:
run s3 log sync script on shutdown
fil
e
:
>
s
tate=link
src={{ COMMON_BIN_DIR }}/send-logs-to-s3
path=/etc/rc0.d/S00send-logs-to-s3
-
name
:
run s3 log sync script on s
upervisor s
hutdown
templat
e
:
>
s
rc=etc/init/sync-on-stop.conf.j2
dest=/etc/init/sync-on-stop.conf
owner=root group=root mode=0644
when
:
AWS_S3_LOGS
# cron job runs the aws s3 sync script
# this job will log its output to /var/log/aws
-
name
:
cronjob for s3 log sync
cron
:
>
name
=
"cronjob for s3 log sync"
user
=
root
minute
=
0
job
={{ aws_s3_sync_script }}
cron
:
name
:
"
cronjob
for
s3
log
sync"
user
:
root
minute
:
0
job
:
"
{{
aws_s3_sync_script
}}
>
/dev/null
2>&1"
when
:
AWS_S3_LOGS
playbooks/roles/aws/templates/etc/init/sync-on-stop.conf.j2
0 → 100644
View file @
ef987361
start on stopped supervisor
description "sync s3 logs on supervisor shutdown"
script
/bin/bash {{ aws_s3_sync_script }}
end script
playbooks/roles/aws/templates/send-logs-to-s3.j2
View file @
ef987361
...
...
@@ -13,6 +13,10 @@ fi
exec > >(tee "{{ aws_s3_logfile }}")
exec 2>&1
# s3cmd sync requires a valid home
# directory
export HOME=/
shopt -s extglob
usage() {
...
...
playbooks/roles/rabbitmq/tasks/main.yml
View file @
ef987361
...
...
@@ -57,8 +57,8 @@
-
name
:
set up a cron job to run the script
cron
:
name
=
"log-queue-lenghts"
job
="{{ rabbitmq_app_dir }}/log-rabbitmq-queues.sh
"
name
:
"
log-queue-lenghts"
job
:
"
{{
rabbitmq_app_dir
}}/log-rabbitmq-queues.sh
>/dev/null
2>&1
"
# Defaulting to /var/lib/rabbitmq
-
name
:
create cookie directory
...
...
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