From d0210116a9d3512ed1f0df1f42f2d61ea987f5e4 Mon Sep 17 00:00:00 2001 From: Shankari Date: Fri, 31 May 2024 17:13:28 -0700 Subject: [PATCH 1/2] reset to the known good commit *after* cloning This should fix https://github.com/EVerest/everest-demo/issues/47#issuecomment-2143117112 Testing done: Made a change to copy the everest demo instead of cloning it. ``` $ bash demo-iso15118-2-ac-plus-ocpp.sh -r /.../everest-demo -3 /var/folders/y5/cx3cfzrd2q116myv9ly86sw1rnlmdj/T/tmp.4wcbFf1P/maeve-csms /var/folders/y5/cx3cfzrd2q116myv9ly86sw1rnlmdj/T/tmp.4wcbFf1P HEAD is now at b990d0e fix: make lb depend on services in compose ... Patching the CSMS to enable EVerest organization patching file docker-compose.yml Patching the CSMS to enable local mo root patching file 'config/manager/config.toml' Patching the CSMS to enable local mo root patching file 'manager/handlers/ocpp201/authorize.go' Starting the CSMS ``` Signed-off-by: Shankari --- demo-iso15118-2-ac-plus-ocpp.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/demo-iso15118-2-ac-plus-ocpp.sh b/demo-iso15118-2-ac-plus-ocpp.sh index d704df32..37044d78 100755 --- a/demo-iso15118-2-ac-plus-ocpp.sh +++ b/demo-iso15118-2-ac-plus-ocpp.sh @@ -91,14 +91,14 @@ cd "${DEMO_DIR}" || exit 1 echo "Cloning EVerest from ${DEMO_REPO} into ${DEMO_DIR}/everest-demo" git clone --branch "${DEMO_BRANCH}" "${DEMO_REPO}" everest-demo -git reset --hard ${CSMS_BRANCH} - if [[ "$DEMO_VERSION" != v1.6j ]]; then echo "Cloning ${CSMS} CSMS from ${CSMS_REPO} into ${DEMO_DIR}/${CSMS}-csms and starting it" git clone ${CSMS_REPO} ${CSMS}-csms pushd ${CSMS}-csms || exit 1 + git reset --hard ${CSMS_BRANCH} + # Set up CSMS echo "Setting up ${CSMS}" if [[ "$CSMS" == "citrine" ]]; then From c98bdaea96f52ff4f4e49a0133ca5f6ce34c9154 Mon Sep 17 00:00:00 2001 From: Shankari Date: Fri, 31 May 2024 19:10:32 -0700 Subject: [PATCH 2/2] Copy the certificates and the device model to the correct locations This fixes: https://github.com/EVerest/everest-demo/issues/47#issuecomment-2143157540 by implementing https://github.com/EVerest/everest-demo/issues/47#issuecomment-2143194967 Testing done: - Ran the script - Station was connected to CSMS - Plugged in car with both EIM and PnC, both worked Signed-off-by: Shankari --- demo-iso15118-2-ac-plus-ocpp.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/demo-iso15118-2-ac-plus-ocpp.sh b/demo-iso15118-2-ac-plus-ocpp.sh index 37044d78..8c599e10 100755 --- a/demo-iso15118-2-ac-plus-ocpp.sh +++ b/demo-iso15118-2-ac-plus-ocpp.sh @@ -342,11 +342,11 @@ pushd everest-demo || exit 1 docker compose --project-name everest-ac-demo --file "${DEMO_COMPOSE_FILE_NAME}" up -d --wait docker cp config-sil-ocpp201-pnc.yaml everest-ac-demo-manager-1:/ext/source/config/config-sil-ocpp201-pnc.yaml if [[ "$DEMO_VERSION" =~ sp2 || "$DEMO_VERSION" =~ sp3 ]]; then - docker cp manager/cached_certs_correct_name_emaid.tar.gz everest-ac-demo-manager-1:/workspace/ - docker exec everest-ac-demo-manager-1 /bin/bash -c "tar xf cached_certs_correct_name_emaid.tar.gz" + docker cp manager/cached_certs_correct_name_emaid.tar.gz everest-ac-demo-manager-1:/ext/source/build + docker exec everest-ac-demo-manager-1 /bin/bash -c "pushd /ext/source/build && tar xf cached_certs_correct_name_emaid.tar.gz" echo "Configured everest certs, validating that the chain is set up correctly" - docker exec everest-ac-demo-manager-1 /bin/bash -c "openssl verify -show_chain -CAfile dist/etc/everest/certs/ca/v2g/V2G_ROOT_CA.pem --untrusted dist/etc/everest/certs/ca/csms/CPO_SUB_CA1.pem --untrusted dist/etc/everest/certs/ca/csms/CPO_SUB_CA2.pem dist/etc/everest/certs/client/csms/CSMS_LEAF.pem" + docker exec everest-ac-demo-manager-1 /bin/bash -c "pushd /ext/source/build && openssl verify -show_chain -CAfile dist/etc/everest/certs/ca/v2g/V2G_ROOT_CA.pem --untrusted dist/etc/everest/certs/ca/csms/CPO_SUB_CA1.pem --untrusted dist/etc/everest/certs/ca/csms/CPO_SUB_CA2.pem dist/etc/everest/certs/client/csms/CSMS_LEAF.pem" fi if [[ ${CSMS} == "citrine" ]]; then @@ -355,19 +355,19 @@ else if [[ "$DEMO_VERSION" =~ sp1 ]]; then echo "Copying device DB, configured to SecurityProfile: 1" docker cp manager/device_model_storage_maeve_sp1.db \ - everest-ac-demo-manager-1:/workspace/dist/share/everest/modules/OCPP201/device_model_storage.db + everest-ac-demo-manager-1:/ext/source/build/dist/share/everest/modules/OCPP201/device_model_storage.db elif [[ "$DEMO_VERSION" =~ sp2 ]]; then echo "Copying device DB, configured to SecurityProfile: 2" docker cp manager/device_model_storage_maeve_sp2.db \ - everest-ac-demo-manager-1:/workspace/dist/share/everest/modules/OCPP201/device_model_storage.db + everest-ac-demo-manager-1:/ext/source/build/dist/share/everest/modules/OCPP201/device_model_storage.db elif [[ "$DEMO_VERSION" =~ sp3 ]]; then echo "Copying device DB, configured to SecurityProfile: 3" docker cp manager/device_model_storage_maeve_sp3.db \ - everest-ac-demo-manager-1:/workspace/dist/share/everest/modules/OCPP201/device_model_storage.db + everest-ac-demo-manager-1:/ext/source/build/dist/share/everest/modules/OCPP201/device_model_storage.db fi fi if [[ "$DEMO_VERSION" =~ v2.0.1 ]]; then echo "Starting software in the loop simulation" - docker exec everest-ac-demo-manager-1 sh /workspace/build/run-scripts/run-sil-ocpp201-pnc.sh + docker exec everest-ac-demo-manager-1 sh /ext/source/build/run-scripts/run-sil-ocpp201-pnc.sh fi