Skip to content

Commit 7fb7f44

Browse files
committed
Design cf-remote config
Signed-off-by: Victor Moene <victor.moene@northern.tech>
1 parent f69a26d commit 7fb7f44

1 file changed

Lines changed: 55 additions & 0 deletions

File tree

vm-config.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Indempotent VM spawning config
2+
3+
4+
5+
## Core concepts:
6+
7+
- Fully reproducible and sharable cfengine testing environment
8+
- Should work for dev environment: support for package install and scripts
9+
- Atomic config: either all vms created or none. No in-between states.
10+
- Top-down run order
11+
- VMs bound to config that generated them. Should not manually interfer: VMs should not be destroyed manually and the config should not be modified while VMs are running.
12+
- Should provide abstraction over provider (aws, vagrant, static)
13+
- By defining VM instance inside their category (aws: debian_aws), we enforce the parameters on the VM through the syntax. Otherwise
14+
15+
16+
## Example:
17+
18+
```
19+
machines:
20+
- ubuntu-vm:
21+
provider: aws # if we want to force provider
22+
count: 1 # ignore if provider is "static"
23+
24+
aws:
25+
image: ubuntu-24
26+
27+
vagrant:
28+
image: ubuntu/focal64
29+
memory: 1024
30+
cpus: 2
31+
32+
static:
33+
hosts: [ ubuntu@8.8.8.8, ubuntu@1.1.1.1 ]
34+
35+
packages:
36+
- cfengine-master:
37+
package: cfengine
38+
version: master
39+
bootstrap: myhub # myhub count must be 1
40+
41+
- git-latest:
42+
package: git
43+
version: latest
44+
45+
hubs:
46+
- myhub:
47+
from: ubuntu-vm
48+
install: [ cfengine-master, git-latest ]
49+
scripts: [ ./provision.sh ]
50+
51+
clients:
52+
- myclient:
53+
from: ubuntu-vm
54+
install: [ cfengine-master ]
55+
```

0 commit comments

Comments
 (0)