You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The environment generator also performs binary synchronization for binary services (oracle, validator, daemon-client, api-client). This sets up the volume directory, ensures required folders and SQLite DB exist, and downloads binaries for the specified tag. If the target binary already exists for that tag, it will be reused and download will be skipped.
58
+
59
+
Key points:
60
+
-`NODE_VERSION` is **required** for binary services and triggers automatic sync
61
+
-`REPO_URL` and `SQLITE_DB` can be read from `--input` and written via `--output`
62
+
-`NODE_VERSION` is written to service envs and consolidated env for Docker usage
63
+
- Binaries are placed under `<volume>/<service>/bin/<tag>/<binary>`
64
+
- Validator SQLite DB is created under `<volume>/validator/sqlite/<name>.db` (existing `<volume>/sqlite` is migrated)
65
+
- Only prompts for binary configs (REPO_URL, NODE_VERSION) when binary services are involved
66
+
- Only prompts for validator config (SQLITE_DB) when validator service is involved
67
+
68
+
Examples:
69
+
70
+
```bash
71
+
# Generate binary service envs (NODE_VERSION required, triggers automatic sync)
72
+
python3 envgen.py \
73
+
--service validator \
74
+
--profile bsctest \
75
+
--config-dir deploy/config \
76
+
--ntag v1.2.3 \
77
+
--volume-dir /opt/openstore/volume
78
+
79
+
# Generate all services with binary sync
80
+
python3 envgen.py \
81
+
--profile bsctest \
82
+
--config-dir deploy/config \
83
+
--output deploy/config/.env.all \
84
+
--ntag v1.2.3 \
85
+
--volume-dir /opt/openstore/volume
86
+
87
+
# Interactive mode for binary services (will prompt for NODE_VERSION)
88
+
python3 envgen.py \
89
+
--service oracle \
90
+
--profile bsctest \
91
+
--config-dir deploy/config \
92
+
--volume-dir /opt/openstore/volume
93
+
```
94
+
95
+
Volume directory layout after sync (existing binaries are reused, not re-downloaded):
96
+
97
+
```
98
+
<volume>/
99
+
├── daemon-client/
100
+
│ ├── bin/
101
+
│ │ └── v1.2.3/
102
+
│ │ └── daemon-client
103
+
│ └── log/
104
+
├── api-client/
105
+
│ ├── bin/
106
+
│ │ └── v1.2.3/
107
+
│ │ └── api-client
108
+
│ └── log/
109
+
├── validator/
110
+
│ ├── bin/
111
+
│ │ └── v1.2.3/
112
+
│ │ └── validator
113
+
│ ├── log/
114
+
│ └── sqlite/
115
+
│ └── bsctest.db
116
+
├── oracle/
117
+
│ ├── bin/
118
+
│ │ └── v1.2.3/
119
+
│ │ └── oracle
120
+
│ └── log/
121
+
├── redis/
122
+
├── postgres/
123
+
├── certbot/
124
+
│ ├── conf/
125
+
│ └── www/
126
+
└── nginx/
127
+
└── log/
128
+
```
129
+
130
+
Flags for binary services:
131
+
-`--ntag`: Node release tag (required for binary services, triggers sync)
132
+
-`--volume-dir`: Volume root directory (or set `VOLUME_DIR`)
133
+
-`--repo-url`: Custom repository URL (read/write via consolidated env as `REPO_URL`)
134
+
-`--sqlite-db`: SQLite DB name (read/write via consolidated env as `SQLITE_DB`)
0 commit comments