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

[DO NOT MERGE] Import EdgeX v2.0.0 #326

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
17 changes: 5 additions & 12 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,18 @@ jobs:
fail-fast: false
matrix:
arch: [x86, x86_64, arm, arm64]
os: [ubuntu-16.04, ubuntu-18.04, ubuntu-20.04]
os: [ubuntu-18.04, ubuntu-20.04]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2

- name: Setup Golang
uses: actions/setup-go@v1
with:
go-version: '1.15.6'
go-version: '1.16.5'

- name: Install Qemu
if: ${{ matrix.arch != 'x86_64' }}
- name: Build the project
run: |
sudo apt-get update
sudo apt-get install -y qemu binfmt-support qemu-user-static

- name: Build the project
if: ${{ matrix.arch == 'x86_64' }}
run: ./build.sh

- name: Build the container
run: ./build.sh container ${{ matrix.arch }}
sudo apt-get install -y libzmq3-dev
./build.sh
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: Setup Golang
uses: actions/setup-go@v1
with:
go-version: '1.15.2'
go-version: '1.16.5'

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
5 changes: 4 additions & 1 deletion .github/workflows/lint-vet-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
- name: Setup Golang
uses: actions/setup-go@v1
with:
go-version: '1.15.6'
go-version: '1.16.5'

- name: Set env vars (golint)
run: |
Expand All @@ -24,5 +24,8 @@ jobs:

- name: Vet Analysis
run: |
sudo apt-get update
sudo apt-get install -y libzmq3-dev
go mod vendor
go vet -v ./internal/...

6 changes: 4 additions & 2 deletions .github/workflows/test-suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,20 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-16.04, ubuntu-18.04, ubuntu-20.04]
os: [ubuntu-18.04, ubuntu-20.04]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2

- name: Setup Golang
uses: actions/setup-go@v1
with:
go-version: '1.15.6'
go-version: '1.16.5'

- name: Set env vars (gocov)
run: |
sudo apt-get update
sudo apt-get install -y libzmq3-dev
go get github.com/axw/gocov/gocov
echo "$HOME/go/bin" >> $GITHUB_PATH
sudo mkdir -p /var/edge-orchestration/mnedc
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ RUN mkdir -p $TARGET_DIR/res/

# install required tools
RUN apt-get update
RUN apt-get install -y net-tools iproute2
RUN apt-get install -y net-tools iproute2 libzmq3-dev

# expose ports
EXPOSE $HTTP_PORT $MDNS_PORT $ZEROCONF_PORT $MNEDC_PORT $MNEDC_BROADCAST_PORT
Expand Down
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ GOCOVER := gocov
GOMOBILE := gomobile
DOCKER := docker
GO_COMMIT_ID := $(shell git rev-parse --short HEAD)
GO_LDFLAGS := -ldflags '-extldflags "-static" -X main.version=$(VERSION) -X main.commitID=$(GO_COMMIT_ID) -X main.buildTime=$(BUILD_DATE) -X main.buildTags=$(BUILD_TAGS)'
GO_LDFLAGS := -ldflags '-X main.version=$(VERSION) -X main.commitID=$(GO_COMMIT_ID) -X main.buildTime=$(BUILD_DATE) -X main.buildTags=$(BUILD_TAGS)'
#GO_LDFLAGS := -ldflags '-extldflags "-static" -X main.version=$(VERSION) -X main.commitID=$(GO_COMMIT_ID) -X main.buildTime=$(BUILD_DATE) -X main.buildTags=$(BUILD_TAGS)'
GO_MOBILE_LDFLAGS := -ldflags '-X main.version=$(VERSION) -X main.commitID=$(GO_COMMIT_ID) -X main.buildTime=$(BUILD_DATE) -X main.buildTags=$(BUILD_TAGS)'

# Target parameters
Expand Down
66 changes: 26 additions & 40 deletions configs/datastorage/configuration.toml
Original file line number Diff line number Diff line change
@@ -1,57 +1,43 @@
[Writable]
LogLevel = 'DEBUG'
LogLevel = 'INFO'

[Service]
Host = 'localhost'
HealthCheckInterval = '10s'
Host = ''
Port = 49986
ConnectRetries = 20
Labels = []
OpenMsg = "REST device started"
Timeout = 5000
EnableAsyncReadings = true
AsyncBufferSize = 16
ServerBindAddr = '' # blank value defaults to Service.Host value
StartupMsg = 'device rest started'
# MaxRequestSize limit the request body size in byte of put command
MaxRequestSize = 0 # value 0 unlimit the request size.
RequestTimeout = '5s'

[Registry]
Host = 'localhost'
Port = 8500
Type = "consul"
CheckInterval = "10s"
FailLimit = 3
FailWaitTime = 10
Type = 'consul'

[Clients]
[Clients.Data]
Protocol = "http"
Host = "localhost"
Port = 48080
Timeout = 5000
[Clients.core-data]
Protocol = 'http'
Host = 'localhost'
Port = 59880

[Clients.Metadata]
Protocol = "http"
Host = "localhost"
Port = 48081
Timeout = 5000

[Clients.Logging]
Protocol = "http"
Host = "localhost"
Port = 48061
[Clients.core-metadata]
Protocol = 'http'
Host = 'localhost'
Port = 59881

[Device]
DataTransform = true
InitCmd = ""
InitCmdArgs = ""
MaxCmdOps = 128
MaxCmdValueLen = 256
RemoveCmd = ""
RemoveCmdArgs = ""
ProfilesDir = "./res"
ProfilesDir = './res/profiles'
DevicesDir = './res/devices'
UpdateLastConnected = true
Labels = []
EnableAsyncReadings = true
AsyncBufferSize = 16
UseMessageBus = false

# Pre-define Devices
[[DeviceList]]
Name = "datastorage"
Profile = "datastorage"
Description = "RESTful Device"
Labels = [ "rest", "json", "numeric", "float", "int" ]
[DeviceList.Protocols]
[DeviceList.Protocols.other]
# Driver configs
# [Driver]
54 changes: 0 additions & 54 deletions configs/datastorage/datastorage-device.yaml

This file was deleted.

6 changes: 6 additions & 0 deletions configs/datastorage/devices/datastorage-device.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Pre-define Devices
[[DeviceList]]
Name = 'datastorage'
ProfileName = 'datastorage'
[DeviceList.Protocols]
[DeviceList.Protocols.other]
48 changes: 48 additions & 0 deletions configs/datastorage/profiles/datastorage.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: "datastorage"
manufacturer: "Home Edge"
model: "Home Edge"
labels:
- "rest"
- "json"
- "numeric"
- "float"
- "int"
description: "REST Device"

deviceResources:
- name: json
description: "JSON message"
properties:
valueType: "String"
readWrite: "RW"
mediaType: "application/json"
- name: int
description: "Int64 value"
properties:
valueType: "Int64"
readWrite: "RW"
mediaType: "text/plain"
- name: float
description: "Float64 value"
properties:
valueType: "Float64"
readWrite: "RW"
mediaType: "text/plain"
- name: jpeg
description: "Jpeg image"
properties:
valueType: "Binary"
readWrite: "RW"
mediaType: "image/jpeg"
- name: png
description: "png image"
properties:
valueType: "Binary"
readWrite: "RW"
mediaType: "image/jpeg"
- name: string
description: "String"
properties:
valueType: "String"
readWrite: "RW"
mediaType: "text/plain"