Implement: Fuel install QEMU

Closes-Bug:#1507878

Change-Id: I5762f236e6a040836f26bcc13ee96f76a2c2c33f
Signed-off-by: lingyu1 <ling.y.yu@intel.com>
This commit is contained in:
lingyu1 2015-12-09 01:09:05 +08:00
parent 8507e55d5e
commit 48a509d98d
4 changed files with 47 additions and 7 deletions

View File

@ -5,17 +5,36 @@ if $operatingsystem == 'Ubuntu' {
}
package { 'qemu-utils':
ensure => "${qemu_version}",
require => Package['qemu-block-extra'],
}
package { 'qemu-system':
package { 'qemu-system-common':
ensure => "${qemu_version}",
}
package { 'qemu-system-arm':
ensure => "${qemu_version}",
}
package { 'qemu-system-mips':
ensure => "${qemu_version}",
}
package { 'qemu-system-misc':
ensure => "${qemu_version}",
}
package { 'qemu-system-sparc':
ensure => "${qemu_version}",
}
package { 'qemu-system-x86':
ensure => "${qemu_version}",
}
package { 'qemu-system-ppc':
ensure => "${qemu_version}",
}
package { 'qemu-user':
ensure => "${qemu_version}",
}
package { 'qemu':
ensure => "${qemu_version}",
require => Package['qemu-utils','qemu-system','qemu-user'],
}
package { 'qemu-system':
ensure => "${qemu_version}",
}
package { 'qemu':
ensure => "${qemu_version}",
}
} elsif $operatingsystem == 'CentOS' {
}

View File

@ -5,9 +5,21 @@ set -eux
BUILD_FOR=${BUILD_FOR:-ubuntu}
DIR="$(dirname `readlink -f $0`)"
INCLUDE_DEPENDENCIES=${INCLUDE_DEPENDENCIES:-true}
function download_dependencies {
if [ "$INCLUDE_DEPENDENCIES" = true ]
then
wget --content-disposition -N -i "${DIR}/qemu_package/${1}/dependencies.txt"
fi
}
function build_pkg {
case $1 in
ubuntu)
pushd "${DIR}/repositories/${1}/"
download_dependencies ${1}
popd
cd ${DIR}/qemu
sudo docker build -t qemu .
container_id=`sudo docker run -d qemu`
@ -16,6 +28,13 @@ function build_pkg {
sudo docker cp $container_id:/qemu-utils_2.4+dfsg-4ubuntu1_amd64.deb ${DIR}/repositories/ubuntu/
sudo docker cp $container_id:/qemu_2.4+dfsg-4ubuntu1_amd64.deb ${DIR}/repositories/ubuntu/
sudo docker cp $container_id:/qemu-user_2.4+dfsg-4ubuntu1_amd64.deb ${DIR}/repositories/ubuntu/
sudo docker cp $container_id:/qemu-system-arm_2.4+dfsg-4ubuntu1_amd64.deb ${DIR}/repositories/ubuntu/
sudo docker cp $container_id:/qemu-system-common_2.4+dfsg-4ubuntu1_amd64.deb ${DIR}/repositories/ubuntu/
sudo docker cp $container_id:/qemu-system-mips_2.4+dfsg-4ubuntu1_amd64.deb ${DIR}/repositories/ubuntu/
sudo docker cp $container_id:/qemu-system-misc_2.4+dfsg-4ubuntu1_amd64.deb ${DIR}/repositories/ubuntu/
sudo docker cp $container_id:/qemu-system-ppc_2.4+dfsg-4ubuntu1_amd64.deb ${DIR}/repositories/ubuntu/
sudo docker cp $container_id:/qemu-system-sparc_2.4+dfsg-4ubuntu1_amd64.deb ${DIR}/repositories/ubuntu/
sudo docker cp $container_id:/qemu-system-x86_2.4+dfsg-4ubuntu1_amd64.deb ${DIR}/repositories/ubuntu/
;;
*) echo "Not supported system"; exit 1;;
esac

View File

@ -0,0 +1,2 @@
http://archive.ubuntu.com/ubuntu/pool/main/s/seabios/seabios_1.7.5-1ubuntu1_all.deb
http://archive.ubuntu.com/ubuntu/pool/main/s/slof/qemu-slof_20140630+dfsg-1ubuntu1~14.04_all.deb

View File

@ -1,5 +1,5 @@
- id: qemu_install
role: '*'
role: ['compute']
stage: pre_deployment
type: puppet
parameters: