Skip to content

Commit

Permalink
Merge pull request #8 from umati/upstream
Browse files Browse the repository at this point in the history
feat(ci): update docs, optimize multi-arch container build
  • Loading branch information
barnstee authored May 4, 2024
2 parents 5e1234c + 8cd21e7 commit bc9f2d0
Show file tree
Hide file tree
Showing 5 changed files with 97 additions and 85 deletions.
13 changes: 13 additions & 0 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:recommended"
],
"packageRules": [
{
"matchPackagePatterns": ["OPCFoundation.NetStandard"],
"labels": ["OPC-F.NetStandard"],
"groupName": "OPC-F.NetStandard"
}
]
}
55 changes: 0 additions & 55 deletions .github/workflows/docker-publish-arm64.yml

This file was deleted.

24 changes: 16 additions & 8 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
---
name: Docker

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

on:
on: # yamllint disable-line rule:truthy
schedule:
- cron: '23 9 * * *'
push:
branches: [ main ]
branches: [main, develop]
# Publish semver tags as releases.
tags: [ 'v*.*.*' ]
tags: ['v*.*.*']
pull_request:
branches: [ main ]
branches: [main, develop]
merge_group:

env:
# Use docker.io for Docker Hub if empty
Expand All @@ -32,13 +34,13 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4.1.1

# Login against a Docker registry except on PR
# https://github.com/docker/login-action
- name: Log into registry ${{ env.REGISTRY }}
if: github.event_name != 'pull_request'
uses: docker/login-action@28218f9b04b4f3f62068d7b6ce6ca5b26e35336c
uses: docker/login-action@v3.1.0
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
Expand All @@ -48,16 +50,22 @@ jobs:
# https://github.com/docker/metadata-action
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
uses: docker/metadata-action@v5.5.1
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

- name: Set up QEMU
uses: docker/[email protected]
- name: Set up Docker Buildx
uses: docker/[email protected]

# Build and push Docker image with Buildx (don't push on PR)
# https://github.com/docker/build-push-action
- name: Build and push Docker image
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
uses: docker/build-push-action@v5.3.0
with:
context: .
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
40 changes: 40 additions & 0 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
name: Lint

on: # yamllint disable-line rule:truthy
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
merge_group:

permissions:
contents: read
packages: write

jobs:
build:
name: Lint
runs-on: ubuntu-latest

permissions:
contents: read
packages: read
# To report GitHub Actions status checks
statuses: write

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
# super-linter needs the full git history to get the
# list of files that changed across commits
fetch-depth: 0

- name: Super-linter
uses: super-linter/[email protected]
env:
# To report GitHub Actions status checks
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VALIDATE_ALL_CODEBASE: false
VALIDATE_CHECKOV: false
50 changes: 28 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# UA Cloud Publisher

A cross-platform OPC UA cloud publisher reference implementation leveraging OPC UA PubSub over MQTT. It runs in a Docker container on standard Docker hosts or on Kubernetes and comes with an easy-to-use web user interface.
A cross-platform OPC UA cloud publisher reference implementation leveraging OPC UA PubSub over MQTT. It runs in a container image on standard Docker hosts or on Kubernetes and comes with an easy-to-use web user interface.

## Features

* Cross-plattform - Runs natively on Windows and Linux
* Runs inside a Docker container and on Kubernetes
* UI for connecting to, browsing of, reading nodes from and publishing nodes from an OPC UA server
* Generates a CSV file containing all OPC UA nodes from a connected server
* Generates a publishednodes.json file containing all OPC UA variable nodes from a connected server
* Generates a `publishednodes.json` file containing all OPC UA variable nodes from a connected server
* Uses OPC UA PubSub JSON encoding
* Uses plain MQTT broker as publishing endpoint
* Optionally uses plain Kafka broker as publishing endpoint
Expand All @@ -31,34 +31,44 @@ A cross-platform OPC UA cloud publisher reference implementation leveraging OPC
* UI for configuration
* Publishing from the cloud via a broker
* Publishing on data changes or on regular intervals
* Supports publishednodes.json imput file format
* Supports `publishednodes.json` input file format
* Support for storing configuration files locally
* Support for storing configuration files in the Azure cloud
* Support for storing configuration files in Microsoft OneLake
* Support for Store & Forward during Internet connection outages
* Support for Store & Forward during internet connection outages
* Support for username and password authentication
* Support for both Intel x64 and ARM x64 architectures (Raspberry Pi4, etc.) with pre-built Docker containers ready for use
* Support for Intel/AMD `x64` and `arm64` architectures (Raspberry Pi4, etc.) with pre-built container images ready for use
* Integration with [UA Edge Translator](https://github.com/barnstee/UA-EdgeTranslator)
* Support for generating the Web of Things Thing Descriptions for UA Edge Translator automatically using ChatGPT

## Build Status

[![Docker](https://github.com/barnstee/UA-CloudPublisher/actions/workflows/docker-publish.yml/badge.svg)](https://github.com/barnstee/UA-CloudPublisher/actions/workflows/docker-publish.yml)

## Screenshots

### Main Page:
### Main Page

![Main Page](screenshots/mainpage.png)

### Browser:
### Browser

![Browser](screenshots/browser.png)

### Published Nodes Management:
### Published Nodes Management

![Published Nodes Management](screenshots/publishednodesmanagement.png)

### Diagnostics:
### Diagnostics

![Diagnostics](screenshots/diagnostics.png)

### Configuration:
### Configuration

![Configuration](screenshots/configuration.png)

### UA Edge Translator Integration:
### UA Edge Translator Integration

![Configuration](screenshots/translator.png)

## Usage
Expand All @@ -81,17 +91,17 @@ UA Cloud Publisher settings and published nodes configuration can be persisted l

`docker run -itd -v c:/publisher/logs:/app/logs -v c:/publisher/settings:/app/settings -p 80:80 ghcr.io/barnstee/ua-cloudpublisher:main`

For Linux hosts, remove the "c:" instances from the command above.
For Linux hosts, remove the `c:` instances from the command above.

And then point your browser to <http://yourIPAddress>.
And then point your browser to `http://yourIPAddress`.

## Optional Environment Variables

* LOG_FILE_PATH - path to the log file to use. Default is /app/logs/UACloudPublisher.log (in the Docker container).
* STORAGE_TYPE - type of storage to use for settings and configuration files. Current options are "Azure" and "OneLake". Default is local file storage (under /app/settings/ in the Docker container).
* STORAGE_CONNECTION_STRING - when using STORAGE_TYPE="Azure" or "OneLake", specifies the connection string to the cloud storage. For OneLake, this is called "URL" and can be retrieved from your Lakehouse `Files` folder properties in Microsoft Fabric.
* STORAGE_CONTAINER_NAME - when using STORAGE_TYPE="Azure" or "OneLake", specifies the storage container name. Default is "uacloudpublisher".
* USE_KAFKA - **if present**, use a Kafka broker instead of an MQTT broker to send messages to and receive commands from.
* `LOG_FILE_PATH` - path to the log file to use. Default is /app/logs/UACloudPublisher.log (in the Docker container).
* `STORAGE_TYPE` - type of storage to use for settings and configuration files. Current options are `Azure` and `OneLake`. Default is local file storage (under `/app/settings/` in the Docker container).
* `STORAGE_CONNECTION_STRING` - when using `STORAGE_TYPE`=`Azure` or `OneLake`, specifies the connection string to the cloud storage. For `OneLake`, this is called `URL` and can be retrieved from your Lakehouse `Files` folder properties in Microsoft Fabric.
* `STORAGE_CONTAINER_NAME` - when using STORAGE_TYPE="Azure" or "OneLake", specifies the storage container name. Default is "uacloudpublisher".
* `USE_KAFKA` - **if present**, use a Kafka broker instead of an MQTT broker to send messages to and receive commands from.

## PublishedNodes.json File Format

Expand Down Expand Up @@ -313,7 +323,3 @@ Response:
]
}
```

## Build Status

[![Docker](https://github.com/barnstee/UA-CloudPublisher/actions/workflows/docker-publish.yml/badge.svg)](https://github.com/barnstee/UA-CloudPublisher/actions/workflows/docker-publish.yml)

0 comments on commit bc9f2d0

Please sign in to comment.