FrostFS local Development and Testing environment
Find a file
Anton Nikiforov cbed3ce798 [#27] Fix step make prepare.ir
Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
2023-05-10 12:31:06 +03:00
.github [#14] Add Issue Template 2023-03-23 12:20:42 +03:00
bin [#18] bin: Remove passwd.exp 2023-05-02 17:01:46 +00:00
docs [TrueCloudLab#1] Remove mainchain related components 2023-01-24 11:19:00 +03:00
services [#27] Fix step make prepare.ir 2023-05-10 12:31:06 +03:00
wallets [#76] Update neo-go and contracts to N3 testnet RC2 version 2021-05-21 14:26:43 +03:00
.basic_services [#208] Split basic services into basic and essential 2022-09-13 17:48:51 +03:00
.bootstrap_services [#16] dev-env: Add prometheus 2023-04-10 09:40:33 +03:00
.dockerignore Initial commit 2020-07-10 18:33:27 +03:00
.editorconfig Initial commit 2020-07-10 18:33:27 +03:00
.env [#22] .env: Update neo-go to v0.101.1 2023-05-03 12:34:41 +03:00
.gitignore [#242] gitignore: Add VSCode settings 2022-11-30 17:08:32 +03:00
.int_test.env Add .int_test.env files for config amendments (#167) 2022-04-07 15:33:53 +03:00
.services [TrueCloudLab#1] Remove coredns 2023-01-24 11:19:00 +03:00
CONTRIBUTING.md [TrueCloudLab#1] Update docs 2022-12-29 18:02:22 +03:00
frostfs-adm.yml [#18] frostfs-adm.yml: Add alphabet-wallets 2023-05-02 17:01:46 +00:00
frostfs_config.mk [#18] bin: Replace some commands with frostfs-adm 2023-05-02 17:01:46 +00:00
help.mk [#172] Makefile: Add filter to help target 2022-10-26 19:08:08 +03:00
LICENSE Initial commit 2020-07-10 18:33:27 +03:00
Makefile [#22] morph_chain: Do not use deprecated config fields 2023-05-03 12:34:46 +03:00
README.md Change logo 2023-01-07 18:14:53 +03:00

FrostFS logo

FrostFS local Development and Testing environment


Overview

Tools to set up local FrostFS network and N3 privnets. Devenv, for short.

Prerequisites

Make sure you have installed all of the following prerequisites on your machine:

  • docker
  • docker-compose
  • make (3.82+)
  • expect
  • openssl
  • jq
  • base64 (coreutils)

Quick Start

Clone repo:

$ git clone https://github.com/TrueCloudLab/frostfs-dev-env.git

Run next commands from project's root:

$ make get

This command should be executed for the first run only to execute make hosts. It is part of the make up and, if the hosts have been added already, there is no need to run it separately.

$ make hosts
192.168.130.10 bastion.frostfs.devenv
192.168.130.50 main-chain.frostfs.devenv
192.168.130.61 ir01.frostfs.devenv
...
192.168.130.74 s04.frostfs.devenv

This command shows addresses and hostnames of components. Add make hosts output to your local /etc/hosts file.

Run all services with command:

$ make up

When all services are up, you need to make GAS deposit for test wallet to be able to pay for FrostFS operations. Test wallet is located in wallets/wallet.json with the corresponding key in wallets/wallet.key. The password is empty.

$ make prepare.ir
password >
fa6ba62bffb04030d303dcc95bda7413e03aa3c7e6ca9c2f999d65db9ec9b82c

Also, you should add self-signed node (s04.frostfs.devenv) certificate to trusted store (default location might be changed using CA_CERTS_TRUSTED_STORE variable). This step is required for client services (frostfs-http-gw, frostfs-s3-gw) to interact with the node:

$ sudo make prepare.storage

Change FrostFS global configuration values with make update.* commands. The password of inner ring wallet is one. See examples in make help.

$ make update.epoch_duration val=30
Changing EpochDuration configration value to 30
Enter account NNudMSGzEoktFzdYGYoNb3bzHzbmM1genF password > 
Sent invocation transaction dbb8c1145b6d10f150135630e13bb0dc282023163f5956c6945a60db0cb45cb0
Updating FrostFS epoch to 2
Enter account NNudMSGzEoktFzdYGYoNb3bzHzbmM1genF password > 
Sent invocation transaction 0e6eb5e190f36332e5e5f4e866c7e100826e285fd949e11c085e15224f343ba6

For instructions on how to set up DevEnv on macOS, please refer the guide in docs directory.

How it's organized

.
├── Makefile         # Commands to manage devenv
├── .services        # List of services to work with
├── services         # Services definitions and files
│   ├── basenet
│   ├── chain
│   ├── ir
│   ├── morph_chain
│   └── storage
├── vendor           # Temporary files and artifacts
└── wallets          # Wallet files to manage GAS assets

Main commands and targets to manage devenv's services are in Makefile.

Each service is defined in it's own directory under services/ with all required files to run and scripts to get external artifacts or dependencies.

The list of services and the starting order is defined in .services file. You can comment out services you don't want to start or add your own new services.

You can find more information on each service in docs directory.

Maybe you will find the answer for your question in F.A.Q.

Using FrostFS Admin Tool in dev-env

Devenv supports FrostFS network management via frostfs-adm. services/ir contains the Alphabet wallet in a proper format, specify it with --alphabet-wallets flag.

Notable make targets

make help will print the brief description of available targets. Here we describe some of them in a more detailed way.

up

Start all Devenv services.

This target call pull to get container images, get to download required artifacts, vendor/hosts to generate hosts file and then starts all services in the order defined in .services file.

down

Shutdowns all services. This will destroy all containers and networks. All changes made inside containers will be lost.

hosts

Display addresses and host names for each running service, if available.

clean

Clean up vendor directory.

Contributing

Feel free to contribute to this project after reading the contributing guidelines.

Before starting to work on a certain topic, create an new issue first, describing the feature/topic you are going to implement.

License