Skip to content

Commit

Permalink
Update deployment doc (#26)
Browse files Browse the repository at this point in the history
* Add commands to install dependencies

* Manually save admin token to a file
  • Loading branch information
wlxiong authored Mar 1, 2025
1 parent fcfbb0f commit 4e8c49f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
3 changes: 2 additions & 1 deletion deploy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -267,10 +267,11 @@ Install `storage` service on **storage** node.
```bash
/opt/3fs/bin/admin_cli -cfg /opt/3fs/etc/admin_cli.toml --config.mgmtd_client.mgmtd_server_addresses '["RDMA://192.168.1.1:8000"]' "user-add --root --admin 0 root"
```
Save the admin token to `/opt/3fs/etc/token.txt`.
The admin token is printed to the console, save it to `/opt/3fs/etc/token.txt`.
2. Generate `admin_cli` commands to create storage targets on 5 storage nodes (16 SSD per node, 6 targets per SSD).
- Follow instructions at [here](data_placement/README.md) to install Python packages.
```bash
pip install -r ~/3fs/deploy/data_placement/requirements.txt
python ~/3fs/deploy/data_placement/src/model/data_placement.py \
-ql -relax -type CR --num_nodes 5 --replication_factor 3 --min_targets_per_disk 6
python ~/3fs/deploy/data_placement/src/setup/gen_chain_table.py \
Expand Down
14 changes: 13 additions & 1 deletion deploy/data_placement/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,21 @@ Suppose we are going to setup a small 3FS cluster:
- 16 SSDs attached to each node
- 6 storage targets on each SSD

## Install dependencies

The data placement problem is formulated using [Pyomo](https://www.pyomo.org/) and solved with the [HiGHS](https://highs.dev/) solver. Install them and other dependencies:

```bash
$ cd deploy/data_placement
$ pip install -r requirements.txt
```

## Generate chain table

First generate a solution of the data placement problem.

```bash
$ cd deploy/data_placement
$ python src/model/data_placement.py -ql -relax -type CR --num_nodes 5 --replication_factor 3 --min_targets_per_disk 6 --init_timelimit 600

...
Expand Down Expand Up @@ -45,7 +57,7 @@ $ python src/model/data_placement.py -ql -relax -type CR --num_nodes 5 --replica

Note that some combinations of `--num_nodes` and `--replication_factor` may have no solution.

Then generate commands to create/remove storage targets.
Then generate commands to create/remove storage targets and the chain table.

```bash
$ python src/setup/gen_chain_table.py --chain_table_type CR --node_id_begin 10001 --node_id_end 10005 --num_disks_per_node 16 --num_targets_per_disk 6 --incidence_matrix_path output/DataPlacementModel-v_5-b_10-r_6-k_3-λ_2-lb_1-ub_1/incidence_matrix.pickle
Expand Down

0 comments on commit 4e8c49f

Please sign in to comment.