Skip to content

Commit 79e3ed8

Browse files
authored
Ethanperry/add package copy headers (#30)
Renames several samples, adds headers to files, and cleans up documentation and readmes.
1 parent caf43a2 commit 79e3ed8

File tree

136 files changed

+846
-451
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

136 files changed

+846
-451
lines changed

.github/workflows/callout_build.yml renamed to .github/workflows/device_simulator_build.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
name: callout_build
1+
name: device-simulator_build
22

33
on:
44
workflow_dispatch:
55
push:
66
tags:
7-
- 'v*.*.*-callout'
7+
- 'v*.*.*-device-simulator'
88

99
jobs:
1010
call-docker-build:
1111
uses: ./.github/workflows/docker_build.yml
1212
with:
13-
registry: makocr.azurecr.io/callout
14-
file: samples/callout/Dockerfile
13+
registry: makocr.azurecr.io/device-simulator
14+
file: samples/device-simulator/Dockerfile
1515
context: .
1616
secrets:
1717
azureCredentials: ${{ secrets.AZURE_CREDENTIALS }}
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
name: krill_test
1+
name: device-simulator_test
22

33
on:
44
workflow_dispatch:
55
push:
66
paths:
7-
- samples/callout/**
7+
- samples/device-simulator/**
88

99
jobs:
1010
call-mage-test:
1111
uses: ./.github/workflows/mage_tests.yml
1212
with:
13-
workdir: samples/callout/
13+
workdir: samples/device-simulator/

.github/workflows/krill_build.yml renamed to .github/workflows/http_grpc_callout_build.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
name: krill_build
1+
name: http_grpc_callout_build
22

33
on:
44
workflow_dispatch:
55
push:
66
tags:
7-
- 'v*.*.*-krill'
7+
- 'v*.*.*-http-grpc-callout'
88

99
jobs:
1010
call-docker-build:
1111
uses: ./.github/workflows/docker_build.yml
1212
with:
13-
registry: makocr.azurecr.io/krill
14-
file: samples/krill/Dockerfile
13+
registry: makocr.azurecr.io/http-grpc-callout
14+
file: samples/http-grpc-callout/Dockerfile
1515
context: .
1616
secrets:
1717
azureCredentials: ${{ secrets.AZURE_CREDENTIALS }}
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
name: krill_test
1+
name: http_grpc_callout_test
22

33
on:
44
workflow_dispatch:
55
push:
66
paths:
7-
- samples/krill/**
7+
- samples/http-grpc-callout/**
88

99
jobs:
1010
call-mage-test:
1111
uses: ./.github/workflows/mage_tests.yml
1212
with:
13-
workdir: samples/krill/
13+
workdir: samples/http-grpc-callout/

README.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
1-
# Azure IoT Operations Dev Toolbox
1+
# Explore IoT Operations
22

3-
This repo is the source of tools, samples, and other resources for customers of Azure IoT Operations.
3+
This repo is the source of tools, samples, tutorials, and other resources for customers of Azure IoT Operations.
44

55
## Features
66

7-
This project provides the following tools:
7+
This project provides the following:
88

99
* Pre-configured codespace with [K3s](https://k3s.io/) cluster via [K3d](https://k3d.io/)
10-
* Krill MQTT Data Simulator
11-
* HTTP Callout Server
12-
* GRPC Callout Server
10+
* MQTT Device Simulator
11+
* HTTP & GRPC Callout Server
1312

1413
> [!IMPORTANT]
1514
> Codespaces are easy to setup quickly and tear down later, but they're not suitable for performance evaluation or scale testing. For those scenarios, use a validated environment from the official documentation.

docs/ORGANIZATION.md

Lines changed: 16 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,31 @@
1-
# Toolbox Organization
1+
# Explore IoT Operations Organization
22

33
## Structure
44

5-
The AIO toolbox is a collection of several tools for customers of AIO. To keep the project understandable and extensible to future additions, the following conventions should be followed for repository structure.
5+
Explore IoT Operations is a collection of tools and samples for customers of Azure IoT Operations. To keep the project understandable and extensible to future additions, the following conventions should be followed for repository structure.
66

77
```
8-
├── lib
9-
│ ├── library1
8+
├── lib/
9+
│ ├── library1/
1010
│ ├── ...
11-
│ ├── libraryN
12-
├── samples
13-
│ ├── tool1
14-
│ │ ├── config.yml
15-
│ │ ├── config.json
11+
│ ├── libraryN/
12+
├── samples/
13+
│ ├── sample1/
1614
│ ├── ...
17-
│ ├── toolN
18-
├── tools
19-
│ ├── tool1
20-
│ │ ├── cmd
21-
│ │ │ ├── main.go
22-
│ │ ├── pkg
23-
│ │ │ ├── pkg1
24-
│ ├── ...
25-
│ ├── toolN
26-
├── docker
27-
│ ├── tool1
28-
│ │ ├── Dockerfile
29-
│ ├── ...
30-
│ ├── toolN
31-
├── go.mod
32-
├── go.sum
33-
├── magefile.go
15+
│ ├── sampleN/
16+
├── scripts/
17+
├── tutorials/
3418
└── README.md
3519
```
3620

37-
__Libraries__ which are shared between multiple tools should be stored in the lib directory. This library can be incorporated into projects beyond AIO tools and such documentation will be available on the _go.dev_ documentation site.
38-
39-
__Samples__ are configuration files which have been created for specific sample usages of a tool. Multiple configuration files can live in each sample folder for different samples which utilize the same tool.
40-
41-
__Tools__ are AIO specific tools which may have their own internal packages stored within the pkg folder. Other top-level folders in each tool are allowed, though it is recommended to minimize the number of top-level folders. Each tool must also have its own cmd directory where the entrypoint is located.
42-
43-
__Dockerfiles__ for relavent docker images are stored for each tool under the docker directory. They are siloed into their own directories for each tool.
44-
45-
__Mage Commands__ are located within the magefile.go. Mage commands should be written in such a way that they apply to any given tool based on a parameter. Mage commands should not be targeted at a specific tool itself. If such a command is required, a magefile within the tool directory should be produced.
21+
**Libraries** (`./lib`) are shared between multiple tools or samples.
4622

47-
## Linting & Formatting Requirements
23+
**Samples** (`./samples`) are tools or code samples which can be written in any language. They should be given a descriptive name which adequately describes their purpose, and should include some level of documentation regarding their usage.
4824

49-
Linting and formatting rules are applied to all tools and libraries based on a linting configuration set up and applied via mage commands.
25+
**Scripts** (`./scripts`) are bash scripts smaller than a tool or sample which are in some way used for setup.
5026

51-
## Example Tool
27+
**Tutorials** (`./tutorials`) are collections of code and documentation which are used together to provide a step-by-step walkthrough to demonstrate the capabilities of some feature of Azure IoT Operations. These typically serve a more narrow scope than that of a tool or code sample, designed to exercise specific facets of Azure IoT Operations.
5228

53-
Please view the example tool in `tools/example` for an example of how to contribute a new tool to the AIO toolbox.
29+
## Linting, Formatting, and Testing Requirements
5430

55-
_Note_: tools can be written in any language including minimal tools such as bash scripts. The tools are written in golang in this document for example purposes.
31+
Linting, formatting, and testing are not required but are highly recommended. The mage library under `./lib/mage` is provided for golang projects and offers some basic commands for linting, formatting, building, testing, and assuring test coverage bars. Comments describe each function within the library. See `./samples/device-simulation/mage.go` for an example of how this library is used.

samples/callout/cover.tmp.out

Lines changed: 0 additions & 1 deletion
This file was deleted.

samples/callout/coverage.out

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/bin
2+
cover.tmp.out
3+
coverage.out
4+
cover.*

0 commit comments

Comments
 (0)