NeoFS Storage Node Deploy

  • amd64 Linux machine with public IP address,
  • docker v20.10.2 or older,
  • docker-compose v1.25.5 or older,
  • NeoFS CLI v0.21.1
  • N3 testnet compatible wallet app (we will use neo-go v0.95.2 in our examples).

Prepare keys and wallets

Receive testnet GAS

  • generate side-chain GAS for storage node, so it can send a bootstrap transaction,
  • filter out “free” nodes that can affect the network.

Make deposit

neo-go wallet nep17 transfer -r https://rpc1.n3.nspcc.ru:20331 -w keys/storage_wallet.json --from NdisEtkGKNsmkQXFTM5NjEiJYiQ1Vxe5iW --to NadZ8YfvkddivcFFkztZgfwxZyKf1acpRF --token GAS --amount 10

Configure storage node

  • storage node network address
  • UN/LOCODE attribute.
  • path to storage dir,
  • path to the key file.

Path to storage dir

volumes:
- /home/username/neofs/rc3/storage:/storage

Network address

NEOFS_NODE_ADDRESS=65.52.183.157:36512
NEOFS_GRPC_ENDPOINT=65.52.183.157:36512

UN/LOCODE attribute

NEOFS_NODE_ADDRESS=65.52.183.157:36512
NEOFS_GRPC_ENDPOINT=65.52.183.157:36512
NEOFS_NODE_ATTRIBUTE_1=UN-LOCODE:RU LED
$ neofs-cli util locode info --db ./locode_db --locode 'RU LED' Country: Russia 
Location: Saint Petersburg (ex Leningrad)
Continent: Europe 5Subdivision: [SPE] Sankt-Peterburg
Coordinates: 59.53, 30.15

Start and maintain storage node

---version: "2.4"
services:
storage01:
image: nspccdev/neofs-storage-testnet:0.21.1
container_name: neofs-testnet
env_file: node_config.env
network_mode: host
restart: always
volumes:
- /home/username/neofs/rc3/storage:/storage
- /home/username/neofs/rc3/keys/storage.key:/node.key
stop_signal: SIGINT
vmagent:
image: victoriametrics/vmagent:v1.61.0
env_file: node_config.env
container_name: vmagent
command:
- '-promscrape.config=/configs/prometheus.yml'
- '-remoteWrite.url=https://collector.fs.neo.org:8429/api/v1/write'
network_mode: host
restart: always
volumes:
- ./prometheus.yml:/configs/prometheus.yml
volumes:
neofs_storage:

Start up

$ docker-compose up -d
$ neofs-cli control healthcheck -k storage.key -r 65.52.183.157:36512
Network status: ONLINE
Health status: READY
$ neofs-cli netmap snapshot -k storage.key -r 65.52.183.157:36512

Logs

$ docker logs neofs-testnet
environment:
- NEOFS_LOGGER_LEVEL=debug

Shutdown

Summary

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store