Skip to content

Commit

Permalink
HTTP Extensibility Branch Rebase and Update (#320)
Browse files Browse the repository at this point in the history
* test latest k8s versions [SAME VERSION] (#188)

* update changelog for 0.1.5 release (#189)

* add more description and simplify commands in e2e demo (#191)

* Various typos fixed on new OPCUA documentation (#195)

* Various typos fixed on new OPCUA documentation

Signed-off-by: Didier Durand <durand.didier@gmail.com>

* Fixes on extensibility documentation

Signed-off-by: Didier Durand <durand.didier@gmail.com>

* Make end-to-end demo on Raspberry Pi simpler and more descriptive (#193)

* mirror updates in e2e demo in rasp-pi demo

* syntax changes, capacity specification, building kernel module

* fix syntax issues

* Get Agent logs before testing their contents [SAME VERSION] (#197)

* add additional checks to see why getting logs failing

* log information when get crictl error

* use os.system to log info

* try using shell with subprocess when doing complex commands

* Fix failing to query container runtime in test workflow on MicroK8s [SAME VERSION] (#202)

* loop query containerd several times instead of sleeping

* shorten agent log query

* Allow overwriting controller.nodeSelectors (#194)

* Allow overwriting controller.nodeSelectors

* Add note about `sed` for MacOS contributors

* Allow conditional compilation of agent protocols (#196)

* Allow conditional compilation of agent protocols

* Bump patch version

Co-authored-by: Jiayi Hu <jiayihu@Bad-wolf.local>

* Prometheus (#190)

* add frame count metric to udev broker

* add prometheus metrics

* format metrics.rs

* update Helm charts for Prometheus support

* Prometheus documentation

* increase supported rust version to latest

* fix metrics chart

* use PodMonitor instead of ServiceMonitor for Akri Agent and Controller

* update tarpaulin to latest version to fix protobuf issue

* remove debug echo shared setting

* update version

* Use anyhow instead of the deprecated failure crate (#201)

* Switch to use anyhow crate instead of failure crate

Include Cargo.lock updates

* Rebase and increment patch version

* Merge conflict

* Add missing version updates after rebase

* [Helm] Added CRD variables (#205)

* Added CRD variables

* `version.sh` updates Helm `crds.version`

* Bump version

* Document naming convention (#204)

* Initial commit

* Remove references to `http` example

* Added `udev-broker`

* Added `akri-udev`

* Rephrased

* Typo

* naming-guidelines >> development.md

* r/udev-broker/udev-video-broker

* punctuation

* r/Resources/resources

* r/Compute/Computer (#210)

* fix instructions for cloning and building v4l2 (#209)

* Update hyper version and other dependencies

* Update patch version

* Explicitly specify h2 patch version dependency to avoid future accidentl updates by cargo-update or similar

* Remove redundant unnecessary hyper dependencies

* Add security audit workflow

* Move security audit to existing check-rust workflow

* Simplify mockall usage (#214)

* Simplify mockall usage

* Bump patch version

* add project logo and art [SAME VERSION] (#149)

* add akri branding and artwork

Signed-off-by: flynnduism <dev@ronan.design>

* edit artwork README

Signed-off-by: flynnduism <dev@ronan.design>

* re-render dark logos

Signed-off-by: flynnduism <dev@ronan.design>

* redraw the svg icon to fix glitchy render

Signed-off-by: flynnduism <dev@ronan.design>

* update logo.svg

Signed-off-by: flynnduism <dev@ronan.design>

* fix the mixed up color hex values

Signed-off-by: flynnduism <dev@ronan.design>

* update branding with inconsolata typeface

Signed-off-by: flynnduism <dev@ronan.design>

* use correct casing for mentions of Akri

Signed-off-by: flynnduism <dev@ronan.design>

* remove default documentation to use latest containers (#218)

* Image pull policy (#207)

* change default image pull policy to IfNotPresent

* set ImagePullPolicy to default to empty

* increase version

* only add ImagePullPolicy if specified

* Add a workflow to automated dependencies update

* fix the instruction of the end to end demo and the rspi4 demo. (#217)

* Add comment for  cargo-audit action behavior

* use akri bot PAT for the autoupdate workflow

* update token  secret name

* Patch anomaly detection app (#229)

* close connection to grpc service each loop

* update version

* use local subchannel pool

* fix title typo

* Add logo to README [SAME VERSION] (#220)

* Auto-updated dependencies

* Auto-updated dependencies

* Allow unreachable code introduced with feature-driven protocols [SAME VERSION] (#232)

* Allow unreachable code introduced with feature-driven protocols [SAME VERSION]

The catchall match is there in case someone turns off one of the handlers via features ... but at runtime the disabled feature is configured.

* update for cargo fmt

* add comment explanation

* fix cargo fmt

* Improve development experience with timestamped container labels (#234)

Using labels based on version.txt can make it difficult to iterate during development.  Creating timestamped labels for the local build experience should make it easier to differentiate between development builds.

* Reduce frequency of dependency update [SAME VERSION] (#236)

* Reduce frequency of dependency update

Our dependencies update on a daily basis ... not sure it makes sense for us to update our version each time someone else's do.  I chose a monthly cadence because it would, at most, cause us to update our version 12x per year, which doesn't seem too bad.

* Update auto-update-dependencies.yml

* update code owners

* Lazy eval of makefile timestamp breaks local build [SAME VERSION] [IGNORE INTERMEDIATE BUILDS] (#242)

* Update hyper crate for security risk

* patch version update

* force override kubernetes package to deal with installation errors

* Fix typo

* Simplify matrix; Use all versions 1.16+ for all distros (#244)

* Simplify matrix; Use all versions 1.16+ for all distros

* Remove non-existent webhook test

* Remove `microk8s.enable helm3` appears redundant and fails

* Link Kubernetes and crictl for K3s|MicroK8s

* Per: #206 (comment)

* Typo

* fix matrix and crictl path

* Consistency and double-quote to expand `${PWD}`

* Temporarily (!) block K3s 1.16 due to hard-coded device plugs (k3s-io/k3s#1390)

* Test mapping K3s 1.16 device plugins to default K8s location

* Create kubectl path in expected location if not present

* Consistent w/ MicroK8s step

* Wait until cluster has stabilized before wrangling device-plugins

* Initial documentation for `run-test-cases.yml`

* Correct indentation

Co-authored-by: bfjelds <bfjelds@microsoft.com>

* add microk8s inspect to installation

* try waiting repeatedly for microk8s to be ready

* Cleanup streaming app sample (#173)

* Initial version

* Create logical classes

* Fixes and optimizations

* Use naming guideline for method names

* Version bump

* Version bump

Co-authored-by: Brian Fjeldstad <bfjelds@microsoft.com>

* Admission Controller (Webhook) for Akri Configuration(s) (#206)

* Helm Chart updates

* Add 'webhooks' to the project

* Commented Helm Chart `webhook-configuration`

* Template `webhook-configuration`

* Webhook service

* Dockerfile (draft)

* GitHub Action (draft)

* Force build

* Trying again

* And again

* Added GHCR secret to fork

* Grrr

* Grrr

* Issue w/ GitHub Action build

* Undo

* Consistency

* Revised Rust Webhook to not require these

* Preliminary README

* Update `version.sh` and run `./version.sh -u -s`

* Added `webhook-configuration`

* Does this resolve Helm Linting concern?

* r/AMD32V7/AMR32V7

* Are these required?

* Follow pattern

* Follow Akri pattern

* r/webhook-configuration/webhookConfiguration

* correct path references

* Cross-build Rust

* Exceptions no longer required

* Assume `./target/release/webhook-configuration`

* Expose x-plat targets to docker

* Omission

* Improve handling of flags

* Tidy

* Correct indendation

* Version bump

* Update `CHANGELOG`

* `cargo.lock` versions now bumped too

* Temporarily (!) bumping build timeouts

* Corrected component reference

* Missed `build-arg=CROSS_BUILD_TARGET=...`

* Avoid Helm issue with un-`named` `Lists`

* Revert `CHANGELOG`

* Added unit tests

* Filters Akri Configuration manifest so that it validates

* Added test for filtered `generation`

* Added test for extended (complete) Config

* To avoid GitHub Actions build failure

* End-to-End Webhook tests

* Integration tests require `actix-rt`

* Include `webhook-configuration` container image

* Learns all the things!

* Typo

* Added `webhook` to `test-case`s

* Removed `get_agent_and_controller` reference

* Simplified Actions `matrix`; Updated Webhook certs

* Override `webhookConfiguration.image.tag` to `pr-amd64`

* Add debugging

* Typo

* sudo'ing `kubectl` commands

* Try subprocess; reduce test matrix

* Add `shell=True`

* More `describe`s

* Correct `kubectl --selector` commands

* Reflect r/ENTRYPOINT/CMD in Dockerfile

* Try matrix

* Debugging Kubenernetes 1.16

* Additional MicroK8s 1.16+1.17 and debugging

* Generate: `*-webhook-log` from GitHub Actions

* Add some debugging statements

* K8s 1.16 expects AdmissionReview to be v1beta1

* Checking K3s 1.16+1.17

* Ordering may be significant

* Reverted

* Don't delete CRDs; Remove redundant debugging

* Limit to distro-versions known to work for E2Es

* Bumped OpenAPI-generated sources due to Akri security audit issues

* Documents `run-webook.py`

* Typo

* `expect` only when providing useful message

* fix Makefile formatting for image push [SAME VERSION]

* add updates to lock file fir admission controller webhook dependencies (#254)

* proposal for logging standards

* Fix typo

* Simplify containers makefile (#256)

* simplify makefile for containers

* add for all containers

* fix indent

* bump version

* try to fix indentation

* fix manifest creation error (#257)

* Fix onvif

* changes to the particular makefiles should invoke container workflow (#258)

* Add more docs for akri build (#260)

* add docs for akri build

* address feedback

* add local instructions

* fix mistakes

* Auto-updated dependencies

* Allow dependencies auto update to be manually run

* Auto-updated dependencies

* increase timeout for tarpaulin and check-rust workflows (#266)

* Increase docker create timeout to 600 minutes and document this hidden timeout (#267)

* Try same env var for action and container timeout

* output script to verify

* try reusing timeout-minutes directly

* Try moving timeout to step and access that directly

* try fixing env var creation

* try using env var again

https://docs.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions#job-context suggests timeout-minutes can be set from env

* Use step.timeout-minutes because it can pull from env var

* Update run-tarpaulin.yml

* just make the docker keep alive script sleep 600 minutes

* remove env var

* fix typo

* typos, typos, typos

* create certs for webhook e2e tests with longer lasting CA (#271)

* Enable Discovery Handlers as Pods (#252)

* Move security audit checks to a daily schedule instead of on PRs

* Fix typo

* Link to specific github run url from github context

* rename rust jobs

* remove unnecessary job

* only run on main and not forks

* Update security-audit.yml

Restrict the action to main repo and not forks

* Serialize Configuration Properties for Webhook (#276)

* don't skip serializing configuration properties

* increase version

* rust fmt fixes

* Try to ONLY build rust once per platform (#270)

* build rust once/platform, share with artifacts

* timeout => timeout-minutes

* trigger when build-rust-code changes

* only run container builds after successful rust build

* install rust toolchain to build rust

* add crossbuild qemu

* reduce retention to minimum

* make test timeout longer

* update version

* Fix artifact name [SAME VERSION] (#280)

* fix artifact name [SAME VERSION]

* only run for main

* Add Workflow to Cancel Previous PR Workflows [SAME VERSION] (#281)

* add workflow to cancel all previous workflows on a pr

* remove security workflow and cancel workflow from list

* Build both slim and full Agents [IGNORE INTERMEDIATE BUILDS] (#279)

* specify component name in agent multiarch build (#285)

* Build discovery handler images [SAME VERSION] (#286)

* Enable Canceling Previous Workflows on PRs from Forks [SAME VERSION] (#284)

* use workflow_run trigger in cancel workflow

* only run cancel workflow explicitly for pull_request events

* Increase e2e test timeout [SAME VERSION] (#287)

* increase e2e test timeout

* increase timeout further

* Ensure Discovery Handler is marked as available again after Configuration deletions (#282)

* Make sure `shared` environment variable is set in debug echo Discovery Handler (#289)

* Overwrite latest tag when user specifies a tag (#293)

* overwrite latest tag when user supplies tag

* increase version

* Auto-updated dependencies

* Reference correct Agent features for embedding Discovery Handlers [IGNORE INTERMEDIATE BUILDS] (#295)

* Debug echo properties (#288)

* Add Documentation on using Debug Echo [SAME VERSION] (#296)

* make sure webhook-configuration version updated in lock file (#300)

* Remove un-utilized CRD field (#290)

* remove rbac property from Instance CRD

* bump minor version to 0.5.0 for breaking change

* Rename CRD fields to be more descriptive (#297)

* change Configuration.properties to Configuration.brokerProperties

* change Instance.metadata to Instance.brokerProperties

* increase minor version due to CRD breaking change

* fix errors in user guide (#302)

* Remove udev directory mount from Agent (#304)

* Extend documentation (#303)

* Documentation fixes (#307)

A few simple fixes to the Debug Echo documentation.

Signed-off-by: Hernan Gatta <hegatta@microsoft.com>

* fix opc ua configuration table in docs (#309)

* use sudo when getting logs in e2e tests (#312)

* suggest background reading before discovery handler development (#310)

* Update cluster setup documentation (#308)

* lint helm chart with values (#306)

* Add documentation on setting a Configuration's `brokerProperties` (#311)

* Fix end-to-end tests (#301)

* Reduce K3s and MicroK8s eviction limits for tests [SAME VERSION] (#313)

* reduce K3s eviction limits for tests

* reduce MicroK8s limits

* Rename configuration templates (#315)

* rename configuration templates

* increase version

* Set compute resource limits and requests for all Akri components (#305)

* Extensibility example fixes [SAME VERSION] (#321)

* Use latest Rust and Tarpaulin (#318)

* use latest tarpaulin in workflow

* use latest rust in workflows

* increase version

* use previous tarpaulin version due to segfault issue

* Increase dependency minor versions where possible [SAME VERSION] (#323)

* increase cfg-if, env_logger, mockall_double, prometheus, udev, opcua-client, and rand crate minor versions

* increase version

* extend sleep in test case workflow to 45 minutes for component builds to complete (#326)

* Test e2e tests on latest K8s version [SAME VERSION] (#317)

* reference Akri's release Helm chart in documentation (#325)

* Update CHANGELOG for v0.6.5 release (#319)

* [Extensibility] HTTP protocol (branch: http-extensibility) (#135)

* Initial commit

* Working

* Correct errors & revise for Device|Discovery v2

* Working

* Should (!) work

* Typo

* Enrich

* Refine

* Fixes: #102

* Moves

* Resolved

* Revised for `dnsPolicy`

* Dockerfiles

* Added gRPC solution

* Replaced

* Kubernetes specs

* Merge

* Correct Kubernetes config filenames

* Typo

* Removed duplicate

* Standalone broker exposes no ports

* end-to-end-demo-gce.md: fixing 1 typo (#131)

Hi,
just removing the superfluous 's'
Didier

* link to codecov.io and use codecov action (#134)

* Update end-to-end-demo.md (#112)

* Update end-to-end-demo.md

Hi there
I extended the documentatio with the installation of linux-modules-extra because I had to add this package on Ubuntu 20.04 LTS (on a GCE instance): it seems that it doesn't come by default on distros / images aimed at backend servers. v4l loopback won't load if this other module is not present.
Didier

* Update end-to-end-demo.md

fixing initial text according to revision notes in PR review

* Update end-to-end-demo.md

fixing style

* Update end-to-end-demo.md

simplifying text, based on PR review by Kate

* rebase to finalize PR

* Fix codecov for pull_request_target [SAME VERSION] (#138)

* fix codecov for pull_request_target

* add anti-pull-request-* conditional

* Do not upload to codecov on PRs (#140)

* end-to-end-demo-rpi4: fixing 1 typo (#143)

Hello,
Title says it all
Didier

* end-to-end demo : fixing 1 typo (#141)

Hi there,
The title says it all
Didier

* Minor e2e demo doc flow change (#139)

* Minor flow change

* Cleanup

* Expand udev rule support (#130)

* add support for SUBSYSTEMS, KERNELS, ATTRIBUTES, DRIVERS, and TAGS fields

* fix formatting and add comments

* add recursive search for subsystems

* update udev configuration document with newly supported fields

* check child device for field before looking up hierarchy

* update version

* document how to filter for only devices with devnodes when testing

* reuse shared code

* rust fmt fixes

* add inline documentation for regex matching

* Update end-to-end-demo.md (#113)

Hi there,
I added a comment regarding the importance of the version of v4l2loopback to avoid my personal initial mistake to others: I did not realize at start that the version was so important. So I went through this ticket with the dev: umlaeute/v4l2loopback#370
Didier

Co-authored-by: bfjelds <bfjelds@microsoft.com>

* Add sudo into udev configuration doc (#144)

* Use arm7

* Reference arm7

* Reference branch on clone

* `REPO="akri"`

* Helm template for Agent already revised

* Consistency

* Use `./version.txt` for Akri version

* Automate IMAGE updates

* Build|Push gRPC images; Add'l consistency

* Add Action to build HTTP Broker containers

* I guess `http-extensibility` not `main`

* Enable PRs to test changes to helm charts [SAME VERSION] (#146)

* enable PRs to test changes to helm charts

* handle manual job, fix push and release conditional

* trigger e2e for helm changes

* Updates references to `armv7`

* Removed `shared`  from HTTP Broker Dockerfiles

* Correct version reference for image tags

* Typo

* Adds Golang Device|Discovery and alt-gRPC

* s/println!/trace!

* Consistency

* Reflect relocation of apps

* Simplify environment

* Typo

* Consistency on repo names for HTTP apps

* Rename HTTP apps gRPC images

* GitHub Actions to build HTTP apps containers

* Configure broker security context (#148)

* make udev broker security context configurable

* update version

* change group permissions to be default in example

* fix comment with group id

* Remove privileged security context from Akri Agent (#147)

* Remove (redundant!?) aliasing

* Remove healthchecks (`/healthz`)

* Removed `akri-shared` dep

* Simplified using `strategy.matrix`

* Revised to use `strategy.matrix`

* reference macro using fully-qualified module name

* r|Microsoft|deislabs/akri

* Remove unnecessary include

* Add precision on arch being built

* Consistent image naming and v1

* Remove `/v2/` references

* Explantion of different broker implementations

* Cleanup Workflows [IGNORE INTERMEDIATE BUILDS][SAME VERSION] (#155)

* don't persist github creds and remove setup.sh from workflows

* Update CHANGELOG for release v0.0.44 (#153)

* Update CHANGELOG for release v0.0.44

* update release to better describe helm changes and supported flavors

* add note about known k3s incompat

* Pin CHANGELOG changes to the expected label

* Fix CHANGELOG typo

* Optimize build and test all supported versions (#157)

* build once, test all supported versions

* test step needs build step

* fix copy-paste error

* use startsWith instead of '==' to check kube-runtime

* for download, specifying path introduces an unwanted directory

* load the artifact containers into docker for Kubernetes

* microk8s ctr images import is mysteriously failing with 'context deadline exceeded'

* avoid k3s' crictl, add more testing versions for kubernetes & k3s

* allow downgrades for kubernetes install, try to understand microk8s image import failure

* swallow the return code of version checks

* use persist-creds=false

* disable microk8s 1.19 for now

* microk8s 1.19 requires small sleep before it is ready for ctr requests

* to ensure sequential running, we cannot skip the build-containers job (just its steps) (#159)

* Update user guide with first release tag for Akri release chart (#160)

* update user guide with first release tag for akri release chart

* reference akri release chart instead of dev chart in docs

* Remove pull_request_target triggers and minimize credential use [SAME VERSION] [IGNORE INTERMEDIATE BUILDS] (#161)

* remove dockerhub credentials from workflows

* add link to repo to intermediate containers

* remove pull_request_target

* only log into docker when pushing changes to ghcr

* Typos

* Added existing "Extensibility" preamble

* Tidy

* Replace "Extensibility"

* attempt to merge extensibility.md

i focused on the standalone to cut down on the size (the file is still 800+ lines) with a thought towards linking to some md files in http-extensibility branch for more details (on the rust grpc and golang grpc).

* tighten up to reduce size

combine device and discovery into one http server/pod, remove some comments from quoted code

* provide a few more explanations

* fix typo

* Use matrix for build-http-broker-containers.yaml

* Replace backup md file with extensibility-http-grpc.md

Create document for deeper dive into gRPC broker/client code.  This can be referenced from extensibility.md.

* update extensibility.md to be consistent 'HTTP'

* create links to http-extensibility branch

* after walkthrough, make a couple fixes

* use different curl container

busyboxplus seems to have a dns problem that manifests on k3s

* remove workflows for http-extensibility

* remove new workflows in extensibility branch

Co-authored-by: Didier Durand <durand.didier@gmail.com>
Co-authored-by: bfjelds <bfjelds@microsoft.com>
Co-authored-by: Jiri Appl <jiria@microsoft.com>
Co-authored-by: Kate Goldenring <kate.goldenring@microsoft.com>

* add http discovery handler to the discovery handler modules folder

Co-authored-by: Didier Durand <durand.didier@gmail.com>
Co-authored-by: Jiayi Hu <jiayi.ghu@gmail.com>
Co-authored-by: Jiayi Hu <jiayihu@Bad-wolf.local>
Co-authored-by: Roaa <romoh@microsoft.com>
Co-authored-by: Daz Wilkin <DazWilkin@users.noreply.github.com>
Co-authored-by: Ronan Flynn-Curran <flynnduism@gmail.com>
Co-authored-by: romoh <noreply@github.com>
Co-authored-by: Chao Zheng <charleszheng44@gmail.com>
Co-authored-by: bfjelds <bfjelds@microsoft.com>
Co-authored-by: Jiri Appl <jiria@microsoft.com>
Co-authored-by: Hernan Gatta <HernanGatta@users.noreply.github.com>
  • Loading branch information
12 people committed Apr 27, 2021
1 parent c7279e7 commit 26fba01
Show file tree
Hide file tree
Showing 218 changed files with 18,343 additions and 7,802 deletions.
27 changes: 27 additions & 0 deletions .dockerignore
Expand Up @@ -37,20 +37,47 @@
!target/x86_64-unknown-linux-gnu/release/controller
!target/x86_64-unknown-linux-gnu/debug/agent
!target/x86_64-unknown-linux-gnu/release/agent
!target/x86_64-unknown-linux-gnu/debug/agent-full
!target/x86_64-unknown-linux-gnu/release/agent-full
!target/x86_64-unknown-linux-gnu/debug/udev-video-broker
!target/x86_64-unknown-linux-gnu/release/udev-video-broker
!target/x86_64-unknown-linux-gnu/debug/webhook-configuration
!target/x86_64-unknown-linux-gnu/release/webhook-configuration
!target/x86_64-unknown-linux-gnu/release/udev-discovery-handler
!target/x86_64-unknown-linux-gnu/release/debug-echo-discovery-handler
!target/x86_64-unknown-linux-gnu/release/http-discovery-handler
!target/x86_64-unknown-linux-gnu/release/onvif-discovery-handler
!target/x86_64-unknown-linux-gnu/release/opcua-discovery-handler
!target/aarch64-unknown-linux-gnu/debug/controller
!target/aarch64-unknown-linux-gnu/release/controller
!target/aarch64-unknown-linux-gnu/debug/agent
!target/aarch64-unknown-linux-gnu/release/agent
!target/aarch64-unknown-linux-gnu/debug/agent-full
!target/aarch64-unknown-linux-gnu/release/agent-full
!target/aarch64-unknown-linux-gnu/debug/udev-video-broker
!target/aarch64-unknown-linux-gnu/release/udev-video-broker
!target/aarch64-unknown-linux-gnu/debug/webhook-configuration
!target/aarch64-unknown-linux-gnu/release/webhook-configuration
!target/aarch64-unknown-linux-gnu/release/udev-discovery-handler
!target/aarch64-unknown-linux-gnu/release/debug-echo-discovery-handler
!target/aarch64-unknown-linux-gnu/release/http-discovery-handler
!target/aarch64-unknown-linux-gnu/release/onvif-discovery-handler
!target/aarch64-unknown-linux-gnu/release/opcua-discovery-handler
!target/armv7-unknown-linux-gnueabihf/debug/controller
!target/armv7-unknown-linux-gnueabihf/release/controller
!target/armv7-unknown-linux-gnueabihf/debug/agent
!target/armv7-unknown-linux-gnueabihf/release/agent
!target/armv7-unknown-linux-gnueabihf/debug/agent-full
!target/armv7-unknown-linux-gnueabihf/release/agent-full
!target/armv7-unknown-linux-gnueabihf/debug/udev-video-broker
!target/armv7-unknown-linux-gnueabihf/release/udev-video-broker
!target/armv7-unknown-linux-gnueabihf/debug/webhook-configuration
!target/armv7-unknown-linux-gnueabihf/release/webhook-configuration
!target/armv7-unknown-linux-gnueabihf/release/udev-discovery-handler
!target/armv7-unknown-linux-gnueabihf/release/debug-echo-discovery-handler
!target/armv7-unknown-linux-gnueabihf/release/http-discovery-handler
!target/armv7-unknown-linux-gnueabihf/release/onvif-discovery-handler
!target/armv7-unknown-linux-gnueabihf/release/opcua-discovery-handler

# Cross toml file needs to be available for making the cross build containers
!Cross.toml
Expand Down
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
@@ -1,3 +1,3 @@
# https://help.github.com/en/articles/about-code-owners#codeowners-syntax

* @bfjelds @kate-goldenring @jiria @britel
* @bfjelds @kate-goldenring @jiria @britel @romoh
3 changes: 2 additions & 1 deletion .github/actions/build-component-per-arch/main.js
Expand Up @@ -62,11 +62,12 @@ async function shell_cmd(cmd) {
core.setFailed(`Failed with unknown platform: ${core.getInput('platform')}`)
return
}

console.log(`Makefile build target suffix: ${makefile_target_suffix}`)

if (core.getInput('build_rust') == '1') {
console.log(`Install Rust`)
child_process.execSync(`curl https://sh.rustup.rs | sh -s -- -y --default-toolchain=1.41.0`);
child_process.execSync(`curl https://sh.rustup.rs | sh -s -- -y --default-toolchain=1.51.0`);
const bindir = `${process.env.HOME}/.cargo/bin`;
process.env.PATH = `${process.env.PATH}:${bindir}`;

Expand Down
33 changes: 33 additions & 0 deletions .github/workflows/auto-update-dependencies.yml
@@ -0,0 +1,33 @@
name: Dependencies autoupdate

on:
workflow_dispatch: # can be manually run if needed
schedule:
- cron: '0 0 1 * *' # run on first day of each month at 12:00 am UTC time

env:
CARGO_TERM_COLOR: always

jobs:
auto-update-dependencies:
runs-on: ubuntu-latest

steps:
- name: Checkout the head commit of the branch
uses: actions/checkout@v2
with:
persist-credentials: false

- name: Install Linux requirements
run: |
apt_dependencies="git curl libssl-dev pkg-config libudev-dev libv4l-dev"
echo "Run apt update and apt install the following dependencies: $apt_dependencies"
sudo apt update
sudo apt install -y $apt_dependencies
- name: Check for dependency updates
uses: romoh/dependencies-autoupdate@v1.1
with:
token: ${{ secrets.AKRI_BOT_TOKEN }}
update-command: "'cargo update && cargo test'"
on-changes-command: "'./version.sh -u -p'"
82 changes: 38 additions & 44 deletions .github/workflows/build-agent-container.yml
@@ -1,41 +1,16 @@
name: Build Agent
name: Build Agents

on:
push:
branches: [ main ]
paths:
- .github/actions/build-component-per-arch/**
- .github/actions/build-component-multi-arch/**
- .github/workflows/build-agent-container.yml
- build/containers/Dockerfile.agent
- agent/**
- shared/**
- version.txt
- build/akri-containers.mk
- Makefile
pull_request:
branches: [ main ]
paths:
- .github/actions/build-component-per-arch/**
- .github/actions/build-component-multi-arch/**
- .github/workflows/build-agent-container.yml
- build/containers/Dockerfile.agent
- agent/**
- shared/**
- version.txt
- build/akri-containers.mk
- Makefile
release:
types:
- published

env:
AKRI_COMPONENT: agent
MAKEFILE_COMPONENT: agent
workflow_run:
workflows: ["Build Production Rust Code"]
branches: [main]
types:
- completed

jobs:

per-arch:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
timeout-minutes: 40
strategy:
Expand All @@ -44,6 +19,9 @@ jobs:
- arm64v8
- arm32v7
- amd64
akri-component:
- agent
- agent-full

steps:
- name: Checkout the head commit of the branch
Expand All @@ -60,27 +38,43 @@ jobs:
yarn install
yarn add @actions/core @actions/github @actions/exec fs
- name: Run Per-Arch component build for ${{ env.AKRI_COMPONENT }}
- name: Download rust build artifacts
uses: dawidd6/action-download-artifact@v2
with:
workflow: ${{ github.event.workflow_run.workflow_id }}
workflow_conclusion: success
commit: ${{ github.event.workflow_run.head_sha }}
name: rust-${{ matrix.arch }}-binaries
path: /tmp

- name: Unpack Rust binaries
run: |
tar -xvf /tmp/rust-${{ matrix.arch }}-binaries.tar
- name: Run Per-Arch component build for ${{ matrix.akri-component }}
uses: ./.github/actions/build-component-per-arch
with:
github_event_name: ${{ github.event_name }}
github_event_name: ${{ github.event.workflow_run.event }}
github_ref: ${{ github.ref }}
github_event_action: ${{ github.event.action }}
github_merged: ${{ github.event.pull_request.merged }}
container_name: ${{ env.AKRI_COMPONENT }}
container_name: ${{ matrix.akri-component }}
container_prefix: ghcr.io/deislabs/akri
container_registry_base_url: ghcr.io
container_registry_username: ${{ secrets.crUsername }}
container_registry_password: ${{ secrets.crPassword }}
makefile_component_name: ${{ env.MAKEFILE_COMPONENT }}
makefile_component_name: ${{ matrix.akri-component }}
platform: ${{ matrix.arch }}
build_rust: "1"
build_rust: "0"

multi-arch:
if: (github.event_name == 'release') || (github.event_name == 'push' && github.ref == 'refs/heads/main') || (startsWith(github.event_name, 'pull_request') && github.event.action == 'closed' && github.event.pull_request.merged == true && github.ref != 'refs/heads/main')
if: ${{ github.event.workflow_run.conclusion == 'success' }} && ((github.event.workflow_run.event == 'release') || (github.event.workflow_run.event == 'push' && github.ref == 'refs/heads/main'))
needs: per-arch
runs-on: ubuntu-latest
timeout-minutes: 5
strategy:
matrix:
akri-component:
- agent
- agent-full

steps:
- name: Checkout repo
Expand All @@ -97,13 +91,13 @@ jobs:
yarn install
yarn add @actions/core @actions/github @actions/exec fs
- name: Run Multi-Arch component build for ${{ env.AKRI_COMPONENT }}
- name: Run Multi-Arch component build for ${{ matrix.akri-component }}
uses: ./.github/actions/build-component-multi-arch
with:
github_event_name: ${{ github.event_name }}
container_name: ${{ env.AKRI_COMPONENT }}
github_event_name: ${{ github.event.workflow_run.event }}
container_name: ${{ matrix.akri-component }}
container_prefix: ghcr.io/deislabs/akri
container_registry_base_url: ghcr.io
container_registry_username: ${{ secrets.crUsername }}
container_registry_password: ${{ secrets.crPassword }}
makefile_component_name: ${{ env.MAKEFILE_COMPONENT }}
makefile_component_name: ${{ matrix.akri-component }}
2 changes: 2 additions & 0 deletions .github/workflows/build-anomaly-detection-app-container.yml
Expand Up @@ -11,6 +11,7 @@ on:
- samples/apps/anomaly-detection-app/**
- version.txt
- build/akri-containers.mk
- build/akri-python-containers.mk
- Makefile
pull_request:
branches: [ main ]
Expand All @@ -22,6 +23,7 @@ on:
- samples/apps/anomaly-detection-app/**
- version.txt
- build/akri-containers.mk
- build/akri-python-containers.mk
- Makefile
release:
types:
Expand Down
56 changes: 23 additions & 33 deletions .github/workflows/build-controller-container.yml
@@ -1,33 +1,11 @@
name: Build Controller

on:
push:
branches: [ main ]
paths:
- .github/actions/build-component-per-arch/**
- .github/actions/build-component-multi-arch/**
- .github/workflows/build-controller-container.yml
- build/containers/Dockerfile.controller
- controller/**
- shared/**
- version.txt
- build/akri-containers.mk
- Makefile
pull_request:
branches: [ main ]
paths:
- .github/actions/build-component-per-arch/**
- .github/actions/build-component-multi-arch/**
- .github/workflows/build-controller-container.yml
- build/containers/Dockerfile.controller
- controller/**
- shared/**
- version.txt
- build/akri-containers.mk
- Makefile
release:
types:
- published
workflow_run:
workflows: ["Build Production Rust Code"]
branches: [main]
types:
- completed

env:
AKRI_COMPONENT: controller
Expand All @@ -36,6 +14,7 @@ env:
jobs:

per-arch:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
timeout-minutes: 40
strategy:
Expand All @@ -59,24 +38,35 @@ jobs:
yarn install
yarn add @actions/core @actions/github @actions/exec fs
- name: Download rust build artifacts
uses: dawidd6/action-download-artifact@v2
with:
workflow: ${{ github.event.workflow_run.workflow_id }}
workflow_conclusion: success
commit: ${{ github.event.workflow_run.head_sha }}
name: rust-${{ matrix.arch }}-binaries
path: /tmp

- name: Unpack Rust binaries
run: |
tar -xvf /tmp/rust-${{ matrix.arch }}-binaries.tar
- name: Run Per-Arch component build for ${{ env.AKRI_COMPONENT }}
uses: ./.github/actions/build-component-per-arch
with:
github_event_name: ${{ github.event_name }}
github_event_name: ${{ github.event.workflow_run.event }}
github_ref: ${{ github.ref }}
github_event_action: ${{ github.event.action }}
github_merged: ${{ github.event.pull_request.merged }}
container_name: ${{ env.AKRI_COMPONENT }}
container_prefix: ghcr.io/deislabs/akri
container_registry_base_url: ghcr.io
container_registry_username: ${{ secrets.crUsername }}
container_registry_password: ${{ secrets.crPassword }}
makefile_component_name: ${{ env.MAKEFILE_COMPONENT }}
platform: ${{ matrix.arch }}
build_rust: "1"
build_rust: "0"

multi-arch:
if: (github.event_name == 'release') || (github.event_name == 'push' && github.ref == 'refs/heads/main') || (startsWith(github.event_name, 'pull_request') && github.event.action == 'closed' && github.event.pull_request.merged == true && github.ref != 'refs/heads/main')
if: ${{ github.event.workflow_run.conclusion == 'success' }} && ((github.event.workflow_run.event == 'release') || (github.event.workflow_run.event == 'push' && github.ref == 'refs/heads/main'))
needs: per-arch
runs-on: ubuntu-latest
timeout-minutes: 5
Expand All @@ -99,7 +89,7 @@ jobs:
- name: Run Multi-Arch component build for ${{ env.AKRI_COMPONENT }}
uses: ./.github/actions/build-component-multi-arch
with:
github_event_name: ${{ github.event_name }}
github_event_name: ${{ github.event.workflow_run.event }}
container_name: ${{ env.AKRI_COMPONENT }}
container_prefix: ghcr.io/deislabs/akri
container_registry_base_url: ghcr.io
Expand Down

0 comments on commit 26fba01

Please sign in to comment.