Skip to content

Commit 6be62bc

Browse files
chgennarAzure IoT Operations Bot
andauthored
Promote to AIO repo (v0.3.0-preview) (#35)
Promote to AIO repo --------- Co-authored-by: Azure IoT Operations Bot <actionbot@azure.com>
1 parent 913211f commit 6be62bc

11 files changed

Lines changed: 292 additions & 311 deletions

File tree

.github/workflows/create-azure-iot-operations-release.yml

Lines changed: 61 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,35 @@ on:
77
description: 'Version to publish'
88
required: true
99
type: string
10-
10+
isDraft:
11+
description: 'Whether the release should be a draft release.'
12+
required: true
13+
type: boolean
14+
default: true
15+
releaseBranchEnabled:
16+
description: 'Whether the release branch creation is enabled.'
17+
required: true
18+
type: boolean
19+
default: false
20+
workflow_call:
21+
inputs:
22+
version:
23+
description: 'Version to publish'
24+
required: true
25+
type: string
26+
isDraft:
27+
description: 'Whether the release should be a draft release.'
28+
required: true
29+
type: boolean
30+
default: true
31+
releaseBranchEnabled:
32+
description: 'Whether the release branch creation is enabled.'
33+
required: true
34+
type: boolean
35+
default: false
36+
1137
jobs:
12-
Version:
38+
ValidateRelease:
1339
runs-on: ubuntu-latest
1440
outputs:
1541
version: ${{ steps.templateVersion.outputs.version }}
@@ -32,18 +58,22 @@ jobs:
3258
run: |-
3359
set -e
3460
# strip spaces from version
35-
version=$(echo "${{ github.event.inputs.version }}" | tr -d '[:space:]')
61+
version=$(echo "${{ inputs.version }}" | tr -d '[:space:]')
3662
3763
if [[ -z "$version" ]]; then
3864
echo "::error::Valid version is required"
3965
fi
4066
67+
if [[ $version != v* ]]; then
68+
echo "::error::Version must begin with 'v'"
69+
fi
70+
4171
echo "Set version to $version"
4272
echo "version=${version}" >> $GITHUB_OUTPUT
4373
44-
PreRelease:
74+
CreateRelease:
4575
runs-on: ubuntu-latest
46-
needs: Version
76+
needs: ValidateRelease
4777
steps:
4878
- name: Checkout
4979
uses: actions/checkout@v1
@@ -81,24 +111,45 @@ jobs:
81111
set -e
82112
83113
gh auth login --with-token <<< "${{ github.token }}"
84-
url=$(gh release create "${{ needs.Version.outputs.version }}" \
85-
--draft \
114+
url=$(gh release create "${{ needs.ValidateRelease.outputs.version }}" \
86115
--latest \
87-
--prerelease \
88116
--target "${{ github.ref }}" \
89117
--repo "${{ github.repository }}" \
90-
--title "${{ needs.Version.outputs.version }}" \
118+
--title "${{ needs.ValidateRelease.outputs.version }}" \
119+
$( ${{ inputs.isDraft }} && echo "--draft" ) \
91120
$(echo "${{ steps.buildAssets.outputs.filelist }}" | tr "," " "))
121+
92122
echo "url=$url" >> $GITHUB_OUTPUT
93123
94124
- name: Summarize
95125
run: |-
96126
IFS=',' read -r -a files <<< "${{ steps.buildAssets.outputs.filelist }}"
97127
98-
echo "# PreRelease ${{ needs.Version.outputs.version }} created" >> $GITHUB_STEP_SUMMARY
128+
echo "# Release ${{ needs.ValidateRelease.outputs.version }} created" >> $GITHUB_STEP_SUMMARY
99129
echo "A draft release has been created with the following assets:" >> $GITHUB_STEP_SUMMARY
100130
for file in "${files[@]}"; do
101131
echo "- $file" >> $GITHUB_STEP_SUMMARY
102132
done
103133
echo "" >> $GITHUB_STEP_SUMMARY
104134
echo "The release can be found [here](${{ steps.createRelease.outputs.url }})" >> $GITHUB_STEP_SUMMARY
135+
136+
CreateReleaseBranch:
137+
runs-on: ubuntu-latest
138+
needs: CreateRelease
139+
steps:
140+
- name: Checkout
141+
uses: actions/checkout@v1
142+
- name: Create Release Branch
143+
env:
144+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
145+
run: |-
146+
set -e
147+
git config --global user.email "actionbot@azure.com"
148+
git config --global user.name "Azure IoT Operations Bot"
149+
if [ ${{inputs.releaseBranchEnabled}} == true ]; then
150+
git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/${{ github.repository }}
151+
git branch release/${{inputs.version}}
152+
git push origin release/${{inputs.version}}
153+
fi
154+
155+

README.md

Lines changed: 14 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ This repo contains the deployment definition of Azure IoT Operations (AIO) and a
66
AIO to be deployed to an Arc-enabled K8s cluster. This repository does not encourage pull requests, as the repo is
77
meant for publicly sharing the releases of AIO and not shared development of AIO.
88

9-
Please see the [Azure IoT Operations Documentation](https://aka.ms/AIOdocs).
9+
Please see the [Azure IoT Operations documentation](https://aka.ms/AIOdocs) for more information. To learn how to
10+
deploy AIO using GitOps, see the [Deploy to cluster documentation](https://learn.microsoft.com/en-us/azure/iot-operations/deploy-iot-ops/howto-deploy-iot-operations?tabs=github#deploy-extensions).
1011

1112
## Forking the Repo
1213

@@ -28,46 +29,22 @@ need to take to set up the fork.
2829
in your fork. Repository secrets can be found under **Settings** > **Secrets and
2930
variables** > **Actions**. To learn more, see [creating secrets for a repository](https://docs.github.com/en/actions/security-guides/using-secrets-in-github-actions#creating-secrets-for-a-repository).
3031

31-
2. To be able to use secrets in AIO, follow [Manage Secrets](https://learn.microsoft.com/en-us/azure/iot-operations/deploy-iot-ops/howto-manage-secrets) to create an AKV and a Service Principal with access to AKV.
32+
2. Enable GitHub actions on the fork.
3233

33-
3. Create and setup K8s Arc-enabled cluster.
34+
1. On the forked repo, select **Actions** and select **I understand my workflows, go ahead and enable them.**
3435

35-
1. If you don't have an existing K8s cluster, try [minikube](https://minikube.sigs.k8s.io/docs/).
36+
## Available Parameters
3637

37-
2. Arc-enable your K8s cluster using the [az connectedk8s connect](https://learn.microsoft.com/cli/azure/connectedk8s#az-connectedk8s-connect) command.
38+
Various parameters can be specified when deploying AIO. The below table describes these parameters. For an example parameter file, see `environments/example.parameters.json`.
3839

39-
```bash
40-
az connectedk8s connect -n $CLUSTER_NAME -l $LOCATION -g $RESOURCE_GROUP --subscription $SUBSCRIPTION_ID
41-
```
42-
43-
3. Use the [az connectedk8s enable-features](https://learn.microsoft.com/cli/azure/connectedk8s?view=azure-cli-latest#az-connectedk8s-enable-features) command to enable custom location support on your cluster.
44-
45-
```bash
46-
az connectedk8s enable-features -n $CLUSTER_NAME -g $RESOURCE_GROUP --features cluster-connect custom-locations
47-
```
48-
49-
3. Run cluster setup script from `tools/setup-cluster/setup-cluster.sh`.
50-
51-
1. In setup-cluster.sh, update the variables at the top of the script to have the values for your Azure Subscription, Resources, and Cluster.
52-
53-
4. Deploy Azure IoT Operations.
54-
55-
1. Create parameter file where environment configuration is specified for your AIO deployment. For an example, see `environments/example.parameters.json`.
56-
57-
| **Parameter** | **Requirement** | **Type** | **Description** |
58-
| ------------- |--|------------|-------------- |
59-
| clusterName | ***[Required]*** | `string` | The Arc-enabled cluster resource in Azure. |
60-
| clusterLocation | *[Optional]* | `string` |If the cluster resource's location is different than its resource group's location, the cluster location will need to be specified. Otherwise, this parameter will default to the location of the resource group. |
61-
| location | *[Optional]* | `string` | If the resource group's location is not a supported AIO region, this parameter can be used to override the location of the AIO resources. |
62-
| dataProcessorSecrets | *[Optional]*<sup>1</sup>| `object` | Add the name of the SecretProviderClass and k8s AKV SP secret that were created from the `setup-cluster.sh`. This should be something like `aio-default-spc` and `aio-akv-sp`, respectively. <br><br>Example:<br> <pre>{<br> "secretProviderClassName": "aio-default-spc",<br> "servicePrincipalSecretRef": "aio-akv-sp"<br>}</pre>|
63-
| mqSecrets | *[Optional]*<sup>1</sup>| `object` | Add the name of the SecretProviderClass and k8s AKV SP secret that were created from the `setup-cluster.sh`. This should be something like `aio-default-spc` and `aio-akv-sp`, respectively. <br><br>Example:<br> <pre>{<br> "secretProviderClassName": "aio-default-spc",<br> "servicePrincipalSecretRef": "aio-akv-sp"<br>}</pre>|
64-
| opcUaBrokerSecrets | *[Optional]*<sup>1</sup>| `object` | Add the name of the k8s AKV SP secret that was created from the `setup-cluster.sh`. This should be something like `aio-akv-sp` and kind should be `csi`. <br><br>Example:<br> <pre>{<br> "kind": "csi",<br> "csiServicePrincipalSecretRef": "aio-akv-sp"<br>}</pre>|
65-
66-
> <sup>1</sup> This param is only necessary if you are using different values than the defaults specified in `setup-cluster.sh`.
67-
68-
2. On the forked repo, select **Actions** and select **I understand my workflows, go ahead and enable them.**
69-
70-
3. Run the **Deploy Azure IoT Operations** GitHub Action. You'll need to provide both the `subscription` and `resource group` where your Arc-enabled cluster resource is and the path to the `environment parameters file` you created previously.
40+
| **Parameter** | **Requirement** | **Type** | **Description** |
41+
| ------------- |--|------------|-------------- |
42+
| clusterName | ***[Required]*** | `string` | The Arc-enabled cluster resource in Azure. |
43+
| clusterLocation | *[Optional]* | `string` |If the cluster resource's location is different than its resource group's location, the cluster location will need to be specified. Otherwise, this parameter will default to the location of the resource group. |
44+
| location | *[Optional]* | `string` | If the resource group's location is not a supported AIO region, this parameter can be used to override the location of the AIO resources. |
45+
| simulatePLC | *[Optional]* | `boolean` | Flag to enable a simulated PLC. The default is false. |
46+
| opcuaDiscoveryEndpoint | *[Optional]* | `string` | The OPC UA Discovery Endpoint used by Akri. The default is opc.tcp://<NOT_SET>:<NOT_SET>. |
47+
| deployResourceSyncRules | *[Optional]* | `boolean` | Flag to deploy the default resource sync rules for the AIO arc extensions. The default is `true`.|
7148
7249
## Trademarks
7350
This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is

0 commit comments

Comments
 (0)