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
f1d78e75
Commit
f1d78e75
authored
Jun 26, 2014
by
Feanil Patel
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1249 from edx/feanil/update_logrotate
Feanil/update logrotate
parents
f90e4338
3578851a
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
17 additions
and
31 deletions
+17
-31
CHANGELOG.md
+2
-0
playbooks/roles/aws/defaults/main.yml
+1
-1
playbooks/roles/common/tasks/main.yml
+5
-13
requirements.txt
+1
-1
util/jenkins/build-ami.sh
+3
-16
util/vpc-tools/abbey.py
+5
-0
No files found.
CHANGELOG.md
View file @
f1d78e75
-
Logrotation now happens hourly by default for all logs.
-
Role: xqwatcher, xqueue, nginx, edxapp, common
-
Moving nginx basic authorization flag and credentials to the common role
...
...
playbooks/roles/aws/defaults/main.yml
View file @
f1d78e75
...
...
@@ -56,7 +56,7 @@ aws_debian_pkgs:
aws_pip_pkgs
:
-
https://s3.amazonaws.com/cloudformation-examples/aws-cfn-bootstrap-latest.tar.gz
-
awscli
-
boto==2.2
0
.1
-
boto==2.2
9
.1
aws_redhat_pkgs
:
[]
aws_s3cmd_version
:
s3cmd-1.5.0-beta1
...
...
playbooks/roles/common/tasks/main.yml
View file @
f1d78e75
...
...
@@ -60,21 +60,17 @@
owner=root group=root mode=644
notify
:
restart rsyslogd
# This is in common to keep all logrotation config
# in the same role
-
name
:
Create hourly subdirectory in logrotate.d
file
:
path=/etc/logrotate.d/hourly state=directory
-
name
:
Install logrotate configuration for edX
template
:
>
dest=/etc/logrotate.d/hourly/edx-services
src=etc/logrotate.d/hourly/edx_logrotate.j2
owner=root group=root mode=644
# This can be removed after new release of edX
-
name
:
Remove old edx-services config from /etc/logrotate.d
file
:
path=/etc/logrotate.d/edx-services state=absent
# This is in common to keep all logrotation config
# in the same role
-
name
:
Create hourly subdirectory in logrotate.d
file
:
path=/etc/logrotate.d/hourly state=directory
-
name
:
Install logrotate configuration for tracking file
template
:
>
dest=/etc/logrotate.d/hourly/tracking.log
...
...
@@ -87,10 +83,6 @@
src=etc/cron.hourly/logrotate
owner=root group=root mode=555
# This can be removed after new release of edX
-
name
:
Remove old tracking.log config from /etc/logrotate.d
file
:
path=/etc/logrotate.d/tracking.log state=absent
-
name
:
update /etc/hosts
template
:
src=hosts.j2 dest=/etc/hosts
when
:
COMMON_HOSTNAME
...
...
requirements.txt
View file @
f1d78e75
...
...
@@ -3,7 +3,7 @@ PyYAML==3.11
Jinja2
==2.7.2
MarkupSafe
==0.23
argparse
==1.2.1
boto
==2.2
8.0
boto
==2.2
9.1
ecdsa
==0.11
paramiko
==1.14.0
pycrypto
==2.6.1
...
...
util/jenkins/build-ami.sh
View file @
f1d78e75
...
...
@@ -61,17 +61,9 @@ fi
export
PYTHONUNBUFFERED
=
1
if
[[
-z
$configuration
]]
;
then
cd
configuration
configuration
=
`
git rev-parse HEAD
`
cd
..
fi
if
[[
-z
$configuration_secure
]]
;
then
cd
configuration-secure
configuration_secure
=
`
git rev-parse HEAD
`
cd
..
fi
cd
$WORKSPACE
/configuration
configuration
=
`
git rev-parse
--short
HEAD
`
cd
$WORKSPACE
base_params
=
""
if
[[
-n
"
$base_ami
"
]]
;
then
...
...
@@ -96,11 +88,6 @@ if [[ ! -z "$configurationprivaterepo" ]]; then
fi
fi
stackname_params
=
""
if
[[
!
-z
"
$playbook_dir
"
]]
;
then
stackname_params
=
"--playbook-dir
$playbook_dir
"
fi
hipchat_params
=
""
if
[[
!
-z
"
$hipchat_room_id
"
]]
&&
[[
!
-z
"
$hipchat_api_token
"
]]
;
then
hipchat_params
=
"--hipchat-room-id
$hipchat_room_id
--hipchat-api-token
$hipchat_api_token
"
...
...
util/vpc-tools/abbey.py
View file @
f1d78e75
...
...
@@ -647,6 +647,7 @@ def launch_and_configure(ec2_args):
def
send_hipchat_message
(
message
):
print
(
message
)
#If hipchat is configured send the details to the specified room
if
args
.
hipchat_api_token
and
args
.
hipchat_room_id
:
import
hipchat
...
...
@@ -710,6 +711,7 @@ if __name__ == '__main__':
else
:
base_ami
=
args
.
base_ami
error_in_abbey_run
=
False
try
:
sqs_queue
=
None
instance_id
=
None
...
...
@@ -749,6 +751,7 @@ if __name__ == '__main__':
play
=
args
.
play
,
exception
=
repr
(
e
))
send_hipchat_message
(
message
)
error_in_abbey_run
=
True
finally
:
print
if
not
args
.
no_cleanup
and
not
args
.
noop
:
...
...
@@ -761,3 +764,5 @@ if __name__ == '__main__':
# Check to make sure we have an instance id.
if
instance_id
:
ec2
.
terminate_instances
(
instance_ids
=
[
instance_id
])
if
error_in_abbey_run
:
exit
(
1
)
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