Skip to content

armgit / core

Public Imported from GitHub
0

100% open-source IoT Platform - Integrate your devices, add intelligence, build custom apps

Enhancement: remove sensitive info (#2151)

Eric Bariauxce27231974fd
diff --git a/kubernetes/README-AWS.md b/kubernetes/README-AWS.md
index 30d4e46fb..f2cecc30b 100644
--- a/kubernetes/README-AWS.md
+++ b/kubernetes/README-AWS.md
@@ -142,9 +142,9 @@ export AWS_ACCESS_KEY_ID="…"
export AWS_SECRET_ACCESS_KEY="…"
export AWS_SESSION_TOKEN="…"
-aws ecr get-login-password --region eu-west-1| docker login --username AWS --password-stdin 134517981306.dkr.ecr.eu-west-1.amazonaws.com
+aws ecr get-login-password --region eu-west-1| docker login --username AWS --password-stdin <or-developers account id>.dkr.ecr.eu-west-1.amazonaws.com
-docker buildx build --no-cache --push --platform linux/amd64,linux/arm64 -t 134517981306.dkr.ecr.eu-west-1.amazonaws.com/openremote/manager:demo manager/build/install/manager/
+docker buildx build --no-cache --push --platform linux/amd64,linux/arm64 -t <or-developers account id>.dkr.ecr.eu-west-1.amazonaws.com/openremote/manager:demo manager/build/install/manager/
```
### Starting a cluster with the OR demo image
@@ -157,7 +157,7 @@ helm install manager manager -f manager/values-haproxy-eks.yaml \
with
```bash
helm install manager manager -f manager/values-haproxy-eks.yaml -f manager/values-demo.yaml \
- --set-string or.hostname=$FQDN
+ --set-string or.hostname=$FQDN --set-string image.repository=$AWS_DEVELOPERS_ACCOUNT_ID.dkr.ecr.eu-west-1.amazonaws.com/openremote/manager
```
This values file does two things:
diff --git a/kubernetes/README.md b/kubernetes/README.md
index 01a46ce86..11a5b0263 100644
--- a/kubernetes/README.md
+++ b/kubernetes/README.md
@@ -161,20 +161,20 @@ Once this image is created, use the image.repository and image.tag entries in yo
Having the following Dockerfile in your `myprj` custom project deployment folder
```dockerfile
-FROM openremote/manager:1.7.0
+FROM openremote/manager:1.8.1
RUN mkdir -p /deployment/manager/extensions
ADD ./build/image /deployment
```
You can locally build a project specific image using
-`docker buildx build --load -t openremote/myprj:1.7.0 -f Dockerfile .`
+`docker buildx build --load -t openremote/myprj:1.8.1 -f Dockerfile .`
And use the following snippet in your manager values files
```yaml
image:
repository: openremote/myprj
- tag: "1.7.0"
+ tag: "1.8.1"
```
to have the pod run the built image.
diff --git a/kubernetes/eks-common.sh b/kubernetes/eks-common.sh
index d226845b0..216a6aa76 100755
--- a/kubernetes/eks-common.sh
+++ b/kubernetes/eks-common.sh
@@ -1,5 +1,16 @@
#!/bin/bash
+if [ -z "$AWS_ACCOUNT_ID" ]; then
+ echo "Error: AWS_ACCOUNT_ID environment variable is not set"
+ echo "Please set it to the ID of the account you want to deploy the cluster into with: export AWS_ACCOUNT_ID=your-account-id"
+ exit 1
+fi
+if [ -z "$AWS_DEVELOPERS_ACCOUNT_ID" ]; then
+ echo "Error: $AWS_DEVELOPERS_ACCOUNT_ID environment variable is not set"
+ echo "Please set it to the ID of the OpenRemote developers root account with: export AWS_DEVELOPERS_ACCOUNT_ID=dev-account-id"
+ exit 1
+fi
+
set -eo pipefail
# Name of cluster, not exposed but must be unique within account
@@ -12,9 +23,8 @@ MQTT_FQDN=mqtt.$FQDN
MQTTS_FQDN=mqtts.$FQDN
export AWS_REGION="eu-west-1"
-AWS_ACCOUNT_ID="463235666115" # openremote
-DNSCHG_ROLE_ARN="arn:aws:iam::134517981306:role/route53-full-access"
+DNSCHG_ROLE_ARN="arn:aws:iam::$AWS_DEVELOPERS_ACCOUNT_ID:role/route53-full-access"
aws configure set region $AWS_REGION
aws configure --profile or set region $AWS_REGION
diff --git a/kubernetes/keycloak/values-eks.yaml b/kubernetes/keycloak/values-eks.yaml
index 2b8d3e833..fcfb06227 100644
--- a/kubernetes/keycloak/values-eks.yaml
+++ b/kubernetes/keycloak/values-eks.yaml
@@ -9,7 +9,7 @@ ingress:
alb.ingress.kubernetes.io/scheme: internet-facing
alb.ingress.kubernetes.io/target-type: ip
alb.ingress.kubernetes.io/group.name: eric-test-ig
- alb.ingress.kubernetes.io/certificate-arn: arn:aws:acm:eu-west-1:463235666115:certificate/...
+ alb.ingress.kubernetes.io/certificate-arn: arn:aws:acm:eu-west-1:<openremote account id>:certificate/...
tls: {}
or:
diff --git a/kubernetes/manager/Chart.yaml b/kubernetes/manager/Chart.yaml
index f8480ae7a..0aa025723 100644
--- a/kubernetes/manager/Chart.yaml
+++ b/kubernetes/manager/Chart.yaml
@@ -6,4 +6,4 @@ type: application
version: 0.1.0
-appVersion: "1.8.0"
+appVersion: "1.8.1"
diff --git a/kubernetes/manager/values-demo.yaml b/kubernetes/manager/values-demo.yaml
index b0e68cfbb..f0da7df15 100644
--- a/kubernetes/manager/values-demo.yaml
+++ b/kubernetes/manager/values-demo.yaml
@@ -1,5 +1,4 @@
image:
- repository: 134517981306.dkr.ecr.eu-west-1.amazonaws.com/openremote/manager
tag: demo
livenessProbe:
diff --git a/kubernetes/manager/values-eks.yaml b/kubernetes/manager/values-eks.yaml
index 0939beab3..aa2722767 100644
--- a/kubernetes/manager/values-eks.yaml
+++ b/kubernetes/manager/values-eks.yaml
@@ -25,7 +25,7 @@ ingress:
alb.ingress.kubernetes.io/scheme: internet-facing
alb.ingress.kubernetes.io/target-type: ip
alb.ingress.kubernetes.io/group.name: eric-test-ig
- alb.ingress.kubernetes.io/certificate-arn: arn:aws:acm:eu-west-1:463235666115:certificate/...
+ alb.ingress.kubernetes.io/certificate-arn: arn:aws:acm:eu-west-1:<openremote account id>:certificate/...
tls: {}
service:
mqtt:
@@ -40,7 +40,7 @@ service:
service.beta.kubernetes.io/aws-load-balancer-type: "external"
service.beta.kubernetes.io/aws-load-balancer-nlb-target-type: "ip"
service.beta.kubernetes.io/aws-load-balancer-scheme: "internet-facing"
- service.beta.kubernetes.io/aws-load-balancer-ssl-cert: arn:aws:acm:eu-west-1:463235666115:certificate/...
+ service.beta.kubernetes.io/aws-load-balancer-ssl-cert: arn:aws:acm:eu-west-1:<openremote account id>:certificate/...
metrics:
enabled: true
type: LoadBalancer