initial commit
This commit is contained in:
commit
f9b7913992
4 changed files with 143 additions and 0 deletions
63
README.md
Normal file
63
README.md
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
# coreos-kvm [](https://quay.io/repository/dghubble/coreos-kvm)
|
||||
|
||||
`coreos-kvm` is a container images which runs a QEMU/KVM CoreOS VM.
|
||||
|
||||
## Usage
|
||||
|
||||
Run the container image as a privileged container. Provide Ignition or Cloud-Config user-data to provision the guest instance.
|
||||
|
||||
# config
|
||||
sudo docker run --name kvm --privileged -e CONFIG_FILE=/userdata/config.yaml -v $PWD/examples/config.yaml:/userdata/config.yaml quay.io/dghubble/coreos-kvm
|
||||
|
||||
# ignition
|
||||
sudo docker run --name kvm --privileged -e IGNITION_CONFIG_FILE=/userdata/ignition.json -v $PWD/examples/ignition.json:/userdata/ignition.json quay.io/dghubble/coreos-kvm
|
||||
|
||||
# cloud-config
|
||||
sudo docker run --name kvm --privileged -e CLOUD_CONFIG_FILE=/userdata/cloud.yaml -v $PWD/examples/cloud.yaml:/userdata/cloud.yaml quay.io/dghubble/coreos-kvm
|
||||
|
||||
SSH into the container IP on port 2222.
|
||||
|
||||
sudo docker network inspect bridge
|
||||
ssh -p 2222 core@172.17.0.2
|
||||
|
||||
The container runs a local port (2222) forward to the CoreOS VM (22).
|
||||
|
||||
### Environment Variables
|
||||
|
||||
| env variable | example |
|
||||
|----------------------|-------------------------|
|
||||
| CONFIG_FILE | /userdata/config.yaml |
|
||||
| IGNITION_CONFIG_FILE | /userdata/ignition.json |
|
||||
| CLOUD_CONFIG_FILE | /userdata/cloud.yaml |
|
||||
| VM_NAME | coreos-kvm |
|
||||
| VM_MEMORY | 4G |
|
||||
| VM_DISK_SIZE | 12G |
|
||||
| HOSTFWD | hostfwd=tcp::2222-:22 |
|
||||
|
||||
## Development
|
||||
|
||||
To develop the container image, build it locally.
|
||||
|
||||
### Container Image
|
||||
|
||||
Build the container image.
|
||||
|
||||
make docker-image
|
||||
|
||||
### Run
|
||||
|
||||
Run the container image as a privileged container. Provide Ignition or Cloud-Config user-data to provision the guest instance.
|
||||
|
||||
# config
|
||||
sudo docker run --name kvm --privileged -e CONFIG_FILE=/userdata/config.yaml -v $PWD/examples/config.yaml:/userdata/config.yaml dghubble/coreos-kvm
|
||||
|
||||
# ignition
|
||||
sudo docker run --name kvm --privileged -e IGNITION_CONFIG_FILE=/userdata/ignition.json -v $PWD/examples/ignition.json:/userdata/ignition.json dghubble/coreos-kvm
|
||||
|
||||
# cloud-config
|
||||
sudo docker run --name kvm --privileged -e CLOUD_CONFIG_FILE=/userdata/cloud.yaml -v $PWD/examples/cloud.yaml:/userdata/cloud.yaml dghubble/coreos-kvm
|
||||
|
||||
Remove the container from another terminal.
|
||||
|
||||
sudo docker stop kvm
|
||||
sudo docker rm kvm
|
||||
Loading…
Add table
Add a link
Reference in a new issue