From 940a158c0ec03b3384b47706371ee07a74da8db2 Mon Sep 17 00:00:00 2001 From: Shankari Date: Mon, 11 Nov 2024 21:09:49 -0800 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20=F0=9F=90=9B=20Ensure=20th?= =?UTF-8?q?at=20the=20demo=20code=20does=20not=20silently=20fail?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Several of the options in the demo do not actually work For example: - Citrine fails to build (even on main) - SP1 (and SP2) won't work with TLS https://github.com/EVerest/everest-demo/issues/78#issuecomment-2468520655 Fixes: - Error out before Citrine build with a message indicating that it is not supported - Patch the config for SP1 and SP2 to disable TLS Testing done: - Citrine ``` Cloning citrineos CSMS from https://github.com/citrineos/citrineos-core.git into /var/folders/y5/cx3cfzrd2q116myv9ly86sw1rnlmdj/T/tmp.I8ClXLLd/citrineos-csms and starting it Cloning into 'citrineos-csms'... remote: Enumerating objects: 16467, done. remote: Counting objects: 100% (303/303), done. remote: Compressing objects: 100% (221/221), done. remote: Total 16467 (delta 139), reused 161 (delta 70), pack-reused 16164 (from 1) Receiving objects: 100% (16467/16467), 5.07 MiB | 969.00 KiB/s, done. Resolving deltas: 100% (10346/10346), done. /var/folders/y5/cx3cfzrd2q116myv9ly86sw1rnlmdj/T/tmp.I8ClXLLd/citrineos-csms /var/folders/y5/cx3cfzrd2q116myv9ly86sw1rnlmdj/T/tmp.I8ClXLLd Copying certs into /var/folders/y5/cx3cfzrd2q116myv9ly86sw1rnlmdj/T/tmp.I8ClXLLd/citrineos-csms/Server/data/certificates Validating that the certificates are set up correctly Server/data/certificates/certChain.pem: OK Chain: depth=0: CN=host.docker.internal, O=EVerest, C=DE, DC=CPO (untrusted) depth=1: CN=CPOSubCA2, O=EVerest, C=DE, DC=V2G (untrusted) depth=2: CN=CPOSubCA1, O=EVerest, C=DE, DC=V2G (untrusted) depth=3: CN=V2GRootCA, O=EVerest, C=DE, DC=V2G No patches to apply Build and run CitrineOS does not currently build due to issues with npm dependencies. It is disabled until we roll forward. Apologies for the inconvenience! ``` - Maeve ``` Successfully copied 84.5kB to everest-ac-demo-manager-1:/ext/source/build/dist/share/everest/modules/OCPP201/device_model_storage.db Successfully copied 3.07kB to everest-ac-demo-manager-1:/tmp/ /ext/source /workspace patching file config/config-sil-ocpp201-pnc.yaml ``` And then charging with EIM was successful Signed-off-by: Shankari --- citrineos/build-and-run.sh | 3 +++ demo-iso15118-2-ocpp-201.sh | 4 ++++ manager/disable_iso_tls.patch | 11 +++++++++++ 3 files changed, 18 insertions(+) create mode 100644 manager/disable_iso_tls.patch diff --git a/citrineos/build-and-run.sh b/citrineos/build-and-run.sh index 9b6126ab..5d9d55ab 100644 --- a/citrineos/build-and-run.sh +++ b/citrineos/build-and-run.sh @@ -1,5 +1,8 @@ echo "Build and run" +echo "CitrineOS does not currently build due to issues with npm dependencies. It is disabled until we roll forward. Apologies for the inconvenience!" +exit 1 + pushd Server || exit 1 docker compose build diff --git a/demo-iso15118-2-ocpp-201.sh b/demo-iso15118-2-ocpp-201.sh index 2195c5d9..bdfb629c 100755 --- a/demo-iso15118-2-ocpp-201.sh +++ b/demo-iso15118-2-ocpp-201.sh @@ -158,10 +158,14 @@ if [[ "$DEMO_VERSION" =~ sp1 ]]; then echo "Copying device DB, configured to SecurityProfile: 1" docker cp manager/device_model_storage_${DEMO_CSMS}_sp1.db \ everest-ac-demo-manager-1:/ext/source/build/dist/share/everest/modules/OCPP201/device_model_storage.db +docker cp manager/disable_iso_tls.patch everest-ac-demo-manager-1:/tmp/ +docker exec everest-ac-demo-manager-1 /bin/bash -c "pushd /ext/source && patch -p0 -i /tmp/disable_iso_tls.patch" elif [[ "$DEMO_VERSION" =~ sp2 ]]; then echo "Copying device DB, configured to SecurityProfile: 2" docker cp manager/device_model_storage_${DEMO_CSMS}_sp2.db \ everest-ac-demo-manager-1:/ext/source/build/dist/share/everest/modules/OCPP201/device_model_storage.db +docker cp manager/disable_iso_tls.patch everest-ac-demo-manager-1:/tmp/ +docker exec everest-ac-demo-manager-1 /bin/bash -c "pushd /ext/source && patch -p0 -i /tmp/disable_iso_tls.patch" elif [[ "$DEMO_VERSION" =~ sp3 ]]; then echo "Copying device DB, configured to SecurityProfile: 3" docker cp manager/device_model_storage_${DEMO_CSMS}_sp3.db \ diff --git a/manager/disable_iso_tls.patch b/manager/disable_iso_tls.patch new file mode 100644 index 00000000..2db455d9 --- /dev/null +++ b/manager/disable_iso_tls.patch @@ -0,0 +1,11 @@ +--- /tmp/config-sil-ocpp201-pnc.yaml ++++ config/config-sil-ocpp201-pnc.yaml +@@ -14,7 +14,7 @@ + config_module: + device: auto + supported_ISO15118_2: true +- tls_active: true ++ tls_active: false + is_cert_install_needed: false + evse_manager_1: + module: EvseManager