Compare commits
10 Commits
c140f7a784
...
f53400834a
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f53400834a | ||
|
|
67e22e4246 | ||
|
|
658278c42f | ||
|
|
90834df7bf | ||
|
|
65d241fbdb | ||
|
|
9aa9bc6da8 | ||
|
|
090872639f | ||
|
|
9b483fc797 | ||
|
|
e5bdd2e00f | ||
|
|
4b9e866587 |
@ -1,30 +1,46 @@
|
|||||||
diff -uprN zincati-0.0.24/docs/development/os-metadata.md zincati-0.0.24-new/docs/development/os-metadata.md
|
From 67ce1b700372637050218715411984226b6ab9ef Mon Sep 17 00:00:00 2001
|
||||||
--- zincati-0.0.24/docs/development/os-metadata.md 1973-11-30 05:33:09.000000000 +0800
|
From: jianli-97 <lijian2@kylinos.cn>
|
||||||
+++ zincati-0.0.24-new/docs/development/os-metadata.md 2022-09-01 22:14:16.419124499 +0800
|
Date: Mon, 15 Apr 2024 13:30:27 +0800
|
||||||
@@ -31,7 +31,7 @@ Booted deployment must provide several m
|
Subject: [PATCH] modify as nestos stream
|
||||||
|
|
||||||
|
---
|
||||||
|
docs/development/os-metadata.md | 2 +-
|
||||||
|
src/rpm_ostree/cli_status.rs | 2 +-
|
||||||
|
tests/fixtures/rpm-ostree-staged.json | 4 ++--
|
||||||
|
tests/fixtures/rpm-ostree-status.json | 2 +-
|
||||||
|
tests/kola/server/test-stream.sh | 6 +++---
|
||||||
|
5 files changed, 8 insertions(+), 8 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/docs/development/os-metadata.md b/docs/development/os-metadata.md
|
||||||
|
index a99a48b..b6edc57 100644
|
||||||
|
--- a/docs/development/os-metadata.md
|
||||||
|
+++ b/docs/development/os-metadata.md
|
||||||
|
@@ -30,7 +30,7 @@ Booted deployment must provide several mandatory metadata entries:
|
||||||
|
* `checksum`: OSTree commit revision
|
||||||
* `version`: OS version
|
* `version`: OS version
|
||||||
* under `base-commit-meta`:
|
* under `base-commit-meta`:
|
||||||
* `coreos-assembler.basearch`: base architecture
|
|
||||||
- * `fedora-coreos.stream`: update stream
|
- * `fedora-coreos.stream`: update stream
|
||||||
+ * `nestos.stream`: update stream
|
+ * `nestos.stream`: update stream
|
||||||
|
|
||||||
All those metadata entries must exist with a non-empty string value.
|
All those metadata entries must exist with a non-empty string value.
|
||||||
|
|
||||||
diff -uprN zincati-0.0.24/src/rpm_ostree/cli_status.rs zincati-0.0.24-new/src/rpm_ostree/cli_status.rs
|
diff --git a/src/rpm_ostree/cli_status.rs b/src/rpm_ostree/cli_status.rs
|
||||||
--- zincati-0.0.24/src/rpm_ostree/cli_status.rs 1973-11-30 05:33:09.000000000 +0800
|
index 1be93e3..68682e8 100644
|
||||||
+++ zincati-0.0.24-new/src/rpm_ostree/cli_status.rs 2022-09-01 22:13:30.381509120 +0800
|
--- a/src/rpm_ostree/cli_status.rs
|
||||||
@@ -63,7 +63,7 @@ pub struct DeploymentJson {
|
+++ b/src/rpm_ostree/cli_status.rs
|
||||||
struct BaseCommitMetaJson {
|
@@ -74,7 +74,7 @@ pub struct Deployment {
|
||||||
#[serde(rename = "coreos-assembler.basearch")]
|
/// Metadata from base commit (only fields relevant to zincati).
|
||||||
basearch: String,
|
#[derive(Clone, Debug, Deserialize)]
|
||||||
|
struct BaseCommitMeta {
|
||||||
- #[serde(rename = "fedora-coreos.stream")]
|
- #[serde(rename = "fedora-coreos.stream")]
|
||||||
+ #[serde(rename = "nestos.stream")]
|
+ #[serde(rename = "nestos.stream")]
|
||||||
stream: String,
|
stream: Option<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
diff -uprN zincati-0.0.24/tests/fixtures/rpm-ostree-staged.json zincati-0.0.24-new/tests/fixtures/rpm-ostree-staged.json
|
diff --git a/tests/fixtures/rpm-ostree-staged.json b/tests/fixtures/rpm-ostree-staged.json
|
||||||
--- zincati-0.0.24/tests/fixtures/rpm-ostree-staged.json 1973-11-30 05:33:09.000000000 +0800
|
index 12bac6e..7e25bad 100644
|
||||||
+++ zincati-0.0.24-new/tests/fixtures/rpm-ostree-staged.json 2022-09-01 22:16:06.002212519 +0800
|
--- a/tests/fixtures/rpm-ostree-staged.json
|
||||||
|
+++ b/tests/fixtures/rpm-ostree-staged.json
|
||||||
@@ -9,7 +9,7 @@
|
@@ -9,7 +9,7 @@
|
||||||
"coreos-assembler.config-dirty" : "false",
|
"coreos-assembler.config-dirty" : "false",
|
||||||
"rpmostree.inputhash" : "77dbde3d9502f2f87757d2b68b93b52efa2c65fb7b1fc317e0ffc50b483a3a52",
|
"rpmostree.inputhash" : "77dbde3d9502f2f87757d2b68b93b52efa2c65fb7b1fc317e0ffc50b483a3a52",
|
||||||
@ -43,9 +59,10 @@ diff -uprN zincati-0.0.24/tests/fixtures/rpm-ostree-staged.json zincati-0.0.24-n
|
|||||||
"version" : "31.20200505.3.0",
|
"version" : "31.20200505.3.0",
|
||||||
"rpmostree.initramfs-args" : [
|
"rpmostree.initramfs-args" : [
|
||||||
"--add=ignition",
|
"--add=ignition",
|
||||||
diff -uprN zincati-0.0.24/tests/fixtures/rpm-ostree-status.json zincati-0.0.24-new/tests/fixtures/rpm-ostree-status.json
|
diff --git a/tests/fixtures/rpm-ostree-status.json b/tests/fixtures/rpm-ostree-status.json
|
||||||
--- zincati-0.0.24/tests/fixtures/rpm-ostree-status.json 1973-11-30 05:33:09.000000000 +0800
|
index 6e62cc2..ed041cc 100644
|
||||||
+++ zincati-0.0.24-new/tests/fixtures/rpm-ostree-status.json 2022-09-01 22:14:39.301431354 +0800
|
--- a/tests/fixtures/rpm-ostree-status.json
|
||||||
|
+++ b/tests/fixtures/rpm-ostree-status.json
|
||||||
@@ -8,7 +8,7 @@
|
@@ -8,7 +8,7 @@
|
||||||
"coreos-assembler.config-dirty" : "true",
|
"coreos-assembler.config-dirty" : "true",
|
||||||
"coreos-assembler.config-gitrev" : "e5ffda727170e124c7f7d8782e256b0462bf9869",
|
"coreos-assembler.config-gitrev" : "e5ffda727170e124c7f7d8782e256b0462bf9869",
|
||||||
@ -55,9 +72,10 @@ diff -uprN zincati-0.0.24/tests/fixtures/rpm-ostree-status.json zincati-0.0.24-n
|
|||||||
"rpmostree.inputhash" : "0e2ba98bac847c8a8cc5ffd42822a41d53ef6719ccaf6a0094559768aa24da33",
|
"rpmostree.inputhash" : "0e2ba98bac847c8a8cc5ffd42822a41d53ef6719ccaf6a0094559768aa24da33",
|
||||||
"version" : "30.1",
|
"version" : "30.1",
|
||||||
"rpmostree.rpmmd-repos" : [
|
"rpmostree.rpmmd-repos" : [
|
||||||
diff -uprN zincati-0.0.24/tests/kola/server/test-stream.sh zincati-0.0.24-new/tests/kola/server/test-stream.sh
|
diff --git a/tests/kola/server/test-stream.sh b/tests/kola/server/test-stream.sh
|
||||||
--- zincati-0.0.24/tests/kola/server/test-stream.sh 1973-11-30 05:33:09.000000000 +0800
|
index 96b1d52..f45e913 100755
|
||||||
+++ zincati-0.0.24-new/tests/kola/server/test-stream.sh 2022-09-01 22:15:44.394996808 +0800
|
--- a/tests/kola/server/test-stream.sh
|
||||||
|
+++ b/tests/kola/server/test-stream.sh
|
||||||
@@ -66,7 +66,7 @@ EOF
|
@@ -66,7 +66,7 @@ EOF
|
||||||
ostree --repo=/var/www pull-local /ostree/repo "$cur_payload"
|
ostree --repo=/var/www pull-local /ostree/repo "$cur_payload"
|
||||||
# Create a new branch `test-branch` by creating a dummy commit.
|
# Create a new branch `test-branch` by creating a dummy commit.
|
||||||
@ -85,3 +103,6 @@ diff -uprN zincati-0.0.24/tests/kola/server/test-stream.sh zincati-0.0.24-new/te
|
|||||||
--keep-metadata='coreos-assembler.basearch' --parent="$cur_payload")"
|
--keep-metadata='coreos-assembler.basearch' --parent="$cur_payload")"
|
||||||
|
|
||||||
jq \
|
jq \
|
||||||
|
--
|
||||||
|
2.33.0
|
||||||
|
|
||||||
33
0002-modify-cincinnati-url-for-nestos.patch
Normal file
33
0002-modify-cincinnati-url-for-nestos.patch
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
From 1f83eb227ca6a66c776565bb22da927b6d730f65 Mon Sep 17 00:00:00 2001
|
||||||
|
From: jianli-97 <lijian2@kylinos.cn>
|
||||||
|
Date: Wed, 27 Sep 2023 16:38:12 +0800
|
||||||
|
Subject: [PATCH] modify cincinnati url for nestos
|
||||||
|
|
||||||
|
---
|
||||||
|
dist/config.d/50-fedora-coreos-cincinnati.toml | 3 ---
|
||||||
|
dist/config.d/50-nestos-cincinnati.toml | 3 +++
|
||||||
|
2 files changed, 3 insertions(+), 3 deletions(-)
|
||||||
|
delete mode 100644 dist/config.d/50-fedora-coreos-cincinnati.toml
|
||||||
|
create mode 100644 dist/config.d/50-nestos-cincinnati.toml
|
||||||
|
|
||||||
|
diff --git a/dist/config.d/50-fedora-coreos-cincinnati.toml b/dist/config.d/50-fedora-coreos-cincinnati.toml
|
||||||
|
deleted file mode 100644
|
||||||
|
index fe259f3..0000000
|
||||||
|
--- a/dist/config.d/50-fedora-coreos-cincinnati.toml
|
||||||
|
+++ /dev/null
|
||||||
|
@@ -1,3 +0,0 @@
|
||||||
|
-# Fedora CoreOS Cincinnati backend
|
||||||
|
-[cincinnati]
|
||||||
|
-base_url= "https://updates.coreos.fedoraproject.org"
|
||||||
|
diff --git a/dist/config.d/50-nestos-cincinnati.toml b/dist/config.d/50-nestos-cincinnati.toml
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000..7a01c68
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/dist/config.d/50-nestos-cincinnati.toml
|
||||||
|
@@ -0,0 +1,3 @@
|
||||||
|
+# NestOS Cincinnati backend
|
||||||
|
+[cincinnati]
|
||||||
|
+base_url= "http://www.nestos.org.cn:8080"
|
||||||
|
--
|
||||||
|
2.33.0
|
||||||
|
|
||||||
35
README.md
35
README.md
@ -1,30 +1,39 @@
|
|||||||
# zincati
|
# zincati
|
||||||
|
|
||||||
#### 介绍
|
#### 介绍
|
||||||
Zincati is an auto-update agent for NestOS hosts..
|
Zincati is an auto-update agent for NestOS hosts.
|
||||||
|
|
||||||
#### 软件架构
|
It works as a client for Cincinnati and rpm-ostree, taking care of automatically updating/rebooting machines.
|
||||||
软件架构说明
|
|
||||||
|
#### Features:
|
||||||
|
-Agent for continuous auto-updates, with support for phased rollouts
|
||||||
|
-Configuration via TOML dropins and overlaid directories
|
||||||
|
-Multiple update strategies for finalization/reboot
|
||||||
|
-Local maintenance windows on a weekly schedule for planned upgrades
|
||||||
|
-Internal metrics exposed over a local endpoint in Prometheus format
|
||||||
|
-Logging with configurable priority levels
|
||||||
|
-Support for complex update-graphs via Cincinnati protocol (with rollout wariness, barriers, dead-ends and more)
|
||||||
|
-Support for cluster-wide reboot orchestration, via an external lock-manager
|
||||||
|
|
||||||
|
|
||||||
#### 安装教程
|
#### 安装教程
|
||||||
|
|
||||||
1. xxxx
|
Install zincati rpm package:
|
||||||
2. xxxx
|
|
||||||
3. xxxx
|
yum install zincati
|
||||||
|
|
||||||
#### 使用说明
|
#### 使用说明
|
||||||
|
|
||||||
1. xxxx
|
详细使用说明请参考[zincati官网](https://coreos.github.io/zincati/)以及[NestOS主页](https://gitee.com/openeuler/NestOS)
|
||||||
2. xxxx
|
|
||||||
3. xxxx
|
|
||||||
|
|
||||||
#### 参与贡献
|
#### 参与贡献
|
||||||
|
|
||||||
1. Fork 本仓库
|
master分支使用最新的上游版本,如果检测到上游有最新版本发布,先形成issue后再提交对应PR更新,流程如下。
|
||||||
2. 新建 Feat_xxx 分支
|
1. 提交issue
|
||||||
3. 提交代码
|
2. Fork 本仓库
|
||||||
4. 新建 Pull Request
|
3. 新建 Feat_xxx 分支
|
||||||
|
4. 提交代码
|
||||||
|
5. 新建 Pull Request
|
||||||
|
|
||||||
|
|
||||||
#### 特技
|
#### 特技
|
||||||
|
|||||||
@ -1,8 +0,0 @@
|
|||||||
diff -Nur zincati-0.0.18/dist/config.d/50-fedora-coreos-cincinnati.toml zincati-0.0.18-new/dist/config.d/50-fedora-coreos-cincinnati.toml
|
|
||||||
--- zincati-0.0.18/dist/config.d/50-fedora-coreos-cincinnati.toml 2021-02-28 06:16:41.000000000 +0800
|
|
||||||
+++ zincati-0.0.18-new/dist/config.d/50-fedora-coreos-cincinnati.toml 2022-05-17 11:27:14.242121619 +0800
|
|
||||||
@@ -1,3 +1,2 @@
|
|
||||||
-# Fedora CoreOS Cincinnati backend
|
|
||||||
[cincinnati]
|
|
||||||
-base_url= "https://updates.coreos.fedoraproject.org"
|
|
||||||
+base_url= "http://1.203.97.152:8080"
|
|
||||||
@ -4,16 +4,16 @@
|
|||||||
%global zcuid 986
|
%global zcuid 986
|
||||||
|
|
||||||
Name: rust-%{crate}
|
Name: rust-%{crate}
|
||||||
Version: 0.0.24
|
Version: 0.0.27
|
||||||
Release: 7
|
Release: 2
|
||||||
Summary: Update agent for NestOS
|
Summary: Update agent for NestOS
|
||||||
License: Apache-2.0
|
License: Apache-2.0
|
||||||
URL: https://crates.io/crates/%{crate}
|
URL: https://crates.io/crates/%{crate}
|
||||||
Source0: %{crate}-%{version}.crate
|
Source0: %{crate}-%{version}.crate
|
||||||
Source1: https://github.com/coreos/%{crate}/releases/download/v%{version}/%{crate}-%{version}-vendor.tar.gz
|
Source1: https://github.com/coreos/%{crate}/releases/download/v%{version}/%{crate}-%{version}-vendor.tar.gz
|
||||||
Source2: zincati-systemd-sysusers.conf
|
Source2: zincati-systemd-sysusers.conf
|
||||||
Patch1: base-cincinnati-url-for-nestos.patch
|
Patch1: 0001-modify-as-nestos-stream.patch
|
||||||
Patch2: modify-as-nestos-stream.patch
|
Patch2: 0002-modify-cincinnati-url-for-nestos.patch
|
||||||
|
|
||||||
BuildRequires: rust-packaging
|
BuildRequires: rust-packaging
|
||||||
BuildRequires: systemd openssl-devel
|
BuildRequires: systemd openssl-devel
|
||||||
@ -27,7 +27,7 @@ Update agent for NestOS.}
|
|||||||
|
|
||||||
%package -n %{crate}
|
%package -n %{crate}
|
||||||
Summary: %{summary}
|
Summary: %{summary}
|
||||||
License: ASL 2.0 and BSD and MIT and MPLv2.0 and zlib
|
License: Apache-2.0 AND BSD-3-Clause AND MIT AND (Apache-2.0 OR BSL-1.0) AND (Apache-2.0 OR MIT) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND (MIT OR Apache-2.0 OR BSD-2-Clause) AND (MIT OR Apache-2.0 OR Zlib) AND (Unlicense OR MIT)
|
||||||
|
|
||||||
%description -n %{crate} %{_description}
|
%description -n %{crate} %{_description}
|
||||||
|
|
||||||
@ -51,6 +51,7 @@ License: ASL 2.0 and BSD and MIT and MPLv2.0 and zlib
|
|||||||
%{_tmpfilesdir}/zincati.conf
|
%{_tmpfilesdir}/zincati.conf
|
||||||
%{_datadir}/polkit-1/rules.d/zincati.rules
|
%{_datadir}/polkit-1/rules.d/zincati.rules
|
||||||
%{_datadir}/polkit-1/actions/org.coreos.zincati.*
|
%{_datadir}/polkit-1/actions/org.coreos.zincati.*
|
||||||
|
%{_datadir}/dbus-1/system.d/*.conf
|
||||||
%{_sysusersdir}/zincati.conf
|
%{_sysusersdir}/zincati.conf
|
||||||
|
|
||||||
%pre -n %{crate}
|
%pre -n %{crate}
|
||||||
@ -116,20 +117,32 @@ install -Dpm0644 -t %{buildroot}%{_datadir}/polkit-1/rules.d \
|
|||||||
dist/polkit-1/rules.d/*.rules
|
dist/polkit-1/rules.d/*.rules
|
||||||
install -Dpm0644 -t %{buildroot}%{_datadir}/polkit-1/actions \
|
install -Dpm0644 -t %{buildroot}%{_datadir}/polkit-1/actions \
|
||||||
dist/polkit-1/actions/org.coreos.zincati.*
|
dist/polkit-1/actions/org.coreos.zincati.*
|
||||||
ln -snf /run/%{crate}/public/metrics.promsock %{buildroot}/run/%{crate}/private/metrics.promsock
|
install -Dpm0644 -t %{buildroot}%{_datadir}/dbus-1/system.d \
|
||||||
|
dist/dbus-1/system.d/*.conf
|
||||||
install -Dpm644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysusersdir}/zincati.conf
|
install -Dpm644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysusersdir}/zincati.conf
|
||||||
|
|
||||||
|
ln -snf /run/%{crate}/public/metrics.promsock %{buildroot}/run/%{crate}/private/metrics.promsock
|
||||||
|
|
||||||
%if %{with check}
|
%if %{with check}
|
||||||
%check
|
%check
|
||||||
%cargo_test
|
%cargo_test
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Aug 15 2024 duyiwei <duyiwei@kylinos.cn> - 0.0.27-2
|
||||||
|
- Repair the warning that the user and group do not exist during installation
|
||||||
|
|
||||||
|
* Mon Apr 15 2024 lijian <lijian2@kylinos.cn> - 0.0.27-1
|
||||||
|
- update to 0.0.27
|
||||||
|
- update all dependencies to latest versions
|
||||||
|
|
||||||
|
* Wed Sep 27 2023 lijian <lijian2@kylinos.cn> - 0.0.24-8
|
||||||
|
- add 0001-modify-cincinnati-url-for-nestos.patch
|
||||||
|
|
||||||
* Wed Dec 28 2022 chendexi <chendexi@kylinos.cn> - 0.0.24-7
|
* Wed Dec 28 2022 chendexi <chendexi@kylinos.cn> - 0.0.24-7
|
||||||
- modify base-cincinnati-url-for-nestos.patch
|
- modify base-cincinnati-url-for-nestos.patch
|
||||||
|
|
||||||
* Thu Dec 08 2022 fushanqing <fushanqing@kylinos.cn> - 0.0.24-6
|
* Sat Dec 10 2022 fushanqing <fushanqing@kylinos.cn> - 0.0.24-6
|
||||||
- Enable debuginfo for fix strip
|
- Enable debuginfo for fix strip
|
||||||
|
|
||||||
* Fri Dec 09 2022 liukuo <liukuo@kylinos.cn> - 0.0.24-5
|
* Fri Dec 09 2022 liukuo <liukuo@kylinos.cn> - 0.0.24-5
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
version_control: github
|
version_control: github
|
||||||
src_repo: https://github.com/coreos/zincati.git
|
src_repo: coreos/zincati.git
|
||||||
tag_prefix: "^v"
|
tag_prefix: "^v"
|
||||||
seperator: "."
|
seperator: "."
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
BIN
zincati-0.0.27.crate
Normal file
BIN
zincati-0.0.27.crate
Normal file
Binary file not shown.
@ -1,25 +0,0 @@
|
|||||||
|
|
||||||
--- zincati-0.0.18/Cargo.toml
|
|
||||||
+++ zincati-0.0.18/Cargo.toml
|
|
||||||
@@ -89,7 +89,7 @@ version = "2.1"
|
|
||||||
features = ["serde"]
|
|
||||||
|
|
||||||
[dependencies.prometheus]
|
|
||||||
-version = "0.11"
|
|
||||||
+version = "0.10"
|
|
||||||
default-features = false
|
|
||||||
|
|
||||||
[dependencies.rand]
|
|
||||||
@@ -128,10 +128,10 @@ features = ["serde"]
|
|
||||||
version = "0.2"
|
|
||||||
|
|
||||||
[dev-dependencies.mockito]
|
|
||||||
-version = "0.29"
|
|
||||||
+version = "0.28"
|
|
||||||
|
|
||||||
[dev-dependencies.proptest]
|
|
||||||
-version = "1.0"
|
|
||||||
+version = "0.10"
|
|
||||||
|
|
||||||
[features]
|
|
||||||
failpoints = ["fail/failpoints"]
|
|
||||||
@ -1 +1 @@
|
|||||||
u zincati - "Zincati user for auto-updates" /run/zincati
|
u zincati - "Zincati user for auto-updates" /run/zincati
|
||||||
Loading…
x
Reference in New Issue
Block a user