Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce new rocket_chat_mongodb_ vars to make role more generic #40

Closed
TwizzyDizzy opened this issue May 23, 2017 · 4 comments
Closed

Comments

@TwizzyDizzy
Copy link

TwizzyDizzy commented May 23, 2017

Hi folks,

I was wondering: currently it doesn't seem to be possible to define the user / password for the connection to mongodb. It is also not possible to say that one wants to connect to rocket.chat via TLS and furthermore it's not possible to disable the oplog if one does not use it.

I would therefore want to introduce the following new vars:

  • STRING rocket_chat_mongodb_user
  • STRING rocket_chat_mongodb_password
  • BOOL rocket_chat_mongodb_connect_tls

This would result in a MONGO_URL like this:

MONGO_URL=mongodb://{{ rocket_chat_mongodb_user }}:{{ rocket_chat_mongodb_password }}@{{ rocket_chat_mongodb_server }}:{{ rocket_chat_mongodb_port }}/rocketchat?ssl={{ rocket_chat_mongodb_connect_tls }}
  • BOOL rocket_chat_mongodb_use_oplog

This would either define or not define MONGO_OPLOG_URL in the files:

  • templates/rocketchat_upstart.j2
  • templates/rocketchat.service.j2

Cheers
Thomas

@TwizzyDizzy
Copy link
Author

Any feedback on this or anything I can clarify? :)

Cheers
Thomas

@xenithorb
Copy link
Collaborator

xenithorb commented Oct 21, 2017

Would you be willing to implement this on the develop branch?

Commenting now because I see you're still around, and so am I now

@TwizzyDizzy
Copy link
Author

The reason I haven't done that already is, that currently I have the feeling that I'm not good enough with ansible yet. But I'll have a look at it in time and give it a shot...

Cheers
Thomas

xenithorb added a commit that referenced this issue Mar 2, 2018
 - Explicitly define the mongodb upstart init conf path
 - Mongodb repo updates for 3.4
 - Allow tuning of mongodb service name
   - New vars:
     - `rocket_chat_mongodb_service_name`: mongod (string)
     - `rocket_chat_mongodb_org_pkgs`: false (bool)
     - `rocket_chat_mongodb_org_version`: 3.4 (string)
- Implement suggestions from #40 #50
  - Allow fine-grained tuning of `MONGO_URL` inside service files
  - Configure `rocket_chat_mongodb_URI` with jinja2 logic
    - New vars:
      - `rocket_chat_mongodb_user`: ~ (string)
      - `rocket_chat_mongodb_password`: ~ (string)
      - `rocket_chat_mongodb_database`: rocketchat (string)
      - `rocket_chat_mongodb_use_tls`: false (bool)
      - `rocket_chat_mongodb_URI`: computed result
- Move replSet task into mongodb.yml
- Change idempotency of replSet command
  - Now actually check on the JSON output of the
- Add MongoDB.org offical package install task for RHEL
- Vaariabilize `rocket_chat_mongodb_config` for debian packages
     - Set the variable explicitly in the org packages task to match the
       official location
- Fixes: #40 #50 #71

Mongodb changes from @photoninger (Thanks also for #71 as a reference!)

 - Add mongodb_service_name to README
 - Variablize mongodb log to match service name

Fixes: #71
xenithorb added a commit that referenced this issue Mar 2, 2018
 - Explicitly define the mongodb upstart init conf path
 - Mongodb repo updates for 3.4
 - Allow tuning of mongodb service name
   - New vars:
     - `rocket_chat_mongodb_service_name`: mongod (string)
     - `rocket_chat_mongodb_org_pkgs`: false (bool)
     - `rocket_chat_mongodb_org_version`: 3.4 (string)
- Implement suggestions from #40 #50
  - Allow fine-grained tuning of `MONGO_URL` inside service files
  - Configure `rocket_chat_mongodb_URI` with jinja2 logic
    - New vars:
      - `rocket_chat_mongodb_user`: ~ (string)
      - `rocket_chat_mongodb_password`: ~ (string)
      - `rocket_chat_mongodb_database`: rocketchat (string)
      - `rocket_chat_mongodb_use_tls`: false (bool)
      - `rocket_chat_mongodb_URI`: computed result
- Move replSet task into mongodb.yml
- Change idempotency of replSet command
  - Now actually check on the JSON output of the
- Add MongoDB.org offical package install task for RHEL
- Vaariabilize `rocket_chat_mongodb_config` for debian packages
     - Set the variable explicitly in the org packages task to match the
       official location
- Fixes: #40 #50 #54 #71

Mongodb changes from @photoninger (Thanks also for #71 as a reference!)

 - Add mongodb_service_name to README
 - Variablize mongodb log to match service name

Fixes: #71
@Lawri-van-Buel
Copy link

Lawri-van-Buel commented Apr 23, 2018

I just created a Pull request that should solve this based on current develop branch.
It allows for not just TLS but any MongoDB option to be set (for example a auth file or anything basically)

My pull request is #81

A pull request based on the version_3_1_0 branch is My pull request is #84

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants