Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagebash
# Clone PCEI repo to your local directory

git clone "https://gerrit.akraino.org/r/pcei"
cd pcei
mkdir awsggc1
cp -a aswggc/. awsggc1/
cd awsggc1
ls -al
total 16
-rw-r--r--  1 oberzin  108493823  116 Nov 23 10:55 Chart.yaml
drwxr-xr-x  9 oberzin  108493823  306 Nov 24 23:10 templates
-rw-r--r--  1 oberzin  108493823  376 Nov 24 13:32 values.yaml

# Modify template files:
cd templates/
(base) USMBB6G8WL-3:templates oberzin$ ls -l
total 56
-rw-r--r--  1 oberzin  108493823  1042 Nov 23 10:55 _helpers.tpl
-rw-r--r--  1 oberzin  108493823  1443 Nov 24 22:37 awsggc-cert.yaml
-rw-r--r--  1 oberzin  108493823  1939 Nov 24 22:34 awsggc-privkey.yaml
-rw-r--r--  1 oberzin  108493823  1405 Nov 24 22:22 awsggc-rootca.yaml
-rw-r--r--  1 oberzin  108493823  1086 Nov 24 22:30 configmap.yaml
-rw-r--r--  1 oberzin  108493823  1701 Nov 24 23:10 deployment.yaml
-rw-r--r--  1 oberzin  108493823   407 Nov 23 10:55 service.yaml


Code Block
languageyml
# Modify config.yaml file.
# Update the "thingArn", "iotHost" and "ggHost" valuses based on the config.json file from your GGC configuration. 
# LEAVE ALL OTHER LINES UNCHANGED.
vi config.yaml

apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "awsggc.name" .}}-configmap
data:
  config.json: |-
    {
      "coreThing" : {
        "caPath" : "root.ca.pem",
        "certPath" : "cert.pem",
        "keyPath" : "private.key",
        "thingArn" : "arn:aws:iot:us-west-2:XXXXX",
        "iotHost" : "XXXXX-ats.iot.us-west-2.amazonaws.com",
        "ggHost" : "greengrass-ats.iot.us-west-2.amazonaws.com",
        "keepAlive" : 600
      },
      "runtime" : {
        "cgroup" : {
          "useSystemd" : "yes"
        }
      },
      "managedRespawn" : false,
      "crypto" : {
        "principals" : {
          "SecretsManager" : {
            "privateKeyPath" : "file:///greengrass/keys/private.key"
          },
          "IoTCertificate" : {
            "privateKeyPath" : "file:///greengrass/keys/private.key",
            "certificatePath" : "file:///greengrass/certs/cert.pem"
          }
        },
        "caPath" : "file:///greengrass/ca/root.ca.pem"
      }
    }


Defining AWS GGC Service in PCEI

...