Skip to content

Commit 4b0a2e2

Browse files
Remove unused features (#75)
* Remove unused features * Changes to CI * Update readme Co-authored-by: Joseph Ware <[email protected]> * Use default ingress and add section in values.yaml --------- Co-authored-by: Joseph Ware <[email protected]>
1 parent af30194 commit 4b0a2e2

Some content is hidden

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

45 files changed

+332
-3347
lines changed
Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,8 @@
1-
name: backend CI
1+
name: CI
22

33
on:
44
push:
5-
paths:
6-
- pyproject.toml
7-
- src/**
8-
- tests/**
95
pull_request:
10-
paths:
11-
- pyproject.toml
12-
- src/**
13-
- tests/**
146

157
jobs:
168
check:
@@ -29,7 +21,7 @@ jobs:
2921
strategy:
3022
matrix:
3123
runs-on: ["ubuntu-latest"] # can add windows-latest, macos-latest
32-
python-version: ["3.11"] # Should run with 3.12 once not dependent on Dodal for constants
24+
python-version: ["3.11", "3.12"]
3325
include:
3426
# Include one that runs in the dev environment
3527
- runs-on: "ubuntu-latest"

.github/workflows/gui_ci.yml

Lines changed: 0 additions & 27 deletions
This file was deleted.

README.md

Lines changed: 14 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,24 @@
11
[![Frontend CI](https://github.com/DiamondLightSource/daq-config-server/actions/workflows/gui_ci.yml/badge.svg)](https://github.com/DiamondLightSource/daq-config-server/actions/workflows/gui_ci.yml)
2-
[![Backend CI](https://github.com/DiamondLightSource/daq-config-server/actions/workflows/backend_ci.yml/badge.svg)](https://github.com/DiamondLightSource/daq-config-server/actions/workflows/backend_ci.yml)
2+
[![Backend CI](https://github.com/DiamondLightSource/daq-config-server/actions/workflows/ci.yml/badge.svg)](https://github.com/DiamondLightSource/daq-config-server/actions/workflows/backend_ci.yml)
33
[![Coverage](https://codecov.io/gh/DiamondLightSource/daq-config-server/branch/main/graph/badge.svg)](https://codecov.io/gh/DiamondLightSource/daq-config-server)
44
[![PyPI](https://img.shields.io/pypi/v/daq-config-server.svg)](https://pypi.org/project/daq-config-server)
55
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
66

77
# DAQ Config Server
88

9-
A service to put and get your config values from.
9+
IMPORTANT: This repository is currently under a rework, none of the features are production-ready yet.
1010

11-
Comprises a FastAPI backend with a valkey database to C/R/U/D config values, and a Chakra/React frontend for easier management.
11+
A service to read files on Diamond's filesystem from a BlueAPI container.
1212

13-
Currently the scope is JUST storing and retrieving feature flags for Hyperion/I03 UDC but we hope to expand this to replace all DAQ config files.
13+
Comprises a FastAPI backend
14+
15+
Currently the scope is JUST reading files on /dls_sw/
1416

1517
| Source | <https://github.com/DiamondLightSource/daq-config-server> |
1618
| :------: | :----------------------------------------------------------------: |
1719
| Docker | `docker run ghcr.io/DiamondLightSource/daq-config-server:latest` |
1820
| Releases | <https://github.com/DiamondLightSource/daq-config-server/releases> |
1921

20-
A simple app for storing and fetching values. Has a Valkey (Redis) instance as well as options for file-backed legacy
21-
values (e.g. `beamlineParameters`...)
22-
2322
Currently the server application always needs to be run with the `--dev` flag, as it cannot yet look at the DLS
2423
filesystem to find the real beamline parameter files.
2524

@@ -34,32 +33,22 @@ use_stub_offsets: bool = config_server.best_effort_get_feature_flag("use_stub_of
3433

3534
```
3635

37-
To work on the GUI you will probably need to run:
38-
39-
```bash
40-
module load node
41-
npm install
42-
```
43-
44-
in the gui directory to setup the environment.
45-
4636
## Testing and deployment
4737

48-
There is a convenient script in `./deployment/build_and_push_all.sh` to build all the containers, which takes
38+
There is a convenient script in `./deployment/build_and_push.sh`, which takes
4939
a `--dev` option to push containers with `-dev` appended to their names and a `--no-push` option for local
50-
development. This ensures that environment variables for dev or prod builds are included in the built container,
51-
such as the GUI pointing at the subdomain URL vs. localhost, and the `root_path` of the FastAPI app. To push to
40+
development. This ensures that environment variables for dev or prod builds are included in the built container. To push to
5241
the registry you must have identified to gcloud by having loaded a kubernetes module and running `gcloud auth login.`
5342

5443
To deploy a live version, you can run the above script with no arguments and then while logged in to
5544
argus, in the `daq-config-server` namespace, run `kubectl rollout restart deployment`. If it is not
56-
currently deploy it you can deploy it with `helm install daq-config ./helmchart`.
45+
currently deployed it you can deploy it with `helm install daq-config ./helmchart`.
5746

58-
To test locally, you can build everything with `./deployment/build_and_push_all.sh --dev --no-push` and then
59-
run the containers `daq-config-server-dev` (with the command `daq-config-server --dev`), `daq-config-server-db-dev`,
47+
To test locally, you can build with `./deployment/build_and_push.sh --dev --no-push` and then
48+
run the container `daq-config-server-dev` (with the command `daq-config-server --dev`), `daq-config-server-db-dev`,
6049
and `daq-config-server-gui-dev`, all with the `--net host` option.
6150

62-
To test on pollux, log in to pollux in your namespace and run:
51+
To test on argus, log in to argus in your namespace and run:
6352

6453
```bash
6554
helm install daq-config ./helmchart/ --values dev-values.yaml
@@ -68,7 +57,7 @@ helm install daq-config ./helmchart/ --values dev-values.yaml
6857
followed by:
6958

7059
```bash
71-
kubectl port-forward service/daq-config-server-svc 8080 8555
60+
kubectl port-forward service/daq-config-server-svc 8555
7261
```
7362

74-
after which you should be able to access the frontend on `http://localhost:8080` and the API on `http://localhost:8555`
63+
after which you should be able to access the API on `http://localhost:8555/docs`
Lines changed: 1 addition & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ for option in "$@"; do
1515
echo "Build and push the current repository state into containers and publish them to"
1616
echo "gcr.io/diamond-privreg/daq-config-server/<container-name> ready for deployment."
1717
echo " "
18-
echo " -d, --dev Creates -dev:latest tagged containers for testing on pollux."
18+
echo " -d, --dev Creates -dev:latest tagged containers for testing on argus."
1919
echo " -n, --no-push Don't push containers to GCR."
2020
echo " "
2121
exit 0
@@ -33,19 +33,13 @@ BASE_REPO_ADDR="gcr.io/diamond-privreg/daq-config-server/"
3333
if [ $DEV -gt 0 ]; then
3434
echo "Building dev-mode containers..."
3535
MAIN_CONTAINER_NAME="${BASE_CONTAINER_NAME}-dev"
36-
GUI_CONTAINER_NAME="${BASE_CONTAINER_NAME}-gui-dev"
37-
DB_CONTAINER_NAME="${BASE_CONTAINER_NAME}-db-dev"
3836
else
3937
echo "Building prod-mode containers..."
4038
MAIN_CONTAINER_NAME="${BASE_CONTAINER_NAME}"
41-
GUI_CONTAINER_NAME="${BASE_CONTAINER_NAME}-gui"
42-
DB_CONTAINER_NAME="${BASE_CONTAINER_NAME}-db"
4339
fi
4440
echo " "
4541

4642
MAIN_CONTAINER_TAG="${BASE_REPO_ADDR}${MAIN_CONTAINER_NAME}"
47-
GUI_CONTAINER_TAG="${BASE_REPO_ADDR}${GUI_CONTAINER_NAME}"
48-
DB_CONTAINER_TAG="${BASE_REPO_ADDR}${DB_CONTAINER_NAME}"
4943

5044
# set env vars which will be used by build process:
5145
if [ $DEV -gt 0 ]; then
@@ -67,41 +61,4 @@ podman build --build-arg RUN_APP_IN_DEV_MODE=$MAIN_APP_DEV_MODE -t $MAIN_CONTAIN
6761
if [ $PUSH -gt 0 ]; then
6862
podman tag $MAIN_CONTAINER_NAME $MAIN_CONTAINER_TAG
6963
podman push $MAIN_CONTAINER_NAME $MAIN_CONTAINER_TAG
70-
fi
71-
72-
cd gui/config-server-gui
73-
74-
echo " "
75-
echo "========================"
76-
echo "==== Building GUI ===="
77-
echo "========================"
78-
module load node
79-
npm run build
80-
81-
echo " "
82-
echo "=============================================="
83-
echo "==== Building and pushing GUI container ===="
84-
echo "=============================================="
85-
echo " "
86-
echo "Building ${GUI_CONTAINER_NAME}"
87-
echo " "
88-
podman build -t $GUI_CONTAINER_NAME .
89-
if [ $PUSH -gt 0 ]; then
90-
podman tag $GUI_CONTAINER_NAME $GUI_CONTAINER_TAG
91-
podman push $GUI_CONTAINER_NAME $GUI_CONTAINER_TAG
92-
fi
93-
94-
cd ../../valkey
95-
96-
echo " "
97-
echo "============================================="
98-
echo "==== Building and pushing DB container ===="
99-
echo "============================================="
100-
echo " "
101-
echo "Building ${DB_CONTAINER_NAME}"
102-
echo " "
103-
podman build -t $DB_CONTAINER_NAME .
104-
if [ $PUSH -gt 0 ]; then
105-
podman tag $DB_CONTAINER_NAME $DB_CONTAINER_TAG
106-
podman push $DB_CONTAINER_NAME $DB_CONTAINER_TAG
10764
fi

gui/config-server-gui/.gitignore

Lines changed: 0 additions & 23 deletions
This file was deleted.

gui/config-server-gui/Dockerfile

Lines changed: 0 additions & 2 deletions
This file was deleted.

gui/config-server-gui/README.md

Lines changed: 0 additions & 59 deletions
This file was deleted.

gui/config-server-gui/build_container.sh

Lines changed: 0 additions & 6 deletions
This file was deleted.

gui/config-server-gui/package.json

Lines changed: 0 additions & 55 deletions
This file was deleted.
-14.7 KB
Binary file not shown.

0 commit comments

Comments
 (0)