init
Signed-off-by: anatasluo <luolongjuna@gmail.com>
This commit is contained in:
parent
10e887c063
commit
8213d8f302
71
README.md
71
README.md
@ -1,37 +1,62 @@
|
|||||||
# nvwa
|
# nvwa
|
||||||
|
|
||||||
#### 介绍
|
#### 介绍
|
||||||
A daemon process for kernel online update
|
|
||||||
|
|
||||||
#### 软件架构
|
一个用于自动化openEuler热升级过程的工具
|
||||||
软件架构说明
|
|
||||||
|
#### 构建方式
|
||||||
|
|
||||||
|
```
|
||||||
|
cd src
|
||||||
|
go get nvwa
|
||||||
|
go build
|
||||||
|
```
|
||||||
|
|
||||||
|
#### 关于配置
|
||||||
|
|
||||||
|
配置文件放置在config目录下,运行时二进制会去三个地方寻找配置文件,按照先后为:
|
||||||
|
|
||||||
|
1. 运行目录
|
||||||
|
2. 运行目录的config子目录
|
||||||
|
3. /etc/nvwa
|
||||||
|
|
||||||
|
配置文件包括:
|
||||||
|
|
||||||
|
1. nvwa-restore.yaml
|
||||||
|
|
||||||
|
需要进行现场恢复的进程和服务,两者区别在于,对于每一个服务,nvwa会去修改systemd的配置,通过systemd恢复运行状态
|
||||||
|
|
||||||
|
2. nvwa-server.yaml
|
||||||
|
|
||||||
|
热升级使用中需要用到的目录,日志,二进制目录配置等等
|
||||||
|
|
||||||
|
|
||||||
#### 安装教程
|
#### 支持的命令
|
||||||
|
|
||||||
1. xxxx
|
+ nvwa check -- 运行环境检查
|
||||||
2. xxxx
|
|
||||||
3. xxxx
|
|
||||||
|
|
||||||
#### 使用说明
|
+ nvwa update <version> -- 热升级到相应的内核版本(相关文件需放置在/boot下)
|
||||||
|
|
||||||
1. xxxx
|
nvwa将会去/boot目录下寻找需要的kernel和rootfs,kernel的命名格式需为vmlinuz-<version>, rootfs命名格式需为initramfs-<version>.img
|
||||||
2. xxxx
|
|
||||||
3. xxxx
|
|
||||||
|
|
||||||
#### 参与贡献
|
+ nvwa restore <process> -- 恢复某个之前freeze的进程
|
||||||
|
|
||||||
1. Fork 本仓库
|
+ nvwa help
|
||||||
2. 新建 Feat_xxx 分支
|
|
||||||
3. 提交代码
|
|
||||||
4. 新建 Pull Request
|
|
||||||
|
|
||||||
|
显示client相关的帮助信息
|
||||||
|
|
||||||
#### 特技
|
+ nvwa --help
|
||||||
|
|
||||||
1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md
|
显示server相关的帮助信息
|
||||||
2. Gitee 官方博客 [blog.gitee.com](https://blog.gitee.com)
|
|
||||||
3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解 Gitee 上的优秀开源项目
|
#### 开发计划
|
||||||
4. [GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目
|
|
||||||
5. Gitee 官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help)
|
+ 将/boot目录下kernel和rootfs的命名格式放入配置项
|
||||||
6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)
|
+ 支持日志重定向至文件
|
||||||
|
+ 配置文件改变后,服务自动重新加载
|
||||||
|
+ server必须以root权限运行
|
||||||
|
+ server/client帮助文本的问题
|
||||||
|
+ 优化使用体验
|
||||||
|
+ 配置文件存在模糊的地方
|
||||||
|
+ nvwa的启动时机存在一定问题(criu对lsm之类存在依赖)
|
||||||
|
+ 网络dump/restore变成可选(否则会造成开机网络失效)
|
||||||
BIN
nvwa-v0.0.1.tar.gz
Normal file
BIN
nvwa-v0.0.1.tar.gz
Normal file
Binary file not shown.
62
nvwa.spec
Normal file
62
nvwa.spec
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
Name: nvwa
|
||||||
|
Version: 0.0.1
|
||||||
|
Release: 1
|
||||||
|
Summary: a tool used for openEuler kernel update
|
||||||
|
|
||||||
|
License: MulanPSL-2.0 and Apache-2.0 and MIT
|
||||||
|
URL: https://gitee.com/openeuler/nvwa
|
||||||
|
Source: %{name}-v%{version}.tar.gz
|
||||||
|
|
||||||
|
BuildRequires: golang >= 1.13
|
||||||
|
Requires: kexec-tools criu
|
||||||
|
Requires: systemd-units iptables-services iproute
|
||||||
|
|
||||||
|
%description
|
||||||
|
A tool used to automate the process of seamless update of the openEuler.
|
||||||
|
|
||||||
|
%global debug_package %{nil}
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%autosetup -n %{name}-v%{version}
|
||||||
|
|
||||||
|
|
||||||
|
%build
|
||||||
|
|
||||||
|
cd src
|
||||||
|
go build -mod=vendor
|
||||||
|
cd -
|
||||||
|
|
||||||
|
%install
|
||||||
|
|
||||||
|
mkdir -p %{buildroot}/%{_bindir}
|
||||||
|
mkdir -p %{buildroot}/etc/%{name}
|
||||||
|
mkdir -p %{buildroot}/etc/%{name}/running/
|
||||||
|
mkdir -p %{buildroot}/etc/systemd/system/
|
||||||
|
|
||||||
|
install -m 0750 %{_builddir}/%{name}-v%{version}/src/%{name} %{buildroot}/%{_bindir}/
|
||||||
|
install -m 0640 %{_builddir}/%{name}-v%{version}/config/%{name}-restore.yaml %{buildroot}/etc/%{name}/
|
||||||
|
install -m 0640 %{_builddir}/%{name}-v%{version}/config/%{name}-server.yaml %{buildroot}/etc/%{name}/
|
||||||
|
|
||||||
|
install -m 0644 %{_builddir}/%{name}-v%{version}/%{name}.service %{buildroot}/etc/systemd/system/
|
||||||
|
|
||||||
|
%post
|
||||||
|
%systemd_post %{name}.service
|
||||||
|
|
||||||
|
%preun
|
||||||
|
%systemd_preun %{name}.service
|
||||||
|
|
||||||
|
%postun
|
||||||
|
%systemd_postun_with_restart %{name}.service
|
||||||
|
|
||||||
|
%files
|
||||||
|
%license LICENSE
|
||||||
|
%dir /etc/%{name}/
|
||||||
|
/etc/%{name}/%{name}-restore.yaml
|
||||||
|
/etc/%{name}/%{name}-server.yaml
|
||||||
|
/etc/systemd/system/%{name}.service
|
||||||
|
%{_bindir}/%{name}
|
||||||
|
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Thu Feb 18 2021 anatasluo <luolongjun@huawei.com>
|
||||||
|
- Update to 0.0.1
|
||||||
Loading…
x
Reference in New Issue
Block a user