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
OpenEdx
configuration
Commits
2ff5593a
Commit
2ff5593a
authored
Aug 12, 2014
by
e0d
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1393 from edx/e0d/s3-log-refactor
path fixes
parents
92994a30
5fe61a2f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
+6
-5
playbooks/roles/aws/defaults/main.yml
+5
-4
playbooks/roles/aws/templates/send-logs-to-s3.j2
+1
-1
No files found.
playbooks/roles/aws/defaults/main.yml
View file @
2ff5593a
...
@@ -27,11 +27,11 @@ AWS_S3_LOGS_FROM_EMAIL: dummy@example.com
...
@@ -27,11 +27,11 @@ AWS_S3_LOGS_FROM_EMAIL: dummy@example.com
# You should be overriding the environment and deployment vars
# You should be overriding the environment and deployment vars
# Order of precedence is left to right for exclude and include options
# Order of precedence is left to right for exclude and include options
AWS_S3_LOG_PATHS
:
AWS_S3_LOG_PATHS
:
-
bucket
:
"
{{
COMMON_ENVIRONMENT
}}-{{
COMMON_DEPLOYMENT
}}
-app-logs
"
-
bucket
:
"
{{
COMMON_ENVIRONMENT
}}-{{
COMMON_DEPLOYMENT
}}
/logs/application
"
path
:
"
{{
COMMON_LOG_DIR
}}/!(*tracking*)"
path
:
"
{{
COMMON_LOG_DIR
}}/!(*tracking*)"
-
bucket
:
"
{{
COMMON_ENVIRONMENT
}}-{{
COMMON_DEPLOYMENT
}}
-app-logs
"
-
bucket
:
"
{{
COMMON_ENVIRONMENT
}}-{{
COMMON_DEPLOYMENT
}}
/logs/system
"
path
:
"
/var/log/*"
path
:
"
/var/log/*"
-
bucket
:
"
{{
COMMON_ENVIRONMENT
}}-{{
COMMON_DEPLOYMENT
}}
-tracking-logs
"
-
bucket
:
"
{{
COMMON_ENVIRONMENT
}}-{{
COMMON_DEPLOYMENT
}}
/logs/tracking
"
path
:
"
{{
COMMON_LOG_DIR
}}/*tracking*"
path
:
"
{{
COMMON_LOG_DIR
}}/*tracking*"
#
#
...
@@ -45,7 +45,8 @@ aws_s3_logfile: "{{ aws_log_dir }}/s3-log-sync.log"
...
@@ -45,7 +45,8 @@ aws_s3_logfile: "{{ aws_log_dir }}/s3-log-sync.log"
aws_log_dir
:
"
{{
COMMON_LOG_DIR
}}/aws"
aws_log_dir
:
"
{{
COMMON_LOG_DIR
}}/aws"
aws_region
:
"
us-east-1"
aws_region
:
"
us-east-1"
# default path to the aws binary
# default path to the aws binary
aws_cmd
:
"
{{
COMMON_BIN_DIR
}}/s3cmd"
s3cmd_cmd
:
"
{{
COMMON_BIN_DIR
}}/s3cmd"
aws_cmd
:
"
/usr/local/bin/aws"
#
#
# OS packages
# OS packages
#
#
...
...
playbooks/roles/aws/templates/send-logs-to-s3.j2
View file @
2ff5593a
...
@@ -90,5 +90,5 @@ region=${availability_zone:0:${{lb}}#availability_zone{{rb}} - 1}
...
@@ -90,5 +90,5 @@ region=${availability_zone:0:${{lb}}#availability_zone{{rb}} - 1}
s3_path="${2}/$sec_grp/"
s3_path="${2}/$sec_grp/"
{% for item in AWS_S3_LOG_PATHS -%}
{% for item in AWS_S3_LOG_PATHS -%}
$noop {{
aws
_cmd }} sync {{ item['path'] }} "s3://{{ item['bucket'] }}/$sec_grp/${instance_id}-${ip}/"
$noop {{
s3cmd
_cmd }} sync {{ item['path'] }} "s3://{{ item['bucket'] }}/$sec_grp/${instance_id}-${ip}/"
{% endfor %}
{% endfor %}
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