cloyne / servers

Salt configuration for Cloyne servers.
0 stars 3 forks source link

Cloyne rocketchat #4

Open samuelhsu123 opened 4 years ago

samuelhsu123 commented 4 years ago

cloynemongodb

This was on Christopher's computer.

Forked version of mongodb container (version 3.6) with the recommended settings from the rocket-chat container (step one):

oplog size: 128 replset: rs0

There is a third option "smallfiles" but we haven't done anything with that yet.

First, localhost and localhost:3000 give "conection was reset" at the moment, which is different from "connection refused" previously with clonmmongodb.

Following step two, we got some kind of syntax error claiming a missing curly bracket, but there's doesn't seem to be a missing one. New error after adding escape characters around the quotation marks. Something might have been misnamed.

Added to mongo 3.6 dockerfile echo -e "replication:\n replSetName: \ "rs01\"" | sudo tee -a /etc/mongod.conf

In /etc/service/rocketchat/run added to the last line (so the same line): --replSet rs01 before 2>&1.

Ran rs.initiate() in the mongo shell. Oddly enough replicaset first showed up as secondary, but then showed up as primary upon runningrs.isMaster().

Ran export MONGO_UPLOG_URL: mongodb://mongo:27017/local?replSet=rs01 MONGO_URL: mongodb://mongo:27017/rocketchat node main.js in the mongo shell.

After this, rocketchat worked on localhost:3000.

cestevens commented 4 years ago

in order to run:

in mongo container: (docker exec --user root -ti mongo /bin/bash --login)

mongo

>rs.initiate()

in rocketchat container: (docker exec --user root -ti rocketchat /bin/bash --login)

/etc/service/rocketchat/run

cestevens commented 4 years ago

To fix docker network issues (i.e. you have just renumbered the networks): docker container ls -a shows all docker containers docker rm <relevant container> do this on all containers (an alternative approach is the nuclear: docker container prune) docker network prune removes old networks so they are properly recreated

cestevens commented 4 years ago

To connect to LDAP:

  1. Goto admin panel
  2. Goto LDAP pane
  3. Set Enable to true using the radio button
  4. Set Host: 172.25.1.8 or other ip if using different setting
  5. Set Port: 389
  6. Set Base DN: cn=admin,dc=ldap,dc=cloyne,dc=org
  7. Under Authentication tab: 1.Set Enable: True
    1. Set User DN: cn=admin,dc=ldap,dc=cloyne,dc=org
    2. Set Password: to the correct password