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
0f60191f
Commit
0f60191f
authored
Sep 17, 2013
by
Will Daly
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Configure Mongo to use /mnt so we don't run out of disk space
parent
ab93f880
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
58 additions
and
5 deletions
+58
-5
playbooks/roles/jenkins_worker/tasks/system.yml
+23
-5
playbooks/roles/jenkins_worker/templates/mongodb_conf.j2
+11
-0
playbooks/roles/jenkins_worker/templates/mongodb_upstart.j2
+20
-0
playbooks/roles/jenkins_worker/vars/main.yml
+4
-0
No files found.
playbooks/roles/jenkins_worker/tasks/system.yml
View file @
0f60191f
...
...
@@ -9,6 +9,11 @@
shell
:
touch {{ jenkins_user_home }}/.bashrc
sudo_user
:
"
{{
jenkins_user
}}"
-
name
:
jenkins | Create directory for builds
file
:
path={{ jenkins_workspace }}
owner={{ jenkins_user }} group={{ jenkins_group }}
state=directory
-
name
:
jenkins | Create .ssh directory
file
:
path={{ jenkins_user_home }}/.ssh state=directory
owner={{ jenkins_user }} group={{ jenkins_group }}
...
...
@@ -25,11 +30,6 @@
owner={{ jenkins_user }} group={{ jenkins_group }}
mode=400
-
name
:
jenkins | Create directory for builds
file
:
path={{ jenkins_workspace }}
owner={{ jenkins_user }} group={{ jenkins_group }}
state=directory
-
name
:
jenkins | Install system packages
apt
:
pkg=${item} update_cache=yes state=present
with_items
:
...
...
@@ -48,3 +48,21 @@
-
pkg-config
-
unzip
-
xml-twig-tools
-
name
:
jenkins | Stop mongo service
service
:
name=mongodb state=stopped
-
name
:
jenkins | Configure Mongo
template
:
src=mongodb_conf.j2
dest=/etc/mongodb.conf
owner=root
group=root
-
name
:
jenkins | Configure Mongo upstart script
template
:
src=mongodb_upstart.j2
dest=/etc/init/mongodb.conf
owner=root
group=root
-
name
:
jenkins | Start the mongo service
service
:
name=mongodb state=stopped
playbooks/roles/jenkins_worker/templates/mongodb_conf.j2
0 → 100644
View file @
0f60191f
# mongodb.conf
dbpath={{ MONGO_DIR }}
logpath={{ MONGO_LOG_DIR }}/mongodb.log
logappend=true
bind_ip = 127.0.0.1
port = 27017
journal=true
playbooks/roles/jenkins_worker/templates/mongodb_upstart.j2
0 → 100644
View file @
0f60191f
# Ubuntu upstart file at /etc/init/mongodb.conf
pre-start script
mkdir -p {{ MONGO_DIR }}
mkdir -p {{ MONGO_LOG_DIR }}
touch {{ MONGO_LOG_DIR }}/mongodb.log
chown mongodb:nogroup -R {{ MONGO_DIR }}
chown mongodb:nogroup -R {{ MONGO_LOG_DIR }}
end script
start on runlevel [2345]
stop on runlevel [06]
script
ENABLE_MONGODB="yes"
if [ -f /etc/default/mongodb ]; then . /etc/default/mongodb; fi
if [ "x$ENABLE_MONGODB" = "xyes" ]; then exec start-stop-daemon --start --quiet --chuid mongodb --exec /usr/bin/mongod -- --config /etc/mongodb.conf; fi
end script
playbooks/roles/jenkins_worker/vars/main.yml
View file @
0f60191f
...
...
@@ -16,3 +16,7 @@ gem_home: "{{ ruby_base }}/.gem"
# JSCover direct download URL
jscover_url
:
"
http://superb-dca2.dl.sourceforge.net/project/jscover/JSCover-1.0.2.zip"
# Mongo config
MONGO_DIR
:
"
/mnt/mongodb"
MONGO_LOG_DIR
:
"
/mnt/logs/mongodb"
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