Meego Wiki
Views
From MeeGo wiki
(Difference between revisions)
Jump to: navigation, search
(Using any linux distro and lvm tools)
 
(19 intermediate revisions not shown)
Line 1: Line 1:
-
==Using the OBS Appliance==
+
=Setup of the OBS Appliance=
-
The OBS Appliance provides an easy and scalable way to start using OBS. This setup scales from workstation only to workgroup size and allows migration to enterprize size lateron.
+
The OBS Appliance provides an easy and scalable way to start using OBS. This setup scales from workstation only to workgroup-size and allows migration to enterprise-size lateron.
Prerequisites:  
Prerequisites:  
Hardware:
Hardware:
-
* recent CPU                 (with vmx/smt , 64bit is plus but currently no requirement)
+
    min              recommended
-
* >= 4GB RAM                 (the more the better!)
+
* recent CPU           quadcore/HT    (with vmx/smt , 64bit is plus but currently no requirement)
-
* fast disks
+
* >= 4GB RAM             12GB          (the more the better!)
-
* 30GB diskspace             (initial footprint is < 4GB , but scales depending on use)
+
* fast disks         fast disks/ssd   
 +
* 100GB diskspace     500GB raid1    (initial footprint is < 4GB , but scales depending on use)
   
   
Software
Software
Line 16: Line 17:
* OBS Data storage disk with LVM volumes                  (we'll setup, this is YOUR data store)
* OBS Data storage disk with LVM volumes                  (we'll setup, this is YOUR data store)
* openSUSE 11.4 live cd                                  (for LVM volume setup)
* openSUSE 11.4 live cd                                  (for LVM volume setup)
-
* network with dhcp                                      (required!)
+
* network with dhcp                                      (required for appliance!)
* network with dns-server and dhcp client resolution      (option)
* network with dns-server and dhcp client resolution      (option)
The steps on this tutorial were collected on an openSUSE 11.3 system.
The steps on this tutorial were collected on an openSUSE 11.3 system.
-
=== Fetching needed files ===
+
== Fetching needed files ==
Lets create a folder "obs-appliance-downloads".
Lets create a folder "obs-appliance-downloads".
Line 27: Line 28:
  cd ~/obs-appliance-downloads
  cd ~/obs-appliance-downloads
-
==== VirtualBox ====
+
=== VirtualBox ===
Install VirtualBox (as root) for your Distribution from http://www.virtualbox.org/wiki/Linux_Downloads
Install VirtualBox (as root) for your Distribution from http://www.virtualbox.org/wiki/Linux_Downloads
-
or use your package manager to install VirtualBox. At time of writing, VirtualBox 4.0.4 was used.
+
or use your package manager to install VirtualBox. At the time of writing, VirtualBox 4.0.4 was used.
-
==== OBS Appliance ====
+
=== OBS Appliance ===
The openSUSE Build Service Appliance is developed and hosted by the openSUSE project.
The openSUSE Build Service Appliance is developed and hosted by the openSUSE project.
Line 46: Line 47:
-
At the time of writing (--[[User:Jsmoeller|Jsmoeller]] 14:57, 21 March 2011 (UTC)) we used:
+
At the time of writing (--[[User:Jsmoeller|Jsmoeller]] 21:34, 23 March 2011 (UTC)) we used:
-
  wget -nd "http://download.opensuse.org/repositories/openSUSE:/Tools:/Unstable/images/obs-server.x86_64-2.2.60-Build17.1-vmx.tar.bz2"
+
  wget -nd "http://download.opensuse.org/repositories/openSUSE:/Tools:/Unstable/images/obs-server.x86_64-2.2.72-Build1.2-vmx.tar.bz2"
  #
  #
  # ATTENTION !  link changes !
  # ATTENTION !  link changes !
-
==== openSUSE 11.4 live cd ====
+
=== openSUSE 11.4 live cd (optional) ===
For the initial setup of the data storage LVM disk, we use openSUSE 11.4 with yast2 . If you know how to do this with $YOUR_DISTRO, you can replicate the steps.
For the initial setup of the data storage LVM disk, we use openSUSE 11.4 with yast2 . If you know how to do this with $YOUR_DISTRO, you can replicate the steps.
Line 57: Line 58:
  wget -nd "http://download.opensuse.org/distribution/11.4/iso/openSUSE-11.4-KDE-LiveCD-i686.iso"
  wget -nd "http://download.opensuse.org/distribution/11.4/iso/openSUSE-11.4-KDE-LiveCD-i686.iso"
-
 
+
== Creating the virtual machine ==
-
=== Creating the virtual machine ===
+
Make sure the vboxdrv is loaded and all needed components installed for VirtualBox to run!
Make sure the vboxdrv is loaded and all needed components installed for VirtualBox to run!
Line 75: Line 75:
[[File:Obs_appliance_vbox_tutorial_3_wizard1.png|600x400px|center|VirtualBox New Appliance wizard page 2]]
[[File:Obs_appliance_vbox_tutorial_3_wizard1.png|600x400px|center|VirtualBox New Appliance wizard page 2]]
-
Click on "Next" and assign ~3G RAM (as always, more is better ;) ).
+
Click on "Next" and assign ~3G RAM (as always, more is better ;) - it should work with 2G ).
[[File:Obs_appliance_vbox_tutorial_3_wizard3.png|600x400px|center|VirtualBox New Appliance wizard page 3]]
[[File:Obs_appliance_vbox_tutorial_3_wizard3.png|600x400px|center|VirtualBox New Appliance wizard page 3]]
 +
Click on "Next". Now, select to create a new disk:
 +
[[File:Obs_appliance_vbox_tutorial_3_wizard4.png|600x400px|center|VirtualBox New Appliance wizard page 4]]
-
=== Creating the persistent LVM data storage ===
+
Click on "Next" - this will open a new wizard to create a disk image:
 +
 
 +
We'll use a "Dynamically expanding storage" sized 100 GB (your choice - min is ~20GB).
 +
 
 +
[[File:Obs_appliance_vbox_tutorial_4_diskwizard1.png|600x400px|center|VirtualBox New disk wizard page 1]]
 +
 
 +
[[File:Obs_appliance_vbox_tutorial_4_diskwizard2.png|600x400px|center|VirtualBox New disk wizard page 2]]
 +
 
 +
[[File:Obs_appliance_vbox_tutorial_4_diskwizard3a.png|600x400px|center|VirtualBox New disk wizard page 3]]
 +
 
 +
[[File:Obs_appliance_vbox_tutorial_4_diskwizard4a.png|600x400px|center|VirtualBox New disk wizard page 4]]
 +
 
 +
"Finish" will take us back to the first wizard which holds the summary of our new appliance:
 +
 
 +
[[File:Obs_appliance_vbox_tutorial_5_appliance_summary_a.png|600x400px|center|VirtualBox New Appliance Summary]]
 +
 
 +
Click on Finish. Your new appliance is now ready.
 +
 
 +
[[File:Obs_appliance_vbox_tutorial_6_appliance_ready.png|600x400px|center|VirtualBox New Appliance Summary]]
 +
 
 +
In the next step, we'll boot up once into the live system to create the persistent storage partitions.
 +
 
 +
== Creating the persistent LVM data storage ==
 +
 
 +
=== Using the openSUSE KDE livecd ===
First step is to create your persistent data storage which is hosted on a set of logical volumes of a "OBS" volume group.
First step is to create your persistent data storage which is hosted on a set of logical volumes of a "OBS" volume group.
 +
 +
To do this, we add temporarily the downloaded live-cd to the appliance.
 +
 +
Edit the storage settings and select the downloaded iso file located in ~/obs-appliance-downloads/openSUSE-11.4-KDE-LiveCD-i686.iso .
 +
 +
[[File:Obs_appliance_vbox_tutorial_7_edit_cdrom_settings.png|600x400px|center|Storage setting]]
 +
 +
 +
[[File:Obs_appliance_vbox_tutorial_8_edit_cdrom_settings_done.png|600x400px|center|Storage settings edited]]
 +
 +
 +
We are ready to start up the appliance and configure the disk - please boot up the appliance now.
 +
 +
The LVM disk setup looks like:
 +
 +
  OBS                    -  volume group name
 +
  |
 +
  +--- server          -  backend and data store    -  90GB
 +
  |
 +
  +--- worker_root_1    -  1st worker root drive    -  8GB
 +
  +--- worker_swap_1    -  1st worker swap drive    -  1GB
 +
  |
 +
  +--- cache            -  package cache            -  1GB
 +
 +
 +
 +
'''Video: [[File:Create_partitions4.ogv]]'''
 +
 +
 +
 +
After this is done: remove the cd again from the storage settings!
 +
 +
[[File:Obs_appliance_vbox_tutorial_10_remove_livecd.png|600x400px|center|Remove livecd]]
 +
 +
=== Using any linux distro and lvm tools ===
 +
 +
Boot up linux in the VM and execute these commands as root (assuming the disk is /dev/sda - adapt to your setup)
 +
 +
vgcreate OBS /dev/sda
 +
lvscan
 +
 +
lvcreate -l 90%VG -n server OBS
 +
lvcreate -l 08%VG -n worker_root_1 OBS
 +
lvcreate -l 01%VG -n worker_swap_1 OBS
 +
lvcreate -l 01%VG -n cache OBS
 +
 +
lvscan
 +
 +
mkfs.ext3 /dev/OBS/server
 +
mkfs.ext3 /dev/OBS/worker_root_1
 +
mkfs.ext3 /dev/OBS/cache
 +
mkswap /dev/OBS/worker_swap_1
 +
 +
Note: Adding more workers to this single host is as easy as adding more worker_root_* and worker_swap_* logical volumes.
 +
For two workers this would look like:
 +
 +
vgcreate OBS /dev/sda
 +
lvscan
 +
 +
lvcreate -l 81%VG -n server OBS
 +
lvcreate -l 08%VG -n worker_root_1 OBS
 +
lvcreate -l 01%VG -n worker_swap_1 OBS
 +
lvcreate -l 08%VG -n worker_root_2 OBS
 +
lvcreate -l 01%VG -n worker_swap_2 OBS
 +
lvcreate -l 01%VG -n cache OBS
 +
 +
lvscan
 +
 +
mkfs.ext3 /dev/OBS/server
 +
mkfs.ext3 /dev/OBS/worker_root_1
 +
mkfs.ext3 /dev/OBS/worker_root_2
 +
mkfs.ext3 /dev/OBS/cache
 +
mkswap /dev/OBS/worker_swap_1
 +
mkswap /dev/OBS/worker_swap_2
 +
 +
== Adding the appliance disk image to the virtual machine ==
 +
 +
Before adding the appliance to the storage settings, we need to move the volume group to sata port 1.
 +
 +
[[File:Obs_appliance_vbox_tutorial_11_move_storage_to_sataport1.png|600x400px|center|Move to sata1]]
 +
 +
Then we add another disk and select "use existing disk" and point to the downloaded appliance.
 +
 +
 +
[[File:Obs_appliance_vbox_tutorial_11_add_new_harddisk.png|600x400px|center|Add new harddisk]]
 +
 +
[[File:Obs_appliance_vbox_tutorial_12_choose_existing.png|600x400px|center|Choose existing disk]]
 +
 +
[[File:Obs_appliance_vbox_tutorial_13_choose_appliance.png|600x400px|center|Choose appliance]]
 +
 +
[[File:Obs_appliance_vbox_tutorial_14_overview_settings.png|600x400px|center|Overview settings]]
 +
 +
 +
 +
----
 +
 +
'''Important:'''
 +
'''Make sure, the network interface is using "bridged" mode and is connected to a working network interface with dhcp!'''
 +
 +
----
 +
 +
[[File:Obs_appliance_vbox_tutorial_15_bridged_network.png|600x400px|center|Bridged network]]
 +
 +
== Booting up the appliance ==
 +
 +
Now we're ready to boot up the OBS appliance! Start it and wait for the initial setup to complete (might take some time).
 +
 +
'''Video: [[File:Startup_appliance.ogv]]
 +
 +
= Using the OBS Appliance =
 +
 +
== Setup interlinks ==
 +
 +
== First package, first build ==

Latest revision as of 13:33, 19 April 2011

Contents

Setup of the OBS Appliance

The OBS Appliance provides an easy and scalable way to start using OBS. This setup scales from workstation only to workgroup-size and allows migration to enterprise-size lateron.

Prerequisites:

Hardware:

    min               recommended
* recent CPU           quadcore/HT     (with vmx/smt , 64bit is plus but currently no requirement)
* >= 4GB RAM             12GB          (the more the better!)
* fast disks          fast disks/ssd    
* 100GB diskspace      500GB raid1     (initial footprint is < 4GB , but scales depending on use)

Software

  • VirtualBox (or VMware / Qemu , but instructions are VirtualBox-centric atm)
  • OBS Appliance (will be downloaded in the tutorial)
  • OBS Data storage disk with LVM volumes (we'll setup, this is YOUR data store)
  • openSUSE 11.4 live cd (for LVM volume setup)
  • network with dhcp (required for appliance!)
  • network with dns-server and dhcp client resolution (option)

The steps on this tutorial were collected on an openSUSE 11.3 system.

Fetching needed files

Lets create a folder "obs-appliance-downloads".

mkdir -p ~/obs-appliance-downloads
cd ~/obs-appliance-downloads

VirtualBox

Install VirtualBox (as root) for your Distribution from http://www.virtualbox.org/wiki/Linux_Downloads or use your package manager to install VirtualBox. At the time of writing, VirtualBox 4.0.4 was used.

OBS Appliance

The openSUSE Build Service Appliance is developed and hosted by the openSUSE project. We use the "vmx.tar.bz2" image.

The latest stable version is available here:

http://download.opensuse.org/repositories/openSUSE:/Tools/images/

The latest unstable version is available here:

http://download.opensuse.org/repositories/openSUSE:/Tools:/Unstable/images/


At the time of writing (--Jsmoeller 21:34, 23 March 2011 (UTC)) we used:

wget -nd "http://download.opensuse.org/repositories/openSUSE:/Tools:/Unstable/images/obs-server.x86_64-2.2.72-Build1.2-vmx.tar.bz2"
#
# ATTENTION !  link changes !

openSUSE 11.4 live cd (optional)

For the initial setup of the data storage LVM disk, we use openSUSE 11.4 with yast2 . If you know how to do this with $YOUR_DISTRO, you can replicate the steps. The livecd can be downloaded here:

wget -nd "http://download.opensuse.org/distribution/11.4/iso/openSUSE-11.4-KDE-LiveCD-i686.iso"

Creating the virtual machine

Make sure the vboxdrv is loaded and all needed components installed for VirtualBox to run!

Fire up VirtualBox:

VirtualBox
VirtualBox welcome screen

Create a new Appliance (click "New" on top left)

VirtualBox New Appliance wizard

Click on "Next" and fill in the name of the new appliance. OS is "Linux" and Version is "openSUSE(64 bit)".

Note: We'll use 64bit, but currently for MeeGo the 32bit Appliance would work, too.

VirtualBox New Appliance wizard page 2

Click on "Next" and assign ~3G RAM (as always, more is better ;) - it should work with 2G ).

VirtualBox New Appliance wizard page 3

Click on "Next". Now, select to create a new disk:

VirtualBox New Appliance wizard page 4

Click on "Next" - this will open a new wizard to create a disk image:

We'll use a "Dynamically expanding storage" sized 100 GB (your choice - min is ~20GB).

VirtualBox New disk wizard page 1
VirtualBox New disk wizard page 2
VirtualBox New disk wizard page 3
VirtualBox New disk wizard page 4

"Finish" will take us back to the first wizard which holds the summary of our new appliance:

VirtualBox New Appliance Summary

Click on Finish. Your new appliance is now ready.

VirtualBox New Appliance Summary

In the next step, we'll boot up once into the live system to create the persistent storage partitions.

Creating the persistent LVM data storage

Using the openSUSE KDE livecd

First step is to create your persistent data storage which is hosted on a set of logical volumes of a "OBS" volume group.

To do this, we add temporarily the downloaded live-cd to the appliance.

Edit the storage settings and select the downloaded iso file located in ~/obs-appliance-downloads/openSUSE-11.4-KDE-LiveCD-i686.iso .

Storage setting


Storage settings edited


We are ready to start up the appliance and configure the disk - please boot up the appliance now.

The LVM disk setup looks like:

 OBS                    -  volume group name
  |
  +--- server           -  backend and data store    -  90GB
  |
  +--- worker_root_1    -  1st worker root drive     -  8GB
  +--- worker_swap_1    -  1st worker swap drive     -  1GB
  |
  +--- cache            -  package cache             -  1GB


Video: File:Create partitions4.ogv


After this is done: remove the cd again from the storage settings!

Remove livecd

Using any linux distro and lvm tools

Boot up linux in the VM and execute these commands as root (assuming the disk is /dev/sda - adapt to your setup)

vgcreate OBS /dev/sda
lvscan

lvcreate -l 90%VG -n server OBS
lvcreate -l 08%VG -n worker_root_1 OBS
lvcreate -l 01%VG -n worker_swap_1 OBS
lvcreate -l 01%VG -n cache OBS

lvscan

mkfs.ext3 /dev/OBS/server
mkfs.ext3 /dev/OBS/worker_root_1
mkfs.ext3 /dev/OBS/cache
mkswap /dev/OBS/worker_swap_1

Note: Adding more workers to this single host is as easy as adding more worker_root_* and worker_swap_* logical volumes. For two workers this would look like:

vgcreate OBS /dev/sda
lvscan

lvcreate -l 81%VG -n server OBS
lvcreate -l 08%VG -n worker_root_1 OBS
lvcreate -l 01%VG -n worker_swap_1 OBS
lvcreate -l 08%VG -n worker_root_2 OBS
lvcreate -l 01%VG -n worker_swap_2 OBS
lvcreate -l 01%VG -n cache OBS

lvscan

mkfs.ext3 /dev/OBS/server
mkfs.ext3 /dev/OBS/worker_root_1
mkfs.ext3 /dev/OBS/worker_root_2
mkfs.ext3 /dev/OBS/cache
mkswap /dev/OBS/worker_swap_1
mkswap /dev/OBS/worker_swap_2

Adding the appliance disk image to the virtual machine

Before adding the appliance to the storage settings, we need to move the volume group to sata port 1.

Move to sata1

Then we add another disk and select "use existing disk" and point to the downloaded appliance.


Add new harddisk
Choose existing disk
Choose appliance
Overview settings



Important: Make sure, the network interface is using "bridged" mode and is connected to a working network interface with dhcp!


Bridged network

Booting up the appliance

Now we're ready to boot up the OBS appliance! Start it and wait for the initial setup to complete (might take some time).

Video: File:Startup appliance.ogv

Using the OBS Appliance

Setup interlinks

First package, first build

Personal tools