Hello, Yorozu consultation responsible Sugimon: yum: It is.
This time, I created a package of HULFT IoT Edge Streaming on Sun Electronics Rooster (NSX7000), which is a Linux gateway device!
Sun Electronics Rooster (NSX7000) is a device of Sun Electronics Co., Ltd.'s router Rooster series for IoT / M2M. The NSX7000 is said to be positioned as a Linux gateway that supports LTE communication for multiple carriers.
It seems that it is necessary to prepare the package creation environment in advance to install HULFT IoT Edge Streaming, so I tried to create a package.
--[Download] the zip file containing the product itself from the specified site (https://www.hulft.com/download?&_ga=2.188013544.1972116588.1573457228-475003281.1503981102#anc_24)
--Terminology and operations related to HULFT IoT Edge Streaming can be found in "FirstStepGuide_jpn.pdf" in the zip file.
--NSX7000 package creation environment (* Development environment will be prepared separately) NSX7000 Manual From the above link, I referred to the manual of the procedure for building the package creation environment. --Add-on Application Development-Package Creation Manual.pdf --Add-on Application Development-Environment Construction Manual.pdf
This completes the preparations.
Use HULFT IoT EdgeStreaming Studio to implement stream processing and deploy it to your packaging environment.
For the implementation method and deployment method of stream processing, refer to "FirstStepGuide_jpn.pdf" in the zip file obtained when downloading the product.
tar zxf es-agent.tar.gz
Let's create a package for HULFT IoT EdgeStreaing runtime in the NSX7000 package creation environment.
For the parameters of various files, refer to the following Manual.
--Add-on Application Development-Package Creation Manual.pdf
Top directory/
|
+-- object/
| |
| +-- run-es-agent start script
+-- rpk/
| |
| +-- CONTROL/
| | |
| | +--control file
| |
| +--appctl script
|
+-- EdgeStreaming-runtime
+-- Makefile
Package: EdgeStreaming-runtime
Version: 2.0.0
Depends:
Runtime-Depends:
Maintainer: Company
Architecture: nsx7000
Provides:
Replaces:
Description:
I created it as follows.
#!/bin/sh
PACKAGE_NAME=EdgeStreaming-runtime
PACKAGE_DIR=/app/package
exec $PACKAGE_DIR/$PACKAGE_NAME/sbin/$PACKAGE_NAME $@
#!/bin/sh /etc/rc.common
USE_PROCD=1
PACKAGE_NAME=EdgeStreaming-runtime
PACKAGE_DIR=/app/package
COMMAND=$PACKAGE_DIR/$PACKAGE_NAME/sbin/run-es-agent
start_service() {
procd_open_instance
procd_set_param command $COMMAND
procd_set_param respawn
procd_close_instance
}
stop_service() {
return 0
}
I created it as follows.
#!/bin/sh
PACKAGE_NAME=EdgeStreaming-runtime
PACKAGE_DIR=/app/package
LD_LIBRARY_PATH=${PACKAGE_DIR}/${PACKAGE_NAME}/lib
BIN_DIR=${PACKAGE_DIR}/${PACKAGE_NAME}/bin
COMMAND=${BIN_DIR}/es-agent
export LD_LIBRARY_PATH
cd $BIN_DIR
exec $COMMAND run -c es-agent.yaml
chmod 755 run-es-agent
I created it as follows.
ROOSTER_TOP_DIR ?= $(HOME)/RoosterOS-SDK
ADD_ON_PKG_NAME := EdgeStreaming-runtime
ADD_ON_PKG_VERSION := 2.0.0
ADD_ON_PKG_MAINTAINER := Company
ADD_ON_PKG_DESCRIPTION :=
OBJ_DIR=./object
include $(ROOSTER_TOP_DIR)/mk/add-on-package.mk
EdgeStreaming-runtime:
contents: $(ROOSTER_PACKAGE_ADD_ON_CONTENTS_DIR) EdgeStreaming-runtime
mkdir -p $(ROOSTER_PACKAGE_ADD_ON_CONTENTS_DIR)/bin
cp $(OBJ_DIR)/es-agent* $(ROOSTER_PACKAGE_ADD_ON_CONTENTS_DIR)/bin
cp $(OBJ_DIR)/script.bql $(ROOSTER_PACKAGE_ADD_ON_CONTENTS_DIR)/bin
cp -r $(OBJ_DIR)/plugins $(ROOSTER_PACKAGE_ADD_ON_CONTENTS_DIR)/bin
mkdir -p $(ROOSTER_PACKAGE_ADD_ON_CONTENTS_DIR)/sbin
cp $(OBJ_DIR)/run-es-agent $(ROOSTER_PACKAGE_ADD_ON_CONTENTS_DIR)/sbin
$(call replace_add_on_keyword,\
$(ADD_ON_PKG_NAME),\
$(ROOSTER_PACKAGE_ADD_ON_CONTENTS_DIR)/sbin/$(ADD_ON_PKG_NAME))
chmod +x $(ROOSTER_PACKAGE_ADD_ON_CONTENTS_DIR)/sbin/$(ADD_ON_PKG_NAME)
touch $(ROOSTER_PACKAGE_ADD_ON_CONTENTS_PREPARED)
$(eval $(DefaultTarget))
make rpk
After that, you can use it by bringing this created package file to Rooster and installing it referring to the following manual.
--Add-on Application Development-Environment Construction Manual.pdf
This time, I installed HULFT IoT Edge Streaming on a Linux gateway device. How was it? I tried to create a package, but the manual was also extensive, so the work itself was easier than I expected!
Also, this time, I first tried to create the initial package, I would like to use HULFT IoT Edge Streaming concretely at another time! I would like to talk about more specific points there!
In this blog, I would like to continue to introduce the contents of consultations at the "Yorozu Consultation Counter" of technology and the tricks that were born.
Please continue to check it out and follow us if you like.
See you again!