Skip to content

Commit cecfa34

Browse files
committed
docs(beta): simplify install steps — no shell vars, no fresh/upgrade split
Drop $WSAVAIL_DIR and $NODE_TAG. Operators just cd into their existing checkout and run the commands as-is. config.py step is now idempotent: keep existing, otherwise copy from sample. No verb branching between "fresh install" and "upgrade".
1 parent d5afc48 commit cecfa34

1 file changed

Lines changed: 20 additions & 56 deletions

File tree

BETA.md

Lines changed: 20 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,110 +1,74 @@
11
# ws-availability v1.1.0-beta.1 — Install
22

3-
Beta release. API-compatible with v1.0.5. Default behavior unchanged unless you opt in via env vars.
3+
Beta release. API-compatible with v1.0.5.
44

55
## Prerequisites
66

7-
- Docker with the `docker-compose` v1.x (or `docker compose` v2) plugin.
8-
- Running WFCatalog MongoDB ≥ 4.2 reachable from the host.
7+
- Docker with `docker-compose` (v1) or `docker compose` (v2).
8+
- WFCatalog MongoDB ≥ 4.2 reachable from the host.
99
- Port 9001 free on the host.
10-
- ~2 GB RAM.
1110

1211
## Install
1312

14-
Set two shell variables once. Replace `<your_node>` with a short tag (`noa`, `resif`, `orfeus`, …).
13+
`cd` into your `ws-availability` checkout (or `git clone https://github.com/EIDA/ws-availability.git` if you don't have one yet), then:
1514

16-
```bash
17-
export WSAVAIL_DIR=/path/to/your/ws-availability/checkout # adjust
18-
export NODE_TAG=<your_node> # adjust
19-
```
20-
21-
1. Back up.
22-
23-
```bash
24-
cd "$WSAVAIL_DIR"
25-
cp config.py "$HOME/config.py.pre-1.1.0-beta.bak" 2>/dev/null || true
26-
crontab -l > "$HOME/crontab.pre-1.1.0-beta.bak" 2>/dev/null || true
27-
git rev-parse HEAD > "$HOME/ws-availability.pre-1.1.0-beta.commit" 2>/dev/null || true
28-
```
29-
30-
2. Check out the beta.
15+
1. Check out the beta.
3116

3217
```bash
3318
git fetch --tags origin
3419
git checkout v1.1.0-beta.1
3520
```
3621

37-
3. Set the per-node Sentry tag.
38-
39-
```bash
40-
echo "SENTRY_ENVIRONMENT=${NODE_TAG}_production" > .env
41-
```
42-
43-
4. If this is a first install, copy and edit `config.py`. (Skip on upgrade — your existing `config.py` is kept.)
44-
45-
```bash
46-
cp config.py.sample config.py
47-
$EDITOR config.py
48-
```
49-
50-
5. Build images.
22+
2. `config.py` — keep your existing one if you already have it; otherwise copy the sample and edit:
5123

5224
```bash
53-
docker-compose build api cacher
25+
[ -f config.py ] || cp config.py.sample config.py
26+
$EDITOR config.py # set MONGODB_*, FDSNWS_STATION_URL, SENTRY_DSN
5427
```
5528

56-
6. Replace the API container.
29+
3. Set your node's Sentry tag (replace `noa` with your node short name):
5730

5831
```bash
59-
docker-compose up -d --no-deps --build api
32+
echo "SENTRY_ENVIRONMENT=noa_production" > .env
6033
```
6134

62-
7. Replace the cacher container.
35+
4. Build and start.
6336

6437
```bash
65-
docker-compose up -d --no-deps --build cacher
38+
docker-compose build
39+
docker-compose up -d
6640
```
6741

68-
Wait for the cacher startup tasks to finish:
69-
70-
```bash
71-
docker logs -f fdsnws-availability-cacher 2>&1 | grep --line-buffered -E "Scheduler started|ERROR|Traceback"
72-
```
73-
74-
Stop tailing (`Ctrl-C`) once you see `Scheduler started`.
75-
76-
8. If your node had a host cron triggering `views/main.js`, remove it. It is now redundant.
42+
5. If your node had a host cron triggering `views/main.js`, remove it — it's now redundant.
7743

7844
```bash
7945
crontab -l | grep -v "ws-availability.*views.*main.js" | crontab -
8046
```
8147

8248
## Verify
8349

84-
Replace `<known_net>` and `<known_sta>` with one of your live stations.
50+
Replace `<net>` and `<sta>` with one of your live stations.
8551

8652
```bash
8753
curl -s http://127.0.0.1:9001/version
8854
# expected: 1.1.0-beta.1
8955

9056
curl -s -o /dev/null -w "%{http_code}\n" \
91-
"http://127.0.0.1:9001/extent?net=<known_net>&sta=<known_sta>&start=2024-01-01&end=2024-01-02"
57+
"http://127.0.0.1:9001/extent?net=<net>&sta=<sta>&start=2024-01-01&end=2024-01-02"
9258
# expected: 200
9359

94-
curl -s -o /dev/null -w "%{http_code}\n" "http://127.0.0.1:9001/extent?network=<known_net>"
60+
curl -s -o /dev/null -w "%{http_code}\n" "http://127.0.0.1:9001/extent?network=<net>"
9561
# expected: 413
9662

9763
docker exec fdsnws-availability-api env | grep SENTRY_ENVIRONMENT
98-
# expected: SENTRY_ENVIRONMENT=<your_node>_production
64+
# expected: SENTRY_ENVIRONMENT=noa_production
9965
```
10066

10167
## Rollback
10268

10369
```bash
104-
cd "$WSAVAIL_DIR"
10570
git checkout v1.0.5
10671
rm -f .env
107-
docker-compose build api cacher
108-
docker-compose up -d --no-deps api cacher
109-
crontab "$HOME/crontab.pre-1.1.0-beta.bak"
72+
docker-compose build
73+
docker-compose up -d
11074
```

0 commit comments

Comments
 (0)