1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-03-09 15:40:17 +00:00

tweaks to get mongodb autotarting

This commit is contained in:
George Hunt 2018-05-21 23:28:21 +00:00
parent 732547b9e7
commit e0309cd5d4
10 changed files with 13 additions and 31 deletions

View file

@ -17,7 +17,7 @@
- { path: '/library/dbdata/mongodb' }
- { path: '/var/log/mongodb' }
- name: Create systemd files
- name: Move required files
template: src={{ item.src }}
dest={{ item.dest }}
owner=root
@ -25,9 +25,7 @@
mode=0644
with_items:
- { src: 'mongodb.service' , dest: '/etc/systemd/system/' }
- { src: 'mongodb' , dest: '/etc/sysconfig/'}
- { src: 'mongod.conf' , dest: '/etc/mongod.conf'}
- { src: 'mongod.conf' , dest: '/etc/mongodb.conf'}
- name: enable services
service: name={{ item.name }}
@ -45,20 +43,6 @@
- { name: mongodb }
when: not mongodb_enabled
# See https://github.com/iiab/iiab/issues/254 for other attempts to eliminate
# these 256MB files. Brute Force Idea: rm /var/lib/mongodb/journal/prealloc.*
- name: find /var/lib/mongodb/prealloc.* files to delete
find:
paths: /var/lib/mongodb/journal
patterns: prealloc.*
register: files_to_delete
- name: delete prealloc files
file:
path: "{{ item.path }}"
state: absent
with_items: "{{ files_to_delete.files }}"
- name: add mongodb to service list
ini_file: dest="{{ service_filelist }}"
section=mongodb

View file

@ -18,13 +18,13 @@ pidfilepath = /var/run/mongodb/mongod.pid
logpath = /var/log/mongodb/mongod.log
# Alternative directory for UNIX domain sockets (defaults to /tmp)
unixSocketPrefix = /var/run/mongodb
# unixSocketPrefix = /var/run/mongodb
# Directory for datafiles (defaults to /data/db/)
dbpath = /library/dbdata/mongodb
# Enable/Disable journaling (journaling is on by default for 64 bit)
#journal = true
journal = true
#nojournal = true
@ -37,7 +37,7 @@ dbpath = /library/dbdata/mongodb
#verbose = v
# Max number of simultaneous connections (1000000 by default)
#maxConns = 1000000
maxConns = 1000
# Log to system's syslog facility instead of file or stdout (false by default)
#syslog = true

View file

@ -1 +0,0 @@
OPTIONS=' -f /etc/mongod.conf '

View file

@ -7,7 +7,7 @@ Type=forking
User=mongodb
Group=mongodb
PIDFile=/var/run/mongodb/mongod.pid
EnvironmentFile=/etc/sysconfig/mongodb
#EnvironmentFile=/etc/sysconfig/mongodb
ExecStart=/usr/bin/mongod -f /etc/mongod.conf
[Install]

View file

@ -1 +0,0 @@
OPTIONS=' -f /etc/mongod.conf '

View file

@ -1,7 +1,6 @@
sugarizer_install: True
sugarizer_enabled: False
sugarizer_location: '{{ doc_root }}'
sugarizer_port: 8089
sugarizer_location: /opt/iiab
sugarizer_version: 'sugarizer-1.0'
sugarizer_server_version: 'sugarizer-server-1.0'
npm_exists: False

View file

@ -1,2 +1,2 @@
dependencies:
# - { role: mongodb, tags: ['generic','mongodb'], when: sugarizer_install }
- { role: mongodb, tags: ['generic','mongodb'], when: sugarizer_install }

View file

@ -5,7 +5,7 @@
timeout: "{{ download_timeout }}"
when: internet_available
- name: Untar to /library/www/html/{{ sugarizer_version }}
- name: Untar to {{ sugarizer_version }}
unarchive:
src: "{{ downloads_dir }}/{{ sugarizer_version }}.tar.gz"
dest: "{{ sugarizer_location }}"
@ -20,7 +20,7 @@
timeout: "{{ download_timeout }}"
when: internet_available
- name: Untar to /library/www/html/{{ sugarizer_version }}
- name: Untar to /{{ sugarizer_version }}
unarchive:
src: "{{ downloads_dir }}/{{ sugarizer_version }}.tar.gz"
dest: "{{ sugarizer_location }}"
@ -94,7 +94,7 @@
with_items:
- { src: 'sugarizer.service.j2' , dest: '/etc/systemd/system/sugarizer.service'}
- { src: 'sugarizer.ini' , dest: '{{ sugarizer_location }}/{{ sugarizer_server_version }}/env/sugarizer.ini' }
- { src: 'sugarizer.conf' , dest: '/etc/apache2/sites-available' }
- { src: 'sugarizer.conf' , dest: '/etc/apache2/sites-available' }
- name: Create the symlink enabling the rewrite
file: src=/etc/apache2/sites-available/sugarizer.conf

View file

@ -1,3 +1,3 @@
RewriteRule ^/sugarizer(.*)$ http://localhost:{{ sugaarizer_port }}/sugarizer$1 [P,L]
ProxyPassReverse /sugarizer http://localhost:{{ sugarizer_port }}/sugarizer
RewriteRule ^/sugarizer(.*)$ http://localhost:"{{ sugarizer_port }}/sugarizer$1" [P,L]
ProxyPassReverse /sugarizer http://localhost:"{{ sugarizer_port }}/sugarizer"
ProxyRequests Off

View file

@ -320,6 +320,7 @@ pathagar_enabled: False
# Sugarizer
sugarizer_install: True
sugarizer_enabled: False
sugarizer_port: 8089
# 8-MGMT-TOOLS