Skip to content

Commit

Permalink
feat(init): release tat-agent from v0.1.12
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
shouyanwang committed Nov 24, 2021
0 parents commit d9d7947
Show file tree
Hide file tree
Showing 65 changed files with 9,560 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/target
.vscode/
.idea/
log
install/tat_agent
tat_agent
install/tat_agent_*.zip
install/tat_agent_*.tar.gz
install/tat_agent_*install*

# temp script generated by test.
.*.sh
*.exe
install/*.exe
111 changes: 111 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
# Changelog

All notable changes to this project will be documented in this file.

## [0.1.12] - 2021-11-16

### Changed

- Optimize executor logic.
- Support task cancellation.
- Remove speculate.

## [0.1.11] - 2021-10-12

### Changed

- Agent support for windows.

## [0.1.10] - 2021-10-12

### Changed

- Modify the backend domain.

## [0.1.9] - 2021-09-18

### Changed

- Report `START_FAILED` during script file creating failed because of disk full or permission deny.
- Fix some warning, replace the deprecated func.
- Modify a test case of cache lib, make it more accurate.
- Reduce some redundant log.

## [0.1.8] - 2021-08-19

### Changed

- Reduce systemd restart seconds to 1s.

## [0.1.7] - 2021-08-04

### Changed

- Optimized for preload environment.
- Use `vendored` mode for building openssl, see: [openssl](https://docs.rs/openssl/0.10.35/openssl/#vendored).
- Optimize Makefile for cross-compile.

## [0.1.6] - 2021-06-28

### Changed

- Support agent run daemon tasks.

## [0.1.5] - 2021-06-22

### Added

- Support set `username` for invocation task.
- Support preload environment variables before running task.
- Add `err_info` to store the reason for task `START_FAILED`.

## [0.1.4] - 2021-05-07

### Added

- Support containerize agent, used for E2E environment.
- Support debug mode for mock vpc info, used for E2E environment.

## [0.1.3] - 2021-04-25

### Added

- Report dropped bytes of output.
- Add CHANGELOG & LICENSE.

## [0.1.2] - 2021-01-05

### Added

- Add integration tests for HTTP API.

### Changed

- Do CheckUpdate 10s after the agent started.
- Update install.sh to adapt some bash version which do not support [[ syntax.
- Fix bug of finish time return 0 when start failed.

## [0.1.1] - 2020-12-14

### Added

- Support install for CoreOS whose /usr is Read-only.

### Changed

- Report task start & finish support retry.
- Optimize several sleep operations.
- Fix sleep method in tokio, use await instead of thread sleep.
- Fix bug, commands local saving directory recreate each month.
- Set tat_agent auto-restart time to 5s by systemd.

## [0.1.0] - 2020-11-16

### Added

- First release of TAT agent.
- Including one WebSocket thread for task notify.
- Including one HTTP thread for task query & report.
- Including one On-time thread for some periodic & timer tasks.
- Commands spawned as an independent process.

3 changes: 3 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# TAT Agent Community Code of Conduct

TAT Agent follows the [CNCF Code of Conduct](https://github.com/cncf/foundation/blob/master/code-of-conduct.md).
56 changes: 56 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Prepare

- Rust

Install Rust with command:
```
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
```
See more at:
https://www.rust-lang.org/learn/get-started

- Rust target

Add target if you need, such as x86_64-unknown-linux-musl to build static target on linux:
```
rustup target add x86_64-unknown-linux-musl
```

- IDE

1. Linux command line;
2. IntelliJ IDEA with Rust plugin;
3. Visual Studio Code.

# Build

- Run directly

cargo will run immediately after build.
```
make run
```

- Build static target

cargo will only build the target.
Need x86_64-unknown-linux-musl target added and docker installed.
```
make build
```

# Run

After build, you can run tat_agent anywhere with:
```
# root user
./tat_agent
```
The tat_agent will use flock() to lock the pid file /var/run/tat_agent.pid,
to ensure only one tat_agent process can start success on one machine.
The pid file will be auto unlocked after the tat_agent exit.
So you do not need to modify the pid file manually.

# Contribute

You are welcome to report bug, or contribute from github via issue, pull request or any discussions.
Loading

0 comments on commit d9d7947

Please sign in to comment.