Created
December 16, 2016 10:01
-
-
Save dirkmueller/48f8058b7f8f66e3cd0942f84c1235d8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!1 Requirements | |
Before you even start working with mkcloud, you should be aware that you will need: | |
* a lot of patience ;) | |
* installation DVD iso for SLE-12-SP2 (https://download.suse.com/Download?buildid=sl4IW_HRfKs%7E) (if link does not work, please use official beta program web site: https://www.suse.com/de-de/support/beta-program/beta) | |
* installation DVD iso for SUSE-CLOUD-7 (you can find link here: http://beta.suse.com/private/SUSE-CLOUD/beta/) | |
* qcow2 image with SLE-12-SP2 installed (more details will follow) | |
* qcow2 image file with manila-service-image (https://github.com/uglide/manila-image-elements/releases/download/0.1.0/manila-service-image.qcow2) | |
* mkcloud script (https://github.com/SUSE-Cloud/automation) | |
* host machine with qemu and libvirt installed and working (it is highly recommended to have some KVM GUI, like virtual machine manager) | |
* host machine with http server at port 80 (using other ports maybe possible, but then a lot of changes may be required in the mkcloud script) | |
* host machine running NFS server with /srv as root directory | |
* host machine with at least 100GB free disc space and lots of RAM (for me 32GB was enough, probably 16GB would do the trick) | |
* root access to the host machine | |
* public-private key pair generated for the root user (for password-less authentication to SSH) | |
!2 Host Operating System | |
I've installed SUSE Cloud with mkcloud running Ubuntu 16.04. I believe, mkcloud could work (only a little bit) better running on SUSE/OpenSUSE. So if you have choice for it. If not, you should still be able to install SUSE Cloud. | |
!2 SLES12-SP2.qcow2 | |
This should be an image of basic SUSE Server 12 with Service Pack 2. In order to create one, you need to: | |
# create a new KVM virtual machine (use qcow2 format for disc) | |
# install SLES (there should be an option of 'KVM Guest' or something similar) | |
# use 'linux' for the root password | |
# after installation, make sure that firewall is disabled and password authentication is enabled for SSH (PasswordAuthentication yes) | |
# turn off the machine - your qcow2 image is ready now | |
(Alternatively ask Jakub for the image file). | |
!1 Installation | |
!2 SUSE Cloud environment | |
The reference deployment of SUSE Cloud consists of 3 nodes: | |
* admin node - this node runs crowbar, which controls remaining nodes | |
* OpenStack control node - horizon, keystone, database, glance, rabbitmq and so on run on this node | |
* OpenStack compute node - nova/swift/cinder etc. | |
(As a matter of fact, it should be possible to run more than 1 compute node, but this has not been tested.) | |
All the nodes are virtual machines running on the host machine by means of KVM. | |
!2 Installation overview | |
First, the admin node is being installed using SLES12-SP2.qcow2 image. This image is used to start a virtual machine, and then crowbar is installed and configured there. | |
Control and compute nodes are installed via PXE and autoyast. Admin node works as TFTP boot server, and other nodes connect to it on boot. Then, automatic SLES installation is started on these nodes. Note: these nodes are installed from SLES installation ISO and not form the qcow2 image. | |
OpenStack nodes are configured by Crowbar. | |
!2 Step 1: changes in mkcloud script | |
In order to make mkcloud run I had to do the following modifications: | |
!3 automation/scripts/lib/libvirt/templates/cpu-intel.xml | |
{{{diff --git a/scripts/lib/libvirt/templates/cpu-intel.xml b/scripts/lib/libvirt/templates/cpu-intel.xml | |
index d26ccef..d22f8be 100644 | |
--- a/scripts/lib/libvirt/templates/cpu-intel.xml | |
+++ b/scripts/lib/libvirt/templates/cpu-intel.xml | |
@@ -3,7 +3,6 @@ | |
<apic/> | |
<pae/> | |
</features> | |
- <cpu mode='custom' match='exact'> | |
- <model fallback='allow'>core2duo</model> | |
+ <cpu mode='host-passthrough' match='exact'> | |
<feature policy='require' name='vmx'/> | |
</cpu> | |
}}} | |
!3 automation/scripts/lib/mkcloud-libvirt.sh | |
Note: these changes may not be required for SUSE/openSUSE host systems | |
{{{diff --git a/scripts/lib/mkcloud-libvirt.sh b/scripts/lib/mkcloud-libvirt.sh | |
index 3a9dfac..f42524b 100644 | |
--- a/scripts/lib/mkcloud-libvirt.sh | |
+++ b/scripts/lib/mkcloud-libvirt.sh | |
@@ -27,7 +27,7 @@ function workaround_bsc928384() | |
# Returns success if the config was changed | |
function libvirt_configure_libvirtd() | |
{ | |
- chkconfig libvirtd on | |
+# chkconfig libvirtd on | |
local changed= | |
@@ -35,7 +35,7 @@ function libvirt_configure_libvirtd() | |
confset /etc/libvirt/libvirtd.conf listen_tcp 1 && changed=y | |
confset /etc/libvirt/libvirtd.conf listen_addr '"0.0.0.0"' && changed=y | |
confset /etc/libvirt/libvirtd.conf auth_tcp '"none"' && changed=y | |
- workaround_bsc928384 && changed=y | |
+ # workaround_bsc928384 && changed=y | |
[ -n "$changed" ] | |
} | |
@@ -93,7 +93,7 @@ function libvirt_prepare() | |
{ | |
# libvirt | |
libvirt_modprobe_kvm | |
- libvirt_start_daemon | |
+# libvirt_start_daemon | |
# network | |
${mkcloud_lib_dir}/libvirt/net-config $cloud $cloudbr $admingw $adminnetmask $cloudfqdn $adminip $forwardmode > /tmp/$cloud-admin.net.xml | |
}}} | |
!3 automation/scripts/mkcloud | |
{{{diff --git a/scripts/mkcloud b/scripts/mkcloud | |
index 63a84f5..59f937f 100755 | |
--- a/scripts/mkcloud | |
+++ b/scripts/mkcloud | |
@@ -437,7 +437,7 @@ function onhost_deploy_image() | |
safely qemu-img convert -t none -O raw -S 0 -p $image $disk | |
popd | |
- resize_partition $disk | |
+ #resize_partition $disk | |
} | |
function onhost_add_etchosts_entries() | |
}}} | |
!2 Step 2: LVM config | |
mkcloud script requires some specific settings to be applied to LVM config. One needs to change filter option in /etc/lvm/lvm.conf: | |
{{{filter = [ "r|/dev/mapper/cloud-|", "r|/dev/cloud/|", "r|/dev/disk/by-id/|", "a|.*/|" ] | |
}}} | |
!2 Step 3: HTTP server data | |
{{{$ tree /var/www/html/ | |
/var/www/html/ | |
├── ibs | |
│ └── SUSE: | |
│ └── SLE-12-SP2: | |
│ └── Update: | |
│ └── Products: | |
│ └── Cloud7 | |
│ └── images | |
│ └── iso | |
│ └── SUSE-OPENSTACK-CLOUD-7-x86_64-Beta3-Media1.iso | |
├── images | |
│ ├── other | |
│ │ └── manila-service-image.qcow2 | |
│ └── x86_64 | |
│ └── SLES12-SP2.qcow2 | |
├── index.html | |
└── repos -> /srv/nfs/repos/x86_64/ | |
}}} | |
!2 Step 4: NFS server data | |
Please follow (X) marks and read details | |
{{{$ tree /srv/nfs/ -d -L 3 | |
/srv/nfs/ | |
├── repos | |
│ └── x86_64 | |
│ ├── Cloud (1) | |
│ ├── SLES12-SP1-Pool -> /srv/nfs/suse-12.1/x86_64/install | |
│ ├── SLES12-SP1-Updates -> SLES12-SP1-Pool | |
│ ├── SLES12-SP2-Pool -> /srv/nfs/suse-12.2/x86_64/install | |
│ └── SLES12-SP2-Updates -> SLES12-SP2-Pool | |
├── suse-12.1 | |
│ ├── aarch64 -> x86_64 | |
│ ├── s390x -> x86_64 | |
│ └── x86_64 (2) | |
└── suse-12.2 | |
├── aarch64 -> x86_64 | |
├── s390x -> x86_64 | |
└── x86_64 | |
└── install (3) | |
}}} | |
# copy of the SUSE-CLOUD iso content | |
# empty directory | |
# copy of the SLES12-SP2 install iso content | |
Note: in order to copy ISO content, please mount ISO image as loop device. Otherwise, you may end up with invalid data. | |
!2 Step 5: configure mkcloud script | |
mkcloud documentation mentions that there are some environment variables that must be set for the mkcloud to work. However, these does not seem to be very accurate. For me the following set of env vars did the trick: | |
{{{$ cat runmkcloud.sh | |
export cloudpv="/dev/loop0" | |
export cloudsource="susecloud7" | |
export clouddata="192.168.124.1" | |
#export debug_mkcloud=1 | |
#export debug_qa_crowbarsetup=1 | |
export susedownload="192.168.124.1" | |
../automation/scripts/mkcloud "$@" | |
}}} | |
Note: 192.168.124.1 is the IP address of the host machine, which should be configured automatically by the mkcloud script. You should not need to change it. | |
!2 Step 6: follow the mkcloud documentation | |
https://github.com/SUSE-Cloud/automation/blob/master/docs/mkcloud.md In short (I suggest run all of these as root): | |
{{{fallocate -l 80G mkcloud.disk | |
losetup -f mkcloud.disk | |
./runmkcloud.sh setuphost | |
./runmkcloud.sh plain | |
}}} | |
This should take around 20-30 minutes to complete. However, you should keep track of the installation process, as there is some manual action required: when the OpenStack nodes are deployed and SLES is being installed, it fails to access Registration and Update servers. You should access these nodes via vncviewer (I used Virtual Machine Manager) and click 'OK' twice for each of the machines. | |
!2 Step 7: enjoy your SUSE Cloud installation | |
After successful installation, you should be able to: | |
# access crowbar at http://192.168.124.10 (credentials: crowbar/crowbar) | |
# access Horizon at http://192.168.124.81 (credentials: crowbar/crowbar) | |
# access every node via SSH with your private key | |
!2 Step 8: fix Horizon theme | |
There is a known-issue for SUSE Cloud Beta 3: | |
> | |
>OpenStack dashboard theming is broken (bsc#989691). As a workaround, call "openstack-dashboard-theme-install" from the node where the dashboard is running. | |
!1 Summary | |
SUSE Cloud 7 was successfully installed, however, it took quite some time and lots of reverse-engineering ;) | |
So far was able to identify the following issues with the installation: | |
# it seems that there should be two virtual networks configured to access OpenStack: 'admin' network with ip 192.168.124.* and 'public' network with ip 192.168.122.*. The other network does not work, and as a result I was unable to access vnc display of a virtual machine run within OpenStack |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment