2023-01-07 15:13:54 +00:00
|
|
|
<p align="center">
|
|
|
|
<img src="./.github/logo.svg" width="500px" alt="FrostFS logo">
|
|
|
|
</p>
|
2020-09-25 13:06:06 +00:00
|
|
|
<p align="center">
|
2022-12-21 11:59:19 +00:00
|
|
|
<a href="https://frostfs.info">FrostFS</a> local Development and Testing environment
|
2020-09-25 13:06:06 +00:00
|
|
|
</p>
|
|
|
|
|
|
|
|
---
|
|
|
|
## Overview
|
|
|
|
|
2022-12-21 11:59:19 +00:00
|
|
|
Tools to set up local FrostFS network and N3 privnets. Devenv, for short.
|
2020-09-25 13:06:06 +00:00
|
|
|
|
2021-06-10 13:25:02 +00:00
|
|
|
## Prerequisites
|
|
|
|
|
|
|
|
Make sure you have installed all of the following prerequisites on your machine:
|
|
|
|
* docker
|
|
|
|
* docker-compose
|
2022-08-10 09:25:18 +00:00
|
|
|
* make (`3.82+`)
|
2021-06-10 13:25:02 +00:00
|
|
|
* expect
|
|
|
|
* openssl
|
2021-07-06 12:32:33 +00:00
|
|
|
* jq
|
2021-09-21 14:56:19 +00:00
|
|
|
* base64 (coreutils)
|
2021-06-10 13:25:02 +00:00
|
|
|
|
|
|
|
|
2020-09-25 13:06:06 +00:00
|
|
|
## Quick Start
|
2022-06-02 06:38:55 +00:00
|
|
|
|
2022-06-02 05:12:30 +00:00
|
|
|
Clone repo:
|
2020-09-25 13:06:06 +00:00
|
|
|
|
|
|
|
```
|
2023-06-07 09:44:09 +00:00
|
|
|
$ git clone https://git.frostfs.info/TrueCloudLab/frostfs-dev-env.git
|
2022-06-02 05:12:30 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
Run next commands from project's root:
|
2022-06-02 06:38:55 +00:00
|
|
|
|
2022-06-02 17:58:02 +00:00
|
|
|
```
|
|
|
|
$ 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.
|
|
|
|
|
2022-06-02 05:12:30 +00:00
|
|
|
```
|
2022-06-01 18:38:45 +00:00
|
|
|
$ make hosts
|
2022-12-21 11:59:19 +00:00
|
|
|
192.168.130.10 bastion.frostfs.devenv
|
|
|
|
192.168.130.50 main-chain.frostfs.devenv
|
|
|
|
192.168.130.61 ir01.frostfs.devenv
|
2022-06-02 05:12:30 +00:00
|
|
|
...
|
2022-12-21 11:59:19 +00:00
|
|
|
192.168.130.74 s04.frostfs.devenv
|
2022-06-01 18:38:45 +00:00
|
|
|
```
|
|
|
|
|
2022-06-02 06:38:55 +00:00
|
|
|
This command shows addresses and hostnames of components. Add `make hosts`
|
|
|
|
output to your local `/etc/hosts` file.
|
2022-06-02 05:12:30 +00:00
|
|
|
|
|
|
|
Run all services with command:
|
2022-06-01 18:38:45 +00:00
|
|
|
```
|
2020-09-25 13:06:06 +00:00
|
|
|
$ make up
|
|
|
|
```
|
2022-06-02 06:38:55 +00:00
|
|
|
|
2022-12-21 11:59:19 +00:00
|
|
|
Also, you should add self-signed node (`s04.frostfs.devenv`) certificate to trusted
|
2022-06-02 06:38:55 +00:00
|
|
|
store (default location might be changed using `CA_CERTS_TRUSTED_STORE`
|
2022-12-21 11:59:19 +00:00
|
|
|
variable). This step is required for client services (frostfs-http-gw,
|
|
|
|
frostfs-s3-gw) to interact with the node:
|
2022-06-02 06:38:55 +00:00
|
|
|
|
2021-06-10 13:25:02 +00:00
|
|
|
```
|
|
|
|
$ sudo make prepare.storage
|
|
|
|
```
|
2020-09-25 13:06:06 +00:00
|
|
|
|
2022-12-21 11:59:19 +00:00
|
|
|
Change FrostFS global configuration values with `make update.*` commands. The
|
2021-04-16 13:28:17 +00:00
|
|
|
password of inner ring wallet is `one`. See examples in `make help`.
|
|
|
|
|
|
|
|
```
|
|
|
|
$ make update.epoch_duration val=30
|
2023-06-07 09:44:09 +00:00
|
|
|
Waiting for transactions to persist...
|
2021-04-16 13:28:17 +00:00
|
|
|
```
|
|
|
|
|
2020-12-13 21:18:13 +00:00
|
|
|
For instructions on how to set up DevEnv on macOS, please refer [the
|
|
|
|
guide](docs/macOS.md) in `docs` directory.
|
2020-12-01 15:03:59 +00:00
|
|
|
|
2020-09-25 20:36:46 +00:00
|
|
|
## 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.
|
|
|
|
|
2020-12-01 15:03:59 +00:00
|
|
|
Maybe you will find the answer for your question in [F.A.Q.](docs/faq.md)
|
|
|
|
|
2022-12-21 11:59:19 +00:00
|
|
|
## Using FrostFS Admin Tool in `dev-env`
|
2022-08-13 12:22:45 +00:00
|
|
|
|
2023-06-07 09:44:09 +00:00
|
|
|
Devenv supports FrostFS network management via [frostfs-adm](https://git.frostfs.info/TrueCloudLab/frostfs-node/src/branch/master/cmd/frostfs-adm).
|
2022-08-13 12:22:45 +00:00
|
|
|
`services/ir` contains the Alphabet wallet in a proper format, specify it
|
|
|
|
with `--alphabet-wallets` flag.
|
|
|
|
|
2020-12-01 15:03:59 +00:00
|
|
|
## 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.
|
|
|
|
|
2020-09-25 13:06:06 +00:00
|
|
|
## Contributing
|
|
|
|
|
|
|
|
Feel free to contribute to this project after reading the [contributing
|
|
|
|
guidelines](CONTRIBUTING.md).
|
|
|
|
|
|
|
|
Before starting to work on a certain topic, create an new issue first,
|
|
|
|
describing the feature/topic you are going to implement.
|
|
|
|
|
|
|
|
# License
|
|
|
|
|
|
|
|
- [GNU General Public License v3.0](LICENSE)
|