Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge M3 updates to main #98

Merged
merged 6 commits into from
Nov 1, 2024
Merged

Merge M3 updates to main #98

merged 6 commits into from
Nov 1, 2024

Conversation

dominicbetts
Copy link
Member

Merging M3 sample updates to main

cristipogacean and others added 6 commits October 17, 2024 15:28
#95)

## Purpose
<!-- Describe the intention of the changes being proposed. What problem
does it solve or functionality does it add? -->

* opc plc can be deployed completely independent from the aio. It only
requires that `azure-iot-operations` namespace exists.
* the user will have to manually establish mutual trust between opc ua
connector and the opc plc as in the example below:

PowerShell
```PowerShell
# extract the opc ua connector application instance cert and add it to the opc plc's trust list
kubectl -n azure-iot-operations get secret aio-opc-opcuabroker-default-application-cert -o jsonpath='{.data.tls\.crt}' | %{ [Text.Encoding]::UTF8.GetString([Convert]::FromBase64String($_)) } > opcuabroker.crt
$data = kubectl create secret generic temp --from-file=opcuabroker.crt=./opcuabroker.crt --dry-run=client -o jsonpath='{.data}'
kubectl patch secret opc-plc-trust-list -n azure-iot-operations -p "{`"data`": $data}"
rm ./opcuabroker.crt

# extract the opc plc application instance cert and add it to the opc ua connector's trust list
kubectl -n azure-iot-operations get secret opc-plc-default-application-cert -o jsonpath='{.data.tls\.crt}' | %{ [Text.Encoding]::UTF8.GetString([Convert]::FromBase64String($_)) } > opcplc.crt
$data = kubectl create secret generic temp --from-file=opcplc-000000.crt=./opcplc.crt --dry-run=client -o jsonpath='{.data}'
kubectl patch secret aio-opc-ua-broker-trust-list -n azure-iot-operations -p "{`"data`": $data}"
rm ./opcplc.crt
```
Bash
```Bash
# extract the opc ua connector application instance cert and add it to the opc plc's trust list
kubectl -n azure-iot-operations get secret aio-opc-opcuabroker-default-application-cert -o jsonpath='{.data.tls\.crt}' | base64 -d > opcuabroker.crt
data=$(kubectl create secret generic temp --from-file=opcuabroker.crt=./opcuabroker.crt --dry-run=client -o jsonpath='{.data}')
kubectl patch secret opc-plc-trust-list -n azure-iot-operations -p "{\"data\": $data}"
rm ./opcuabroker.crt

# extract the opc plc application instance cert and add it to the opc ua connector's trust list
kubectl -n azure-iot-operations get secret opc-plc-default-application-cert -o jsonpath='{.data.tls\.crt}' | base64 -d > opcplc.crt
data=$(kubectl create secret generic temp --from-file=opcplc-000000.crt=./opcplc.crt --dry-run=client -o jsonpath='{.data}')
kubectl patch secret aio-opc-ua-broker-trust-list -n azure-iot-operations -p "{\"data\": $data}"
rm ./opcplc.crt
```

## Does this introduce a breaking change?
<!-- Mark one with an "x". -->
```
[x] Yes
[ ] No
```

## Pull Request Type
What kind of change does this Pull Request introduce?

<!-- Please check the one that applies to this PR using "x". -->
```
[x] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Documentation content changes
[ ] Other... Please describe:
```

## How to Test
*  Get the code

```
git clone [repo-address]
cd [repo-name]
git checkout [branch-name]
npm install
```

* Test the code
<!-- Add steps to run the tests suite and/or manually test -->
```
```

## What to Check
Verify that the following are valid
* ...

## Other Information
<!-- Add any other helpful information that may be needed here. -->
@dominicbetts dominicbetts merged commit 88ccc0c into main Nov 1, 2024
3 checks passed
@dominicbetts dominicbetts deleted the release-m3 branch November 1, 2024 10:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants