cmd/multinode: Removes dependency on deprecated identity-dir flag, code and documentation. (#5646)

* The Multinode Dashboard no longer requires the identity files.

* Removed deprecated code that used the identity-dir.
This commit is contained in:
Sembeth 2023-03-08 13:56:15 +01:00 committed by GitHub
parent e3cbbd4d80
commit 0408997e6c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 23 deletions

View File

@ -4,30 +4,14 @@
[Tech Preview Forum Post](https://forum.storj.io/t/tech-preview-multinode-dashboard-binaries/14572)
## Generate identity files
## Running the Multinode Dashboard in Docker with persistent data
In order to run this Docker image, you need to create an identity for the Multinode Dashboard.
For this you need the binaries of the Identity Tool, which you can find in the latest version here:
[https://github.com/storj/storj/releases/latest](https://github.com/storj/storj/releases/latest)
In this example under Windows, we use the file `identity_windows_amd64.zip`, download it and unzip it.
Then we open a PowerShell window in the folder where the `identity.exe` was unzipped and run the following command:
```
./identity.exe create multinode --difficulty 10
```
If we run this command on Windows, the identity files will be created in the folder `%appdata%\Storj\Identity\multinode`.
## Running the Multinode Dashboard in Docker
Then start the image like this, while replacing the directories marked by the `< >` with your parameters below:
Start the image as follows, while replacing the placeholder `<multinode-config-dir>` with a path to a directory. This directory will contain database files and a config.yaml.
```
docker run -d --restart unless-stopped \
--user $(id -u):$(id -g) \
-p 127.0.0.1:15002:15002/tcp \
--mount type=bind,source="<multinode-identity-dir>",destination=/app/identity \
--mount type=bind,source="<multinode-config-dir>",destination=/app/config \
--name multinode storjlabs/multinode:latest
```
```

View File

@ -2,11 +2,10 @@
set -euo pipefail
if [[ ! -f "/app/config/config.yaml" ]]; then
./multinode setup --config-dir config --identity-dir identity
./multinode setup --config-dir config
fi
RUN_PARAMS="${RUN_PARAMS:-} --config-dir config"
RUN_PARAMS="${RUN_PARAMS:-} --identity-dir identity"
RUN_PARAMS="${RUN_PARAMS:-} --console.address=:15002"
exec ./multinode run $RUN_PARAMS "$@"

View File

@ -659,7 +659,6 @@ func newNetwork(flags *Flags) (*Processes, error) {
process.Arguments = withCommon(process.Directory, Arguments{
"setup": {
"--identity-dir", process.Directory,
"--console.address", net.JoinHostPort(host, port(multinodePeer, 0, publicHTTP)),
"--console.static-dir", filepath.Join(storjRoot, "web/multinode/"),
"--debug.addr", net.JoinHostPort(host, port(multinodePeer, 0, debugHTTP)),

View File

@ -145,7 +145,6 @@ fi
# setup multinode if config is missing
MULTINODE_DIR=$(storj-sim network env MULTINODE_0_DIR)
if [ ! -f "$MULTINODE_DIR/config.yaml" ]; then
identity --identity-dir $MULTINODE_DIR --concurrency 1 --difficulty 8 create .
multinode $(storj-sim --host "$STORJ_NETWORK_HOST4" network env MULTINODE_0_SETUP_ARGS)
fi