Skip to content

Commit

Permalink
build: Latest go-mods, config and Dockerfile fix
Browse files Browse the repository at this point in the history
Signed-off-by: Elizabeth J Lee <elizabeth.j.lee@intel.com>
  • Loading branch information
ejlee3 committed Oct 26, 2022
1 parent 3cb9e91 commit 9e40fa3
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 31 deletions.
2 changes: 0 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ ARG MAKE='make build'
ARG ALPINE_PKG_BASE="make git gcc libc-dev zeromq-dev"
ARG ALPINE_PKG_EXTRA=""

RUN sed -e 's/dl-cdn[.]alpinelinux.org/dl-4.alpinelinux.org/g' -i~ /etc/apk/repositories
RUN apk add --no-cache ${ALPINE_PKG_BASE} ${ALPINE_PKG_EXTRA}

WORKDIR /app
Expand All @@ -37,7 +36,6 @@ FROM alpine:3.16
LABEL license='SPDX-License-Identifier: Apache-2.0' \
copyright='Copyright (c) 2022: Intel'

RUN sed -e 's/dl-cdn[.]alpinelinux.org/dl-4.alpinelinux.org/g' -i~ /etc/apk/repositories
RUN apk add --update --no-cache zeromq dumb-init

COPY --from=builder /app/LICENSE /
Expand Down
33 changes: 28 additions & 5 deletions cmd/res/configuration.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,20 @@ LogLevel = "INFO"
[Writable.InsecureSecrets.DB.Secrets]
username = ""
password = ""
[Writable.Telemetry]
Interval = "30s"
PublishTopicPrefix = "edgex/telemetry" # /<service-name>/<metric-name> will be added to this Publish Topic prefix
[Writable.Telemetry.Metrics] # All service's metric names must be present in this list.
# Device SDK provided Service Metrics
EventsSent = false
ReadingsSent = false
# Common Security Service Metrics
SecuritySecretsRequested = false
SecuritySecretsStored = false
SecurityConsulTokensRequested = false
SecurityConsulTokenDuration = false
[Writable.Telemetry.Tags] # Contains the service level tags to be attached to all the service's metrics
# Gateway="my-iot-gateway" # Tag must be added here since Env Override can only change existing value, not added new ones.

[Service]
Host = "localhost"
Expand All @@ -14,7 +28,7 @@ ServerBindAddr = "" # blank value defaults to Service.Host value
StartupMsg = "device llrp started"
HealthCheckInterval = "10s"
# MaxRequestSize limit the request body size in byte of put command
MaxRequestSize = 0 # value 0 unlimit the request size.
MaxRequestSize = 0 # value 0 unlimited request size.
RequestTimeout = "5s"
[Service.CORSConfiguration]
EnableCORS = false
Expand Down Expand Up @@ -73,20 +87,29 @@ Type = "redis"
AuthMode = "usernamepassword" # required for redis messagebus (secure or insecure).
SecretName = "redisdb"
PublishTopicPrefix = "edgex/events/device" # /<device-profile-name>/<device-name>/<source-name> will be added to this Publish Topic prefix
[MessageQueue.Topics]
CommandRequestTopic = "edgex/device/command/request/device-rfid-llrp/#" # subscribing for inbound command requests
CommandResponseTopicPrefix = "edgex/device/command/response" # publishing outbound command responses; <device-service>/<device-name>/<command-name>/<method> will be added to this publish topic prefix
[MessageQueue.Optional]
# Default MQTT Specific options that need to be here to enable environment variable overrides of them
# Client Identifiers
ClientId = "device-rfid-llrp"
# Connection information
Qos = "0" # Quality of Sevice values are 0 (At most once), 1 (At least once) or 2 (Exactly once)
Qos = "0" # Quality of Service values are 0 (At most once), 1 (At least once) or 2 (Exactly once)
KeepAlive = "10" # Seconds (must be 2 or greater)
Retained = "false"
AutoReconnect = "true"
ConnectTimeout = "5" # Seconds
SkipCertVerify = "false" # Only used if Cert/Key file or Cert/Key PEMblock are specified
[MessageQueue.Topics]
CommandRequestTopic = "edgex/device/command/request/device-rfid-llrp/#" # subscribing for inbound command requests
CommandResponseTopicPrefix = "edgex/device/command/response" # publishing outbound command responses; <device-service>/<device-name>/<command-name>/<method> will be added to this publish topic prefix
# Default NATS Specific options that need to be here to enable environment variable overrides of them
Format = "nats"
RetryOnFailedConnect = "true"
QueueGroup = ""
Durable = ""
AutoProvision = "true"
Deliver = "new"
DefaultPubRetryAttempts = "2"
Subject = "edgex/#" # Required for NATS JetStream only for stream auto provisioning


[Device]
Expand Down
16 changes: 8 additions & 8 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ module github.com/edgexfoundry/device-rfid-llrp-go
go 1.18

require (
github.com/edgexfoundry/device-sdk-go/v2 v2.3.0-dev.46
github.com/edgexfoundry/go-mod-core-contracts/v2 v2.3.0-dev.18
github.com/edgexfoundry/device-sdk-go/v2 v2.3.0-dev.49
github.com/edgexfoundry/go-mod-core-contracts/v2 v2.3.0-dev.19
github.com/pkg/errors v0.9.1
github.com/stretchr/testify v1.8.0
)
Expand All @@ -17,11 +17,11 @@ require (
github.com/cenkalti/backoff v2.2.1+incompatible // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/eclipse/paho.mqtt.golang v1.4.1 // indirect
github.com/edgexfoundry/go-mod-bootstrap/v2 v2.3.0-dev.23 // indirect
github.com/edgexfoundry/go-mod-configuration/v2 v2.3.0-dev.14 // indirect
github.com/edgexfoundry/go-mod-messaging/v2 v2.3.0-dev.24 // indirect
github.com/edgexfoundry/go-mod-registry/v2 v2.3.0-dev.10 // indirect
github.com/edgexfoundry/go-mod-secrets/v2 v2.3.0-dev.8 // indirect
github.com/edgexfoundry/go-mod-bootstrap/v2 v2.3.0-dev.28 // indirect
github.com/edgexfoundry/go-mod-configuration/v2 v2.3.0-dev.15 // indirect
github.com/edgexfoundry/go-mod-messaging/v2 v2.3.0-dev.25 // indirect
github.com/edgexfoundry/go-mod-registry/v2 v2.3.0-dev.11 // indirect
github.com/edgexfoundry/go-mod-secrets/v2 v2.3.0-dev.11 // indirect
github.com/fatih/color v1.9.0 // indirect
github.com/fxamacker/cbor/v2 v2.4.0 // indirect
github.com/go-kit/log v0.2.1 // indirect
Expand All @@ -34,7 +34,7 @@ require (
github.com/google/uuid v1.3.0 // indirect
github.com/gorilla/mux v1.8.0 // indirect
github.com/gorilla/websocket v1.4.2 // indirect
github.com/hashicorp/consul/api v1.15.2 // indirect
github.com/hashicorp/consul/api v1.15.3 // indirect
github.com/hashicorp/errwrap v1.0.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.1 // indirect
github.com/hashicorp/go-hclog v0.14.1 // indirect
Expand Down
32 changes: 16 additions & 16 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -45,20 +45,20 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/eclipse/paho.mqtt.golang v1.4.1 h1:tUSpviiL5G3P9SZZJPC4ZULZJsxQKXxfENpMvdbAXAI=
github.com/eclipse/paho.mqtt.golang v1.4.1/go.mod h1:JGt0RsEwEX+Xa/agj90YJ9d9DH2b7upDZMK9HRbFvCA=
github.com/edgexfoundry/device-sdk-go/v2 v2.3.0-dev.46 h1:a55tE4TGI7JFxl6XJ7ODNRFVg42Nysl5s6Sm9+HpWeI=
github.com/edgexfoundry/device-sdk-go/v2 v2.3.0-dev.46/go.mod h1:j9TRW5Mrq4Jqk4DepNVmKCvQawsGLIG5TH2f1tAoPbA=
github.com/edgexfoundry/go-mod-bootstrap/v2 v2.3.0-dev.23 h1:Yc3veKQ1Duk0MlqGPmVQXiKfKvbjknOPQjckHn6MeyY=
github.com/edgexfoundry/go-mod-bootstrap/v2 v2.3.0-dev.23/go.mod h1:D27mjjRoYzpSGpR+SploF5wauAR69knnzGo2A+Za/+g=
github.com/edgexfoundry/go-mod-configuration/v2 v2.3.0-dev.14 h1:hjAFgpx/e0iLjESYmKQ3oc4hALJ2BD6qpd9Qk8SIV1U=
github.com/edgexfoundry/go-mod-configuration/v2 v2.3.0-dev.14/go.mod h1:4do/6nXmtMcWoMu4eqKjlr3Ot+l0rF68qOJpZwnN9R8=
github.com/edgexfoundry/go-mod-core-contracts/v2 v2.3.0-dev.18 h1:Smkhoqq9+XsMcs0B3JokAmIT7hXJy9eQWk6SYk9z4yE=
github.com/edgexfoundry/go-mod-core-contracts/v2 v2.3.0-dev.18/go.mod h1:4/e61acxVkhQWCTjQ4XcHVJDnrMDloFsZZB1B6STCRw=
github.com/edgexfoundry/go-mod-messaging/v2 v2.3.0-dev.24 h1:h2hsipXIC72xySkgS/uwq3HOyFQ3iiJCRgXGodeXTUU=
github.com/edgexfoundry/go-mod-messaging/v2 v2.3.0-dev.24/go.mod h1:S78Q/vqwRiu11oJFqB3NoyV1kQ7pGfuzVb41FDWjNsA=
github.com/edgexfoundry/go-mod-registry/v2 v2.3.0-dev.10 h1:qKwzfX2Eb2spjzc35omFl+Bx+KIwu4KNFq5D4c2V/iU=
github.com/edgexfoundry/go-mod-registry/v2 v2.3.0-dev.10/go.mod h1:bpDKvtS7gpvqK2v5D1CKxaolZHFQi4mCXscsPLXdKgo=
github.com/edgexfoundry/go-mod-secrets/v2 v2.3.0-dev.8 h1:1YqPIpkMGPrpUDecpOEJeqtY7pBZe7EFvVhplZ2PIQA=
github.com/edgexfoundry/go-mod-secrets/v2 v2.3.0-dev.8/go.mod h1:h/FohFNY8xHalioLg1bhjAuEj0z+danSDtixirvaXmQ=
github.com/edgexfoundry/device-sdk-go/v2 v2.3.0-dev.49 h1:LwRPcB7giLQTCI42AksBJ8hnUZ45AoWVc5pVt27pQDw=
github.com/edgexfoundry/device-sdk-go/v2 v2.3.0-dev.49/go.mod h1:VL6rr5+g9KDvmT04rFAyabWfctBYKgnFI65lnr+XcRg=
github.com/edgexfoundry/go-mod-bootstrap/v2 v2.3.0-dev.28 h1:8dM47NQrbwHuT1Y6l4imYLxMCN+jO6wHIIRdXOA24cc=
github.com/edgexfoundry/go-mod-bootstrap/v2 v2.3.0-dev.28/go.mod h1:HI3x1WwCC9feC9rZ8kXyTXUnKrP496yaOYvL7wMUgiQ=
github.com/edgexfoundry/go-mod-configuration/v2 v2.3.0-dev.15 h1:HN9u4TMQmMHubyRMsuejeHXrOjQB/5vD1ARFgy0BaIo=
github.com/edgexfoundry/go-mod-configuration/v2 v2.3.0-dev.15/go.mod h1:1tKJhcPEWftFy+I4n7+sNIBOo7H5ys/QaPvyXl0tMtc=
github.com/edgexfoundry/go-mod-core-contracts/v2 v2.3.0-dev.19 h1:PHatXspMYc1ZY6hEOGW7I3UPHIAJonX1hfUubLGEaxI=
github.com/edgexfoundry/go-mod-core-contracts/v2 v2.3.0-dev.19/go.mod h1:4/e61acxVkhQWCTjQ4XcHVJDnrMDloFsZZB1B6STCRw=
github.com/edgexfoundry/go-mod-messaging/v2 v2.3.0-dev.25 h1:4vCcieLnRhXsCq09aQtpL+UiEU3JJQ0BLQLIOyp6cdY=
github.com/edgexfoundry/go-mod-messaging/v2 v2.3.0-dev.25/go.mod h1:LMO8q7dU+dETXHgoyl+1rEThIC3sAuQvgU5VUK5bokE=
github.com/edgexfoundry/go-mod-registry/v2 v2.3.0-dev.11 h1:OWBQB6AGt7S32afhMS/0FA3NDoaInQQ6EPhrO9dPHF8=
github.com/edgexfoundry/go-mod-registry/v2 v2.3.0-dev.11/go.mod h1:Gyx8a+7jfzy53ljq9kgiz553xhgYYKNNWhnaTn76i+g=
github.com/edgexfoundry/go-mod-secrets/v2 v2.3.0-dev.11 h1:XB9rR8BOcXLGSsfVSYEWrMCIuZ4EVBAsf5mA+YLTxg0=
github.com/edgexfoundry/go-mod-secrets/v2 v2.3.0-dev.11/go.mod h1:ymkBQhj9NBohrTfhfHjv8ep7B9O5O4bWDk0oh50iDfU=
github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
Expand Down Expand Up @@ -131,8 +131,8 @@ github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB7
github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc=
github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw=
github.com/hashicorp/consul/api v1.15.2 h1:3Q/pDqvJ7udgt/60QOOW/p/PeKioQN+ncYzzCdN2av0=
github.com/hashicorp/consul/api v1.15.2/go.mod h1:v6nvB10borjOuIwNRZYPZiHKrTM/AyrGtd0WVVodKM8=
github.com/hashicorp/consul/api v1.15.3 h1:WYONYL2rxTXtlekAqblR2SCdJsizMDIj/uXb5wNy9zU=
github.com/hashicorp/consul/api v1.15.3/go.mod h1:/g/qgcoBcEXALCNZgRRisyTW0nY86++L0KbeAMXYCeY=
github.com/hashicorp/consul/sdk v0.11.0 h1:HRzj8YSCln2yGgCumN5CL8lYlD3gBurnervJRJAZyC4=
github.com/hashicorp/consul/sdk v0.11.0/go.mod h1:yPkX5Q6CsxTFMjQQDJwzeNmUUF5NUGGbrDsv9wTb8cw=
github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA=
Expand Down

0 comments on commit 9e40fa3

Please sign in to comment.