Skip to content

Commit 98589ac

Browse files
authored
start to switch to hcl (#1)
* start to switch to hcl * start to re-implement error * start to report error * finish error reporting * remove rcl
1 parent 714ff1d commit 98589ac

31 files changed

+1831
-1215
lines changed

Cargo.lock

+99-11
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ members = [
3636
]
3737

3838
[workspace.dependencies]
39+
hcl-rs = { git = "https://github.com/lapce/hcl-rs", rev = "fb0ac2875760a8219899f5a4d774d0996a5b06dd" }
40+
hcl-edit = { git = "https://github.com/lapce/hcl-rs", rev = "fb0ac2875760a8219899f5a4d774d0996a5b06dd" }
3941
tempfile = "3.10.1"
4042
os_info = "3.7"
4143
itertools = "0.12.1"
@@ -55,5 +57,3 @@ tiron = { path = "./tiron" }
5557
tiron-tui = { path = "./tiron-tui" }
5658
tiron-node = { path = "./tiron-node" }
5759
tiron-common = { path = "./tiron-common" }
58-
rcl = { git = "https://github.com/lapce/rcl", rev = "78796fe8845a2a129b21093604006501fa5cde24" }
59-
# rcl = { path = "../rcl" }

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@
2424
</div>
2525

2626
## Features
27-
* **No YAML:** Tiron uses a new configuration language called [rcl](https://github.com/ruuda/rcl), which is simple to write with some basic code functionalities.
27+
* **No YAML:** Tiron uses [HCL](https://github.com/hashicorp/hcl) as the configuration language.
2828
* **Agentless:** By using SSH, Tiron connects to the remote machines without the need to install an agent first.
2929
* **TUI:** Tiron has a built in terminal user interfaces to display the outputs of the running tasks.
30-
* **Correctness:** Tiron pre validates all the rcl files and will throw errors before the task is started to execute.
30+
* **Correctness:** Tiron pre validates all the runbook files and will throw errors before the task is started to execute.
3131
* **Speed:** On validating all the input, Tiron also pre populates all the data for tasks, and send them to the remote machines in one go to save the roundtrips between the client and remote.
3232

3333
## Quickstart

examples/example_tiron_project/jobs/job1/main.rcl

-26
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
use "test.tr" {
2+
job "job2" {}
3+
}
4+
5+
job "job1" {
6+
action "copy" {
7+
name = "the first action"
8+
params {
9+
src = "/tmp/test.tr"
10+
dest = "/tmp/test.conf"
11+
}
12+
}
13+
action "job" {
14+
params {
15+
name = "job2"
16+
}
17+
}
18+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
job "job2" {
2+
action "copy" {
3+
name = "the first action in job2"
4+
params {
5+
src = "/tmp/test.tr"
6+
dest = "/tmp/test.conf"
7+
}
8+
}
9+
}

examples/example_tiron_project/jobs/test_job.rcl

Whitespace-only changes.

examples/example_tiron_project/main.rcl

-31
This file was deleted.
+71
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
use "jobs/job1/main.tr" {
2+
job "job1" {
3+
}
4+
}
5+
6+
use "tiron.tr" {
7+
group "group2" {}
8+
}
9+
10+
group "production" {
11+
host "localhost" {
12+
apache = "apache2"
13+
}
14+
}
15+
16+
group "gropu3" {
17+
group "group2" {}
18+
}
19+
20+
run "production" {
21+
name = "initial run"
22+
remote_user = "dz"
23+
become = true
24+
25+
action "package" {
26+
params {
27+
name = [apache, "mariadb-connector-c", "${apache}"]
28+
state = "present"
29+
}
30+
}
31+
32+
action "copy" {
33+
params {
34+
src = "/tmp/test.tr"
35+
dest = "/tmp/test.conf"
36+
}
37+
}
38+
39+
action "job" {
40+
name = "run job1"
41+
params {
42+
name = "job1"
43+
}
44+
}
45+
}
46+
47+
run "group2" {
48+
remote_user = "dz"
49+
50+
action "job" {
51+
params {
52+
name = "job1"
53+
}
54+
}
55+
action "copy" {
56+
params {
57+
src = "/tmp/test.tr"
58+
dest = "/tmp/test.conf"
59+
}
60+
}
61+
action "job" {
62+
params {
63+
name = "job1"
64+
}
65+
}
66+
action "job" {
67+
params {
68+
name = "job1"
69+
}
70+
}
71+
}

0 commit comments

Comments
 (0)