1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-13 03:32:12 +00:00

Merge pull request #2613 from holta/mongodb_port

Change mongodb_port from 27018 to more standard 27017, following Sugarizer Server's lead
This commit is contained in:
A Holt 2020-11-03 16:30:24 -05:00 committed by GitHub
commit 37df52ab5f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 22 additions and 13 deletions

View file

@ -15,7 +15,7 @@
# mongodb_enabled: False
# mongodb_port: 27018
# mongodb_port: 27017
# All above are set in: github.com/iiab/iiab/blob/master/vars/default_vars.yml
# If nec, change them by editing /etc/iiab/local_vars.yml prior to installing!

View file

@ -114,12 +114,12 @@
- mongodb-org-server
state: present
- name: Change {{ mongodb_conf }} port to {{ mongodb_port }} -- takes effect on next (re)start of the service -- via enable-or-disable.yml or via sugarizer.service auto-starting MongoDB on demand
- name: Establish {{ mongodb_conf }} port {{ mongodb_port }} (mongodb_conf) -- takes effect on next (re)start of the service -- via enable-or-disable.yml or via sugarizer.service auto-starting MongoDB on demand
lineinfile:
path: "{{ mongodb_conf }}"
regexp: "port: 27017"
backrefs: yes
line: " port: {{ mongodb_port }}" # 27018
regexp: '^\s*port:' # \s = any whitespace char. stackoverflow.com/a/38491899
#backrefs: yes
line: " port: {{ mongodb_port }}" # 27017
# end block
when: (ansible_architecture == "aarch64") or (ansible_architecture == "x86_64")

View file

@ -5,7 +5,12 @@
# Comma separated list of ip addresses to listen on (all local ips by default)
bind_ip = 127.0.0.1
# Specify port number (27017 by default...but typically 27018 for IIAB)
# mongodb_port is set to 27017 in /opt/iiab/iiab/vars/default_vars.yml
# If you must change this, it's best to edit /etc/iiab/local_vars.yml prior to
# installing IIAB. Please also see upstream recommendations:
# https://github.com/llaske/sugarizer-server/blob/master/env/sugarizer.ini line ~22 under [database]
# https://docs.mongodb.com/manual/reference/default-mongodb-port/
# https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.txt
port = {{ mongodb_port }}
# Fork server process (false by default)

View file

@ -176,7 +176,7 @@
- name: Set Sugarizer port to {{ sugarizer_port }} in /opt/iiab/sugarizer-server/env/sugarizer.ini
lineinfile:
path: "{{ iiab_base }}/sugarizer-server/env/sugarizer.ini"
regexp: "^port = 8080$"
regexp: '^port = 8080$'
line: "port = {{ sugarizer_port }}"
# 2019-02-02 No Longer Required thanks to @llaske's upstream fix:
@ -193,15 +193,19 @@
#- name: Set MongoDB "server" from localhost to 127.0.0.1 in /opt/iiab/sugarizer-server/env/sugarizer.ini
# lineinfile:
# path: "{{ iiab_base }}/sugarizer-server/env/sugarizer.ini"
# regexp: "^server = localhost$"
# regexp: '^server = localhost$'
# line: "server = 127.0.0.1"
# mongodb_port is set to 27018 in /opt/iiab/iiab/vars/default_vars.yml
# If you need to change this, edit /etc/iiab/local_vars.yml prior to installing
# mongodb_port is set to 27017 in /opt/iiab/iiab/vars/default_vars.yml
# If you must change this, it's best to edit /etc/iiab/local_vars.yml prior to
# installing IIAB. Please also see upstream recommendations:
# https://github.com/llaske/sugarizer-server/blob/master/env/sugarizer.ini line ~22 under [database]
# https://docs.mongodb.com/manual/reference/default-mongodb-port/
# https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.txt
- name: Set MongoDB port to {{ mongodb_port }} in /opt/iiab/sugarizer-server/env/sugarizer.ini
lineinfile:
path: "{{ iiab_base }}/sugarizer-server/env/sugarizer.ini"
regexp: "^port = 27017$"
regexp: '^port = 27017$' # Careful as file also contains 2 other ports!
line: "port = {{ mongodb_port }}"
# 2-LINE FIX FOR sugarizer.js BY @georgejhunt FOR http://box/sugarizer
@ -211,7 +215,7 @@
- name: For http://box/sugarizer -- add pathPrefix lines in /opt/iiab/sugarizer-server/sugarizer.js
lineinfile:
path: "{{ iiab_base }}/sugarizer-server/sugarizer.js"
regexp: "AUTO-INSERTED BY IIAB" # avoids inserting it twice!
regexp: 'AUTO-INSERTED BY IIAB' # avoids inserting it twice!
insertbefore: "// Start listening$"
line: | # SEE https://yaml-multiline.info (use |+ to 'keep' newlines at end...though |8 and |+4 "indentation indicators" don't work with Ansible)
// AUTO-INSERTED BY IIAB FOR http://box/sugarizer

View file

@ -485,7 +485,7 @@ mongodb_install: False
# misleading as Sugarizer starts mongodb's systemd service on its own, due to
# 'Requires=mongodb.service' within /etc/systemd/system/sugarizer.service
mongodb_enabled: False
mongodb_port: 27018
mongodb_port: 27017
# roles/sugarizer/meta/main.yml auto-invokes 2 above prereqs: mongodb & nodejs
# Might stall MongoDB on Power Failure: github.com/xsce/xsce/issues/879