diff --git a/docs/root/source/contributing/dev-setup-coding-and-contribution-process/run-dev-network-stack.md b/docs/root/source/contributing/dev-setup-coding-and-contribution-process/run-dev-network-stack.md index e5e9c37..d059560 100644 --- a/docs/root/source/contributing/dev-setup-coding-and-contribution-process/run-dev-network-stack.md +++ b/docs/root/source/contributing/dev-setup-coding-and-contribution-process/run-dev-network-stack.md @@ -99,8 +99,7 @@ $ bash stack.sh -h ENV[TM_VERSION] (Optional) Tendermint version to use for the setup. (default: 0.22.8) - ENV[MONGO_VERSION] - (Optional) MongoDB version to use with the setup. (default: 3.6) + ENV[AZURE_CLIENT_ID] Only required when STACK_TYPE="cloud" and STACK_TYPE_PROVIDER="azure". Steps to generate: @@ -181,8 +180,6 @@ $ export STACK_BRANCH=master #Optional, since 0.22.8 is the default tendermint version. $ export TM_VERSION=0.22.8 -#Optional, since 3.6 is the default MongoDB version. -$ export MONGO_VERSION=3.6 $ bash stack.sh ``` @@ -232,8 +229,7 @@ $ export STACK_BRANCH=master #Optional, since 0.22.8 is the default tendermint version $ export TM_VERSION=0.22.8 -#Optional, since 3.6 is the default MongoDB version. -$ export MONGO_VERSION=3.6 + $ bash stack.sh ``` diff --git a/docs/root/source/contributing/dev-setup-coding-and-contribution-process/run-node-as-processes.md b/docs/root/source/contributing/dev-setup-coding-and-contribution-process/run-node-as-processes.md index 70a3791..dea26ce 100644 --- a/docs/root/source/contributing/dev-setup-coding-and-contribution-process/run-node-as-processes.md +++ b/docs/root/source/contributing/dev-setup-coding-and-contribution-process/run-node-as-processes.md @@ -11,16 +11,16 @@ The following doc describes how to run a local node for developing Planetmint Te There are two crucial dependencies required to start a local node: -- MongoDB +- Tarantool - Tendermint and of course you also need to install Planetmint Sever from the local code you just developed. -## Install and Run MongoDB +## Install and Run Tarantool -MongoDB can be easily installed, just refer to their [installation documentation](https://docs.mongodb.com/manual/installation/) for your distro. -We know MongoDB 3.4 and 3.6 work with Planetmint. -After the installation of MongoDB is complete, run MongoDB using `sudo mongod` +Tarantool can be easily installed, just refer to their [installation documentation](https://www.tarantool.io/en/download/os-installation/ubuntu/) for your distro. +We know Tarantool 2.8 work with Planetmint. +After the installation of Tarantool is complete, run Tarantool using `tarantool` and to create a listener `box.cfg{listen=3301}` in cli of Tarantool. ## Install and Run Tendermint @@ -125,7 +125,7 @@ To execute tests when developing a feature or fixing a bug one could use the fol $ pytest -v ``` -NOTE: MongoDB and Tendermint should be running as discussed above. +NOTE: Tarantool and Tendermint should be running as discussed above. One could mark a specific test and execute the same by appending `-m my_mark` to the above command. diff --git a/docs/root/source/contributing/dev-setup-coding-and-contribution-process/run-node-with-docker-compose.md b/docs/root/source/contributing/dev-setup-coding-and-contribution-process/run-node-with-docker-compose.md index 5ee7643..de733bb 100644 --- a/docs/root/source/contributing/dev-setup-coding-and-contribution-process/run-node-with-docker-compose.md +++ b/docs/root/source/contributing/dev-setup-coding-and-contribution-process/run-node-with-docker-compose.md @@ -39,7 +39,7 @@ $ docker-compose up -d bdb The above command will launch all 3 main required services/processes: -* ``mongodb`` +* ``tarantool`` * ``tendermint`` * ``planetmint`` @@ -55,7 +55,7 @@ To follow the logs of the ``planetmint`` service: $ docker-compose logs -f planetmint ``` -To follow the logs of the ``mongodb`` service: + ```bash $ docker-compose logs -f mdb diff --git a/docs/root/source/installation/_static/mongodb_cloud_manager_1.png b/docs/root/source/installation/_static/mongodb_cloud_manager_1.png deleted file mode 100644 index 16073d6..0000000 Binary files a/docs/root/source/installation/_static/mongodb_cloud_manager_1.png and /dev/null differ diff --git a/docs/root/source/installation/appendices/log-rotation.md b/docs/root/source/installation/appendices/log-rotation.md index 53bea64..bfd6f68 100644 --- a/docs/root/source/installation/appendices/log-rotation.md +++ b/docs/root/source/installation/appendices/log-rotation.md @@ -9,7 +9,7 @@ Code is Apache-2.0 and docs are CC-BY-4.0 Each Planetmint node runs: -- MongoDB +- Tarantool - Planetmint Server - Tendermint @@ -17,11 +17,6 @@ When running a Planetmint node for long periods of time, we need to consider doing log rotation, i.e. we do not want the logs taking up large amounts of storage and making the node unresponsive or getting it into a bad state. -## MongoDB Logging and Log Rotation - -See the MongoDB docs about -[logging](https://docs.mongodb.com/v3.6/administration/monitoring/#monitoring-standard-loggging) -and [log rotation](https://docs.mongodb.com/v3.6/tutorial/rotate-log-files/). ## Planetmint Server Logging and Log Rotation diff --git a/docs/root/source/installation/network-setup/network-setup.md b/docs/root/source/installation/network-setup/network-setup.md index 8c666b4..47e84ea 100644 --- a/docs/root/source/installation/network-setup/network-setup.md +++ b/docs/root/source/installation/network-setup/network-setup.md @@ -155,13 +155,12 @@ recheck = false Note: The list of `persistent_peers` doesn't have to include all nodes in the network. -## Member: Start MongoDB +## Member: Start Tarantool -If you installed MongoDB using `sudo apt install mongodb`, then MongoDB should already be running in the background. You can check using `systemctl status mongodb`. +You install Tarantool as described [here](https://www.tarantool.io/ru/download/os-installation/ubuntu/). -If MongoDB isn't running, then you can start it using the command `mongod`, but that will run it in the foreground. If you want to run it in the background (so it will continue running after you logout), you can use `mongod --fork --logpath /var/log/mongodb.log`. (You might have to create the `/var/log` directory if it doesn't already exist.) +You can start it using the command `tarantool`.To run it in the background (so it will continue running after you logout), you can have to create a listener `box.cfg{listen=3301}`. -If you installed MongoDB using `sudo apt install mongodb`, then a MongoDB startup script should already be installed (so MongoDB will start automatically when the machine is restarted). Otherwise, you should install a startup script for MongoDB. ## Member: Start Planetmint and Tendermint Using Monit diff --git a/docs/root/source/installation/network-setup/planetmint-node-ansible.md b/docs/root/source/installation/network-setup/planetmint-node-ansible.md index f9fc9a5..ce7ab6c 100644 --- a/docs/root/source/installation/network-setup/planetmint-node-ansible.md +++ b/docs/root/source/installation/network-setup/planetmint-node-ansible.md @@ -4,4 +4,4 @@ You can find one of the installation methods with Ansible on GitHub at: [Ansible script](https://github.com/planetmint/planetmint-node-ansible) -It allows to install Planetmint, MongoDB, Tendermint, and python, and then connect nodes into a network. Current tested machine is Ubuntu 18.04. \ No newline at end of file +It allows to install Planetmint, Tarantool, Tendermint, and python, and then connect nodes into a network. Current tested machine is Ubuntu 18.04. \ No newline at end of file diff --git a/docs/root/source/installation/node-setup/all-in-one-planetmint.md b/docs/root/source/installation/node-setup/all-in-one-planetmint.md index 19af49f..f25f6cf 100644 --- a/docs/root/source/installation/node-setup/all-in-one-planetmint.md +++ b/docs/root/source/installation/node-setup/all-in-one-planetmint.md @@ -15,7 +15,7 @@ Docker image and a This image contains all the services required for a Planetmint node i.e. - Planetmint Server -- MongoDB +- Tarantool - Tendermint **Note:** **NOT for Production Use:** *This is an single node opinionated image not well suited for a network deployment.* @@ -42,8 +42,6 @@ $ docker run \ --publish 9985:9985 \ --publish 27017:27017 \ --publish 26657:26657 \ - --volume $HOME/planetmint_docker/mongodb/data/db:/data/db \ - --volume $HOME/planetmint_docker/mongodb/data/configdb:/data/configdb \ --volume $HOME/planetmint_docker/tendermint:/tendermint \ planetmint/planetmint:all-in-one ``` @@ -55,10 +53,7 @@ Let's analyze that command: * `publish 9984:9984` map the host port `9984` to the container port `9984` (the Planetmint API server) * `9985` Planetmint Websocket server - * `27017` Default port for MongoDB * `26657` Tendermint RPC server -* `--volume "$HOME/planetmint_docker/mongodb:/data"` map the host directory - `$HOME/planetmint_docker/mongodb` to the container directory `/data`; this allows us to have the data persisted on the host machine, you can read more in the [official Docker documentation](https://docs.docker.com/engine/tutorials/dockervolumes) diff --git a/docs/root/source/installation/node-setup/configuration.md b/docs/root/source/installation/node-setup/configuration.md index 2eefac3..5707b65 100644 --- a/docs/root/source/installation/node-setup/configuration.md +++ b/docs/root/source/installation/node-setup/configuration.md @@ -22,28 +22,24 @@ The value of each setting is determined according to the following rules: * Otherwise, use the default value The local config file is `$HOME/.planetmint` by default (a file which might not even exist), but you can tell Planetmint to use a different file by using the `-c` command-line option, e.g. `planetmint -c path/to/config_file.json start` -or using the `PLANETMINT_CONFIG_PATH` environment variable, e.g. `BIGHAINDB_CONFIG_PATH=.my_planetmint_config planetmint start`. +or using the `PLANETMINT_CONFIG_PATH` environment variable, e.g. `PLANETMINT_CONFIG_PATH=.my_planetmint_config planetmint start`. Note that the `-c` command line option will always take precedence if both the `PLANETMINT_CONFIG_PATH` and the `-c` command line option are used. You can read the current default values in the file [planetmint/\_\_init\_\_.py](https://github.com/planetmint/planetmint/blob/master/planetmint/__init__.py). (The link is to the latest version.) -Running `planetmint -y configure localmongodb` will generate a local config file in `$HOME/.planetmint` with all the default values. ## database.* The settings with names of the form `database.*` are for the backend database -(currently only MongoDB). They are: +(currently only Tarantool). They are: -* `database.backend` can only be `localmongodb`, currently. +* `database.backend` can only be `localtarantool`, currently. * `database.host` is the hostname (FQDN) of the backend database. * `database.port` is self-explanatory. -* `database.name` is a user-chosen name for the database inside MongoDB, e.g. `planetmint`. -* `database.connection_timeout` is the maximum number of milliseconds that Planetmint will wait before giving up on one attempt to connect to the backend database. -* `database.max_tries` is the maximum number of times that Planetmint will try to establish a connection with the backend database. If 0, then it will try forever. -* `database.replicaset` is the name of the MongoDB replica set. The default value is `null` because in Planetmint 2.0+, each Planetmint node has its own independent MongoDB database and no replica set is necessary. Replica set must already exist if this option is configured, Planetmint will not create it. -* `database.ssl` must be `true` or `false`. It tells Planetmint Server whether it should connect to MongoDB using TLS/SSL or not. The default value is `false`. +* `database.user` is a user-chosen name for the database inside Tarantool, e.g. `planetmint`. +* `database.pass` is the password of the user for connection to tarantool listener. -There are three ways for Planetmint Server to authenticate itself with MongoDB (or a specific MongoDB database): no authentication, username/password, and x.509 certificate authentication. +There are two ways for Planetmint Server to authenticate itself with Tarantool (or a specific Tarantool service): no authentication, username/password. **No Authentication** @@ -51,58 +47,18 @@ If you use all the default Planetmint configuration settings, then no authentica **Username/Password Authentication** -To use username/password authentication, a MongoDB instance must already be running somewhere (maybe in another machine), it must already have a database for use by Planetmint (usually named `planetmint`, which is the default `database.name`), and that database must already have a "readWrite" user with associated username and password. To create such a user, login to your MongoDB instance as Admin and run the following commands: - -```text -use -db.createUser({user: "", pwd: "", roles: [{role: "readWrite", db: ""}]}) -``` - -* `database.login` is the user's username. -* `database.password` is the user's password, given in plaintext. -* `database.ca_cert`, `database.certfile`, `database.keyfile`, `database.crlfile`, and `database.keyfile_passphrase` are not used so they can have their default values. - -**x.509 Certificate Authentication** - -To use x.509 certificate authentication, a MongoDB instance must be running somewhere (maybe in another machine), it must already have a database for use by Planetmint (usually named `planetmint`, which is the default `database.name`), and that database must be set up to use x.509 authentication. See the MongoDB docs about how to do that. - -* `database.login` is the user's username. -* `database.password` isn't used so the default value (`null`) is fine. -* `database.ca_cert`, `database.certfile`, `database.keyfile` and `database.crlfile` are the paths to the CA, signed certificate, private key and certificate revocation list files respectively. -* `database.keyfile_passphrase` is the private key decryption passphrase, specified in plaintext. - -**Example using environment variables** - -```text -export PLANETMINT_DATABASE_BACKEND=localmongodb -export PLANETMINT_DATABASE_HOST=localhost -export PLANETMINT_DATABASE_PORT=27017 -export PLANETMINT_DATABASE_NAME=database8 -export PLANETMINT_DATABASE_CONNECTION_TIMEOUT=5000 -export PLANETMINT_DATABASE_MAX_TRIES=3 -``` +To use username/password authentication, a Tarantool instance must already be running somewhere (maybe in another machine), it must already have a spaces for use by Planetmint, and that database must already have a "readWrite" user with associated username and password. **Default values** -If (no environment variables were set and there's no local config file), or you used `planetmint -y configure localmongodb` to create a default local config file for a `localmongodb` backend, then the defaults will be: - ```js "database": { - "backend": "localmongodb", + "backend": "tarantool", "host": "localhost", - "port": 27017, - "name": "planetmint", - "connection_timeout": 5000, - "max_tries": 3, - "replicaset": null, - "login": null, + "port": 3301, + "username": null, "password": null - "ssl": false, - "ca_cert": null, - "certfile": null, - "keyfile": null, - "crlfile": null, - "keyfile_passphrase": null, + } ``` diff --git a/docs/root/source/installation/node-setup/planetmint-cli.md b/docs/root/source/installation/node-setup/planetmint-cli.md index 08706ae..a3bab36 100644 --- a/docs/root/source/installation/node-setup/planetmint-cli.md +++ b/docs/root/source/installation/node-setup/planetmint-cli.md @@ -25,18 +25,18 @@ Show the version number. `planetmint -v` does the same thing. Generate a local configuration file (which can be used to set some or all [Planetmint node configuration settings](configuration)). It will ask you for the values of some configuration settings. If you press Enter for a value, it will use the default value. -At this point, only one database backend is supported: `localmongodb`. +At this point, only one database backend is supported: `tarantool`. If you use the `-c` command-line option, it will generate the file at the specified path: ```text -planetmint -c path/to/new_config.json configure localmongodb +planetmint -c path/to/new_config.json configure tarantool ``` If you don't use the `-c` command-line option, the file will be written to `$HOME/.planetmint` (the default location where Planetmint looks for a config file, if one isn't specified). If you use the `-y` command-line option, then there won't be any interactive prompts: it will use the default values for all the configuration settings. ```text -planetmint -y configure localmongodb +planetmint -y configure tarantool ``` @@ -47,13 +47,13 @@ Show the values of the [Planetmint node configuration settings](configuration). ## planetmint init -Create a backend database (local MongoDB), all database tables/collections, +Create a backend database (local tarantool), all database tables/collections, various backend database indexes, and the genesis block. ## planetmint drop -Drop (erase) the backend database (the local MongoDB database used by this node). +Drop (erase) the backend database (the local tarantool database used by this node). You will be prompted to make sure. If you want to force-drop the database (i.e. skipping the yes/no prompt), then use `planetmint -y drop` @@ -148,7 +148,7 @@ $ planetmint election new migration --private-key /home/user/.tendermint/config/ ``` Concluded chain migration elections halt block production at whichever block height they are approved. -Afterwards, validators are supposed to upgrade Tendermint, set new `chain_id`, `app_hash`, and `validators` (to learn these values, use the [election show](#election-show) command) in `genesis.json`, make and save a MongoDB dump, and restart the system. +Afterwards, validators are supposed to upgrade Tendermint, set new `chain_id`, `app_hash`, and `validators` (to learn these values, use the [election show](#election-show) command) in `genesis.json`, make and save a tarantool dump, and restart the system. For more details about how chain migrations work, refer to [Type 3 scenarios in BEP-42](https://github.com/planetmint/BEPs/tree/master/42). diff --git a/docs/root/source/installation/node-setup/production-node/node-components.md b/docs/root/source/installation/node-setup/production-node/node-components.md index 44f2abe..a1759e7 100644 --- a/docs/root/source/installation/node-setup/production-node/node-components.md +++ b/docs/root/source/installation/node-setup/production-node/node-components.md @@ -10,17 +10,15 @@ Code is Apache-2.0 and docs are CC-BY-4.0 A production Planetmint node must include: * Planetmint Server -* MongoDB Server 3.4+ (mongod) +* Tarantool * Tendermint * Storage for MongoDB and Tendermint It could also include several other components, including: * NGINX or similar, to provide authentication, rate limiting, etc. -* An NTP daemon running on all machines running Planetmint Server or mongod, and possibly other machines -* Probably _not_ MongoDB Automation Agent. It's for automating the deployment of an entire MongoDB cluster. -* MongoDB Monitoring Agent -* MongoDB Backup Agent +* An NTP daemon running on all machines running Planetmint Server or tarantool, and possibly other machines + * Log aggregation software * Monitoring software * Maybe more diff --git a/docs/root/source/installation/node-setup/production-node/node-requirements.md b/docs/root/source/installation/node-setup/production-node/node-requirements.md index 077a638..453d7c7 100644 --- a/docs/root/source/installation/node-setup/production-node/node-requirements.md +++ b/docs/root/source/installation/node-setup/production-node/node-requirements.md @@ -7,7 +7,7 @@ Code is Apache-2.0 and docs are CC-BY-4.0 # Production Node Requirements -**This page is about the requirements of Planetmint Server.** You can find the requirements of MongoDB, Tendermint and other [production node components](node-components) in the documentation for that software. +**This page is about the requirements of Planetmint Server.** You can find the requirements of Tarantool, Tendermint and other [production node components](node-components) in the documentation for that software. ## OS Requirements diff --git a/docs/root/source/installation/node-setup/production-node/node-security-and-privacy.md b/docs/root/source/installation/node-setup/production-node/node-security-and-privacy.md index 4841c94..779d1de 100644 --- a/docs/root/source/installation/node-setup/production-node/node-security-and-privacy.md +++ b/docs/root/source/installation/node-setup/production-node/node-security-and-privacy.md @@ -14,5 +14,5 @@ Here are some references about how to secure an Ubuntu 18.04 server: Also, here are some recommendations a node operator can follow to enhance the privacy of the data coming to, stored on, and leaving their node: -- Ensure that all data stored on a node is encrypted at rest, e.g. using full disk encryption. This can be provided as a service by the operating system, transparently to Planetmint, MongoDB and Tendermint. +- Ensure that all data stored on a node is encrypted at rest, e.g. using full disk encryption. This can be provided as a service by the operating system, transparently to Planetmint, Tarantool and Tendermint. - Ensure that all data is encrypted in transit, i.e. enforce using HTTPS for the HTTP API and the Websocket API. This can be done using NGINX or similar, as we do with the IPDB Testnet. diff --git a/docs/root/source/installation/node-setup/set-up-node-software.md b/docs/root/source/installation/node-setup/set-up-node-software.md index afce6d6..ec90189 100644 --- a/docs/root/source/installation/node-setup/set-up-node-software.md +++ b/docs/root/source/installation/node-setup/set-up-node-software.md @@ -5,11 +5,11 @@ SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0) Code is Apache-2.0 and docs are CC-BY-4.0 ---> -# Set Up Planetmint, MongoDB and Tendermint +# Set Up Planetmint, Tarantool and Tendermint We now install and configure software that must run in every Planetmint node: Planetmint Server, -MongoDB and Tendermint. +Tarantool and Tendermint. ## Install Planetmint Server @@ -69,25 +69,18 @@ under `"wsserver"`: where `bnode.example.com` should be replaced by your node's actual subdomain. -## Install (and Start) MongoDB +## Install (and Start) Tarantool -Install a recent version of MongoDB. +Install a recent version of Tarantool. Planetmint Server requires version 3.4 or newer. ``` -sudo apt install mongodb +curl -L https://tarantool.io/DDJLJzv/release/2.8/installer.sh | bash + +sudo apt-get -y install tarantool ``` -If you install MongoDB using the above command (which installs the `mongodb` package), -it also configures MongoDB, starts MongoDB (in the background), -and installs a MongoDB startup script -(so that MongoDB will be started automatically when the machine is restarted). -Note: The `mongodb` package is _not_ the official MongoDB package -from MongoDB the company. If you want to install the official MongoDB package, -please see -[the MongoDB documentation](https://docs.mongodb.com/manual/installation/). -Note that installing the official package _doesn't_ also start MongoDB. ## Install Tendermint diff --git a/docs/root/source/installation/node-setup/troubleshooting.md b/docs/root/source/installation/node-setup/troubleshooting.md index aa679c0..f72bca8 100644 --- a/docs/root/source/installation/node-setup/troubleshooting.md +++ b/docs/root/source/installation/node-setup/troubleshooting.md @@ -2,7 +2,7 @@ ## General Tips -- Check the Planetmint, Tendermint and MongoDB logs. +- Check the Planetmint, Tendermint and Tarantool logs. For help with that, see the page about [Logging and Log Rotation](../appendices/log-rotation). - Try Googling the error message. @@ -36,7 +36,7 @@ addr_book_strict = false If you want to refresh your node back to a fresh empty state, then your best bet is to terminate it and deploy a new machine, but if that's not an option, then you can: -* drop the `planetmint` database in MongoDB using `planetmint drop` (but that only works if MongoDB is running) +* drop the `planetmint` database in tarantool using `planetmint drop` (but that only works if tarantool is running) * reset Tendermint using `tendermint unsafe_reset_all` * delete the directory `$HOME/.tendermint`