Skip to content

Commit

Permalink
Copy the certificates and the device model to the correct locations
Browse files Browse the repository at this point in the history
This fixes:
EVerest#47 (comment)
by implementing
EVerest#47 (comment)

Testing done:
- Ran the script
- Station was connected to CSMS
- Plugged in car with both EIM and PnC, both worked
  • Loading branch information
shankari committed Jun 1, 2024
2 parents 479401e + 601f00d commit 4cbe5e7
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions demo-iso15118-2-ac-plus-ocpp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

0 comments on commit 4cbe5e7

Please sign in to comment.