Skip to content

Commit

Permalink
Merge pull request #40 from PelionIoT/update-to-v94
Browse files Browse the repository at this point in the history
Update to v94
  • Loading branch information
petedyerarm authored Oct 11, 2024
2 parents 1b2111b + ebfd7fe commit 6048f0f
Show file tree
Hide file tree
Showing 11 changed files with 119 additions and 186 deletions.
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# Izuma Edge 2.x.x - 2024

- Base LmP release updated to v91.
- Base LmP release updated to v94.1.
- Update `pe-utils` to version 2.3.7.
- `edge-testnet` is now detecting issues more accurately & more robustly.
- Update `edge-proxy` to latest version (v.1.4.0).
- UPdate `pe-terminal` to latest version (v1.2.0).
- Update `pe-terminal` to latest version (v1.2.0).
- Replace maestro with edge-resource-manager.

# Izuma Edge 2.6.1 - 3rd Oct 2023

Expand Down
5 changes: 4 additions & 1 deletion conf/machine/include/lmp-factory-custom.inc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
# Use sdcard as root device by default
OSTREE_KERNEL_ARGS:imx8mm-lpddr4-evk = "console=tty1 console=ttymxc1,115200 earlycon=ec_imx6q,0x30890000,115200 root=/dev/mmcblk1p2 rootfstype=ext4"

# Enable legacy cgroups because our version of kubelet needs them
OSTREE_KERNEL_ARGS:append = " systemd.unified_cgroup_hierarchy=0"

# Add edge

PREFERRED_RPROVIDER_kubelet = "kubelet"
Expand Down Expand Up @@ -29,7 +32,7 @@ edge-info \
edge-testnet \
edge-terminal \
fluentbit \
maestro \
edge-resource-manager \
"

EDGE_CONTAINER_ORCHESTRATION = " \
Expand Down
84 changes: 84 additions & 0 deletions recipes-edge/edge-resource-manager/edge-resource-manager.bb
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
DESCRIPTION = "edge-resource-manager is a resource manager for edge devices"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://src/${GO_IMPORT}/LICENSE;md5=1dece7821bf3fd70fe1309eaa37d52a2"

GO_IMPORT = "github.com/PelionIoT/edge-resource-manager"

PROVIDES += " edge-resource-manager "
RPROVIDES:${PN} += " edge-resource-manager "

DEPENDS = "libuv"
RDEPENDS:${PN} += "bash"

# avoid the `-linkshared` option in this recipe as it causes a panic
GO_LINKSHARED=""

inherit pkgconfig systemd go gitpkgv edge

RT_SERVICE_FILE = "edge-resource-manager.service"
PR = "r0"

SRC_URI = "git://${GO_IMPORT};protocol=https;branch=main \
file://${RT_SERVICE_FILE} \
file://edge-resource-manager-watcher.service \
file://edge-resource-manager-watcher.path \
file://edge-resource-manager-config.yaml \
"

INSANE_SKIP_${PN} = "textrel"

SRCREV = "v1.0.0"
PV = "${SRCPV}"


SYSTEMD_PACKAGES = "${PN}"
SYSTEMD_SERVICE:${PN} = "edge-resource-manager.service \
edge-resource-manager-watcher.path \
edge-resource-manager-watcher.service"

SYSTEMD_AUTO_ENABLE:${PN} = "enable"

FILESEXTRAPATHS:prepend := "${THISDIR}/edge-resource-manager:"
FILES:${PN} += "\
${EDGE_BIN}/edge-resource-manager \
${EDGE_CONFIG}/edge-resource-manager-config.yaml\
${EDGE_LOG}\
${systemd_system_unitdir}/edge-resource-manager.service\
${systemd_system_unitdir}/edge-resource-manager-watcher.service\
${systemd_system_unitdir}/edge-resource-manager-watcher.path\
"
do_compile[network] = "1"
do_compile() {
# Try not to have any read-only files in the build area (they make cleanup difficult if build fails)
${GO} env -w GOFLAGS=-modcacherw
cd src/${GO_IMPORT}
${GO} build -o bin/edge-resource-manager edge-resource-manager.go
#next 2 lines: workaround for permission error during yocto cleanup
cd ${B}
chmod -R u+w *
cd ${S}/../

edge_replace_vars ${RT_SERVICE_FILE} edge-resource-manager-watcher.path
}

do_install:append() {
# Maestro configuration management
install -d ${D}/${EDGE_CONFIG}
install -m 0644 ${WORKDIR}/edge-resource-manager-config.yaml ${D}/${EDGE_CONFIG}/edge-resource-manager-config.yaml
}

do_install() {

install -d ${D}${EDGE_BIN}
install -d ${D}${systemd_system_unitdir}
install -d ${D}/${bindir}
install -d ${D}/${libdir}
install -d ${D}/${EDGE_LOG}
install -m 0755 ${S}/src/${GO_IMPORT}/bin/edge-resource-manager ${D}${EDGE_BIN}/edge-resource-manager
ln -sf /${EDGE_BIN}/edge-resource-manager ${D}/${bindir}/edge-resource-manager

install -m 0644 ${S}/../${RT_SERVICE_FILE} ${D}${systemd_system_unitdir}/${RT_SERVICE_FILE}
install -m 0644 ${S}/../edge-resource-manager-watcher.path ${D}${systemd_system_unitdir}/edge-resource-manager-watcher.path
install -m 0644 ${S}/../edge-resource-manager-watcher.service ${D}${systemd_system_unitdir}/edge-resource-manager-watcher.service

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
edge_capabilities:
edge_core_socketpath: "/tmp/edge.sock"
lwm2m_objectid: 33457
edge_resources:
- name: "urn:fid:pelion.com:log:1.0.0"
enable: true
config_filepath: "/etc/td-agent-bit/td-agent-bit.conf"
- name: "urn:fid:pelion.com:terminal:1.0.0"
enable: true
config_filepath: "/edge/system/etc/edge-terminal/config.json"
- name: "urn:fid:pelion.com:kaas:1.0.0"
enable: true
config_filepath: "/edge/system/var/lib/kubelet/kubeconfig"
config_end: true
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[Unit]
Description=Monitor the changes to identity.json file and restart maestro
Description=Monitor the changes to identity.json file and restart edge-resource-manager

[Path]
PathChanged=EDGE_DATA/edge_gw_config/identity.json
Unit=maestro-watcher.service
Unit=edge-resource-manager-watcher.service

[Install]
WantedBy=multi-user.target
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[Unit]
Description=edge-resource-manager restarter

[Service]
Type=oneshot
ExecStart=/bin/systemctl restart edge-resource-manager.service

[Install]
WantedBy=multi-user.target

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[Unit]
Description=Maestro: Network, Config, DeviceJS manager
Description=edge-resource-manager: Config manager
Wants=edge-proxy.service
After=edge-proxy.service

Expand All @@ -8,7 +8,7 @@ Restart=always
RestartSec=5s
ExecCondition=sh -c '[ -f EDGE_DATA/edge_gw_config/identity.json ]'
ExecStartPre=mkdir -p EDGE_DATA/etc/
ExecStart=env GODEBUG=madvdontneed=1 EDGE_BIN/maestro -config EDGE_CONFIG/maestro-config.yaml
ExecStart=env GODEBUG=madvdontneed=1 EDGE_BIN/edge-resource-manager -config EDGE_CONFIG/edge-resource-manager-config.yaml

[Install]
RequiredBy=multi-user.target
82 changes: 0 additions & 82 deletions recipes-edge/maestro/maestro.bb

This file was deleted.

79 changes: 0 additions & 79 deletions recipes-edge/maestro/maestro/maestro-config.yaml

This file was deleted.

8 changes: 0 additions & 8 deletions recipes-edge/maestro/maestro/maestro-runtime

This file was deleted.

10 changes: 0 additions & 10 deletions recipes-edge/maestro/maestro/maestro-watcher.service

This file was deleted.

0 comments on commit 6048f0f

Please sign in to comment.