* implement new search and tagging for notebooks * add example tags, remove inspector reference * include annotations in mct * fix performance tests Co-authored-by: John Hill <john.c.hill@nasa.gov> Co-authored-by: unlikelyzero <jchill2@gmail.com> Co-authored-by: Andrew Henry <akhenry@gmail.com>
2.5 KiB
2.5 KiB
Introduction
These instructions are for setting up CouchDB for a development environment. For a production environment, we recommend running Open MCT behind a proxy server (e.g., Nginx or Apache), and securing the CouchDB server properly: https://docs.couchdb.org/en/main/intro/security.html
Installing CouchDB
macOS
Installing with admin privileges to your computer
- Install CouchDB using:
brew install couchdb. - Edit
/usr/local/etc/local.iniand add the following settings:
[admins]
admin = youradminpassword
And set the server up for single node:
[couchdb]
single_node=true
Enable CORS
[chttpd]
enable_cors = true
[cors]
origins = http://localhost:8080
Installing without admin privileges to your computer
- Install CouchDB following these instructions: https://docs.brew.sh/Installation#untar-anywhere.
- Edit
local.iniin Homebrew's/etc/directory as directed above in the 'Installing with admin privileges to your computer' section.
Other Operating Systems
Follow the installation instructions from the CouchDB installation guide: https://docs.couchdb.org/en/stable/install/index.html
Configuring CouchDB
- Start CouchDB by running:
couchdb. - Add the
_global_changesdatabase usingcurl(note theyouradminpasswordshould be changed to what you set above 👆):curl -X PUT http://admin:youradminpassword@127.0.0.1:5984/_global_changes - Navigate to http://localhost:5984/_utils
- Create a database called
openmct - Navigate to http://127.0.0.1:5984/_utils/#/database/openmct/permissions
- Remove permission restrictions in CouchDB from Open MCT by deleting
_adminroles for bothAdminandMember.
Configuring Open MCT
- Edit
openmct/index.htmlcomment out the following line:
openmct.install(openmct.plugins.LocalStorage());
Add a line to install the CouchDB plugin for Open MCT:
openmct.install(openmct.plugins.CouchDB("http://localhost:5984/openmct"));
- Start Open MCT by running
npm startin theopenmctpath. - Navigate to http://localhost:8080/ and create a random object in Open MCT (e.g., a 'Clock') and save. You may get an error saying that the object failed to persist - this is a known error that you can ignore, and will only happen the first time you save - just try again.
- Navigate to: http://127.0.0.1:5984/_utils/#database/openmct/_all_docs
- Look at the 'JSON' tab and ensure you can see the specific object you created above.
- All done! 🏆