summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Dodson <sdodson@redhat.com>2017-07-24 19:08:29 -0400
committerGitHub <noreply@github.com>2017-07-24 19:08:29 -0400
commitd3af493cb3e67c1877dac8cf92e4cad256fe452b (patch)
tree8c040d0976b5b903a3812deff18ea29cfc67a8d3
parente35719849e536dc32602d34d3518e53f38570a51 (diff)
parent04b1c99fd2b769979adf019fe064bc4ba601ef97 (diff)
downloadopenshift-d3af493cb3e67c1877dac8cf92e4cad256fe452b.tar.gz
openshift-d3af493cb3e67c1877dac8cf92e4cad256fe452b.tar.bz2
openshift-d3af493cb3e67c1877dac8cf92e4cad256fe452b.tar.xz
openshift-d3af493cb3e67c1877dac8cf92e4cad256fe452b.zip
Merge pull request #4846 from dcbw/libvirt-fixups
libvirt fixups
-rw-r--r--README_libvirt.md8
-rw-r--r--playbooks/libvirt/openshift-cluster/tasks/launch_instances.yml6
2 files changed, 12 insertions, 2 deletions
diff --git a/README_libvirt.md b/README_libvirt.md
index c523d83fb..1661681a0 100644
--- a/README_libvirt.md
+++ b/README_libvirt.md
@@ -15,7 +15,7 @@ Install dependencies
3. Install [ebtables](http://ebtables.netfilter.org/)
4. Install [qemu and qemu-system-x86](http://wiki.qemu.org/Main_Page)
5. Install [libvirt-python and libvirt](http://libvirt.org/)
-6. Install [genisoimage](http://cdrkit.org/)
+6. Install [genisoimage](http://cdrkit.org/) or [mkisofs](http://cdrtools.sourceforge.net/private/cdrecord.html)
7. Enable and start the libvirt daemon, e.g:
- `systemctl enable libvirtd`
- `systemctl start libvirtd`
@@ -23,6 +23,7 @@ Install dependencies
9. Check that your `$HOME` is accessible to the qemu user²
10. Configure dns resolution on the host³
11. Install libselinux-python
+12. Ensure you have an SSH private and public keypair at `~/.ssh/id_rsa` and `~/.ssh/id_rsa.pub`⁴
#### ¹ Depending on your distribution, libvirt access may be denied by default or may require a password at each access.
@@ -103,6 +104,11 @@ sudo vi /etc/NetworkManager/dnsmasq.d/libvirt_dnsmasq.conf
server=/example.com/192.168.55.1
```
+#### ⁴ Private and public keypair in ~/.ssh/id_rsa and ~/.ssh/id_rsa.pub
+
+This playbook uses SSH keys to communicate with the libvirt-driven virtual machines. At this time the names of those keys are fixed and cannot be changed.
+
+
Test The Setup
--------------
diff --git a/playbooks/libvirt/openshift-cluster/tasks/launch_instances.yml b/playbooks/libvirt/openshift-cluster/tasks/launch_instances.yml
index ccd29be29..f445206ef 100644
--- a/playbooks/libvirt/openshift-cluster/tasks/launch_instances.yml
+++ b/playbooks/libvirt/openshift-cluster/tasks/launch_instances.yml
@@ -49,8 +49,12 @@
- '{{ instances }}'
- [ user-data, meta-data ]
+- name: Check for genisoimage
+ command: which genisoimage
+ register: which_genisoimage
+
- name: Create the cloud-init config drive
- command: 'genisoimage -output {{ libvirt_storage_pool_path }}/{{ item }}_cloud-init.iso -volid cidata -joliet -rock user-data meta-data'
+ command: '{{ 'genisoimage' if which_genisoimage.rc == 0 else 'mkisofs'}} -output {{ libvirt_storage_pool_path }}/{{ item }}_cloud-init.iso -volid cidata -joliet -rock user-data meta-data'
args:
chdir: '{{ libvirt_storage_pool_path }}/{{ item }}_configdrive/'
creates: '{{ libvirt_storage_pool_path }}/{{ item }}_cloud-init.iso'