Skip to content

Commit

Permalink
Nested data plane helm charts and release (#36)
Browse files Browse the repository at this point in the history
* Nested data plane helm charts

* helm accelerator renaming, separate releases and #15
  • Loading branch information
katriendg authored Mar 20, 2023
1 parent 92c653d commit f2beb83
Show file tree
Hide file tree
Showing 33 changed files with 694 additions and 51 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ on:
push:
branches:
- main
paths-ignore:
- 'deployment/**'
paths:
- 'iotedge/Distributed.IoT.Edge'
- 'lib/Industrial-IoT'
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/Release-L2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Main - Release Helm Chart IoT Edge Accelerator L2
on:
push:
branches:
- main
paths:
# Only run this when chart file is updated.
- 'deployment/helm/iot-edge-l2/Chart.yaml'

jobs:
Release-Artifacts:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
- name: Get the version
id: vars
run: echo ::set-output name=tag::$(echo main-${GITHUB_SHA})

- name: Echo Docker images tag
run: echo ${{steps.vars.outputs.tag}}

- name: Run chart-releaser
uses: helm/[email protected]
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
with:
charts_dir: deployment/helm
36 changes: 36 additions & 0 deletions .github/workflows/Release-L4.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Main - Release Helm Chart IoT Edge Accelerator L4
on:
push:
branches:
- main
paths:
# Only run this when chart file is updated.
- 'deployment/helm/iot-edge-l4/Chart.yaml'

jobs:
Release-Artifacts:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
- name: Get the version
id: vars
run: echo ::set-output name=tag::$(echo main-${GITHUB_SHA})

- name: Echo Docker images tag
run: echo ${{steps.vars.outputs.tag}}

- name: Run chart-releaser
uses: helm/[email protected]
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
with:
charts_dir: deployment/helm
36 changes: 36 additions & 0 deletions .github/workflows/Release-mosquitto.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Main - Release Helm Chart Mosquitto Broker
on:
push:
branches:
- main
paths:
# Only run this when chart file is updated.
- 'deployment/helm/mosquitto/Chart.yaml'

jobs:
Release-Artifacts:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
- name: Get the version
id: vars
run: echo ::set-output name=tag::$(echo main-${GITHUB_SHA})

- name: Echo Docker images tag
run: echo ${{steps.vars.outputs.tag}}

- name: Run chart-releaser
uses: helm/[email protected]
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
with:
charts_dir: deployment/helm
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
name: Main Branch Release
name: Main - Release Helm Chart Squid Proxy
on:
push:
branches:
- main
paths:
# Only run this when chart file is updated.
- 'deployment/helm/iot-edge-accelerator/Chart.yaml'
- 'deployment/helm/squid-proxy/Chart.yaml'

jobs:
Release-Artifacts:
runs-on: ubuntu-latest
Expand Down

This file was deleted.

File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: iot-edge-accelerator
description: A Helm chart for deploying IoT edge accelerator on K8s, pre-release version.
name: iot-edge-l2
description: A Helm chart for deploying IoT Edge Accelerator L2 (layer 2) on K8s, pre-release version.
keywords:
- azure
- iot
Expand All @@ -17,7 +17,7 @@ type: application

# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
version: 0.26.0
version: 0.1.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application.
Expand Down
File renamed without changes.
30 changes: 30 additions & 0 deletions deployment/helm/iot-edge-l2/templates/dapr/mqtt-pub-sub.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: {{ .Values.opcPublisherModule.pubsub }}
spec:
type: pubsub.mqtt3
version: v1
metadata:
- name: url
value: {{ .Values.localPubSubModule.mqttUri }}
- name: retain
value: "false"
- name: cleanSession
value: "false"
- name: qos
value: "1"
- name: consumerID
value: "{podName}"
# Lock down type of access for each service.
- name: publishingScopes
value: "simulated-temperature-sensor-module=telemetry;opc-publisher-module=telemetry"
- name: subscriptionScopes
value: "simulated-temperature-sensor-module=;opc-publisher-module="
# Lock down the topics on this pubsub component.
- name: allowedTopics
value: "telemetry"

scopes:
- simulated-temperature-sensor-module
- opc-publisher-module
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
# Simulated Temperature Sensor module settings
simulatedTemperatureSensorFeedIntervalInMilliseconds: 1000

# Data Gateway module settings
dataGatewayModule:
eventHubConnectionString: "replace_with_real_key_at_deploy_time"
storageAccountName: "replace_with_storage_account_name_at_deploy_time"
storageAccountKey: "replace_with_storage_account_key_at_deploy_time"

# Local Pub Sub module settings
localPubSubModule:
redisUri: "redis-master.edge-core.svc.cluster.local:6379"
mqttUri: "tcp://mosquittocluster.edge-core.svc.cluster.local:1883"

# OPC Publisher module settings
opcPublisherModule:
Expand All @@ -19,7 +13,6 @@ opcPublisherModule:

# Docker images
images:
datagatewaymodule: ghcr.io/azure-samples/distributed-az-iot-edge/datagatewaymodule:main-78b133d
simulatedtemperaturesensormodule: ghcr.io/azure-samples/distributed-az-iot-edge/simulatedtemperaturesensormodule:main-78b133d
opcplcmodule: mcr.microsoft.com/iotedge/opc-plc:2.2.0
opcpublishermodule: ghcr.io/azure-samples/distributed-az-iot-edge/opcuapublisher:main-78b133d
25 changes: 25 additions & 0 deletions deployment/helm/iot-edge-l4/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
.tgz
index.yaml
24 changes: 24 additions & 0 deletions deployment/helm/iot-edge-l4/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
apiVersion: v2
name: iot-edge-l4
description: A Helm chart for deploying IoT Edge Accelerator L4 (layer 4) on K8s, pre-release version.
keywords:
- azure
- iot
- edge
# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
# to be deployed.
#
# Library charts provide useful utilities or functions for the chart developer. They're included as
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application

# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
version: 0.1.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application.
appVersion: 0.4.0
6 changes: 6 additions & 0 deletions deployment/helm/iot-edge-l4/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
You have installed release {{ .Chart.Version}} of {{ .Chart.Name }} of IoT Edge K8s Accelerator, pre-release version.

To learn more about the release, try:

$ helm status {{ .Release.Name }}
$ helm get all {{ .Release.Name }}
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,12 @@ spec:
# value: 0
# Lock down type of access for each service.
- name: publishingScopes
value: "simulated-temperature-sensor-module=;data-gateway-module=telemetry;opc-publisher-module=telemetry"
value: "data-gateway-module=telemetry"
- name: subscriptionScopes
value: "simulated-temperature-sensor-module=;data-gateway-module=;opc-publisher-module="
value: "data-gateway-module="
# Lock down the topics on this pubsub component.
- name: allowedTopics
value: "telemetry"
scopes:
- data-gateway-module
- opc-publisher-module
{{ end }}
29 changes: 29 additions & 0 deletions deployment/helm/iot-edge-l4/templates/dapr/gateway-pub-sub.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: gateway-pub-sub
spec:
type: pubsub.mqtt3
version: v1
metadata:
- name: url
value: {{ .Values.gatewayPubSubModule.mqttUri }}
- name: retain
value: "false"
- name: cleanSession
value: "false"
- name: qos
value: "1"
- name: consumerID
value: "{podName}"
# Lock down type of access for each service.
- name: publishingScopes
value: "data-gateway-module="
- name: subscriptionScopes
value: "data-gateway-module=telemetry;"
# Lock down the topics on this pubsub component.
- name: allowedTopics
value: "telemetry"

scopes:
- data-gateway-module
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,5 @@ spec:
- name: data-gateway-module
image: {{ .Values.images.datagatewaymodule }}
imagePullPolicy: Always
args: ["--receiverPubSubName", "{{ .Values.gatewayPubSubModule.name }}"]
restartPolicy: Always
14 changes: 14 additions & 0 deletions deployment/helm/iot-edge-l4/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Data Gateway module settings
dataGatewayModule:
eventHubConnectionString: "replace_with_real_key_at_deploy_time"
storageAccountName: "replace_with_storage_account_name_at_deploy_time"
storageAccountKey: "replace_with_storage_account_key_at_deploy_time"

# Local Pub Sub module settings
gatewayPubSubModule:
mqttUri: "tcp://mosquittocluster.edge-core.svc.cluster.local:1883"
name: gateway-pub-sub

# Docker images
images:
datagatewaymodule: ghcr.io/azure-samples/distributed-az-iot-edge/datagatewaymodule:main-78b133d
Loading

0 comments on commit f2beb83

Please sign in to comment.