Compare commits
No commits in common. "f53400834a4fbb105542b1d2184e29031a479af6" and "c140f7a7842f35c361f35be1e98921e5cc6eb689" have entirely different histories.
f53400834a
...
c140f7a784
@ -1,33 +0,0 @@
|
||||
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,39 +1,30 @@
|
||||
# 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
|
||||
#### 软件架构
|
||||
软件架构说明
|
||||
|
||||
|
||||
#### 安装教程
|
||||
|
||||
Install zincati rpm package:
|
||||
|
||||
yum install zincati
|
||||
1. xxxx
|
||||
2. xxxx
|
||||
3. xxxx
|
||||
|
||||
#### 使用说明
|
||||
|
||||
详细使用说明请参考[zincati官网](https://coreos.github.io/zincati/)以及[NestOS主页](https://gitee.com/openeuler/NestOS)
|
||||
1. xxxx
|
||||
2. xxxx
|
||||
3. xxxx
|
||||
|
||||
#### 参与贡献
|
||||
|
||||
master分支使用最新的上游版本,如果检测到上游有最新版本发布,先形成issue后再提交对应PR更新,流程如下。
|
||||
1. 提交issue
|
||||
2. Fork 本仓库
|
||||
3. 新建 Feat_xxx 分支
|
||||
4. 提交代码
|
||||
5. 新建 Pull Request
|
||||
1. Fork 本仓库
|
||||
2. 新建 Feat_xxx 分支
|
||||
3. 提交代码
|
||||
4. 新建 Pull Request
|
||||
|
||||
|
||||
#### 特技
|
||||
|
||||
8
base-cincinnati-url-for-nestos.patch
Normal file
8
base-cincinnati-url-for-nestos.patch
Normal file
@ -0,0 +1,8 @@
|
||||
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"
|
||||
@ -1,46 +1,30 @@
|
||||
From 67ce1b700372637050218715411984226b6ab9ef Mon Sep 17 00:00:00 2001
|
||||
From: jianli-97 <lijian2@kylinos.cn>
|
||||
Date: Mon, 15 Apr 2024 13:30:27 +0800
|
||||
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
|
||||
diff -uprN zincati-0.0.24/docs/development/os-metadata.md zincati-0.0.24-new/docs/development/os-metadata.md
|
||||
--- zincati-0.0.24/docs/development/os-metadata.md 1973-11-30 05:33:09.000000000 +0800
|
||||
+++ zincati-0.0.24-new/docs/development/os-metadata.md 2022-09-01 22:14:16.419124499 +0800
|
||||
@@ -31,7 +31,7 @@ Booted deployment must provide several m
|
||||
* `version`: OS version
|
||||
* under `base-commit-meta`:
|
||||
* `coreos-assembler.basearch`: base architecture
|
||||
- * `fedora-coreos.stream`: update stream
|
||||
+ * `nestos.stream`: update stream
|
||||
|
||||
All those metadata entries must exist with a non-empty string value.
|
||||
|
||||
diff --git a/src/rpm_ostree/cli_status.rs b/src/rpm_ostree/cli_status.rs
|
||||
index 1be93e3..68682e8 100644
|
||||
--- a/src/rpm_ostree/cli_status.rs
|
||||
+++ b/src/rpm_ostree/cli_status.rs
|
||||
@@ -74,7 +74,7 @@ pub struct Deployment {
|
||||
/// Metadata from base commit (only fields relevant to zincati).
|
||||
#[derive(Clone, Debug, Deserialize)]
|
||||
struct BaseCommitMeta {
|
||||
diff -uprN zincati-0.0.24/src/rpm_ostree/cli_status.rs zincati-0.0.24-new/src/rpm_ostree/cli_status.rs
|
||||
--- zincati-0.0.24/src/rpm_ostree/cli_status.rs 1973-11-30 05:33:09.000000000 +0800
|
||||
+++ zincati-0.0.24-new/src/rpm_ostree/cli_status.rs 2022-09-01 22:13:30.381509120 +0800
|
||||
@@ -63,7 +63,7 @@ pub struct DeploymentJson {
|
||||
struct BaseCommitMetaJson {
|
||||
#[serde(rename = "coreos-assembler.basearch")]
|
||||
basearch: String,
|
||||
- #[serde(rename = "fedora-coreos.stream")]
|
||||
+ #[serde(rename = "nestos.stream")]
|
||||
stream: Option<String>,
|
||||
stream: String,
|
||||
}
|
||||
|
||||
diff --git a/tests/fixtures/rpm-ostree-staged.json b/tests/fixtures/rpm-ostree-staged.json
|
||||
index 12bac6e..7e25bad 100644
|
||||
--- a/tests/fixtures/rpm-ostree-staged.json
|
||||
+++ b/tests/fixtures/rpm-ostree-staged.json
|
||||
diff -uprN zincati-0.0.24/tests/fixtures/rpm-ostree-staged.json zincati-0.0.24-new/tests/fixtures/rpm-ostree-staged.json
|
||||
--- zincati-0.0.24/tests/fixtures/rpm-ostree-staged.json 1973-11-30 05:33:09.000000000 +0800
|
||||
+++ zincati-0.0.24-new/tests/fixtures/rpm-ostree-staged.json 2022-09-01 22:16:06.002212519 +0800
|
||||
@@ -9,7 +9,7 @@
|
||||
"coreos-assembler.config-dirty" : "false",
|
||||
"rpmostree.inputhash" : "77dbde3d9502f2f87757d2b68b93b52efa2c65fb7b1fc317e0ffc50b483a3a52",
|
||||
@ -59,10 +43,9 @@ index 12bac6e..7e25bad 100644
|
||||
"version" : "31.20200505.3.0",
|
||||
"rpmostree.initramfs-args" : [
|
||||
"--add=ignition",
|
||||
diff --git a/tests/fixtures/rpm-ostree-status.json b/tests/fixtures/rpm-ostree-status.json
|
||||
index 6e62cc2..ed041cc 100644
|
||||
--- a/tests/fixtures/rpm-ostree-status.json
|
||||
+++ b/tests/fixtures/rpm-ostree-status.json
|
||||
diff -uprN zincati-0.0.24/tests/fixtures/rpm-ostree-status.json zincati-0.0.24-new/tests/fixtures/rpm-ostree-status.json
|
||||
--- zincati-0.0.24/tests/fixtures/rpm-ostree-status.json 1973-11-30 05:33:09.000000000 +0800
|
||||
+++ zincati-0.0.24-new/tests/fixtures/rpm-ostree-status.json 2022-09-01 22:14:39.301431354 +0800
|
||||
@@ -8,7 +8,7 @@
|
||||
"coreos-assembler.config-dirty" : "true",
|
||||
"coreos-assembler.config-gitrev" : "e5ffda727170e124c7f7d8782e256b0462bf9869",
|
||||
@ -72,10 +55,9 @@ index 6e62cc2..ed041cc 100644
|
||||
"rpmostree.inputhash" : "0e2ba98bac847c8a8cc5ffd42822a41d53ef6719ccaf6a0094559768aa24da33",
|
||||
"version" : "30.1",
|
||||
"rpmostree.rpmmd-repos" : [
|
||||
diff --git a/tests/kola/server/test-stream.sh b/tests/kola/server/test-stream.sh
|
||||
index 96b1d52..f45e913 100755
|
||||
--- a/tests/kola/server/test-stream.sh
|
||||
+++ b/tests/kola/server/test-stream.sh
|
||||
diff -uprN zincati-0.0.24/tests/kola/server/test-stream.sh zincati-0.0.24-new/tests/kola/server/test-stream.sh
|
||||
--- zincati-0.0.24/tests/kola/server/test-stream.sh 1973-11-30 05:33:09.000000000 +0800
|
||||
+++ zincati-0.0.24-new/tests/kola/server/test-stream.sh 2022-09-01 22:15:44.394996808 +0800
|
||||
@@ -66,7 +66,7 @@ EOF
|
||||
ostree --repo=/var/www pull-local /ostree/repo "$cur_payload"
|
||||
# Create a new branch `test-branch` by creating a dummy commit.
|
||||
@ -103,6 +85,3 @@ index 96b1d52..f45e913 100755
|
||||
--keep-metadata='coreos-assembler.basearch' --parent="$cur_payload")"
|
||||
|
||||
jq \
|
||||
--
|
||||
2.33.0
|
||||
|
||||
@ -4,16 +4,16 @@
|
||||
%global zcuid 986
|
||||
|
||||
Name: rust-%{crate}
|
||||
Version: 0.0.27
|
||||
Release: 2
|
||||
Version: 0.0.24
|
||||
Release: 7
|
||||
Summary: Update agent for NestOS
|
||||
License: Apache-2.0
|
||||
URL: https://crates.io/crates/%{crate}
|
||||
Source0: %{crate}-%{version}.crate
|
||||
Source1: https://github.com/coreos/%{crate}/releases/download/v%{version}/%{crate}-%{version}-vendor.tar.gz
|
||||
Source2: zincati-systemd-sysusers.conf
|
||||
Patch1: 0001-modify-as-nestos-stream.patch
|
||||
Patch2: 0002-modify-cincinnati-url-for-nestos.patch
|
||||
Patch1: base-cincinnati-url-for-nestos.patch
|
||||
Patch2: modify-as-nestos-stream.patch
|
||||
|
||||
BuildRequires: rust-packaging
|
||||
BuildRequires: systemd openssl-devel
|
||||
@ -27,7 +27,7 @@ Update agent for NestOS.}
|
||||
|
||||
%package -n %{crate}
|
||||
Summary: %{summary}
|
||||
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)
|
||||
License: ASL 2.0 and BSD and MIT and MPLv2.0 and zlib
|
||||
|
||||
%description -n %{crate} %{_description}
|
||||
|
||||
@ -51,7 +51,6 @@ License: Apache-2.0 AND BSD-3-Clause AND MIT AND (Apache-2.0 OR BSL-1.0)
|
||||
%{_tmpfilesdir}/zincati.conf
|
||||
%{_datadir}/polkit-1/rules.d/zincati.rules
|
||||
%{_datadir}/polkit-1/actions/org.coreos.zincati.*
|
||||
%{_datadir}/dbus-1/system.d/*.conf
|
||||
%{_sysusersdir}/zincati.conf
|
||||
|
||||
%pre -n %{crate}
|
||||
@ -117,32 +116,20 @@ install -Dpm0644 -t %{buildroot}%{_datadir}/polkit-1/rules.d \
|
||||
dist/polkit-1/rules.d/*.rules
|
||||
install -Dpm0644 -t %{buildroot}%{_datadir}/polkit-1/actions \
|
||||
dist/polkit-1/actions/org.coreos.zincati.*
|
||||
install -Dpm0644 -t %{buildroot}%{_datadir}/dbus-1/system.d \
|
||||
dist/dbus-1/system.d/*.conf
|
||||
install -Dpm644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysusersdir}/zincati.conf
|
||||
|
||||
ln -snf /run/%{crate}/public/metrics.promsock %{buildroot}/run/%{crate}/private/metrics.promsock
|
||||
|
||||
install -Dpm644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysusersdir}/zincati.conf
|
||||
|
||||
%if %{with check}
|
||||
%check
|
||||
%cargo_test
|
||||
%endif
|
||||
|
||||
%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
|
||||
- modify base-cincinnati-url-for-nestos.patch
|
||||
|
||||
* Sat Dec 10 2022 fushanqing <fushanqing@kylinos.cn> - 0.0.24-6
|
||||
* Thu Dec 08 2022 fushanqing <fushanqing@kylinos.cn> - 0.0.24-6
|
||||
- Enable debuginfo for fix strip
|
||||
|
||||
* Fri Dec 09 2022 liukuo <liukuo@kylinos.cn> - 0.0.24-5
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
version_control: github
|
||||
src_repo: coreos/zincati.git
|
||||
src_repo: https://github.com/coreos/zincati.git
|
||||
tag_prefix: "^v"
|
||||
seperator: "."
|
||||
|
||||
|
||||
Binary file not shown.
BIN
zincati-0.0.24.crate
Normal file
BIN
zincati-0.0.24.crate
Normal file
Binary file not shown.
Binary file not shown.
25
zincati-fix-metadata.diff
Normal file
25
zincati-fix-metadata.diff
Normal file
@ -0,0 +1,25 @@
|
||||
|
||||
--- 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"]
|
||||
Loading…
x
Reference in New Issue
Block a user