Skip to content

Commit ebaf838

Browse files
committed
docs: adding tag test for local dev
1 parent 0074246 commit ebaf838

File tree

5 files changed

+71
-54
lines changed

5 files changed

+71
-54
lines changed

Makefile

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,44 @@
1-
# Local
1+
# Dev
2+
.PHONY: dev
23
dev:
34
@panel serve ./src/dashboard.py --show --dev
5+
6+
.PHONY: all
7+
all:
8+
@docker build -t intersect-dashboard:test services/nsdf_intersect_dashboard
9+
@docker build -t intersect-service:test services/nsdf_intersect_service
10+
@docker compose -f compose_local.yaml up -d
11+
412
# Docker
13+
.PHONY: dashboard
514
dashboard:
6-
@docker build -t intersect-dashboard:uv services/nsdf_intersect_dashboard
15+
@docker build -t intersect-dashboard services/nsdf_intersect_dashboard
716

17+
.PHONY: service
818
service:
9-
@docker build -t intersect-service:uv services/nsdf_intersect_service
19+
@docker build -t intersect-service services/nsdf_intersect_service
1020

21+
.PHONY: storage
1122
storage:
12-
@docker build -t intersect-storage:uv services/nsdf_intersect_storage
23+
@docker build -t intersect-storage services/nsdf_intersect_storage
24+
1325

26+
.PHONY: up
1427
up:
1528
@docker compose -f compose_local.yaml up -d
1629

30+
.PHONY: down
1731
down:
1832
@docker compose -f compose_local.yaml down
1933

20-
deploy:
21-
@docker compose up -d
22-
23-
undeploy:
24-
@docker compose down
25-
34+
.PHONY: rmvolumes
2635
rmvolumes:
2736
@docker volume rm nsdf-intersect_intersect_bragg_volume nsdf-intersect_intersect_transition_volume nsdf-intersect_intersect_andie_volume nsdf-intersect_intersect_scientist_cloud_volume
2837

2938
# clients
30-
39+
.PHONY: realtime
3140
realtime:
3241
@python clients/realtime_client.py
42+
.PHONY: transition
3343
transition:
3444
@python clients/transition_client.py

README.md

Lines changed: 45 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ This repository hosts the dashboard, dashboard service, storage service, and tes
1515

1616
#### Table of Contents
1717

18+
- [Quick Start](#-quick-start)
1819
- [Dashboard](#-dashboard)
1920
- [Building dashboard image](#building-the-dashboard-image)
2021
- [Running the dashboard container](#running-the-dashboard-container)
@@ -25,15 +26,37 @@ This repository hosts the dashboard, dashboard service, storage service, and tes
2526
- [Building storage service image](#building-the-storage-service-image)
2627
- [Running the storage service container](#running-the-storage-service-container)
2728
- [Testing Clients](#-testing-with-the-client)
28-
- [Single file client](#single_clientpy)
29-
- [Real-time client](#realtime_clientpy)
30-
- [Transition client](#transition_clientpy)
29+
- [Real-time client](#realtime_client)
30+
- [Single file client](#single_client)
31+
- [Transition client](#transition_client)
3132
- [Running all services](#-running-all-services)
3233
- [Running with pre-built images](#running-with-pre-built-images)
3334
- [Running with codespaces](#running-with-codespaces)
3435
- [Authors](#authors)
3536
- [Acknowledgements](#acknowledgements)
3637

38+
## ⚡Quick Start
39+
40+
To get started, you can build and launch all the services with the following command:
41+
42+
```bash
43+
make all
44+
```
45+
46+
Then, you can visualize the dashboard at `http://localhost:10042`.
47+
48+
Lastly, simulate networking of the service and dashboard with the following command:
49+
50+
```bash
51+
make realtime
52+
```
53+
54+
To cleanup, you can run:
55+
56+
```bash
57+
make down
58+
```
59+
3760
## 📈 Dashboard
3861

3962
The dashboard is the visualization component for monitoring the experiment in real-time.
@@ -45,7 +68,7 @@ The dashboard is the visualization component for monitoring the experiment in re
4568
To build the Docker image for the dashboard, run the following:
4669

4770
```bash
48-
docker build -t intersect-dashboard -f Dockerfile.dashboard .
71+
make dashboard
4972
```
5073

5174
#### Running the dashboard container
@@ -59,7 +82,6 @@ docker run --rm -p 10042:10042 intersect-dashboard
5982
## 🖥️ Dashboard service
6083

6184
The dashboard service uses [intersect-sdk](https://github.com/INTERSECT-SDK/python-sdk) to enable endpoints that work with message brokers (i.e RabbitMQ).
62-
The service will include three endpoints to serve the dashboard component: `get_bragg_data`, `get_transition_data`, and `get_next_temperature`.
6385

6486
### 🐳 Docker
6587

@@ -68,7 +90,7 @@ The service will include three endpoints to serve the dashboard component: `get_
6890
To build the Docker image for the service, run the following:
6991

7092
```bash
71-
docker build -t intersect-service -f Dockerfile.dashboard_service .
93+
make service
7294
```
7395

7496
#### Running the dashboard service container
@@ -90,7 +112,7 @@ The storage service interfaces with Scientist Cloud to persist the data that is
90112
To build the Docker image for the storage service, run the following:
91113

92114
```bash
93-
docker build -t intersect-storage -f Dockerfile.storage_service .
115+
make storage
94116
```
95117

96118
#### Running the storage service container
@@ -103,10 +125,21 @@ docker run --rm -p 10044:10044 intersect-storage
103125

104126
## 🧪 Testing with the client
105127

106-
To test the networking of the service and the observer on the dashboard, we can use intersect-sdk to create clients that serve the purpose of simulating
107-
the traffic through the message broker. We have two clients.
128+
To test the networking of the service and the dashboard, we can use intersect-sdk to create clients that serve the purpose of simulating
129+
the traffic through the message broker. We have three clients.
108130

109-
### single_client.py
131+
### Realtime Client
132+
133+
This is a client that implements a message stack with different events (get_bragg_data, get_transition_data, get_next_temperature) and wait times, in order to simulate a real-time stream of events. More information
134+
on this type of client here [counting example](https://intersect-python-sdk.readthedocs.io/en/latest/examples/counting.html). Use this client to test all the dashboard functionality.
135+
136+
To run this client make sure you have the service running, then you can execute the following:
137+
138+
```bash
139+
make realtime
140+
```
141+
142+
### Single Client
110143

111144
This is a simple client that sends only one file.
112145

@@ -130,18 +163,7 @@ python clients/single_client.py --transition
130163
python clients/single_client.py --next-temp --val 30.0
131164
```
132165

133-
### realtime_client.py
134-
135-
This is a client that implements a message stack with different events (get_bragg_data, get_transition_data, get_next_temperature) and wait times, in order to simulate a real-time stream of events. More information
136-
on this type of client here [counting example](https://intersect-python-sdk.readthedocs.io/en/latest/examples/counting.html).
137-
138-
To run this client make sure you have the service running, then you can execute the following:
139-
140-
```bash
141-
python clients/realtime_client.py
142-
```
143-
144-
### transition_client.py
166+
### Transition Client
145167

146168
This is a client that implements a message stack for testing the transition plot. The transition plot receives the type TransitionData which contains a campaign ID, temperature, and a variable size y-list.
147169
The client can simulate a full campaign for the transition plot via its two arguments `--n` for number of points `--ny` for y-list length as follows.
@@ -244,12 +266,11 @@ make transition
244266
## Authors
245267

246268
This project was created by the [NSDF team](https://nationalsciencedatafabric.org/contributors.html), and the [INTERSECT team](https://www.ornl.gov/intersect).
247-
To reach out email us at info@nationalsciencedatafabric.org and Dr. Michela Taufer mtaufer@utk.edu.
269+
To reach out email us at [info@nationalsciencedatafabric.org](mailto:info@nationalsciencedatafabric.org) and Dr. Michela Taufer [mtaufer@utk.edu](mtaufer@utk.edu).
248270

249271
## Acknowledgements
250272

251273
The authors would like to express the gratitude to:
252274

253275
- NSF through the awards 2138811, 2103845, 2334945, 2138296, and 2331152.
254276
- VisStore/ ScientistCloud [link](https://www.visoar.net/)
255-
- The Seal Storage Team [link](https://sealstorage.io/)

clients/short_list_of_data.txt

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,6 @@
1+
./clients/GSAS/NOM168361tof.gsa
2+
./clients/GSAS/NOM168362tof.gsa
13
./clients/GSAS/NOM168363tof.gsa
24
./clients/GSAS/NOM168364tof.gsa
35
./clients/GSAS/NOM168365tof.gsa
46
./clients/GSAS/NOM168366tof.gsa
5-
./clients/GSAS/NOM168367tof.gsa
6-
./clients/GSAS/NOM168368tof.gsa
7-
./clients/GSAS/NOM168369tof.gsa
8-
./clients/GSAS/NOM168370tof.gsa
9-
./clients/GSAS/NOM168371tof.gsa
10-
./clients/GSAS/NOM168372tof.gsa
11-
./clients/GSAS/NOM168373tof.gsa
12-
./clients/GSAS/NOM168374tof.gsa
13-
./clients/GSAS/NOM168375tof.gsa
14-
./clients/GSAS/NOM168376tof.gsa
15-
./clients/GSAS/NOM168377tof.gsa
16-
./clients/GSAS/NOM168378tof.gsa
17-
./clients/GSAS/NOM168379tof.gsa
18-
./clients/GSAS/NOM168380tof.gsa
19-
./clients/GSAS/NOM168381tof.gsa
20-
./clients/GSAS/NOM168382tof.gsa

clients/single_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
from schema import FileType, TransitionData, NextTemperature
2727

2828
logging.basicConfig(level=logging.INFO)
29-
CONFIG_CLIENT = "config/config_client.yaml"
29+
CONFIG_CLIENT = os.path.join(os.getcwd(), "clients/config/config_client.yaml")
3030

3131
transition_data = [
3232
[284.89, 0.9353496748096445, 1.5583828040832086],

compose_local.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ services:
2424
timeout: 10s
2525

2626
dashboard:
27-
image: "intersect-dashboard:uv"
27+
image: "intersect-dashboard:test"
2828
container_name: dashboard
2929
ports:
3030
- "10042:10042"
@@ -45,7 +45,7 @@ services:
4545
- intersect_scientist_cloud_volume:/app/scientist_cloud_volume
4646

4747
dashboard_service:
48-
image: "intersect-service:uv"
48+
image: "intersect-service:test"
4949
container_name: dashboard_service
5050
ports:
5151
- "10043:10043"

0 commit comments

Comments
 (0)