From 496304e28096f01657d1160507b1df4bf50d538f Mon Sep 17 00:00:00 2001 From: Amy Fong Date: Fri, 11 Apr 2014 14:01:29 -0400 Subject: OpenStack: all-in-one node Introduce image openstack-image-aio, integrating both compute and controller functionality Signed-off-by: Amy Fong --- meta-openstack-aio-deploy/README | 48 ++++++++++++++++++++++ meta-openstack-aio-deploy/classes/hosts.bbclass | 17 ++++++++ meta-openstack-aio-deploy/conf/layer.conf | 10 +++++ .../python/python-neutron_git.bbappend | 1 + .../recipes-extended/guest-images/cirros_0.3.0.bb | 21 ---------- .../recipes-extended/guest-images/cirros_0.3.0.bb | 21 ++++++++++ .../recipes-extended/images/openstack-image-aio.bb | 29 +++++++++++++ 7 files changed, 126 insertions(+), 21 deletions(-) create mode 100644 meta-openstack-aio-deploy/README create mode 100644 meta-openstack-aio-deploy/classes/hosts.bbclass create mode 100644 meta-openstack-aio-deploy/conf/layer.conf create mode 100644 meta-openstack-aio-deploy/recipes-devtools/python/python-neutron_git.bbappend delete mode 100644 meta-openstack-controller-deploy/recipes-extended/guest-images/cirros_0.3.0.bb create mode 100644 meta-openstack/recipes-extended/guest-images/cirros_0.3.0.bb create mode 100644 meta-openstack/recipes-extended/images/openstack-image-aio.bb diff --git a/meta-openstack-aio-deploy/README b/meta-openstack-aio-deploy/README new file mode 100644 index 0000000..3603739 --- /dev/null +++ b/meta-openstack-aio-deploy/README @@ -0,0 +1,48 @@ +meta-openstack-aio-deploy +============================= + +This layer provides support configuring and deploying the recipes to create an +all-in-one compute/controller node. + +Dependencies +------------ + +This layer depends on: + +URI: git://github.com/openembedded/oe-core.git +branch: master +revision: HEAD +prio: default + +URI: git://github.com/openembedded/meta-oe.git +patches: 0001-python-sqlalchemy-update-to-0.7.9.patch +revision: HEAD +layers: meta-oe + meta-networking + meta-ruby + +URI: git://git.yoctoproject.org/meta-virtualization +branch: master +revision: head + +meta-openstack +branch: master +revision: head + +Maintenance +----------- + +Send pull requests, patches, comments or questions to meta-virtualization@yoctoproject.org + +When sending single patches, please using something like: +'git send-email -1 --to meta-virtualization@yoctoproject.org --subject-prefix=meta-virtualization][PATCH' + +Maintainers: Bruce Ashfield + +License +------- + +All metadata is MIT licensed unless otherwise stated. Source code included +in tree for individual recipes is under the LICENSE stated in each recipe +(.bb file) unless otherwise stated. + diff --git a/meta-openstack-aio-deploy/classes/hosts.bbclass b/meta-openstack-aio-deploy/classes/hosts.bbclass new file mode 100644 index 0000000..82c9eb7 --- /dev/null +++ b/meta-openstack-aio-deploy/classes/hosts.bbclass @@ -0,0 +1,17 @@ +# +# all-in-one hosts file +# +# The aio rootfs combines the functionality of the compute and +# the controller in one node. +# +# The aio rootfs adds another hostname aio, since we need +# ths hostname compute and controller for the system's functionality, +# we defined compute and controller in this file as well. +# +COMPUTE_IP ?= "${CONTROLLER_IP}" +COMPUTE_HOST ?= "compute" +CONTROLLER_IP ?= "128.224.149.173" +CONTROLLER_HOST ?= "controller" +MY_IP ?= "${CONTROLLER_IP}" +MY_HOST ?= "${CONTROLLER_HOST}" +DB_DATADIR ?= "/etc/postgresql" diff --git a/meta-openstack-aio-deploy/conf/layer.conf b/meta-openstack-aio-deploy/conf/layer.conf new file mode 100644 index 0000000..d1d1f64 --- /dev/null +++ b/meta-openstack-aio-deploy/conf/layer.conf @@ -0,0 +1,10 @@ +# We have a conf and classes directory, append to BBPATH +BBPATH .= ":${LAYERDIR}" + +# We have a recipes directory, add to BBFILES +BBFILES += "${LAYERDIR}/recipes*/*/*.bb ${LAYERDIR}/recipes*/*/*.bbappend ${LAYERDIR}/classes/*.bbclass" + +BBFILE_COLLECTIONS += "openstack-aio-deploy-layer" +BBFILE_PATTERN_openstack-aio-deploy-layer := "^${LAYERDIR}/" +BBFILE_PRIORITY_openstack-aio-deploy-layer = "6" + diff --git a/meta-openstack-aio-deploy/recipes-devtools/python/python-neutron_git.bbappend b/meta-openstack-aio-deploy/recipes-devtools/python/python-neutron_git.bbappend new file mode 100644 index 0000000..28b44ec --- /dev/null +++ b/meta-openstack-aio-deploy/recipes-devtools/python/python-neutron_git.bbappend @@ -0,0 +1 @@ +inherit hosts diff --git a/meta-openstack-controller-deploy/recipes-extended/guest-images/cirros_0.3.0.bb b/meta-openstack-controller-deploy/recipes-extended/guest-images/cirros_0.3.0.bb deleted file mode 100644 index 459628a..0000000 --- a/meta-openstack-controller-deploy/recipes-extended/guest-images/cirros_0.3.0.bb +++ /dev/null @@ -1,21 +0,0 @@ -SUMMARY = "An image containing the cirros cloud guest" -DESCRIPTION = "CirrOS a tiny cloud guest" -HOMEPAGE = "https://launchpad.net/cirros" - -LICENSE="GPLv2" - -SRC_URI = "https://launchpad.net/cirros/trunk/${PV}/+download/${PN}-${PV}-x86_64-disk.img" -SRC_URI[md5sum] = "50bdc35edb03a38d91b1b071afb20a3c" -SRC_URI[sha256sum] = "648782e9287288630250d07531fed9944ecc3986764a6664f0bf6c050ec06afd" - -LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6" - -INHIBIT_PACKAGE_STRIP="1" - -do_install() { - install -d ${D}/root/images - install -m 755 ${WORKDIR}/${PN}-${PV}-x86_64-disk.img ${D}/root/images -} - -PACKAGES = "cirros-guest-image" -FILES_cirros-guest-image = "/root/images/*" diff --git a/meta-openstack/recipes-extended/guest-images/cirros_0.3.0.bb b/meta-openstack/recipes-extended/guest-images/cirros_0.3.0.bb new file mode 100644 index 0000000..459628a --- /dev/null +++ b/meta-openstack/recipes-extended/guest-images/cirros_0.3.0.bb @@ -0,0 +1,21 @@ +SUMMARY = "An image containing the cirros cloud guest" +DESCRIPTION = "CirrOS a tiny cloud guest" +HOMEPAGE = "https://launchpad.net/cirros" + +LICENSE="GPLv2" + +SRC_URI = "https://launchpad.net/cirros/trunk/${PV}/+download/${PN}-${PV}-x86_64-disk.img" +SRC_URI[md5sum] = "50bdc35edb03a38d91b1b071afb20a3c" +SRC_URI[sha256sum] = "648782e9287288630250d07531fed9944ecc3986764a6664f0bf6c050ec06afd" + +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6" + +INHIBIT_PACKAGE_STRIP="1" + +do_install() { + install -d ${D}/root/images + install -m 755 ${WORKDIR}/${PN}-${PV}-x86_64-disk.img ${D}/root/images +} + +PACKAGES = "cirros-guest-image" +FILES_cirros-guest-image = "/root/images/*" diff --git a/meta-openstack/recipes-extended/images/openstack-image-aio.bb b/meta-openstack/recipes-extended/images/openstack-image-aio.bb new file mode 100644 index 0000000..57f4249 --- /dev/null +++ b/meta-openstack/recipes-extended/images/openstack-image-aio.bb @@ -0,0 +1,29 @@ +DESCRIPTION = "Openstack all-in-one node image" +LICENSE = "MIT" + +OPENSTACK_CONTROLLER_EXTRA_INSTALL ?= "" +OPENSTACK_COMPUTE_EXTRA_INSTALL ?= "" +OPENSTACK_AIO_EXTRA_INSTALL ?= "" + +IMAGE_INSTALL = " \ + ${ROOTFS_PKGMANAGE_BOOTSTRAP} \ + ${CORE_IMAGE_BASE_INSTALL} \ + packagegroup-core-full-cmdline \ + packagegroup-cloud-compute \ + packagegroup-cloud-controller \ + packagegroup-cloud-network \ + packagegroup-cloud-debug \ + packagegroup-cloud-extras \ + ${OPENSTACK_CONTROLLER_EXTRA_INSTALL} \ + ${OPENSTACK_COMPUTE_EXTRA_INSTALL} \ + ${OPENSTACK_AIO_EXTRA_INSTALL} \ + " + +IMAGE_FEATURES += "ssh-server-openssh" + +inherit core-image +inherit openstack-base + +# check for 5G of free space, so we use 5G as a starting point. +IMAGE_ROOTFS_EXTRA_SPACE_append += "+ 5000000" + -- cgit v1.2.3-54-g00ecf