Commit bc5b61a8 authored by Ian Johnson's avatar Ian Johnson Committed by Ian Johnson

snap/many: rm device-modbus and device-mqtt

These device services will be split out into their own snaps for
Edinburgh, edgex-device-modbus and edgex-device-mqtt respectively.
Signed-off-by: default avatarIan Johnson <ian.johnson@canonical.com>
parent d3f24ca9
......@@ -27,8 +27,6 @@ ALL_SERVICES="$ALL_SERVICES export-distro"
ALL_SERVICES="$ALL_SERVICES export-client"
# device services
ALL_SERVICES="$ALL_SERVICES device-modbus"
ALL_SERVICES="$ALL_SERVICES device-mqtt"
ALL_SERVICES="$ALL_SERVICES device-random"
ALL_SERVICES="$ALL_SERVICES device-virtual"
......
......@@ -9,7 +9,7 @@ SNAP_CURRENT=${SNAP/%$SNAP_REVISION/current}
# install all the config files from $SNAP/config/SERVICE/res/configuration.toml
# into $SNAP_DATA/config
mkdir -p "$SNAP_DATA/config"
for service in security-api-gateway security-secret-store core-command config-seed core-data core-metadata export-client export-distro support-logging support-notifications support-scheduler sys-mgmt-agent device-modbus device-mqtt device-random device-virtual; do
for service in security-api-gateway security-secret-store core-command config-seed core-data core-metadata export-client export-distro support-logging support-notifications support-scheduler sys-mgmt-agent device-random device-virtual; do
if [ ! -f "$SNAP_DATA/config/$service/res/configuration.toml" ]; then
mkdir -p "$SNAP_DATA/config/$service/res"
cp "$SNAP/config/$service/res/configuration.toml" "$SNAP_DATA/config/$service/res/configuration.toml"
......@@ -143,7 +143,7 @@ fi
# finally, disable and turn off non-default services
# by default, we want the export-*, support-*, device-*, and redis services
# off.
for svc in export-distro export-client support-notifications support-scheduler support-logging support-rulesengine device-modbus device-mqtt device-random device-virtual redis; do
for svc in export-distro export-client support-notifications support-scheduler support-logging support-rulesengine device-random device-virtual redis; do
# set the service as off, so that the setting is persistent after a refresh
# due to snapd bug: https://bugs.launchpad.net/snapd/+bug/1818306
snapctl set $svc=off
......
......@@ -265,28 +265,6 @@ apps:
command: bin/sys-mgmt-agent -confdir $SNAP_DATA/config/sys-mgmt-agent/res --registry
daemon: simple
plugs: [network, network-bind]
device-modbus:
adapter: none
after:
- core-config-seed
- mongo-worker
- edgexproxy
- core-data
- core-metadata
command: bin/device-modbus -confdir $SNAP_DATA/config/device-modbus -profile res --registry
daemon: simple
plugs: [network, network-bind]
device-mqtt:
adapter: none
after:
- core-config-seed
- mongo-worker
- edgexproxy
- core-data
- core-metadata
command: bin/device-mqtt -confdir $SNAP_DATA/config/device-mqtt -profile res --registry
daemon: simple
plugs: [network, network-bind]
device-random:
adapter: none
after:
......@@ -1024,57 +1002,6 @@ parts:
$SNAPCRAFT_PART_INSTALL/config/security-api-gateway/res/configuration.toml
# DEVICE SERVICES parts
device-modbus:
source: https://github.com/edgexfoundry/device-modbus-go.git
source-depth: 1
source-branch: master
plugin: make
after: [go]
override-build: |
cd $SNAPCRAFT_PART_SRC
make build
install -DT "./cmd/device-modbus" "$SNAPCRAFT_PART_INSTALL/bin/device-modbus"
# FIXME: settings can't be overridden from the cmd-line!
# Override 'LogFile' and 'LoggingRemoteURL'
install -d "$SNAPCRAFT_PART_INSTALL/config/device-modbus/res/"
cat "./cmd/res/configuration.toml" | \
sed -e s:\"./device-modbus.log\":\'\$SNAP_COMMON/device-modbus.log\': \
-e s:'ProfilesDir = \"./res\"':'ProfilesDir = \"\$SNAP_DATA/config/device-modbus/res\"': > \
"$SNAPCRAFT_PART_INSTALL/config/device-modbus/res/configuration.toml"
install -DT "./cmd/Attribution.txt" \
"$SNAPCRAFT_PART_INSTALL/usr/share/doc/device-modbus/Attribution.txt"
install -DT "./LICENSE" \
"$SNAPCRAFT_PART_INSTALL/usr/share/doc/device-modbus/LICENSE"
device-mqtt:
source: https://github.com/edgexfoundry/device-mqtt-go.git
source-depth: 1
source-branch: master
plugin: make
after: [go]
override-build: |
cd $SNAPCRAFT_PART_SRC
make build
install -DT "./cmd/device-mqtt" "$SNAPCRAFT_PART_INSTALL/bin/device-mqtt"
# FIXME: settings can't be overridden from the cmd-line!
# Override 'LogFile' and 'LoggingRemoteURL'
install -d "$SNAPCRAFT_PART_INSTALL/config/device-mqtt/res/"
cat "./cmd/res/configuration.toml" | \
sed -e s:\"./device-mqtt.log\":\'\$SNAP_COMMON/device-mqtt.log\': \
-e s:'ProfilesDir = \"./res\"':'ProfilesDir = \"\$SNAP_DATA/config/device-mqtt/res\"': > \
"$SNAPCRAFT_PART_INSTALL/config/device-mqtt/res/configuration.toml"
install -DT "./cmd/Attribution.txt" \
"$SNAPCRAFT_PART_INSTALL/usr/share/doc/device-mqtt/Attribution.txt"
install -DT "./LICENSE" \
"$SNAPCRAFT_PART_INSTALL/usr/share/doc/device-mqtt/LICENSE"
device-virtual-go:
source: https://github.com/edgexfoundry/device-virtual-go.git
source-depth: 1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment