Skip to content

Commit 1795e2f

Browse files
andy-vmandy.peng
andauthored
[Tink] add device-discovery rpm (#118)
* [Tink] add device-discovery rpm * [Tink] update device-discovery rpm * [Tink] update device-discovery service * [Tink] update device-discovery spec * [Tink] update device-discovery spec * [Tink] update device-discovery spec --------- Co-authored-by: andy.peng <andypeng@pglgull002.png.intel.com>
1 parent 2700fc7 commit 1795e2f

File tree

7 files changed

+95
-9
lines changed

7 files changed

+95
-9
lines changed

LICENSES-AND-NOTICES/SPECS/LICENSES-MAP.md

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

LICENSES-AND-NOTICES/SPECS/data/licenses.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2254,6 +2254,7 @@
22542254
"license": "[MIT License](/LICENSES-AND-NOTICES/LICENSE.md)",
22552255
"specs": [
22562256
"cluster-agent",
2257+
"device-discovery",
22572258
"edge-release",
22582259
"edge-repos",
22592260
"edge-rpm-macros",
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
[Unit]
2+
Description=Device Discovery Agent
3+
Documentation=https://github.com/open-edge-platform/infra-onboarding
4+
After=network.target
5+
6+
[Service]
7+
Type=oneshot
8+
ExecStart=/usr/bin/device-discovery/device-discovery
9+
StandardOutput=journal
10+
StandardError=journal
11+
TimeoutSec=0
12+
RemainAfterExit=yes
13+
14+
[Install]
15+
WantedBy=multi-user.target
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"Signatures": {
3+
"device-discovery-1.17.2.tar.gz": "32b5439533c61ee4d53f5caa58698fee08e1fd520adb2f3790fd9416f96598d4",
4+
"device-discovery-1.17.2-vendor.tar.gz": "997e40026d04be283d65dbe202a5ffe23b49cb42311a769b2910d4a2a7919a09",
5+
"device-discovery.service": "ddf6a09482470231124d5dfd1375ab7b7a57c83e3e7a98a11fd6957ff2e5df96"
6+
}
7+
}
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
%global infraonboarding_gitpath github.com/open-edge-platform/infra-onboarding
2+
3+
Summary: Device Discovery Agent for Edge Node
4+
Name: device-discovery
5+
Version: 1.17.2
6+
Release: 1%{?dist}
7+
Distribution: Edge Microvisor Toolkit
8+
Vendor: Intel Corporation
9+
License: Apache-2.0
10+
URL: https://github.com/open-edge-platform/infra-onboarding/tree/main/hook-os/device_discovery
11+
Source0: https://%{infraonboarding_gitpath}/archive/refs/tags/tinker-actions/%{version}.tar.gz#/%{name}-%{version}.tar.gz
12+
Source1: device-discovery.service
13+
Source2: device-discovery-1.17.2-vendor.tar.gz
14+
15+
%{?systemd_requires}
16+
17+
BuildRequires: golang >= 1.23
18+
BuildRequires: systemd-rpm-macros
19+
Requires: curl
20+
21+
22+
%description
23+
The Device Discovery Agent for Edge Node in order to retrieve the specific configuration to start for the current/correct machine.
24+
25+
26+
%prep
27+
%setup -q -n infra-onboarding-emt-uos
28+
cd hook-os/device_discovery
29+
tar -xzf %{SOURCE2} -C .
30+
31+
%build
32+
cd hook-os/device_discovery
33+
CGO_ENABLED=0 go build -buildmode=pie -mod=vendor -trimpath -ldflags '-extldflags "-static"' -gcflags=all="-l -B" -o device-discovery
34+
35+
%install
36+
install -d -m 0755 %{buildroot}%{_bindir}/device-discovery
37+
install -m 0755 ./hook-os/device_discovery/device-discovery %{buildroot}%{_bindir}/device-discovery/device-discovery
38+
install -m 0755 ./hook-os/device_discovery/client-auth.sh %{buildroot}%{_bindir}/device-discovery/client-auth.sh
39+
40+
# systemd units
41+
install -Dp -m0644 %{SOURCE1} %{buildroot}%{_unitdir}/device-discovery.service
42+
43+
%post
44+
%systemd_post device-discovery.service
45+
46+
%files
47+
%{_bindir}/device-discovery/*
48+
%{_unitdir}/device-discovery.service
49+
50+
%changelog
51+
* Tue May 20 2025 Andy <andy.peng@intel.com> - 1.17.2-1
52+
- Original version for Edge Microvisor Toolkit. License verified.

cgmanifest.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2603,6 +2603,16 @@
26032603
}
26042604
}
26052605
},
2606+
{
2607+
"component": {
2608+
"type": "other",
2609+
"other": {
2610+
"name": "device-discovery",
2611+
"version": "1.17.2",
2612+
"downloadUrl": "https://github.com/open-edge-platform/infra-onboarding/archive/refs/tags/tinker-actions/1.17.2.tar.gz"
2613+
}
2614+
}
2615+
},
26062616
{
26072617
"component": {
26082618
"type": "other",
Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
{
22
"packages": [
3-
"rpc",
4-
"dracut-tmpfsroot",
5-
"tar",
6-
"fluent-bit",
73
"caddy",
8-
"rng-tools",
94
"containerd",
10-
"gawk",
5+
"cryptsetup",
6+
"device-discovery",
7+
"dracut-tmpfsroot",
118
"efibootmgr",
9+
"fluent-bit",
10+
"gawk",
1211
"lvm2",
13-
"parted",
1412
"net-tools",
15-
"cryptsetup"
13+
"parted",
14+
"rng-tools",
15+
"rpc",
16+
"tar"
1617
]
1718
}

0 commit comments

Comments
 (0)