diff --git a/citrineos/apply-patches.sh b/citrineos/apply-patches.sh index 4f04324b..d28c2498 100644 --- a/citrineos/apply-patches.sh +++ b/citrineos/apply-patches.sh @@ -1,3 +1,5 @@ #!/usr/bin/env bash -echo "No patches to apply" +CSMS_SP1_URL="ws://host.docker.internal:8082/cp001" +CSMS_SP2_URL="wss://host.docker.internal:8443/cp001" +CSMS_SP3_URL="wss://host.docker.internal:8444/cp001" diff --git a/demo-iso15118-2-ocpp-201.sh b/demo-iso15118-2-ocpp-201.sh index f0762203..38d3e4c1 100755 --- a/demo-iso15118-2-ocpp-201.sh +++ b/demo-iso15118-2-ocpp-201.sh @@ -27,8 +27,6 @@ where: DEMO_VERSION= DEMO_COMPOSE_FILE_NAME= DEMO_CSMS=maeve -DEMO_CSMS_REPO=$MAEVE_REPO -DEMO_CSMS_BRANCH=$MAEVE_BRANCH # loop through positional options/arguments while getopts ':r:b:123chm' option; do @@ -41,9 +39,7 @@ while getopts ':r:b:123chm' option; do DEMO_COMPOSE_FILE_NAME="docker-compose.ocpp201.yml" ;; 3) DEMO_VERSION="v2.0.1-sp3" DEMO_COMPOSE_FILE_NAME="docker-compose.ocpp201.yml" ;; - c) DEMO_CSMS="citrineos" - DEMO_CSMS_REPO=$CITRINEOS_REPO - DEMO_CSMS_BRANCH=$CITRINEOS_BRANCH ;; + c) DEMO_CSMS="citrineos" ;; m) START_OPTION="manual" ;; h) echo -e "$usage"; exit ;; \?) echo -e "illegal option: -$OPTARG\n" >&2 @@ -80,6 +76,9 @@ echo "DEMO VERSION: $DEMO_VERSION" echo "DEMO CONFIG: $DEMO_COMPOSE_FILE_NAME" echo "DEMO DIR: $DEMO_DIR" echo "DEMO CSMS: $DEMO_CSMS" +echo "CSMS_SP1_URL: $CSMS_SP1_URL" +echo "CSMS_SP2_URL: $CSMS_SP2_URL" +echo "CSMS_SP3_URL: $CSMS_SP3_URL" cd "${DEMO_DIR}" || exit 1 @@ -149,7 +148,6 @@ echo "Now applying the patches" docker cp manager/enable_evcc_logging.cfg everest-ac-demo-manager-1:/ext/dist/etc/everest/default_logging.cfg docker exec everest-ac-demo-manager-1 /bin/bash -c "cd /ext && patch -p0 -i /tmp/enable_payment_method_in_python.patch" docker exec everest-ac-demo-manager-1 /bin/bash -c "cd /ext/dist/libexec/everest && patch -p1 -i /tmp/support_payment_in_jsevmanager.patch" -docker exec everest-ac-demo-manager-1 /bin/bash -c "sed -i 's#ws://localhost:9000#ws://host.docker.internal/ws/cp001#' /ext/dist/share/everest/modules/OCPP201/component_config/standardized/InternalCtrlr.json" if [[ "$DEMO_VERSION" =~ sp2 || "$DEMO_VERSION" =~ sp3 ]]; then docker cp manager/cached_certs_correct_name_emaid.tar.gz everest-ac-demo-manager-1:/ext/source/build @@ -160,21 +158,17 @@ if [[ "$DEMO_VERSION" =~ sp2 || "$DEMO_VERSION" =~ sp3 ]]; then fi 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 +echo "Configured to SecurityProfile: 1, disabling TLS and configuring server to ${CSMS_SP1_URL}" +docker exec everest-ac-demo-manager-1 /bin/bash -c "sed -i 's#ws://localhost:9000#${CSMS_SP1_URL}#' /ext/dist/share/everest/modules/OCPP201/component_config/standardized/InternalCtrlr.json" 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" +echo "Configured to SecurityProfile: 2, configuring server to ${CSMS_SP2_URL}" +docker exec everest-ac-demo-manager-1 /bin/bash -c "sed -i 's#ws://localhost:9000#${CSMS_SP2_URL}#' /ext/dist/share/everest/modules/OCPP201/component_config/standardized/InternalCtrlr.json" elif [[ "$DEMO_VERSION" =~ sp3 ]]; then -echo "Copying device DB, configured to SecurityProfile: 3" -docker cp manager/device_model_storage_${DEMO_CSMS}_sp3.db \ - everest-ac-demo-manager-1:/ext/source/build/dist/share/everest/modules/OCPP201/device_model_storage.db +echo "Running with SP3, TLS should be enabled" +echo "Configured to SecurityProfile: 2, configuring server to ${CSMS_SP3_URL}" +docker exec everest-ac-demo-manager-1 /bin/bash -c "sed -i 's#ws://localhost:9000#${CSMS_SP3_URL}#' /ext/dist/share/everest/modules/OCPP201/component_config/standardized/InternalCtrlr.json" fi if [[ "$START_OPTION" == "auto" ]]; then diff --git a/maeve/apply-runtime-patches.sh b/maeve/apply-runtime-patches.sh index 17740219..7e08520d 100644 --- a/maeve/apply-runtime-patches.sh +++ b/maeve/apply-runtime-patches.sh @@ -1,5 +1,9 @@ #!/usr/bin/env bash +CSMS_SP1_URL="ws://host.docker.internal/ws/cp001" +CSMS_SP2_URL="wss://host.docker.internal/ws/cp001" +CSMS_SP3_URL="wss://host.docker.internal/ws/cp001" + if [[ "$DEMO_VERSION" =~ sp2 || "$DEMO_VERSION" =~ sp3 ]]; then echo "Patching the CSMS to enable EVerest organization" patch -p1 -i maeve-csms-everest-org.patch diff --git a/manager/device_model_storage_citrineos_sp1.db b/manager/device_model_storage_citrineos_sp1.db deleted file mode 100644 index 67b9838d..00000000 Binary files a/manager/device_model_storage_citrineos_sp1.db and /dev/null differ diff --git a/manager/device_model_storage_citrineos_sp2.db b/manager/device_model_storage_citrineos_sp2.db deleted file mode 100644 index 6a9adf59..00000000 Binary files a/manager/device_model_storage_citrineos_sp2.db and /dev/null differ diff --git a/manager/device_model_storage_citrineos_sp3.db b/manager/device_model_storage_citrineos_sp3.db deleted file mode 100644 index 16c61d64..00000000 Binary files a/manager/device_model_storage_citrineos_sp3.db and /dev/null differ diff --git a/manager/device_model_storage_maeve_sp1.db b/manager/device_model_storage_maeve_sp1.db deleted file mode 100644 index 7b96f36b..00000000 Binary files a/manager/device_model_storage_maeve_sp1.db and /dev/null differ diff --git a/manager/device_model_storage_maeve_sp2.db b/manager/device_model_storage_maeve_sp2.db deleted file mode 100644 index 9c193ce6..00000000 Binary files a/manager/device_model_storage_maeve_sp2.db and /dev/null differ diff --git a/manager/device_model_storage_maeve_sp3.db b/manager/device_model_storage_maeve_sp3.db deleted file mode 100644 index 9e10ad5b..00000000 Binary files a/manager/device_model_storage_maeve_sp3.db and /dev/null differ