From 2f2b0ae667620f2831ede956714b13a5c25dd593 Mon Sep 17 00:00:00 2001 From: Richards Date: Fri, 6 Oct 2023 12:50:19 -0400 Subject: [PATCH] Impose resource constraints on demos Signed-off-by: Daniel Moore <9156191+drmrd@users.noreply.github.com> --- .env | 2 +- README.md | 4 ++++ docker-compose.admin-panel.yml | 5 +++++ docker-compose.iso15118-dc.yml | 5 +++++ docker-compose.two-evse.yml | 5 +++++ docker-compose.yml | 5 +++++ nodered/Dockerfile | 2 +- 7 files changed, 26 insertions(+), 2 deletions(-) diff --git a/.env b/.env index 109e1592..8dd154d7 100644 --- a/.env +++ b/.env @@ -1 +1 @@ -TAG=0.0.4 +TAG=0.0.7 diff --git a/README.md b/README.md index 935c6bd7..2ef09263 100644 --- a/README.md +++ b/README.md @@ -50,6 +50,10 @@ The use cases supported by the three demos are summarized in conceptual block di - 🚨 ISO 15118 DC Charging ⚡: `curl https://raw.githubusercontent.com/everest/everest-demo/main/demo-iso15118-2-dc.sh | bash` - 🚨 Two EVSE Charging ⚡: `curl https://raw.githubusercontent.com/everest/everest-demo/main/demo-two-evse.sh | bash` +#### Demo Notes +EVerest is designed with embedded applications in mind. To illustrate this, we've imposed maximum CPU usage and RAM constraints of 100% (1 core) and 1024MB, respectively, in each of the demos. Even on modest desktop hardware, these constraints should only result in slightly longer boot times. +The resource constraints for a demo can be changed in its Docker Compose file (the file downloaded in "STEP 1" below). + ### STEP 2: Interact with the demo - Open the `nodered` flows to understand the module flows at http://127.0.0.1:1880 - Open the demo UI at http://127.0.0.1:1880/ui diff --git a/docker-compose.admin-panel.yml b/docker-compose.admin-panel.yml index 303db3d2..998d0d77 100644 --- a/docker-compose.admin-panel.yml +++ b/docker-compose.admin-panel.yml @@ -8,6 +8,11 @@ services: manager: image: ghcr.io/everest/everest-demo/manager:${TAG} + deploy: + resources: + limits: + cpus: '1.0' + memory: 1024mb depends_on: - mqtt-server environment: diff --git a/docker-compose.iso15118-dc.yml b/docker-compose.iso15118-dc.yml index 43b2108e..b1c90a7b 100644 --- a/docker-compose.iso15118-dc.yml +++ b/docker-compose.iso15118-dc.yml @@ -10,6 +10,11 @@ services: manager: image: ghcr.io/everest/everest-demo/manager:${TAG} + deploy: + resources: + limits: + cpus: '1.0' + memory: 1024mb depends_on: - mqtt-server environment: diff --git a/docker-compose.two-evse.yml b/docker-compose.two-evse.yml index 3174bb86..71495e54 100644 --- a/docker-compose.two-evse.yml +++ b/docker-compose.two-evse.yml @@ -8,6 +8,11 @@ services: manager: image: ghcr.io/everest/everest-demo/manager:${TAG} + deploy: + resources: + limits: + cpus: '1.0' + memory: 1024mb depends_on: - mqtt-server environment: diff --git a/docker-compose.yml b/docker-compose.yml index 26ad2393..47b33f2f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -8,6 +8,11 @@ services: manager: image: ghcr.io/everest/everest-demo/manager:${TAG} + deploy: + resources: + limits: + cpus: '1.0' + memory: 1024mb depends_on: - mqtt-server environment: diff --git a/nodered/Dockerfile b/nodered/Dockerfile index 6e748b6b..d77a46a8 100644 --- a/nodered/Dockerfile +++ b/nodered/Dockerfile @@ -4,6 +4,6 @@ RUN npm install node-red-contrib-ui-actions RUN npm install node-red-node-ui-table RUN npm install node-red-contrib-ui-level -COPY config /config +COPY --chown=node-red:root config /config LABEL org.opencontainers.image.source=https://github.com/everest/everest-demo