Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions vm-config.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Indempotent VM spawning config
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# Indempotent VM spawning config
# Idempotent VM spawning config




## Core concepts:

- Fully reproducible and sharable cfengine testing environment
- Should work for dev environment: support for package install and scripts
- Atomic config: either all vms created or none. No in-between states.
- Top-down run order
Comment on lines +9 to +10
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure what you mean by these 2 points.

- 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.
Copy link
Member

@olehermanse olehermanse Jan 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's desirable if you can edit the config and re-run cf-remote. It should detect what is missing and fix it (repair it).

This is useful to for example add one more client.

- Should provide abstraction of provider (aws, vagrant, static)


## Example:

```
machines:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should work a bit more on this part. I don't like the name (machines) and I don't like that it mixes some quite different things. For AWS and vagrant it specifies how / what to spawn (spawn config), while in static there is just a list of hosts.

- ubuntu-vm:
provider: aws # if we want to force provider
count: 1 # ignore if provider is "static"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ignore if provider is "static"

What does this mean?


aws:
image: ubuntu-24

vagrant:
image: ubuntu/focal64
memory: 1024
cpus: 2
Comment on lines +23 to +29
Copy link
Member

@olehermanse olehermanse Jan 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So in this case vagrant would be ignored since we specified aws as provider? I'd maybe expect this to cause an error, invalid config.


static:
hosts: [ [email protected], [email protected] ]
Comment on lines +31 to +32
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Static means managing pre-existing machines with SSH?


packages:
- cfengine-master:
package: cfengine
version: master
bootstrap: myhub # myhub count must be 1

- git-latest:
package: git
version: latest
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does latest mean?


hubs:
- myhub:
from: ubuntu-vm
install: [ cfengine-master, git-latest ]
scripts: [ ./provision.sh ]

clients:
- myclient:
from: ubuntu-vm
install: [ cfengine-master ]
```