Skip to content

Commit

Permalink
Added more workflows for ghcr and changed manifest and documentation … (
Browse files Browse the repository at this point in the history
#44)

Add ghcr workflows for remaining samples and upgrade documentation.
  • Loading branch information
ethanperry1 authored Dec 5, 2023
1 parent 974c295 commit 2216367
Show file tree
Hide file tree
Showing 11 changed files with 87 additions and 29 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/anomaly_detection_ghcr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: anomaly_detection_ghcr

on:
workflow_dispatch:

jobs:
call-docker-build:
uses: ./.github/workflows/ghcr.yml
with:
name: anomaly-detection
file: samples/anomaly-detection/Dockerfile
context: .
12 changes: 12 additions & 0 deletions .github/workflows/http_grpc_callout_ghcr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: http_grpc_callout_ghcr

on:
workflow_dispatch:

jobs:
call-docker-build:
uses: ./.github/workflows/ghcr.yml
with:
name: http-grpc-callout
file: samples/http-grpc-callout/Dockerfile
context: .
12 changes: 12 additions & 0 deletions .github/workflows/http_grpc_shift_calculation_ghcr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: http_grpc_shift_calculation_ghcr

on:
workflow_dispatch:

jobs:
call-docker-build:
uses: ./.github/workflows/ghcr.yml
with:
name: http-grpc-shift-calculation
file: samples/http-grpc-shift-calculation/Dockerfile
context: .
18 changes: 11 additions & 7 deletions samples/anomaly-detection/README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,26 @@
# Anomaly Detection Server

## Usage
## Quick Start

```sh
kubectl apply -f manifest.yml
```

This demo assumes a K3S cluster.
## Usage

### Server as a Pod

```sh
# From the root of the anomaly-detection directory.
docker build ../.. -f Dockerfile -t makocr.azurecr.io/anomaly-detection:latest
docker build ../.. -f Dockerfile -t ghcr.io/azure-samples/explore-iot-operations/anomaly-detection:latest

# Or if running from the root of the explore-iot-operations repository.
# docker build . -f ./samples/anomaly-detection/Dockerfile -t makocr.azurecr.io/anomaly-detection:latest
# docker build . -f ./samples/anomaly-detection/Dockerfile -t ghcr.io/azure-samples/explore-iot-operations/anomaly-detection:latest

# Push or load your newly built image into your cluster, depending on the k8s setup.
# docker push makocr.azurecr.io/anomaly-detection:latest # Using AKS + Connected ACR
# minikube load makocr.azurecr.io/anomaly-detection:latest # Using minikube
# docker save makocr.azurecr.io/anomaly-detection:latest | k3s ctr images import - # Using K3s
# docker push ghcr.io/azure-samples/explore-iot-operations/anomaly-detection:latest # Using AKS + Connected ACR
# minikube load ghcr.io/azure-samples/explore-iot-operations/anomaly-detection:latest # Using minikube
# docker save ghcr.io/azure-samples/explore-iot-operations/anomaly-detection:latest | k3s ctr images import - # Using K3s

kubectl apply -f manifest.yml
```
Expand Down
2 changes: 1 addition & 1 deletion samples/anomaly-detection/manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ spec:
spec:
containers:
- name: anomaly-detection
image: makocr.azurecr.io/anomaly-detection:latest
image: ghcr.io/azure-samples/explore-iot-operations/anomaly-detection:latest
imagePullPolicy: Always
ports:
- name: http
Expand Down
18 changes: 12 additions & 6 deletions samples/http-grpc-callout/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,27 @@

GRPC/HTTP Callout Server is a server for testing the http and grpc callout capabilities of the Azure IoT Operations data processor.

## Quick Start

```sh
kubectl apply -f manifest.yml
```

## Usage

### Server as a Pod
### Build Image from Source

```sh
# From the root of the http-grpc-callout directory.
docker build ../.. -f Dockerfile -t makocr.azurecr.io/http-grpc-callout:latest
docker build ../.. -f Dockerfile -t ghcr.io/azure-samples/explore-iot-operations/http-grpc-callout:latest

# Or if running from the root of the explore-iot-operations repository.
# docker build . -f ./samples/http-grpc-callout/Dockerfile -t makocr.azurecr.io/http-grpc-callout:latest
# docker build . -f ./samples/http-grpc-callout/Dockerfile -t ghcr.io/azure-samples/explore-iot-operations/http-grpc-callout:latest

# Push or load your newly built image into your cluster, depending on the k8s setup.
# docker push makocr.azurecr.io/http-grpc-callout:latest # Using AKS + Connected ACR
# minikube load makocr.azurecr.io/http-grpc-callout:latest # Using minikube
# docker save makocr.azurecr.io/http-grpc-callout:latest | k3s ctr images import - # Using K3s
# docker push ghcr.io/azure-samples/explore-iot-operations/http-grpc-callout:latest # Using AKS + Connected ACR
# minikube load ghcr.io/azure-samples/explore-iot-operations/http-grpc-callout:latest # Using minikube
# docker save ghcr.io/azure-samples/explore-iot-operations/http-grpc-callout:latest | k3s ctr images import - # Using K3s

kubectl apply -f manifest.yml
```
Expand Down
2 changes: 1 addition & 1 deletion samples/http-grpc-callout/manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ spec:
spec:
containers:
- name: http-grpc-callout
image: makocr.azurecr.io/http-grpc-callout:latest
image: ghcr.io/azure-samples/explore-iot-operations/http-grpc-callout:latest
imagePullPolicy: Always
ports:
- name: http
Expand Down
18 changes: 12 additions & 6 deletions samples/http-grpc-shift-calculation/README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,26 @@
# HTTP/GRPC Shift Calculator

## Quick Start

```sh
kubectl apply -f manifest.yml
```

## Usage

### Server as a Pod
### Build Image from Source

```sh
# From the root of the http-grpc-shift-calculation directory.
docker build ../.. -f Dockerfile -t makocr.azurecr.io/http-grpc-shift-calculation:latest
docker build ../.. -f Dockerfile -t ghcr.io/azure-samples/explore-iot-operations/http-grpc-shift-calculation:latest

# Or if running from the root of the explore-iot-operations repository.
# docker build . -f ./samples/http-grpc-shift-calculation/Dockerfile -t makocr.azurecr.io/http-grpc-shift-calculation:latest
# docker build . -f ./samples/http-grpc-shift-calculation/Dockerfile -t ghcr.io/azure-samples/explore-iot-operations/http-grpc-shift-calculation:latest

# Push or load your newly built image into your cluster, depending on the k8s setup.
# docker push makocr.azurecr.io/http-grpc-shift-calculation:latest # Using AKS + Connected ACR
# minikube load makocr.azurecr.io/http-grpc-shift-calculation:latest # Using minikube
# docker save makocr.azurecr.io/http-grpc-shift-calculation:latest | k3s ctr images import - # Using K3s
# docker push ghcr.io/azure-samples/explore-iot-operations/http-grpc-shift-calculation:latest # Using AKS + Connected ACR
# minikube load ghcr.io/azure-samples/explore-iot-operations/http-grpc-shift-calculation:latest # Using minikube
# docker save ghcr.io/azure-samples/explore-iot-operations/http-grpc-shift-calculation:latest | k3s ctr images import - # Using K3s

kubectl apply -f manifest.yml
```
Expand Down
2 changes: 1 addition & 1 deletion samples/http-grpc-shift-calculation/manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ spec:
spec:
containers:
- name: http-grpc-shift
image: makocr.azurecr.io/http-grpc-shift-calculation:latest
image: ghcr.io/azure-samples/explore-iot-operations/http-grpc-shift-calculation:latest
imagePullPolicy: Always
ports:
- name: http
Expand Down
18 changes: 12 additions & 6 deletions samples/industrial-data-simulator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,27 @@

Industrial Data Simulator is a highly configurable MQTT asset simulator.

## Quick Start

```sh
kubectl apply -f manifest.yml
```

## Usage

### Industrial Data Simulator as K8s Pod
### Build an Image and use Industrial Data Simulator as K8s Pod

```sh
# From the root of the industrial-data-simulator directory.
docker build ../.. -f Dockerfile -t makocr.azurecr.io/industrial-data-simulator:latest
docker build ../.. -f Dockerfile -t ghcr.io/azure-samples/explore-iot-operations/industrial-data-simulator:latest

# Or if running from the root of the explore-iot-operations repository.
# docker build . -f ./samples/industrial-data-simulator/Dockerfile -t makocr.azurecr.io/industrial-data-simulator:latest
# docker build . -f ./samples/industrial-data-simulator/Dockerfile -t ghcr.io/azure-samples/explore-iot-operations/industrial-data-simulator:latest

# Push or load your newly built image into your cluster, depending on the k8s setup.
# docker push makocr.azurecr.io/industrial-data-simulator:latest # Using AKS + Connected ACR
# minikube load makocr.azurecr.io/industrial-data-simulator:latest # Using minikube
# docker save makocr.azurecr.io/industrial-data-simulator:latest | k3s ctr images import - # Using K3s
# docker push ghcr.io/azure-samples/explore-iot-operations/industrial-data-simulator:latest # Using AKS + Connected ACR
# minikube load ghcr.io/azure-samples/explore-iot-operations/industrial-data-simulator:latest # Using minikube
# docker save ghcr.io/azure-samples/explore-iot-operations/industrial-data-simulator:latest | k3s ctr images import - # Using K3s

kubectl apply -f manifest.yml
```
Expand Down
2 changes: 1 addition & 1 deletion samples/industrial-data-simulator/manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ spec:
spec:
containers:
- name: data-simulator
image: makocr.azurecr.io/industrial-data-simulator:latest
image: ghcr.io/azure-samples/explore-iot-operations/industrial-data-simulator:latest
imagePullPolicy: Always
ports:
- name: prometheus
Expand Down

0 comments on commit 2216367

Please sign in to comment.