Skip to content

Instantly share code, notes, and snippets.

@adammhaile
Last active June 21, 2017 15:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adammhaile/cf7643feedb971566d6e4046f5b60f93 to your computer and use it in GitHub Desktop.
Save adammhaile/cf7643feedb971566d6e4046f5b60f93 to your computer and use it in GitHub Desktop.
# build kvm image
docker build https://github.com/BBVA/kvm.git -t bbva/kvm:latest
# generate cloud-init init.iso
genisoimage -output /tmp/init.iso -volid cidata -joliet -rock ./user-data ./meta-data
# download latest atomic qcow image
curl https://ci.centos.org/artifacts/fedora-atomic/rawhide/images/latest-atomic.qcow2 --output /tmp/latest-atomic.qcow2
# run the KVM container with atomic qcow
docker run \
--name atomic-test \
-td \
--privileged \
--network=bridge \
-p 2222:22 \
-v /tmp/latest-atomic.qcow2:/image/image \
-v /tmp/init.iso:/image/init.iso \
-e AUTO_ATTACH=yes \
bbva/kvm:latest \
-cdrom /image/init.iso
docker attach atomic-test 2>&1 | tee /tmp/attach.log;
instance-id: atomic-test
local-hostname: atomic-test.redhat.com
#cloud-config
users:
- default
- name: iits
sudo: ALL=(ALL) NOPASSWD:ALL
ssh_pwauth: True
lock_passwd: False
passwd: $6$asldkfjasdfljasd$8cjavXDkPJ8E9UAW6ZRfhCJ85tapMTpUtLQebrix.OYA1ZZFonIs52z3J7kF/AtGq1CB7MrsCCxe0NquX3.MC1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment