-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
♻️ Working!! Almost final upgrade and refactor of the demo
Summary of changes: - Switch to using pre-built images - This is copying over the docker-compose and modifying it to use images; we can and should do better - Apply runtime patches to the CSMS - After changing the paths in the script to run them from the current location - Apply change paths throughout - Remove the second EVSE and connector so they are not created in the device model - Question: Is `/ext/dist/share/everest/modules/OCPP201/component_config/` now the source of truth? Will it always rewrite the DB? Is the DB then just for convenient access? - Since we are now on debian, install patch using apt-get - The new version is after the external payment was removed externally, so add it back using patches - Since we can no longer copy over a DB with the CSMS value (since it will be overridden), we use `sed` to change it in the component_config - With the new build, the build is in `/ext/build` and the distribution is in `/ext/dist` - changed paths in `demo` and the manager patches to match - change to the new module names for the new release - although we added back a patch to support the payment method, we are still using `ac` and `dc` in the JsEvManager, not `AC_three_phase_core`. Change the nodered flow to match. - change the CSMS build action to prepend the csms name to the image name so that we don't create CSMS image called `manager` which overrides the everest manager Testing done: - `bash demo-iso15118-2-ocpp-201.sh -r $(pwd) -1` works without any additional changes NOTE that this still needs the manager to be pushed since it is too large to be built by the CI dec0ca2 And there is still a fair amount of immediate cleanup to be done as well. But this was getting long and complex, and I wanted to check it in before it got too unwieldy. Signed-off-by: Shankari <[email protected]>
- Loading branch information
Showing
19 changed files
with
332 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
TAG=0.0.16 | ||
TAG=0.0.17-localbuild | ||
|
||
EVEREST_MANAGER_CPUS='1.0' | ||
EVEREST_MANAGER_MEMORY='1024mb' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Temporary file for process substitution | ||
temp_file := /tmp/temp.ext | ||
|
||
all: csms.pem cpo_sub_ca1.pem cpo_sub_ca2.pem root-V2G-cert.pem trust.pem | ||
|
||
csms.key: | ||
openssl ecparam -name prime256v1 -genkey -noout -out csms.key | ||
|
||
csms.csr: csms.key | ||
openssl req -new -nodes -key csms.key \ | ||
-subj "/CN=CSMS/O=Thoughtworks" \ | ||
-addext "subjectAltName = DNS:localhost, DNS:gateway, DNS:lb" \ | ||
-out csms.csr | ||
|
||
csms.pem: csms.csr | ||
echo "basicConstraints = critical, CA:false" > $(temp_file) | ||
echo "keyUsage = critical, digitalSignature, keyEncipherment" >> $(temp_file) | ||
echo "subjectAltName = DNS:localhost, DNS:gateway, DNS:lb" >> $(temp_file) | ||
openssl x509 -req -in csms.csr \ | ||
-out csms.pem \ | ||
-signkey csms.key \ | ||
-days 365 \ | ||
-extfile $(temp_file) | ||
rm -f $(temp_file) | ||
|
||
cpo_sub_ca1.pem cpo_sub_ca2.pem root-V2G-cert.pem trust.pem: | ||
../../scripts/get-ca-cert.sh | ||
|
||
.PHONY: clean | ||
clean: | ||
rm -f *.pem csms.key csms.csr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
-----BEGIN EC PRIVATE KEY----- | ||
MHcCAQEEIN14U+Uag5mVXNx2V625fH5I1F8xRFM8jocunYGEmxp7oAoGCCqGSM49 | ||
AwEHoUQDQgAE1UykoMyJkCppRZKnKE+3jtWVK3HVaLHjyheLPJz64dAUeFb0dPnZ | ||
sxqA7ipr6oZStzbQXcieXi+GdMSd/G4+8g== | ||
-----END EC PRIVATE KEY----- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
-----BEGIN CERTIFICATE----- | ||
MIICVzCCAf2gAwIBAgICMDowCgYIKoZIzj0EAwIwSDESMBAGA1UEAwwJVjJHUm9v | ||
dENBMRAwDgYDVQQKDAdFVmVyZXN0MQswCQYDVQQGEwJERTETMBEGCgmSJomT8ixk | ||
ARkWA1YyRzAeFw0yNDAzMTIwMTQzMDlaFw0zNDAzMTAwMTQzMDlaMEgxEjAQBgNV | ||
BAMMCUNQT1N1YkNBMTEQMA4GA1UECgwHRVZlcmVzdDELMAkGA1UEBhMCREUxEzAR | ||
BgoJkiaJk/IsZAEZFgNWMkcwWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAAS6im4H | ||
nE9OlHDLNNUZl3NJZE4ald0+VfNiCySQWdCP/Fwl1zWSZKMidAml0BL0/lihyYO+ | ||
cvAEM1NIYrxjQzW3o4HWMIHTMBIGA1UdEwEB/wQIMAYBAf8CAQEwDgYDVR0PAQH/ | ||
BAQDAgEGMB0GA1UdDgQWBBRvu7duCmt/mCRfjjMrxNC3MxpQvTBtBggrBgEFBQcB | ||
AQRhMF8wJAYIKwYBBQUHMAGGGGh0dHBzOi8vd3d3LmV4YW1wbGUuY29tLzA3Bggr | ||
BgEFBQcwAoYraHR0cHM6Ly93d3cuZXhhbXBsZS5jb20vSW50ZXJtZWRpYXRlLUNB | ||
LmNlcjAfBgNVHSMEGDAWgBSmkv3Hh77+YEsp57+VsBjmwzITVjAKBggqhkjOPQQD | ||
AgNIADBFAiEA/nLc3K3Fsn4bK+9OFoTfkYJoVEl4NsyTVq4Ga71Dms4CIDyk2XU9 | ||
/I7/KL6+oveVLYlvuOfBi489Rr4alOBR+L3L | ||
-----END CERTIFICATE----- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
-----BEGIN CERTIFICATE----- | ||
MIIB6zCCAZGgAwIBAgICMDwwCgYIKoZIzj0EAwIwSDESMBAGA1UEAwwJQ1BPU3Vi | ||
Q0EyMRAwDgYDVQQKDAdFVmVyZXN0MQswCQYDVQQGEwJERTETMBEGCgmSJomT8ixk | ||
ARkWA1YyRzAeFw0yNDAzMTIwMTQzMDlaFw0zNDAzMTAwMTQzMDlaMFMxHTAbBgNV | ||
BAMMFGhvc3QuZG9ja2VyLmludGVybmFsMRAwDgYDVQQKDAdFVmVyZXN0MQswCQYD | ||
VQQGEwJERTETMBEGCgmSJomT8ixkARkWA0NQTzBZMBMGByqGSM49AgEGCCqGSM49 | ||
AwEHA0IABH4hdFZ4+OPvMSLfwcLxvGRflEk7I5zUfQhs9J55DXBo+iv74EtJI/Qg | ||
kf1Cl2S1BK5lGb2o2XekeIYIHOyFIxOjYDBeMAwGA1UdEwEB/wQCMAAwDgYDVR0P | ||
AQH/BAQDAgOIMB0GA1UdDgQWBBSRJ5Mlf4CqG2mbvHj3PE++7WnnpjAfBgNVHSME | ||
GDAWgBSdZoihKocUHKu7g0HVL7/kHarXuzAKBggqhkjOPQQDAgNIADBFAiEAqxo/ | ||
vWSzHj/415lXYoD1lrh2HgaTS8BxOR5hY44g9KcCIDFHQ2v39OV6fSETzF5VFU2/ | ||
MblV+2toVvnyuDX5rM8v | ||
-----END CERTIFICATE----- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
[api] | ||
addr = ":9410" | ||
|
||
[transport] | ||
type = "mqtt" | ||
mqtt.urls = ["mqtt://mqtt:1883"] | ||
|
||
[ocpi] | ||
addr = ":9411" | ||
external_url = "http://manager:9411" | ||
country_code = "GB" | ||
party_id = "TWK" | ||
|
||
[storage] | ||
type = "firestore" | ||
firestore.project_id = "*detect-project-id*" | ||
|
||
[contract_cert_validator] | ||
type = "ocsp" | ||
|
||
[contract_cert_validator.ocsp.root_certs] | ||
type = "opcp" | ||
opcp.url = "https://open.plugncharge-test.hubject.com" | ||
opcp.ttl = "24h" | ||
opcp.auth.type = "hubject_test_token" | ||
opcp.auth.hubject_test_token.url = "https://hubject.stoplight.io/api/v1/projects/cHJqOjk0NTg5/nodes/6bb8b3bc79c2e-authorization-token" | ||
opcp.auth.hubject_test_token.ttl = "6h" | ||
|
||
[contract_cert_provider] | ||
type = "opcp" | ||
opcp.url = "https://open.plugncharge-test.hubject.com" | ||
opcp.auth.type = "hubject_test_token" | ||
opcp.auth.hubject_test_token.url = "https://hubject.stoplight.io/api/v1/projects/cHJqOjk0NTg5/nodes/6bb8b3bc79c2e-authorization-token" | ||
opcp.auth.hubject_test_token.ttl = "6h" | ||
|
||
[charge_station_cert_provider] | ||
type = "delegating" | ||
delegating.v2g.type = "opcp" | ||
delegating.v2g.opcp.url = "https://open.plugncharge-test.hubject.com" | ||
delegating.v2g.opcp.auth.type = "hubject_test_token" | ||
delegating.v2g.opcp.auth.hubject_test_token.url = "https://hubject.stoplight.io/api/v1/projects/cHJqOjk0NTg5/nodes/6bb8b3bc79c2e-authorization-token" | ||
delegating.v2g.opcp.auth.hubject_test_token.ttl = "6h" | ||
delegating.cso.type = "local" | ||
delegating.cso.local.cert.type = "file" | ||
delegating.cso.local.cert.file = "/certificates/csms.pem" | ||
delegating.cso.local.key.type = "file" | ||
delegating.cso.local.key.file = "/certificates/csms.key" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Listeners | ||
listener 1883 | ||
protocol mqtt | ||
|
||
listener 9000 | ||
protocol websockets | ||
|
||
# Logging | ||
log_dest stdout | ||
log_type error | ||
log_type warning | ||
log_type notice | ||
log_type information | ||
log_timestamp true | ||
log_timestamp_format %Y/%m/%d %H:%M:%S | ||
connection_messages false | ||
|
||
# Security | ||
allow_anonymous true |
Oops, something went wrong.