Skip to content

Commit

Permalink
Added Option to run ISO-15118 + OPP with Edgeshark
Browse files Browse the repository at this point in the history
- Added -s flag to `demo-iso15118-2-ac-plus-ocpp.sh`, to
curl and launch EdgeShark alongside demo
- Added "Optional" section to README, to explain this flag
  • Loading branch information
the-bay-kay committed Jun 12, 2024
1 parent 2bf6335 commit 08e1b8f
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,13 @@ in your terminal before one of the one-liners presented in the next section.
- Run the demo: 💄 exploring configs 🔧: `curl -o docker-compose.yml https://raw.githubusercontent.com/everest/everest-demo/main/docker-compose.admin-panel.yml && docker compose -p everest-admin-panel up`
- Access the visual representation at http://localhost:8849

### OPTIONAL: Explore a demo with Edgeshark
- For each demo of ISO 15118-2 AC Charging with OCPP, the demo may be ran alongside [Edgeshark](httpos://github.com/siemans/edgeshark?tab=readme-ov-file#edgeshark) for additional information on the network connection between each container.
- To launch a Edgeshark alongside one of these demos, include the -s flag when running the demo
- 🦈 Example Profile 2 ⚡: `curl https://raw.githubusercontent.com/everest/everest-demo/main/demo-iso15118-2-ac-plus-ocpp.sh | bash -s - -s - -2`
- Using your preferred web browser, navigate to http://localhost:5001 and explore the connections via the discovery engine.
- If you have installed the [cshargextcap plugin](https://github.com/siemens/cshargextcap?tab=readme-ov-file#containershark-extcap-plugin-for-wireshark), you may launch [Wireshark Desktop](https://www.wireshark.org/download.html) from the discovery engine, to perform a live capture.

### TEARDOWN: Clean up after the demo
- Kill the demo process
- Delete files and containers: `docker compose -p [prefix] down && rm docker-compose.yml`
Expand Down
17 changes: 13 additions & 4 deletions demo-iso15118-2-ac-plus-ocpp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ CSMS="maeve"



usage="usage: $(basename "$0") [-r <repo>] [-b <branch>] [-c <csms>] [-j|1|2|3] [-h]
usage="usage: $(basename "$0") [-r <repo>] [-b <branch>] [-c <csms>] [-s] [-j|1|2|3] [-h]
This script will run EVerest ISO 15118-2 AC charging with OCPP demos.
Expand All @@ -21,6 +21,7 @@ where:
-r URL to everest-demo repo to use (default: $DEMO_REPO)
-b Branch of everest-demo repo to use (default: $DEMO_BRANCH)
-c Use CitrineOS CSMS (default: MaEVe)
-s Run with Edgeshark
-j OCPP v1.6j
-1 OCPP v2.0.1 Security Profile 1
-2 OCPP v2.0.1 Security Profile 2
Expand All @@ -30,16 +31,17 @@ where:

DEMO_VERSION=
DEMO_COMPOSE_FILE_NAME=

RUN_WITH_EDGESHARK=false

# loop through positional options/arguments
while getopts ':r:b:cj123h' option; do
while getopts ':r:b:c:sj123h' option; do
case "$option" in
r) DEMO_REPO="$OPTARG" ;;
b) DEMO_BRANCH="$OPTARG" ;;
c) CSMS="citrine"
CSMS_REPO="https://github.com/citrineos/citrineos-core"
CSMS_BRANCH="63670f3adc09266a0977862d972b0f7e440c577f" ;;
s) RUN_WITH_EDGESHARK=true ;;
j) DEMO_VERSION="v1.6j"
DEMO_COMPOSE_FILE_NAME="docker-compose.ocpp16j.yml" ;;
1) DEMO_VERSION="v2.0.1-sp1"
Expand Down Expand Up @@ -84,13 +86,20 @@ echo "DEMO VERSION: $DEMO_VERSION"
echo "DEMO CONFIG: $DEMO_COMPOSE_FILE_NAME"
echo "DEMO DIR: $DEMO_DIR"


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

echo "Run with Edgeshark? $RUN_WITH_EDGESHARK"

if [[ "$RUN_WITH_EDGESHARK" = true ]]; then
wget -q --no-cache -O - \
https://github.com/siemens/edgeshark/raw/main/deployments/wget/docker-compose-localhost.yaml \
| docker compose -f - up -d
fi

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
Expand Down

0 comments on commit 08e1b8f

Please sign in to comment.