Skip to content

Commit

Permalink
Merge pull request #50 from SoftwareDefinedVehicle/main
Browse files Browse the repository at this point in the history
New functionality is added
  • Loading branch information
mikehaller authored Dec 2, 2022
2 parents fd019bf + e8ef871 commit 8c0a5e0
Show file tree
Hide file tree
Showing 6 changed files with 62 additions and 15 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# /********************************************************************************
# * Copyright (c) 2022 Contributors to the Eclipse Foundation
# *
# * See the NOTICE file(s) distributed with this work for additional
# * information regarding copyright ownership.
# *
# * This program and the accompanying materials are made available under the
# * terms of the Apache License 2.0 which is available at
# * https://www.apache.org/licenses/LICENSE-2.0
# *
# * SPDX-License-Identifier: Apache-2.0
# ********************************************************************************/
#
KANTO_MANIFESTS_DIR ??= "/var/containers/manifests"
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,6 @@ Requires=container-management.service
WantedBy=multi-user.target

[Service]
ExecStart=/usr/bin/kanto-auto-deployer /var/containers/manifests
Restart=on-failure
RestartSec=5s
ExecStart=@KD_BIN_DD@/kanto-auto-deployer @KD_CFG_DD@
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,9 @@ PACKAGES = "${PN}"
FILES:${PN} += "${bindir}/kanto-auto-deployer"
FILES:${PN} += "${systemd_unitdir}/system/kanto-auto-deployer.service"

#containers
FILES:${PN} += "/var/containers/manifests/databroker.json"

do_install:append() {
cargo_do_install
install_containers
install_service
}

cargo_do_install () {
Expand Down Expand Up @@ -59,13 +56,18 @@ cargo_do_install () {

}

install_containers() {
install -d ${D}${systemd_unitdir}/system
install -m 0644 ${THISDIR}/files/kanto-auto-deployer.service ${D}${systemd_unitdir}/system
install -d ${D}/var/containers/manifests

#containers
install ${THISDIR}/kanto-containers/databroker.json ${D}/var/containers/manifests
KANTO_SERVICE_DIR = "${systemd_unitdir}/system"

install_service() {
install -d ${D}${KANTO_SERVICE_DIR}
install -m 0644 ${THISDIR}/files/kanto-auto-deployer.service.template ${D}${KANTO_SERVICE_DIR}/kanto-auto-deployer.service

# fill in the kanto auto deployer service template with the result configurations
sed -e 's,@KD_BIN_DD@,${bindir},g' \
-e 's,@KD_CFG_DD@,${KANTO_MANIFESTS_DIR},g' \
-i ${D}${KANTO_SERVICE_DIR}/kanto-auto-deployer.service

install -d ${D}${KANTO_MANIFESTS_DIR}
}


Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ SYSTEMD_SERVICE:${PN} = "${@bb.utils.contains('DISTRO_FEATURES','systemd','kanto
PROVIDES:${PN} += "kanto-auto-deployer"
RPROVIDES:${PN} += "kanto-auto-deployer"

inherit cargo
inherit cargo kanto-auto-deployer

RDEPENDS_${PN} += " grpc protobuf nativesdk-protobuf"
DEPENDS += " protobuf protobuf-native grpc"
DEPENDS += " protobuf protobuf-native grpc git-native"

SRCREV = "1a7ccb4d37c6ca6bbfce2d915c31aa4478623791"
PV:append = ".AUTOINC+1a7ccb4d37"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# /********************************************************************************
# * Copyright (c) 2022 Contributors to the Eclipse Foundation
# *
# * See the NOTICE file(s) distributed with this work for additional
# * information regarding copyright ownership.
# *
# * This program and the accompanying materials are made available under the
# * terms of the Apache License 2.0 which is available at
# * https://www.apache.org/licenses/LICENSE-2.0
# *
# * SPDX-License-Identifier: Apache-2.0
# ********************************************************************************/
#
inherit kanto-auto-deployer

DESCRIPTION = "Kanto Default Containers"
SRC_URI += "file://LICENSE"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://${WORKDIR}/LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"

do_install:append() {
install -d ${D}${KANTO_MANIFESTS_DIR}
install ${THISDIR}/kanto-containers/databroker.json ${D}${KANTO_MANIFESTS_DIR}
}

PACKAGES = "${PN}"
FILES:${PN} += "${KANTO_MANIFESTS_DIR}/databroker.json"

Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,5 @@ RDEPENDS:${PN} = "\
system-metrics \
rauc-hawkbit-updater \
kanto-auto-deployer \
"
sdv-default-containers \
"

0 comments on commit 8c0a5e0

Please sign in to comment.