Skip to content

Commit d9d7947

Browse files
author
shouyanwang
committed
feat(init): release tat-agent from v0.1.12
Main feature includes: - Support shell, powershell and python commands. - Support both Linux and Windows. - Report command output. - Auto kill the timeout task. - Cancel the specified task.
0 parents  commit d9d7947

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+9560
-0
lines changed

.gitignore

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/target
2+
.vscode/
3+
.idea/
4+
log
5+
install/tat_agent
6+
tat_agent
7+
install/tat_agent_*.zip
8+
install/tat_agent_*.tar.gz
9+
install/tat_agent_*install*
10+
11+
# temp script generated by test.
12+
.*.sh
13+
*.exe
14+
install/*.exe

CHANGELOG.md

+111
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
## [0.1.12] - 2021-11-16
6+
7+
### Changed
8+
9+
- Optimize executor logic.
10+
- Support task cancellation.
11+
- Remove speculate.
12+
13+
## [0.1.11] - 2021-10-12
14+
15+
### Changed
16+
17+
- Agent support for windows.
18+
19+
## [0.1.10] - 2021-10-12
20+
21+
### Changed
22+
23+
- Modify the backend domain.
24+
25+
## [0.1.9] - 2021-09-18
26+
27+
### Changed
28+
29+
- Report `START_FAILED` during script file creating failed because of disk full or permission deny.
30+
- Fix some warning, replace the deprecated func.
31+
- Modify a test case of cache lib, make it more accurate.
32+
- Reduce some redundant log.
33+
34+
## [0.1.8] - 2021-08-19
35+
36+
### Changed
37+
38+
- Reduce systemd restart seconds to 1s.
39+
40+
## [0.1.7] - 2021-08-04
41+
42+
### Changed
43+
44+
- Optimized for preload environment.
45+
- Use `vendored` mode for building openssl, see: [openssl](https://docs.rs/openssl/0.10.35/openssl/#vendored).
46+
- Optimize Makefile for cross-compile.
47+
48+
## [0.1.6] - 2021-06-28
49+
50+
### Changed
51+
52+
- Support agent run daemon tasks.
53+
54+
## [0.1.5] - 2021-06-22
55+
56+
### Added
57+
58+
- Support set `username` for invocation task.
59+
- Support preload environment variables before running task.
60+
- Add `err_info` to store the reason for task `START_FAILED`.
61+
62+
## [0.1.4] - 2021-05-07
63+
64+
### Added
65+
66+
- Support containerize agent, used for E2E environment.
67+
- Support debug mode for mock vpc info, used for E2E environment.
68+
69+
## [0.1.3] - 2021-04-25
70+
71+
### Added
72+
73+
- Report dropped bytes of output.
74+
- Add CHANGELOG & LICENSE.
75+
76+
## [0.1.2] - 2021-01-05
77+
78+
### Added
79+
80+
- Add integration tests for HTTP API.
81+
82+
### Changed
83+
84+
- Do CheckUpdate 10s after the agent started.
85+
- Update install.sh to adapt some bash version which do not support [[ syntax.
86+
- Fix bug of finish time return 0 when start failed.
87+
88+
## [0.1.1] - 2020-12-14
89+
90+
### Added
91+
92+
- Support install for CoreOS whose /usr is Read-only.
93+
94+
### Changed
95+
96+
- Report task start & finish support retry.
97+
- Optimize several sleep operations.
98+
- Fix sleep method in tokio, use await instead of thread sleep.
99+
- Fix bug, commands local saving directory recreate each month.
100+
- Set tat_agent auto-restart time to 5s by systemd.
101+
102+
## [0.1.0] - 2020-11-16
103+
104+
### Added
105+
106+
- First release of TAT agent.
107+
- Including one WebSocket thread for task notify.
108+
- Including one HTTP thread for task query & report.
109+
- Including one On-time thread for some periodic & timer tasks.
110+
- Commands spawned as an independent process.
111+

CODE_OF_CONDUCT.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# TAT Agent Community Code of Conduct
2+
3+
TAT Agent follows the [CNCF Code of Conduct](https://github.com/cncf/foundation/blob/master/code-of-conduct.md).

CONTRIBUTING.md

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Prepare
2+
3+
- Rust
4+
5+
Install Rust with command:
6+
```
7+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
8+
```
9+
See more at:
10+
https://www.rust-lang.org/learn/get-started
11+
12+
- Rust target
13+
14+
Add target if you need, such as x86_64-unknown-linux-musl to build static target on linux:
15+
```
16+
rustup target add x86_64-unknown-linux-musl
17+
```
18+
19+
- IDE
20+
21+
1. Linux command line;
22+
2. IntelliJ IDEA with Rust plugin;
23+
3. Visual Studio Code.
24+
25+
# Build
26+
27+
- Run directly
28+
29+
cargo will run immediately after build.
30+
```
31+
make run
32+
```
33+
34+
- Build static target
35+
36+
cargo will only build the target.
37+
Need x86_64-unknown-linux-musl target added and docker installed.
38+
```
39+
make build
40+
```
41+
42+
# Run
43+
44+
After build, you can run tat_agent anywhere with:
45+
```
46+
# root user
47+
./tat_agent
48+
```
49+
The tat_agent will use flock() to lock the pid file /var/run/tat_agent.pid,
50+
to ensure only one tat_agent process can start success on one machine.
51+
The pid file will be auto unlocked after the tat_agent exit.
52+
So you do not need to modify the pid file manually.
53+
54+
# Contribute
55+
56+
You are welcome to report bug, or contribute from github via issue, pull request or any discussions.

0 commit comments

Comments
 (0)