Skip to content

Commit 47d556d

Browse files
Merge pull request #18 from eclipsevortex/release/1.1.0
Release/1.1.0
2 parents 178925a + 68412ad commit 47d556d

56 files changed

Lines changed: 3365 additions & 714 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 27 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
- [Introduction](#introduction)
3333
- [Prerequisites](#prerequisites)
3434
- [How It Works](#how-it-works)
35+
- [Log Locations](#log-locations)
3536
- [Quick Setup](#quick-setup)
3637
- [Quick Start](#quick-start)
3738
- [Quick Stop](#quick-stop)
@@ -154,6 +155,16 @@ Note: In Docker mode, the Auto Upgrader only runs if the neuron isn’t installe
154155

155156
<br />
156157

158+
# 📁 Log Locations <a id="log-locations"></a>
159+
160+
You can monitor the Auto Upgrader using logs. Their location depends on the `SUBVORTEX_EXECUTION_METHOD`:
161+
162+
- **`service`**: logs are in `/var/log/subvortex-auto-upgrader/` and accessible via `tail -f <SERVICE_PATH>` e.v `tail -f /var/log/subvortex-auto-upgrader/subvortex-miner-neuron.log`
163+
- **`process`**: logs are in `/root/.pm2/logs/` and accessible via `pm2 log <PROCESS_NAME>` e.g `pm2 log subvortex-miner-neuron`
164+
- **`container`**: use `docker logs subvortex-auto-upgrader` (add `-f` to follow in real time) and accessible via `docker logs <CONTAINER_NAME>` e.g `docker logs subortex-miner-neuron`
165+
166+
<br />
167+
157168
# 🔑 Personal Access Token <a id="personal-access-token"></a>
158169

159170
To allow the system to pull Docker images and release assets from GitHub, you need to generate a GitHub Personal Access Token (PAT).
@@ -175,13 +186,16 @@ Then, copy that token as value of `SUBVORTEX_GITHUB_TOKEN` in the main Auto Upgr
175186

176187
# 🚀 Quick Setup <a id="quick-setup"></a>
177188

189+
⚠️ Note: This step is usually not required. The Auto Upgrader automatically handles setup for you.
190+
Use this only if you encounter issues or need to manually prepare a specific version.
191+
178192
To setup the Auto Upgrader in a quick way, you can run
179193

180194
```bash
181195
./scripts/quick_setup.sh --neuron validator --release v3.0.1
182196
```
183197

184-
It will download and unzip the newuon's assets of the SubVortex for the requested version.
198+
It will download and unzip the neuron's assets of the SubVortex for the requested version.
185199

186200
Use `-h` to see the options
187201

@@ -192,10 +206,10 @@ Use `-h` to see the options
192206
To install the Auto Upgrader in a quick way, you can run
193207

194208
```bash
195-
./scripts/quick_start.sh
209+
./scripts/quick_start.sh --execution <EXECUTION_METHOD>
196210
```
197211

198-
It will install and start the Auto Upgrader as service which is the default mode.
212+
It will install and start the Auto Upgrader using the `EXECUTION_METHOD`, which defaults to `service`.
199213

200214
Use `-h` to see the options
201215

@@ -206,10 +220,10 @@ Use `-h` to see the options
206220
To stop the Auto Upgrader in a quick way, you can run
207221

208222
```bash
209-
./scripts/quick_stop.sh
223+
./scripts/quick_stop.sh --execution <EXECUTION_METHOD>
210224
```
211225

212-
It will stop and teardown the Auto Upgrader.
226+
It will stop and teardown the Auto Upgrader using the `EXECUTION_METHOD`, which defaults to `service`.
213227

214228
Use `-h` to see the options
215229

@@ -220,9 +234,11 @@ Use `-h` to see the options
220234
To upgrade the Auto Upgrader when a new release has been deployed, you can run
221235

222236
```bash
223-
./scripts/auto_upgrader/auto_upgrader_upgrade.sh
237+
./scripts/auto_upgrader/auto_upgrader_upgrade.sh --execution <EXECUTION_METHOD>
224238
```
225239

240+
It will upgrade and restart the Auto Upgrader using the `EXECUTION_METHOD`, which defaults to `service`.
241+
226242
Use `-h` to see the options
227243

228244
<br />
@@ -232,9 +248,11 @@ Use `-h` to see the options
232248
To stop/start the Auto Upgrader workspace and/or dumps in a quick way. Optionally to remove the current version.
233249

234250
```bash
235-
./scripts/quick_restart.sh
251+
./scripts/quick_restart.sh --execution <EXECUTION_METHOD>
236252
```
237253

254+
It will restart the Auto Upgrader using the `EXECUTION_METHOD`, which defaults to `service`.
255+
238256
Use `-h` to see the options
239257

240258
<br />
@@ -263,13 +281,13 @@ To manage the Auto Upgrader, refer to the [user guide](./scripts/auto_upgrader/R
263281

264282
> ⚠️ **Important:** It is highly recommended to install the Miner using the Auto Upgrader!
265283
266-
To manage the Miner manually, refer to the [user guide](./scripts/miner/README.md)
284+
To manage the Miner manually and/or find out for the logs, refer to the [user guide](./scripts/miner/README.md)
267285

268286
## Validator <a id="installation-validator"></a>
269287

270288
> ⚠️ **Important:** It is highly recommended to install the Validator using the Auto Upgrader!
271289
272-
To manage the Validator manually, refer to the [user guide](./scripts/validator/README.md)
290+
To manage the Validator manually and/or find out for the logs, refer to the [user guide](./scripts/validator/README.md)
273291

274292
## Other <a id="installation-other"></a>
275293

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.0.1
1+
1.1.0

scripts/auto_upgrader/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,12 @@ SUBVORTEX_EXECUTION_METHOD=process
5252
pm2 list
5353
```
5454

55-
You should see a process named `subvortex-auto-upgrade`.
55+
You should see a process named `subvortex-auto-upgrader`.
5656

5757
To check logs:
5858

5959
```bash
60-
pm2 log subvortex-auto-upgrade
60+
pm2 log subvortex-auto-upgrader
6161
```
6262

6363
## 🛡️ Run as Service <a id="run-as-service"></a>
@@ -139,12 +139,12 @@ SUBVORTEX_EXECUTION_METHOD=docker
139139
docker ps
140140
```
141141

142-
Look for a container named `subvortex-auto-upgrade`.
142+
Look for a container named `subvortex-auto-upgrader`.
143143

144144
To follow logs:
145145

146146
```bash
147-
docker logs -f subvortex-auto-upgrade
147+
docker logs -f subvortex-auto-upgrader
148148
```
149149

150150
<br />
@@ -165,7 +165,7 @@ Confirm it's removed:
165165
pm2 list
166166
```
167167

168-
The `subvortex-auto-upgrade` process should no longer appear.
168+
The `subvortex-auto-upgrader` process should no longer appear.
169169

170170
## ❌ Remove Service <a id="remove-service"></a>
171171

@@ -203,7 +203,7 @@ Verify it's gone:
203203
docker ps
204204
```
205205

206-
The `subvortex-auto-upgrade` container should no longer be listed.
206+
The `subvortex-auto-upgrader` container should no longer be listed.
207207

208208
---
209209

scripts/cleaner/clean_workspace.sh

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ fi
155155
echo "🔗 Checking symlink at: $SYMLINK_PATH"
156156

157157
symlink_target=""
158-
if [ -e "$SYMLINK_PATH" ] && [ -h "$SYMLINK_PATH" ]; then
158+
if [ -L "$SYMLINK_PATH" ]; then
159159
resolved_target="$(readlink "$SYMLINK_PATH")"
160160
echo "📌 Resolved symlink target: $resolved_target"
161161

@@ -226,4 +226,18 @@ for dir in "${all_dirs[@]}"; do
226226
fi
227227
done
228228

229-
echo "✅ Cleanup workspace complete."
229+
# Final symlink cleanup check
230+
if [ -L "$SYMLINK_PATH" ]; then
231+
resolved_target="$(readlink "$SYMLINK_PATH")"
232+
233+
if [[ "$resolved_target" != /* ]]; then
234+
resolved_target="$(cd "$(dirname "$SYMLINK_PATH")" && cd "$(dirname "$resolved_target")" && pwd)/$(basename "$resolved_target")"
235+
fi
236+
237+
if [ ! -d "$resolved_target" ]; then
238+
echo "🧨 Symlink target no longer exists. Removing broken symlink: $SYMLINK_PATH"
239+
sudo rm -f "$SYMLINK_PATH"
240+
fi
241+
fi
242+
243+
echo "✅ Cleanup workspace complete."

0 commit comments

Comments
 (0)