Skip to content

Commit

Permalink
build(snap): upgrade kuiper to 1.4.4 (Jakarta) (#4047)
Browse files Browse the repository at this point in the history
* build(snap): upgrade kuiper to 1.4.2 (#3867)

- remove `serviceServer`, since EdgeX v2 does not rely on Core contract Service anymore (see: https://github.com/lf-edge/ekuiper/blob/master/docs/en_US/edgex/edgex_rule_engine_tutorial.md#migrate-to-edgex-v2)
- remove the override of edgex- sink's port, since the default is 6379 now, which will not collide with app-service-configurable's port
- add `connections` and `portable` directory
- specify stream to reuse the connection to EdgeX message bus
- add `connectionSelector` in `eKuiperEdgeXSourceTemplate`
- remove unused kuiper configuration scripts
- remove unused kuiper install scripts `rm *.zip`
- remove unused comment

(cherry picked from commit 85bf44e)
Signed-off-by: Farshid Tavakolizadeh <farshid.tavakolizadeh@canonical.com>

* build(snap): upgrade kuiper to 1.4.4

Signed-off-by: Farshid Tavakolizadeh <farshid.tavakolizadeh@canonical.com>

* fix(snap): revert to remove kuiper zip package

Signed-off-by: Farshid Tavakolizadeh <farshid.tavakolizadeh@canonical.com>

Co-authored-by: Mengyi <mengyi.wang@canonical.com>
  • Loading branch information
farshidtz and MonicaisHer authored Jun 3, 2022
1 parent bc2756e commit db608d2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 16 deletions.
2 changes: 1 addition & 1 deletion internal/security/secretstore/secure-messagebus.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ default:
port: 6379
protocol: redis
server: localhost
serviceServer: http://localhost:48080
connectionSelector: edgex.redisMsgBus
topic: rules-events
type: redis
mqtt_conf:
Expand Down
8 changes: 6 additions & 2 deletions snap/local/runtime-helpers/bin/install-setup-kuiper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@ if [ ! -f "$SNAP_DATA/kuiper/data" ]; then
mkdir -p "$SNAP_DATA/kuiper/etc/services"
mkdir -p "$SNAP_DATA/kuiper/etc/sinks"
mkdir -p "$SNAP_DATA/kuiper/etc/sources"
mkdir -p "$SNAP_DATA/kuiper/etc/connections"
mkdir -p "$SNAP_DATA/kuiper/plugins/functions"
mkdir -p "$SNAP_DATA/kuiper/plugins/sinks"
mkdir -p "$SNAP_DATA/kuiper/plugins/sources"
mkdir -p "$SNAP_DATA/kuiper/plugins/portable"

for cfg in client kuiper; do
cp "$SNAP/etc/$cfg.yaml" "$SNAP_DATA/kuiper/etc"
Expand All @@ -26,14 +28,16 @@ if [ ! -f "$SNAP_DATA/kuiper/data" ]; then

cp "$SNAP/etc/services/"*.proto "$SNAP_DATA/kuiper/etc/services"

for sink in file edgex influx log nop; do
for sink in file edgex influx log nop mqtt; do
cp "$SNAP/etc/sinks/$sink.json" "$SNAP_DATA/kuiper/etc/sinks"
done

for src in edgex random; do
for src in edgex; do
cp "$SNAP/etc/sources/$src.json" "$SNAP_DATA/kuiper/etc/sources"
cp "$SNAP/etc/sources/$src.yaml" "$SNAP_DATA/kuiper/etc/sources"
done

cp "$SNAP/etc/connections/connection.yaml" "$SNAP_DATA/kuiper/etc/connections"

cp "$SNAP/etc/multilingual/"*.ini "$SNAP_DATA/kuiper/etc/multilingual"
fi
15 changes: 2 additions & 13 deletions snap/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -864,7 +864,7 @@ parts:

kuiper:
source: https://github.com/lf-edge/ekuiper.git
source-tag: 1.3.1
source-tag: 1.4.4
source-depth: 1
plugin: make
after: [go-build-helper]
Expand All @@ -876,7 +876,7 @@ parts:
make build_with_edgex
make real_pkg
cd $SNAPCRAFT_PART_INSTALL
# TODO: SIMPLIFY THIS!!!
tar -xvf kuiper*.tar.gz --strip-components=1
rm *.zip *.gz

Expand All @@ -889,17 +889,6 @@ parts:
-e 's@restPort\: 9081@restPort\: 59720@' \
$SNAPCRAFT_PART_INSTALL/etc/kuiper.yaml

# update the edgex source's port to 5566 to match
# app-service-configurable's message bus publish port
sed -i -e 's@port\: 5563@port\: 5566@' \
$SNAPCRAFT_PART_INSTALL/etc/sources/edgex.yaml
# update the edgex sink's port to 5567 so that it
# doesn't collide with the default port used by
# app-service-configurable
sed -i -e 's@"default": 5563@"default": 5567@' \
$SNAPCRAFT_PART_INSTALL/etc/sinks/edgex.json
install -DT "$SNAPCRAFT_PART_SRC/LICENSE" \
"$SNAPCRAFT_PART_INSTALL/usr/share/doc/kuiper/LICENSE"
stage:
Expand Down

0 comments on commit db608d2

Please sign in to comment.