Add extracted tools: CitrineOS, OpenOCPP, ShapeShifter

- CitrineOS core extracted (CSMS OCPP 2.0.1)
- OpenOCPP extracted (firmware OCPP 1.6J/2.0.1)
- ShapeShifter library installed (pip install -e)
- ShapeShifter specification extracted
- EVerest extracted

TODO updated with progress
This commit is contained in:
Eric F
2026-06-08 00:38:27 -04:00
parent 468cfeaa50
commit d398a6ced2
7326 changed files with 1177561 additions and 7 deletions

View File

@@ -0,0 +1 @@
.env

View File

@@ -0,0 +1,64 @@
volumes:
ocpp-db-data:
external: false
node-red-data:
external: false
services:
mqtt-server:
build: ../applications/containers/mosquitto
ports:
- 1883:1883
- 9001:9001
profiles:
- all
- mqtt
- ocpp
- sil
ocpp-db:
image: mariadb:10.4.30 # pinned to patch-version because https://github.com/steve-community/steve/pull/1213
volumes:
- ocpp-db-data:/var/lib/mysql
ports:
- 13306:3306
environment:
MYSQL_RANDOM_ROOT_PASSWORD: "yes"
MYSQL_DATABASE: ocpp-db
MYSQL_USER: ocpp
MYSQL_PASSWORD: ocpp
profiles:
- all
- ocpp
steve:
build: ../applications/containers/steve
ports:
- 8180:8180
- 8443:8443
depends_on:
- ocpp-db
profiles:
- all
- ocpp
mqtt-explorer:
build: ../applications/containers/mqtt-explorer
depends_on:
- mqtt-server
ports:
- 4000:4000
profiles:
- all
- sil
nodered:
build: ../applications/containers/nodered
ports:
- 1880:1880
volumes:
- node-red-data:/data
environment:
- NODE_RED_ENABLE_PROJECTS=false
- MQTT_BROKER=mqtt-server
- MQTT_PORT=1883
profiles:
- all
- sil

View File

@@ -0,0 +1,86 @@
# syntax=docker/dockerfile:1
FROM ghcr.io/everest/everest-ci/dev-env-base:v1.5.4
# Build arguments for customization
# User and group configuration i.e. to match host user inside the container
ARG USERNAME=docker
ARG USER_UID=1000
ARG USER_GID=1000
# Configuration for everest-dev-tool's default git settings, can be overridden when working i.e. in a fork
ARG EVEREST_DEV_TOOL_DEFAULT_GIT_ORGANIZATION_ARG=EVerest
ARG EVEREST_DEV_TOOL_DEFAULT_GIT_HOST_ARG=github.com
ARG EVEREST_DEV_TOOL_DEFAULT_GIT_SSH_USER_ARG=git
##################################################################
# Should be moved to everest-dev-base at some point
# Update the package list and install dependencies (run as root)
USER root
RUN apt-get update && apt-get install -y \
protobuf-compiler \
libsystemd-dev \
libboost-log-dev \
tmux \
chrpath \
cpio \
diffstat \
gawk \
wget \
zstd \
liblz4-tool \
file \
iproute2 \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y locales \
&& sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen \
&& dpkg-reconfigure --frontend=noninteractive locales \
&& update-locale LANG=en_US.UTF-8
ENV LANG en_US.UTF-8
# EVerest Development Tool - Dependencies
RUN pip install --break-system-packages \
nanopb \
pytest
# EVerest Development Tool
COPY --from=everest_dev_tool_src . /tmp/everest_dev_tool
RUN ls -al /tmp/everest_dev_tool \
&& python3 -m pip install \
--break-system-packages \
/tmp/everest_dev_tool/ \
&& rm -rf /tmp/everest_dev_tool
##################################################################
# Modify the existing docker user and group to match the host's USER_UID and USER_GID
RUN groupmod --gid ${USER_GID} ${USERNAME} && \
usermod --uid ${USER_UID} --gid ${USER_GID} ${USERNAME} && \
usermod -aG dialout ${USERNAME}
# Switch to the docker user
USER ${USERNAME}
WORKDIR /workspace
# Add known hosts for git repositories
RUN mkdir -p -m 0600 ~/.ssh && ssh-keyscan ${EVEREST_DEV_TOOL_DEFAULT_GIT_HOST_ARG} >> ~/.ssh/known_hosts
# Set environment variables
ENV EVEREST_DEV_TOOL_DEFAULT_GIT_METHOD=ssh
ENV EVEREST_DEV_TOOL_DEFAULT_GIT_HOST=${EVEREST_DEV_TOOL_DEFAULT_GIT_HOST_ARG}
ENV EVEREST_DEV_TOOL_DEFAULT_GIT_SSH_USER=${EVEREST_DEV_TOOL_DEFAULT_GIT_SSH_USER_ARG}
ENV EVEREST_DEV_TOOL_DEFAULT_GIT_ORGANIZATION=${EVEREST_DEV_TOOL_DEFAULT_GIT_ORGANIZATION_ARG}
# Enable command line completion for devrd script by default
RUN echo "" >> ${HOME}/.bashrc && \
echo "# Enable devrd command completion if available" >> ${HOME}/.bashrc && \
echo "if [ -f /workspace/applications/devrd/devrd-completion.bash ]; then" >> ${HOME}/.bashrc && \
echo " source /workspace/applications/devrd/devrd-completion.bash" >> ${HOME}/.bashrc && \
echo "fi" >> ${HOME}/.bashrc
# Set up welcome message
RUN echo "echo \"🏔️ 🚘 Welcome to the EVerest development environment!\"" >> ${HOME}/.bashrc && \
echo "echo \"Since you are working with the EVerest monorepo, you have all you need to get started here. 🎉🎉🎉\"" >> ${HOME}/.bashrc && \
echo "echo \"You can find the devrd tool in applications/devrd/devrd\"" >> ${HOME}/.bashrc

View File

@@ -0,0 +1,80 @@
{
"name": "EVerest - ${localWorkspaceFolderBasename}",
// Compose configuration
"dockerComposeFile": [
"../docker-compose.yml",
"./docker-compose.devcontainer.yml"
],
"service": "devcontainer",
"runServices": [ "mqtt-server", "ocpp-db", "steve", "mqtt-explorer" ],
// Workspace inside the container
"workspaceFolder": "/workspace",
"initializeCommand": "./applications/devrd/devrd env",
"updateRemoteUserUID": false,
// Networking / forwarded ports
"remoteUser": "docker",
"forwardPorts": [
"mqtt-explorer:4000",
"steve:8180"
],
"portsAttributes": {
"mqtt-explorer:4000": {
"label": "MQTT Explorer - WebView"
},
"steve:8180": {
"label": "Steve - WebTool"
}
},
"otherPortsAttributes": {
"onAutoForward": "notify",
"protocol": "http",
"requireLocalPort": false
},
// VS Code customizations
"customizations": {
// Be aware that anything set here will not apply to the devcontainer
// when used without VS Code (e.g., plain Docker Compose).
"vscode": {
"settings": {
"terminal.integrated.profiles.linux": {
"bash": {
"path": "/bin/bash",
"icon": "terminal-bash",
"args": ["-l"]
}
},
"terminal.integrated.defaultProfile.linux": "bash",
"python.pythonPath": "/usr/bin/python3",
"python.defaultInterpreterPath": "/usr/bin/python3",
"editor.rulers": [79, 120],
// RST
"restructuredtext.preview.scrollEditorWithPreview": false,
"restructuredtext.pythonRecommendation.disabled": true
},
"extensions": [
// language support CPP
"ms-vscode.cpptools",
// language support cmake
"twxs.cmake",
"ms-vscode.cmake-tools",
// language support python
"ms-python.python",
// language support reStructuredText
"lextudio.restructuredtext",
"trond-snekvik.simple-rst"
]
}
}
}

View File

@@ -0,0 +1,82 @@
networks:
docker-proxy-network:
internal: true
devcontainer-ipv6:
enable_ipv6: true
driver_opts:
com.docker.network.endpoint.sysctls: "net.ipv6.conf.eth0.disable_ipv6=0"
volumes:
cpm-source-cache:
name: everest-cpm-source-cache
services:
docker-proxy:
image: tecnativa/docker-socket-proxy:latest
volumes:
- type: bind
source: /var/run/docker.sock
target: /var/run/docker.sock
environment:
- CONTAINERS=1
- IMAGES=1
- POST=1
- NETWORKS=1
- VOLUMES=1
networks:
- docker-proxy-network
profiles:
- all
- ocpp
- sil
devcontainer:
depends_on:
- docker-proxy
env_file:
- .env
build:
dockerfile: Dockerfile
context: ./general-devcontainer
additional_contexts:
everest_dev_tool_src: ../applications/everest_dev_tool
args:
USER_UID: ${UID:-1000}
USER_GID: ${GID:-1000}
EVEREST_DEV_TOOL_DEFAULT_GIT_ORGANIZATION_ARG: ${EVEREST_DEV_TOOL_DEFAULT_GIT_ORGANIZATION:-EVerest}
EVEREST_DEV_TOOL_DEFAULT_GIT_HOST_ARG: ${EVEREST_DEV_TOOL_DEFAULT_GIT_HOST:-github.com}
EVEREST_DEV_TOOL_DEFAULT_GIT_SSH_USER_ARG: ${EVEREST_DEV_TOOL_DEFAULT_GIT_SSH_USER:-git}
volumes:
- type: bind
source: ${HOST_WORKSPACE_FOLDER:-..}
target: /workspace
- type: volume
source: cpm-source-cache
target: /home/docker/.cache/cpm
# Mount the host's SSH agent socket into the container
- type: bind
source: ${SSH_AUTH_SOCK}
target: /ssh-agent
command: sleep infinity
cap_add:
- NET_ADMIN
environment:
MQTT_SERVER_ADDRESS: mqtt-server
MQTT_SERVER_PORT: 1883
DOCKER_HOST: tcp://docker-proxy:2375
CPM_SOURCE_CACHE: /home/docker/.cache/cpm
# Tell SSH to use the forwarded agent
SSH_AUTH_SOCK: /ssh-agent
networks:
- docker-proxy-network
- default
- devcontainer-ipv6
sysctls:
- net.ipv6.conf.all.disable_ipv6=0
- net.ipv6.conf.default.disable_ipv6=0
- net.ipv6.conf.lo.disable_ipv6=0
profiles:
- all
- ocpp
- sil