|
2 | 2 |
|
3 | 3 | This repository includes the following tools: |
4 | 4 |
|
5 | | -- [Map Generation Tool](#map-generation-tool) |
6 | | -- [Automated Data Copy Tool](#automated-data-copy-tool) |
| 5 | +- [http-server](#http-server) |
| 6 | +- [Automated Data Copy Tool (roadtest-archive)](#automated-data-copy-tool-roadtest-archive) |
7 | 7 |
|
8 | 8 | --- |
9 | 9 |
|
10 | | -## Map Generation Tool |
| 10 | +## Http Server |
11 | 11 |
|
12 | | -Generate various Apollo map formats based on a given `base_map`. |
| 12 | +Provides a simple HTTP server used by developer tooling and local testing. |
13 | 13 |
|
14 | 14 | ### Quick Start |
15 | 15 |
|
| 16 | +From the repository root: |
| 17 | + |
16 | 18 | ```bash |
17 | | -bash gen_all_map.sh <your_map_directory> |
| 19 | +cd http-server |
| 20 | +./manage.sh up |
18 | 21 | ``` |
19 | 22 |
|
| 23 | +See `http-server/README.md` for more details about the server and docker |
| 24 | +options. |
| 25 | + |
20 | 26 | --- |
21 | 27 |
|
22 | | -## Automated Data Copy Tool |
| 28 | +## Automated Data Copy Tool (roadtest-archive) |
23 | 29 |
|
24 | | -Automatically copies data packages from the Apollo `data` directory to the `road_test` directory on a selected disk. After the copy process, a Feishu (Lark) notification is sent to the user. |
| 30 | +This component (now in `roadtest-archive/`) installs a udev rule and a |
| 31 | +systemd template to automatically archive data from an Apollo workspace to a |
| 32 | +removable device when it is plugged in. It creates a per-instance environment |
| 33 | +file under `/etc/road_test_archive/<UUID>.env` so each device instance gets the |
| 34 | +correct configuration. |
25 | 35 |
|
26 | | -### Quick Start |
| 36 | +### Quick Start (install) |
27 | 37 |
|
28 | | -Run the following command: |
| 38 | +Run the interactive installer as root: |
29 | 39 |
|
30 | 40 | ```bash |
31 | | -bash setup_host/road_test_env.sh |
| 41 | +sudo bash roadtest-archive/road_test_env.sh |
32 | 42 | ``` |
33 | 43 |
|
34 | | -Follow the interactive prompts: |
| 44 | +The installer will: |
| 45 | + |
| 46 | +- check required commands (`rsync`, `curl`, `logger`, `flock`, `mountpoint`, `mount`, `udevadm`, `systemctl`) |
| 47 | +- install the runtime script to `/usr/local/bin/road_test_archive.sh` |
| 48 | +- install the systemd unit to `/etc/systemd/system/road_test_archive@.service` |
| 49 | +- install the udev rule to `/etc/udev/rules.d/99-roadtest.rules` |
| 50 | +- create `/etc/road_test_archive/<UUID>.env` and enable the per-UUID unit |
| 51 | + |
| 52 | +### Runtime/example |
| 53 | + |
| 54 | +Run the installer and follow prompts. Example interactive output: |
35 | 55 |
|
36 | 56 | ```shell |
37 | | -zero@zero:~/01code/whl-tools$ bash setup_host/road_test_env.sh |
| 57 | +$ sudo bash roadtest-archive/road_test_env.sh |
38 | 58 | Enter Apollo workspace path [/home/zero/01code/apollo]: |
39 | 59 | Enter notification Webhook URL [https://www.feishu.cn/flow/api/trigger-webhook/xxx]: |
40 | 60 | [INFO] Available filesystems: |
41 | | - 1) /dev/nvme0n1p6 (UUID: f9ab690d-5e04-44d9-b9f8-c024016d8245) |
42 | | - 2) /dev/nvme0n1p5 (UUID: DE2411AE24118AA3) |
43 | | - 3) /dev/nvme0n1p3 (UUID: 560446550446386F) |
44 | | - 4) /dev/nvme0n1p1 (UUID: CA41-1B79) |
45 | | - 5) /dev/nvme0n1p4 (UUID: D62817D52817B389) |
46 | | -Select an entry [2]: |
| 61 | + 1) /dev/sdb1 (UUID: 0123-ABCD) |
| 62 | + 2) /dev/sdc1 (UUID: 9f8e7d6c-...) |
| 63 | +Select an entry [1]: |
47 | 64 | [INFO] Configuration complete. |
48 | 65 | Apollo Workspace : /home/zero/01code/apollo |
49 | 66 | Webhook URL : https://www.feishu.cn/flow/api/trigger-webhook/xxx |
50 | | -Disk UUID : DE2411AE24118AA3 |
| 67 | +Disk UUID : 0123-ABCD |
51 | 68 | ``` |
52 | 69 |
|
53 | 70 | 🔗 [How to Create a Feishu Webhook](https://www.feishu.cn/hc/zh-CN/articles/807992406756-webhook-%E8%A7%A6%E5%8F%91%E5%99%A8) |
0 commit comments