You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 22 Next »

Proposed Architecture



Development Timeline

DateNew Piece NameDevelopmentIPAction (normal letter = commands, italics = description)Notes
171020gltg-postgres

141.142.209.176



171025


Install Postgres and postgis

create/import database

create medici role and grant priviledges


  • As Ubuntu user:
  • sudo apt-get update
  • sudo apt-get install postgresql postgresql-contrib
  • sudo apt-get install postgresql-9.5-postgis-2.2

  • sudo -u postgres createuser --interactive
    • medici
    • superuser?: n
    • create dbs?: n
    • create new roles?: n
  • sudo -u postgres createdb geostream

  • sudo -u postgres psql -d geostream -c 'GRANT ALL ON ALL SEQUENCES IN SCHEMA public TO medici;'

  • sudo -u postgres psql -d geostream -c 'GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO medici;'

  • copy over small db from local (change role of db to medici)

  • sudo -u postgres psql geostream < geostream_one_greon.sql

  • /etc/postgresql/9.5/main/postgres.conf add

    • listen_addresses = '*'
  • /etc/postgresql/9.5/main/pg_hba.conf add 
    • host     all   all   0.0.0.0/0   md5

171026
login remotely
  • create user gltgdev and grant permissions
    • createuser gltgdev
    • ALTER USER gltgdev WITH ENCRYPTED PASSWORD 'password';
    • psql -h 141.142.209.176 -U gltgdev -d geostream

  • connect gltg-dev to gltg-postgres

    • in custom.conf (yay, it works)

      • postgres.user="gltgdev"

      • postgres.host="141.142.209.176"

      • postgres.password="*****"


171026gltg-mongo-(1,2,3)
  • 141.142.209.172
  • 141.142.209.173
  • 141.142.209.174


171026
dump, copy, restore
  • on gltg-dev
    • sudo mongodump --out /home/marcuss/backup/test_mongo_dump/test1

  • scp to target server

  • on gltg-mongo-1

    • sudo /var/lib/mongodb-mms-automation/mongodb-linux-x86_64-3.4.9/bin/mongorestore -d gltg --drop /home/ubuntu/test1/gltg

opening mongo shell gives warnings:

WARNING: Using the XFS filesystem is strongly recommended with the WiredTiger storage engine

2017-10-26T20:07:08.303-0500 I STORAGE  [initandlisten] **          See http://dochub.mongodb.org/core/prodnotes-filesystem

2017-10-26T20:07:19.707-0500 I CONTROL  [initandlisten] 

2017-10-26T20:07:19.707-0500 I CONTROL  [initandlisten] ** WARNING: Access control is not enabled for the database.

2017-10-26T20:07:19.707-0500 I CONTROL  [initandlisten] **          Read and write access to data and configuration is unrestricted.

2017-10-26T20:07:19.707-0500 I CONTROL  [initandlisten] 

2017-10-26T20:07:19.707-0500 I CONTROL  [initandlisten] 

2017-10-26T20:07:19.707-0500 I CONTROL  [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/enabled is 'always'.

2017-10-26T20:07:19.707-0500 I CONTROL  [initandlisten] **        We suggest setting it to 'never'

2017-10-26T20:07:19.707-0500 I CONTROL  [initandlisten] 

2017-10-26T20:07:19.708-0500 I CONTROL  [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/defrag is 'always'.

2017-10-26T20:07:19.708-0500 I CONTROL  [initandlisten] **        We suggest setting it to 'never'

show dbs

2017-10-27T09:58:23.913-0500 E QUERY    [thread1] Error: listDatabases failed:{

"ok" : 0,

"errmsg" : "not master and slaveOk=false",

"code" : 13435,

"codeName" : "NotMasterNoSlaveOk"

} :

_getErrorWithCode@src/mongo/shell/utils.js:25:13

Mongo.prototype.getDBs@src/mongo/shell/mongo.js:62:1

shellHelper.show@src/mongo/shell/utils.js:769:19

shellHelper@src/mongo/shell/utils.js:659:15

@(shellhelp2):1:1


Notes meeting Rob 171027

mongo - need to run commands in primary instance?

illinois - separate clowder and geodashboard servers, separate postgres and mongo databases on same servers

make clowder-dev, geodashboard-dev

  • No labels