Implement: Fuel install QEMU

Update docker build

Change-Id: Ia710a6c500a4606c11ea85d21334c744786e05f0
Closes-Bug:#1507878
Signed-off-by: lingyu1 <ling.y.yu@intel.com>
This commit is contained in:
lingyu1 2015-12-03 17:01:14 +08:00
parent 63fb920a81
commit 8507e55d5e
11 changed files with 50 additions and 50 deletions

View File

@ -14,7 +14,7 @@ Requirements
| Requirement | Version/Comment |
|----------------------------------|-----------------|
| Mirantis OpenStack compatibility | 6.1 |
| Mirantis OpenStack compatibility | 7.0 |
Recommendations
---------------
@ -60,7 +60,7 @@ Qemu plugin installation
id | name | version | package_version
---|------------------|---------|----------------
1 | fuel-plugin-qemu | 0.5.0 | 2.0.0
1 | fuel-plugin-qemu | 0.5.1 | 3.0.0
8. Plugin is ready to use and can be enabled on the Settings tab of the Fuel web UI.
@ -102,12 +102,6 @@ Known issues
None.
Release Notes
-------------
**0.5.0**
* Initial release of the plugin. This is a beta version.
Development

View File

@ -18,7 +18,4 @@ if $operatingsystem == 'Ubuntu' {
require => Package['qemu-utils','qemu-system','qemu-user'],
}
} elsif $operatingsystem == 'CentOS' {
package { 'qemu':
ensure => "2.4.1-1",
}
}

1
deployment_tasks.yaml Normal file
View File

@ -0,0 +1 @@
[]

View File

@ -3,11 +3,11 @@ name: fuel-plugin-qemu
# Human-readable name for your plugin
title: fuel-plugin-qemu
# Plugin version
version: '0.5.0'
version: '0.5.1'
# Description
description: 'This plugin provides to deploy qemu'
# Required fuel version
fuel_version: ['6.1']
fuel_version: ['7.0']
# Specify license of your plugin
licenses: ['Apache License Version 2.0']
# Specify author or company name
@ -21,15 +21,10 @@ groups: ['hypervisor']
# The plugin is compatible with releases in the list
releases:
- os: ubuntu
version: 2014.2-6.1
version: 2015.1.0-7.0
mode: ['ha', 'multinode']
deployment_scripts_path: deployment_scripts/
repository_path: repositories/ubuntu
- os: centos
version: 2014.2-6.1
mode: ['ha', 'multinode']
deployment_scripts_path: deployment_scripts/
repository_path: repositories/centos
# Version of plugin package
package_version: '2.0.0'
package_version: '3.0.0'

View File

@ -1,40 +1,26 @@
#!/bin/bash
# Add here any the actions which are required before plugin build
# like packages building, packages downloading from mirrors and so on.
# The script should return 0 if there were no errors.
set -eux
BUILD_FOR=${BUILD_FOR:-centos ubuntu}
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
centos)
pushd "${DIR}/repositories/${1}/"
download_dependencies ${1}
popd
;;
ubuntu)
pushd "${DIR}/repositories/${1}/"
download_dependencies ${1}
popd
;;
cd ${DIR}/qemu
sudo docker build -t qemu .
container_id=`sudo docker run -d qemu`
sudo docker cp $container_id:/qemu-block-extra_2.4+dfsg-4ubuntu1_amd64.deb ${DIR}/repositories/ubuntu/
sudo docker cp $container_id:/qemu-system_2.4+dfsg-4ubuntu1_amd64.deb ${DIR}/repositories/ubuntu/
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/
;;
*) echo "Not supported system"; exit 1;;
esac
}
for system in $BUILD_FOR
do
build_pkg $system

20
qemu/Dockerfile Normal file
View File

@ -0,0 +1,20 @@
#!/bin/bash
FROM ubuntu:14.04.3
RUN apt-get update
RUN apt-get install -y software-properties-common python-software-properties \
make python-setuptools python-all dpkg-dev debhelper \
fuseiso git genisoimage bind9-host wget curl lintian tmux lxc iptables \
ca-certificates sudo apt-utils lsb-release autotools-dev device-tree-compiler texinfo acpica-tools libaio-dev libasound2-dev libattr1-dev libbluetooth-dev libbrlapi-dev libcap-dev libcap-ng-dev libcurl4-gnutls-dev libfdt-dev libncurses5-dev libnss3-dev libpixman-1-dev libpulse-dev librados-dev librbd-dev libsasl2-dev libsdl1.2-dev libseccomp-dev libspice-server-dev libspice-protocol-dev libusb-1.0-0-dev libusbredirparser-dev libx11-dev libxen-dev libnuma-dev uuid-dev xfslibs-dev zlib1g-dev libjpeg-dev libpng12-dev
RUN echo "ALL ALL=NOPASSWD: ALL" > /etc/sudoers.d/open-sudo
RUN chmod 0440 /etc/sudoers.d/open-sudo
ADD ./download-qemu.sh /root/download-qemu.sh
RUN chmod +x /root/download-qemu.sh
RUN /root/download-qemu.sh
ADD ./build-qemu.sh /root/build-qemu.sh
RUN chmod +x /root/build-qemu.sh
RUN /root/build-qemu.sh

8
qemu/build-qemu.sh Executable file
View File

@ -0,0 +1,8 @@
#!/bin/bash
wget http://kr.archive.ubuntu.com/ubuntu/pool/main/libt/libtool/libtool_2.4.2-1.11_all.deb
wget http://kr.archive.ubuntu.com/ubuntu/pool/main/libt/libtool/libtool-bin_2.4.2-1.11_amd64.deb
sudo dpkg -i libtool_2.4.2-1.11_all.deb
sudo dpkg -i libtool-bin_2.4.2-1.11_amd64.deb
dpkg-source -x qemu_2.4+dfsg-4ubuntu1.dsc
cd /qemu-2.4+dfsg;sudo dpkg-buildpackage

5
qemu/download-qemu.sh Executable file
View File

@ -0,0 +1,5 @@
#!/bin/bash
wget https://launchpad.net/ubuntu/+archive/primary/+files/qemu_2.4%2Bdfsg.orig.tar.xz
wget https://launchpad.net/ubuntu/+archive/primary/+files/qemu_2.4%2Bdfsg-4ubuntu1.debian.tar.xz
wget https://launchpad.net/ubuntu/+archive/primary/+files/qemu_2.4%2Bdfsg-4ubuntu1.dsc

View File

@ -1 +0,0 @@
https://github.com/lingyu1/fuel-rpm/blob/master/centos/6.5/x86_64/Packages/qemu-2.4.1-1.x86_64.rpm?raw=true

View File

@ -1,5 +0,0 @@
https://github.com/lingyu1/fuel-rpm/blob/master/ubuntu/14.04.1/x86_64/Packages/qemu-block-extra_2.4+dfsg-4ubuntu1_amd64.deb?raw=true
https://github.com/lingyu1/fuel-rpm/blob/master/ubuntu/14.04.1/x86_64/Packages/qemu-system_2.4+dfsg-4ubuntu1_amd64.deb?raw=true
https://github.com/lingyu1/fuel-rpm/blob/master/ubuntu/14.04.1/x86_64/Packages/qemu-utils_2.4+dfsg-4ubuntu1_amd64.deb?raw=true
https://github.com/lingyu1/fuel-rpm/blob/master/ubuntu/14.04.1/x86_64/Packages/qemu_2.4+dfsg-4ubuntu1_amd64.deb?raw=true
https://github.com/lingyu1/fuel-rpm/blob/master/ubuntu/14.04.1/x86_64/Packages/qemu-user_2.4+dfsg-4ubuntu1_amd64.deb?raw=true