diff options
Diffstat (limited to 'build')
21 files changed, 253 insertions, 71 deletions
diff --git a/build/docker/Dockerfile b/build/docker/Dockerfile index 41a555f6c..1bb56b795 100644 --- a/build/docker/Dockerfile +++ b/build/docker/Dockerfile @@ -17,9 +17,13 @@ ENV DEBIAN_FRONTEND noninteractive RUN apt-get update RUN apt-get install -y software-properties-common python-software-properties \ - make python-setuptools python-all dpkg-dev debhelper \ + make python-setuptools python-all dpkg-dev debhelper ruby-json \ fuseiso git genisoimage bind9-host wget curl lintian tmux lxc iptables \ - ca-certificates sudo apt-utils lsb-release dosfstools debmirror p7zip-full + ca-certificates sudo apt-utils lsb-release dosfstools debmirror p7zip-full \ + build-essential ruby-dev rubygems-integration python-pip git rpm createrepo dpkg-dev + +RUN gem install fpm +RUN pip install fuel-plugin-builder RUN echo "ALL ALL=NOPASSWD: ALL" > /etc/sudoers.d/open-sudo RUN echo "Defaults env_keep += \"ftp_proxy http_proxy https_proxy no_proxy RSYNC_PROXY RSYNC_CONNECT_PROG npm_config_registry\"" > /etc/sudoers.d/keep-proxies diff --git a/build/f_isoroot/Makefile b/build/f_isoroot/Makefile index de18ced7a..51b8f26fa 100644 --- a/build/f_isoroot/Makefile +++ b/build/f_isoroot/Makefile @@ -11,8 +11,8 @@ # Add Fuel plugin build targets here # Plugins disabled for the Fuel Mitaka uplift. Please re-enable your plugin as you have # verified it! -PLUGINS = f_odlpluginbuild f_onosfwpluginbuild f_vsperfpluginbuild f_ovs-nsh-dpdk-pluginbuild -#PLUGINS = f_odlpluginbuild f_onosfwpluginbuild f_ovsnfv-dpdk-pluginbuild f_vsperfpluginbuild f_qemupluginbuild f_ovs-nsh-dpdk-pluginbuild f_bgpvpn-pluginbuild +PLUGINS = f_odlpluginbuild f_onosfwpluginbuild f_vsperfpluginbuild f_ovs-nsh-dpdk-pluginbuild f_yardstick-pluginbuild f_kvm-pluginbuild f_bgpvpn-pluginbuild +#PLUGINS = f_odlpluginbuild f_onosfwpluginbuild f_ovsnfv-dpdk-pluginbuild f_vsperfpluginbuild f_ovs-nsh-dpdk-pluginbuild f_bgpvpn-pluginbuild export PLUGINS #NON_8-0_REBASED_PLUGINS = f_bgpvpn-pluginbuild diff --git a/build/f_isoroot/f_bgpvpn-pluginbuild/Makefile b/build/f_isoroot/f_bgpvpn-pluginbuild/Makefile index 24fa1785d..ed3be2971 100644 --- a/build/f_isoroot/f_bgpvpn-pluginbuild/Makefile +++ b/build/f_isoroot/f_bgpvpn-pluginbuild/Makefile @@ -35,9 +35,6 @@ release:.bgpvpnbuild .bgpvpnbuild: rm -rf fuel-plugin-bgpvpn - sudo apt-get -y install build-essential ruby-dev rubygems-integration python-pip git rpm createrepo dpkg-dev - sudo gem install fpm - sudo pip install fuel-plugin-builder git clone $(BGPVPN_REPO) cd fuel-plugin-bgpvpn; \ git checkout $(BGPVPN_BRANCH); \ diff --git a/build/f_isoroot/f_bgpvpn-pluginbuild/config.mk b/build/f_isoroot/f_bgpvpn-pluginbuild/config.mk index a5f9ad966..dc2366939 100644 --- a/build/f_isoroot/f_bgpvpn-pluginbuild/config.mk +++ b/build/f_isoroot/f_bgpvpn-pluginbuild/config.mk @@ -7,6 +7,6 @@ # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## -BGPVPN_BRANCH=master -BGPVPN_REPO="https://github.com/openstack/fuel-plugin-bgpvpn.git" -BGPVPN_CHANGE=fb8a9ad29f85bd0902db6701f31810aa8015a4fc +BGPVPN_BRANCH?=master +BGPVPN_REPO?="https://github.com/openstack/fuel-plugin-bgpvpn.git" +BGPVPN_CHANGE?=7279e0c4aa5f1cbbb5f2318e1cd97a1f23cccf51 diff --git a/build/f_isoroot/f_qemupluginbuild/Makefile b/build/f_isoroot/f_kvm-pluginbuild/Makefile index 2e3a34f7b..ba2fd0be0 100644 --- a/build/f_isoroot/f_qemupluginbuild/Makefile +++ b/build/f_isoroot/f_kvm-pluginbuild/Makefile @@ -18,37 +18,38 @@ include config.mk ############################################################################# .PHONY: all -all: .qemubuild +all: .kvmbuild .PHONY: clean clean: - @rm -f .qemubuild ../release/opnfv/fuel-plugin-qemu*.rpm fuel-plugin-qemu*.rpm - @rm -f $(BUILD_BASE)/gitinfo_qemu-plugin.txt gitinfo_qemu-plugin.txt + @rm -f .kvmbuild ../release/opnfv/fuel-plugin-kvm*.rpm fuel-plugin-kvm*.rpm + @rm -f $(BUILD_BASE)/gitinfo_kvm-plugin.txt gitinfo_kvm-plugin.txt .PHONY: release -release:.qemubuild - @rm -f ../release/opnfv/fuel-plugin-qemu*.rpm +release:.kvmbuild + @rm -f ../release/opnfv/fuel-plugin-kvm*.rpm @mkdir -p ../release/opnfv - @cp fuel-plugin-qemu*.rpm ../release/opnfv/ - cp gitinfo_qemu-plugin.txt $(BUILD_BASE) + @cp fuel-plugin-kvm*.rpm ../release/opnfv/ + cp gitinfo_kvm-plugin.txt $(BUILD_BASE) -.qemubuild: - @rm -rf fuel-plugin-qemu - sudo apt-get -y install build-essential ruby-dev rubygems-integration python-pip git rpm createrepo dpkg-dev - sudo pip install fuel-plugin-builder +.kvmbuild: + # fix me + @sudo rm -rf kvmfornfv ../../docker/ubuntu-builder/install_docker.sh - git clone $(QEMU_REPO) - cd fuel-plugin-qemu; \ - git checkout $(QEMU_BRANCH); \ - if [ ! -z $(QEMU_CHANGE) ]; then \ - git fetch $(QEMU_REPO) $(QEMU_CHANGE); \ + git clone $(KVMFORNFV_REPO) + cd kvmfornfv; \ + git checkout $(KVMFORNFV_BRANCH); \ + if [ ! -z $(KVMFORNFV_CHANGE) ]; then \ + git fetch $(KVMFORNFV_REPO) $(KVMFORNFV_CHANGE); \ git checkout FETCH_HEAD; \ fi - INCLUDE_DEPENDENCIES=true fpb --debug --build fuel-plugin-qemu/ - @mv fuel-plugin-qemu/fuel-plugin-qemu*.rpm . - $(REPOINFO) -r . > gitinfo_qemu-plugin.txt - @rm -rf fuel-plugin-qemu - @touch .qemubuild + cd kvmfornfv/fuel-plugin; \ + INCLUDE_DEPENDENCIES=true fpb --debug --build ./ + @mv kvmfornfv/fuel-plugin/fuel-plugin-kvm*.rpm . + $(REPOINFO) -r . > gitinfo_kvm-plugin.txt + # fix me + @sudo rm -rf kvmfornfv + @touch .kvmbuild # Store artifact in cache straight away if caching is enabled # (no .cacheid will be present unless this is a cached build) test -f .cacheid && $(MAKE) -f Makefile put-cache || exit 0 @@ -59,13 +60,13 @@ release:.qemubuild # Create a unique hash to be used for getting and putting cache, based on: -# - The SHA1 hash of the HEAD on the plugin repo's $(QEMU_BRANCH) +# - The SHA1 hash of the HEAD on the plugin repo's $(KVMFORNFV_BRANCH) # - The contents of this Makefile .cacheid: - @if [ ! -z $(QEMU_CHANGE) ]; then \ - $(CACHETOOL) getcommitid $(QEMU_REPO) $(QEMU_CHANGE) > .cachedata; \ + @if [ ! -z $(KVMFORNFV_CHANGE) ]; then \ + $(CACHETOOL) getcommitid $(KVMFORNFV_REPO) $(KVMFORNFV_CHANGE) > .cachedata; \ else \ - $(CACHETOOL) getcommitid $(QEMU_REPO) $(QEMU_BRANCH) > .cachedata; \ + $(CACHETOOL) getcommitid $(KVMFORNFV_REPO) $(KVMFORNFV_BRANCH) > .cachedata; \ fi @sha1sum Makefile | awk {'print $$1'} >> .cachedata @sha1sum config.mk | awk {'print $$1'} >> .cachedata @@ -89,4 +90,4 @@ get-cache: .cacheid # Store cache if not already stored - called after ordinary build .PHONY: put-cache put-cache: .cacheid - @tar cf - .qemubuild fuel-plugin-qemu*.rpm gitinfo_qemu-plugin.txt | $(CACHETOOL) put $(shell cat .cacheid) + @tar cf - .kvmbuild fuel-plugin-kvm*.rpm gitinfo_kvm-plugin.txt | $(CACHETOOL) put $(shell cat .cacheid) diff --git a/build/f_isoroot/f_qemupluginbuild/config.mk b/build/f_isoroot/f_kvm-pluginbuild/config.mk index 0b846547e..b608adee0 100644 --- a/build/f_isoroot/f_qemupluginbuild/config.mk +++ b/build/f_isoroot/f_kvm-pluginbuild/config.mk @@ -7,6 +7,6 @@ # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## -QEMU_BRANCH=c35ce3377bcf382a4e36f1df49758100cd2910b1 -QEMU_REPO=https://review.openstack.org/openstack/fuel-plugin-qemu -QEMU_CHANGE= +KVMFORNFV_BRANCH=c715b6029fd5b4eaf323f5efde4ec5db5ba0a9b4 +KVMFORNFV_REPO=https://gerrit.opnfv.org/gerrit/kvmfornfv +KVMFORNFV_CHANGE= diff --git a/build/f_isoroot/f_odlpluginbuild/Makefile b/build/f_isoroot/f_odlpluginbuild/Makefile index c5978ded0..e2cbf7d46 100644 --- a/build/f_isoroot/f_odlpluginbuild/Makefile +++ b/build/f_isoroot/f_odlpluginbuild/Makefile @@ -28,16 +28,6 @@ release:.odlbuild cp gitinfo_odlplugin.txt $(BUILD_BASE) .odlbuild: rm -rf fuel-plugin-opendaylight - sudo apt-get -y install build-essential ruby-dev rubygems-integration python-pip git rpm createrepo dpkg-dev - sudo gem install fpm - #Temporary fpb needs to be build from sources - git clone -b $(FPB_BRANCH) $(FPB_REPO) - cd fuel-plugins; \ - if [ -n $(FPB_CHANGE) ]; then \ - git checkout $(FPB_CHANGE); \ - python setup.py sdist; \ - sudo pip install ./dist/fuel-plugin-builder-*.tar.gz; \ - fi git clone -b $(ODL_BRANCH) $(ODL_REPO) cd fuel-plugin-opendaylight; \ if [ -n $(ODL_CHANGE) ]; then \ diff --git a/build/f_isoroot/f_odlpluginbuild/config.mk b/build/f_isoroot/f_odlpluginbuild/config.mk index 876998cd9..8ad823dfb 100644 --- a/build/f_isoroot/f_odlpluginbuild/config.mk +++ b/build/f_isoroot/f_odlpluginbuild/config.mk @@ -8,14 +8,9 @@ ############################################################################## ODL_BRANCH ?= master -ODL_CHANGE ?= 1c8443ffc64af120337740551307378d1c21535d +ODL_CHANGE ?= 5d80efce6d0b1d242489ec2897cf20f51dd5fcb1 ODL_REPO ?= https://github.com/openstack/fuel-plugin-opendaylight.git -FPB_BRANCH ?= master -FPB_CHANGE ?= 82191ca16b40021e445e854fad37c65cd8e70b0c -FPB_REPO ?= https://github.com/openstack/fuel-plugins - -export USE_JAVA8?=true -export JAVA8_URL?=https://launchpad.net/~openjdk-r/+archive/ubuntu/ppa/+files/openjdk-8-jre-headless_8u72-b15-1~trusty1_amd64.deb export ODL_TARBALL_LOCATION?=https://nexus.opendaylight.org/content/groups/public/org/opendaylight/integration/distribution-karaf/0.4.2-Beryllium-SR2/distribution-karaf-0.4.2-Beryllium-SR2.tar.gz export ODL_VERSION_NUMBER?=0.4.2 +export ODL_BORON_TARBALL_LOCATION?=https://nexus.opendaylight.org/content/repositories/staging/org/opendaylight/integration/distribution-karaf/0.5.0-Boron/distribution-karaf-0.5.0-Boron.tar.gz diff --git a/build/f_isoroot/f_onosfwpluginbuild/Makefile b/build/f_isoroot/f_onosfwpluginbuild/Makefile index 355292d6d..a9dcb2200 100644 --- a/build/f_isoroot/f_onosfwpluginbuild/Makefile +++ b/build/f_isoroot/f_onosfwpluginbuild/Makefile @@ -34,8 +34,6 @@ release:.onosbuild .onosbuild: @rm -rf fuel-plugin-onos - sudo apt-get -y install build-essential ruby-dev rubygems-integration python-pip git rpm createrepo dpkg-dev - sudo pip install fuel-plugin-builder git clone $(ONOS_REPO) cd fuel-plugin-onos; \ git checkout $(ONOS_BRANCH); \ diff --git a/build/f_isoroot/f_ovs-nsh-dpdk-pluginbuild/Makefile b/build/f_isoroot/f_ovs-nsh-dpdk-pluginbuild/Makefile index 5e38b4c53..ecf586a76 100644 --- a/build/f_isoroot/f_ovs-nsh-dpdk-pluginbuild/Makefile +++ b/build/f_isoroot/f_ovs-nsh-dpdk-pluginbuild/Makefile @@ -34,8 +34,6 @@ release:.ovsbuild .ovsbuild: @rm -rf fuel-plugin-ovs - sudo apt-get -y install build-essential ruby-dev rubygems-integration python-pip git rpm createrepo dpkg-dev - sudo pip install fuel-plugin-builder ../../docker/ubuntu-builder/install_docker.sh git clone $(OVS_NSH_DPDK_REPO) cd fuel-plugin-ovs; \ diff --git a/build/f_isoroot/f_ovs-nsh-dpdk-pluginbuild/config.mk b/build/f_isoroot/f_ovs-nsh-dpdk-pluginbuild/config.mk index 819379ed6..4dc65fede 100644 --- a/build/f_isoroot/f_ovs-nsh-dpdk-pluginbuild/config.mk +++ b/build/f_isoroot/f_ovs-nsh-dpdk-pluginbuild/config.mk @@ -7,6 +7,6 @@ # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## -OVS_NSH_DPDK_BRANCH=bee1b2b540922f0a1439d3b878480da590f506d8 -OVS_NSH_DPDK_REPO=https://review.openstack.org/openstack/fuel-plugin-ovs -OVS_NSH_DPDK_CHANGE= +OVS_NSH_DPDK_BRANCH?=6f5f62221049d130ad190030a36db3147d6deb10 +OVS_NSH_DPDK_REPO?=https://review.openstack.org/openstack/fuel-plugin-ovs +OVS_NSH_DPDK_CHANGE?= diff --git a/build/f_isoroot/f_ovsnfv-dpdk-pluginbuild/Makefile b/build/f_isoroot/f_ovsnfv-dpdk-pluginbuild/Makefile index 4ca5236a0..9e432d146 100644 --- a/build/f_isoroot/f_ovsnfv-dpdk-pluginbuild/Makefile +++ b/build/f_isoroot/f_ovsnfv-dpdk-pluginbuild/Makefile @@ -34,8 +34,6 @@ release:.ovsnfvbuild .ovsnfvbuild: @rm -rf ovsnfv - sudo apt-get -y install build-essential ruby-dev rubygems-integration python-pip git rpm createrepo dpkg-dev - sudo pip install fuel-plugin-builder git clone $(OVSNFV_DPDK_REPO) ovsnfv cd ovsnfv; \ git checkout $(OVSNFV_DPDK_BRANCH); \ diff --git a/build/f_isoroot/f_repobuild/Makefile b/build/f_isoroot/f_repobuild/Makefile index 4bb04ca07..cbf81fe4e 100644 --- a/build/f_isoroot/f_repobuild/Makefile +++ b/build/f_isoroot/f_repobuild/Makefile @@ -13,7 +13,9 @@ TOP := $(shell pwd) TMP_ROOT_DIR := $(shell echo "$(MIRROR_UBUNTU_ROOT)" | cut -d "/" -f2) # Enable use of exact repo commit if defined, else use Fuel main branch FUEL_MIRROR_REPO?=https://github.com/openstack/fuel-mirror -FUEL_MIRROR_COMMIT?=$(FUEL_MAIN_TAG) +# Point to the commit where 302 redirects are handled +# https://bugs.launchpad.net/fuel/mitaka/+bug/1593674 +FUEL_MIRROR_COMMIT?=192a3d9f8f993afb12c5108dd9339c6688c23e11 #$(FUEL_MAIN_TAG) include ../../config.mk diff --git a/build/f_isoroot/f_vsperfpluginbuild/Makefile b/build/f_isoroot/f_vsperfpluginbuild/Makefile index d713882fe..9bd236a8d 100644 --- a/build/f_isoroot/f_vsperfpluginbuild/Makefile +++ b/build/f_isoroot/f_vsperfpluginbuild/Makefile @@ -34,8 +34,6 @@ release:.vsperfbuild .vsperfbuild: @rm -rf vswitchperf - sudo apt-get -y install build-essential ruby-dev rubygems-integration python-pip git rpm createrepo dpkg-dev - sudo pip install fuel-plugin-builder ../../docker/ubuntu-builder/install_docker.sh git clone $(VSPERF_REPO) vswitchperf cd vswitchperf; \ diff --git a/build/f_isoroot/f_vsperfpluginbuild/config.mk b/build/f_isoroot/f_vsperfpluginbuild/config.mk index 1bf1ef0b5..576018dcf 100644 --- a/build/f_isoroot/f_vsperfpluginbuild/config.mk +++ b/build/f_isoroot/f_vsperfpluginbuild/config.mk @@ -7,6 +7,6 @@ # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## -VSPERF_BRANCH=5e3b6ae0427963520357453728411327ac8efafe -VSPERF_REPO=https://gerrit.opnfv.org/gerrit/vswitchperf.git -VSPERF_CHANGE= +VSPERF_BRANCH?=5e3b6ae0427963520357453728411327ac8efafe +VSPERF_REPO?=https://gerrit.opnfv.org/gerrit/vswitchperf.git +VSPERF_CHANGE?= diff --git a/build/f_isoroot/f_yardstick-pluginbuild/Makefile b/build/f_isoroot/f_yardstick-pluginbuild/Makefile new file mode 100644 index 000000000..47723d53e --- /dev/null +++ b/build/f_isoroot/f_yardstick-pluginbuild/Makefile @@ -0,0 +1,91 @@ +############################################################################## +# Copyright (c) 2015 Ericsson AB and others. +# jonas.bjurel@eicsson.com +# ruijing.guo@intel.com +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## + +TOP := $(shell pwd) + +############################################################################ +# BEGIN of Include definitions +# +include config.mk +# +# END Include definitions +############################################################################# + +.PHONY: all +all: .yardstickbuild + +.PHONY: clean +clean: + @rm -f .yardstickbuild ../release/opnfv/fuel-plugin-yardstick*.rpm fuel-plugin-yardstick*.rpm + @rm -f $(BUILD_BASE)/gitinfo_yardstick-plugin.txt gitinfo_yardstick-plugin.txt + +.PHONY: release +release:.yardstickbuild + @rm -f ../release/opnfv/fuel-plugin-yardstick*.rpm + @mkdir -p ../release/opnfv + @cp fuel-plugin-yardstick*.rpm ../release/opnfv/ + cp gitinfo_yardstick-plugin.txt $(BUILD_BASE) + +.yardstickbuild: + @rm -rf yardstick + git clone $(YARDSTICK_REPO) yardstick + cd yardstick; \ + git checkout $(YARDSTICK_BRANCH); \ + if [ ! -z $(YARDSTICK_CHANGE) ]; then \ + git fetch $(YARDSTICK_REPO) $(YARDSTICK_CHANGE); \ + git checkout FETCH_HEAD; \ + fi + cd yardstick; \ + INCLUDE_DEPENDENCIES=true fpb --debug --build fuel-plugin/ + @mv yardstick/fuel-plugin/fuel-plugin-yardstick*.rpm . + $(REPOINFO) -r . > gitinfo_yardstick-plugin.txt + @rm -rf fuel-plugin-yardstick + @touch .yardstickbuild + # Store artifact in cache straight away if caching is enabled + # (no .cacheid will be present unless this is a cached build) + test -f .cacheid && $(MAKE) -f Makefile put-cache || exit 0 + +############################################################################# +# Cache operations - only used when building through ci/build.sh +############################################################################# + + +# Create a unique hash to be used for getting and putting cache, based on: +# - The SHA1 hash of the HEAD on the plugin repo's $(YARDSTICK_BRANCH) +# - The contents of this Makefile +.cacheid: + @if [ ! -z $(YARDSTICK_CHANGE) ]; then \ + $(CACHETOOL) getcommitid $(YARDSTICK_REPO) $(YARDSTICK_CHANGE) > .cachedata; \ + else \ + $(CACHETOOL) getcommitid $(YARDSTICK_REPO) $(YARDSTICK_BRANCH) > .cachedata; \ + fi + @sha1sum Makefile | awk {'print $$1'} >> .cachedata + @sha1sum config.mk | awk {'print $$1'} >> .cachedata + @cat .cachedata | $(CACHETOOL) getid > .cacheid + +# Clean local data related to caching - called prior to ordinary build +.PHONY: clean-cache +clean-cache: clean + @rm -f .cachedata .cacheid + +# Try to download cache - called prior to ordinary build +.PHONY: get-cache +get-cache: .cacheid + @if $(CACHETOOL) check $(shell cat .cacheid); then \ + $(CACHETOOL) get $(shell cat .cacheid) | tar xf -;\ + else \ + echo "No cache item found for $(shell cat .cacheid)" ;\ + exit 0;\ + fi + +# Store cache if not already stored - called after ordinary build +.PHONY: put-cache +put-cache: .cacheid + @tar cf - .yardstickbuild fuel-plugin-yardstick*.rpm gitinfo_yardstick-plugin.txt | $(CACHETOOL) put $(shell cat .cacheid) diff --git a/build/f_isoroot/f_yardstick-pluginbuild/config.mk b/build/f_isoroot/f_yardstick-pluginbuild/config.mk new file mode 100644 index 000000000..f671aa997 --- /dev/null +++ b/build/f_isoroot/f_yardstick-pluginbuild/config.mk @@ -0,0 +1,13 @@ +############################################################################## +# Copyright (c) 2015 Ericsson AB and others. +# jonas.bjurel@eicsson.com +# ruijing.guo@intel.com +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## + +YARDSTICK_BRANCH?=675eef731a098f83aa98c2021b151b7e5ba1da7d +YARDSTICK_REPO?=https://gerrit.opnfv.org/gerrit/yardstick.git +YARDSTICK_CHANGE?= diff --git a/build/vagrant/README.rst b/build/vagrant/README.rst new file mode 100644 index 000000000..7db098dfa --- /dev/null +++ b/build/vagrant/README.rst @@ -0,0 +1,39 @@ +================================= +Fuel@OPNFV Build Based on Vagrant +================================= + +License +======= + +This work is licensed under a Creative Commons Attribution 4.0 +International License. .. http://creativecommons.org/licenses/by/4.0 .. +(c) Ruijing Guo (Intel) and others + + +Abstract +======== + +This document describes how to build fuel iso based on vagrant. +The build is to follow fuel/docs/build-instruction.rst. + +Note +==== + +Vagrant based build is not official build. The target user is fuel@opnfv +developer. + +How to Build +============ + +run ./build_fuel.sh + + +Vagrantfile +=========== + +you can change memory & cpus to fit your enviorments. + +setup_fuel.sh +============= + +The script is run in VM and follow fuel/docs/build-instruction.rst. diff --git a/build/vagrant/Vagrantfile b/build/vagrant/Vagrantfile new file mode 100644 index 000000000..0fbadf2ae --- /dev/null +++ b/build/vagrant/Vagrantfile @@ -0,0 +1,23 @@ +# -*- mode: ruby -*- +# vi: set ft=ruby : + +# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! +VAGRANTFILE_API_VERSION = "2" + +Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| + + config.vm.box = "trusty-server-cloudimg-amd64" + config.vm.box_url = "https://cloud-images.ubuntu.com/vagrant/trusty/current/trusty-server-cloudimg-amd64-vagrant-disk1.box" + + config.vm.define "fuel" do | h | + h.vm.host_name = "fuel" + h.vm.synced_folder "../..", "/fuel" + h.vm.provider :virtualbox do |v| + v.customize ["modifyvm", :id, "--memory", 8192] + v.customize ["modifyvm", :id, "--cpus", 8] + file_to_disk = 'large_disk.vdi' + v.customize ['createhd', '--filename', file_to_disk, '--size', 512 * 1024] + v.customize ['storageattach', :id, '--storagectl', 'SATAController', '--port', 1, '--device', 0, '--type', 'hdd', '--medium', file_to_disk ] + end + end +end diff --git a/build/vagrant/build_fuel.sh b/build/vagrant/build_fuel.sh new file mode 100755 index 000000000..051ee4dfd --- /dev/null +++ b/build/vagrant/build_fuel.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +sudo apt-get update +sudo apt-get install -y vagrant virtualbox +vagrant destroy -f; vagrant up +vagrant ssh -c "sudo apt-get update; sudo apt-get install -y linux-generic-lts-vivid" +vagrant reload +vagrant ssh -c "/vagrant/setup_fuel.sh" +vagrant ssh -c "cd fuel/build; make; cp fuel*.iso /vagrant" diff --git a/build/vagrant/setup_fuel.sh b/build/vagrant/setup_fuel.sh new file mode 100755 index 000000000..b4d7651f9 --- /dev/null +++ b/build/vagrant/setup_fuel.sh @@ -0,0 +1,26 @@ +#!/bin/bash + +sudo apt-get install -y git git-review make curl p7zip-full + +#install docker by https://docs.docker.com/engine/installation/linux/ubuntulinux/ +#sudo apt-get install linux-image-extra-$(uname -r) +sudo apt-get install -y apt-transport-https ca-certificates +sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D + +cat << EOF | sudo tee /etc/apt/sources.list.d/docker.list +deb https://apt.dockerproject.org/repo ubuntu-trusty main +EOF +sudo apt-get update +sudo apt-get purge lxc-docker -y + +#workaroud for large disk +sudo mkdir /var/lib/docker +yes | sudo mkfs.ext4 /dev/sdb +sudo mount /dev/sdb /var/lib/docker + +sudo apt-cache policy docker-engine +sudo apt-get install -y docker-engine +sudo service docker start +sudo groupadd docker +sudo usermod -aG docker vagrant +cp -r /fuel /home/vagrant |