Elements for building a heat test image
The heat functional test job needs to boot full images containing the heat agent code (os-collect-config etc) so that it can test the interaction between heat and the agent. Images built with the elements in this change contain the necessary distro packages so that only pip packages need to be installed on server boot. This is very fast compared to doing a disk-image-create on every gate run or doing distro package installs during boot. Initially pip packages would be installed from upstream pypi during boot, but devstack already has the code required [1] to build pip repos from local git checkouts so it will be possible to check and gate on agent code changes, which is not currently possible. The intent would be for these images to replace the vanilla Fedora-x86_64-20-20140618-sda which devstack currently uses during gate jobs. The Fedora-x86_64-20-20140618-sda qcow is cached on the nodepool images but it might be better for these images to be hosted on a server like tarballs.o.o and downloaded on every gate run. Initially I'd like to request that an image be manually built and uploaded somewhere so we can start using it immediately and drop Fedora-x86_64-20-20140618-sda. Building these images does not need to be fully automated and likely only needs to be triggered when there are dependency changes in the heat agent tools. The script build-heat-test-image.sh will trigger a image build defaulting to fedora. Ubuntu and CentOS7 are also fully supported by these elements. [1] https://github.com/openstack-dev/devstack/blob/master/lib/dib#L52 Change-Id: I3f10f9137cc4391de884fddcab5b4fcb802a8dd8
This commit is contained in:
parent
426b924c41
commit
0175da2ee6
hot/software-config
README.rst
test-image
README.rstbuild-heat-test-image.sh
elements
centos7-rdo
heat-agent-pkg-requires
heat-config-hook-requires
python-dev
tools
@ -25,4 +25,9 @@ a custom-built image.
|
||||
example-templates
|
||||
-----------------
|
||||
This contains example heat templates which demonstrate how the software config
|
||||
resources and the hooks work together to perform software configuration.
|
||||
resources and the hooks work together to perform software configuration.
|
||||
|
||||
test-image
|
||||
----------
|
||||
This contains `diskimage-builder <https://github.com/openstack/diskimage-builder>`_
|
||||
elements which will install the distro packages required for a base test image.
|
22
hot/software-config/test-image/README.rst
Normal file
22
hot/software-config/test-image/README.rst
Normal file
@ -0,0 +1,22 @@
|
||||
=======================================
|
||||
Elements for building a heat test image
|
||||
=======================================
|
||||
|
||||
The heat functional test job needs to boot full images containing the
|
||||
heat agent code (os-collect-config etc) so that it can test the
|
||||
interaction between heat and the agent.
|
||||
|
||||
Images built with these elements contain the necessary
|
||||
distro packages so that only pip packages need to be installed on
|
||||
server boot.
|
||||
|
||||
The script build-heat-test-image.sh will trigger a image build
|
||||
defaulting to fedora. Ubuntu and CentOS7 are also fully supported by
|
||||
these elements. Run the following to build all supported images:
|
||||
|
||||
|
||||
::
|
||||
|
||||
DISTRO=fedora ./build-heat-test-image.sh
|
||||
DISTRO=ubuntu ./build-heat-test-image.sh
|
||||
DISTRO=centos7-rdo ./build-heat-test-image.sh
|
25
hot/software-config/test-image/build-heat-test-image.sh
Executable file
25
hot/software-config/test-image/build-heat-test-image.sh
Executable file
@ -0,0 +1,25 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
# implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
set -e
|
||||
|
||||
# known good values of DISTRO are fedora, ubuntu, centos7-rdo
|
||||
export DISTRO=${DISTRO:-fedora}
|
||||
|
||||
export ELEMENTS_PATH=${ELEMENTS_PATH:-`dirname "$0"`/elements}
|
||||
export IMAGE_NAME=${IMAGE_NAME:-$DISTRO-heat-test-image}
|
||||
|
||||
disk-image-create -x --no-tmpfs -o $IMAGE_NAME $DISTRO \
|
||||
vm python-dev heat-agent-pkg-requires heat-config-hook-requires
|
@ -0,0 +1,4 @@
|
||||
Adds the centos7 element and includes the Juno RDO yum repository
|
||||
|
||||
The Juno RDO repo is required for OpenStack packages which are not in
|
||||
CentOS7 or EPEL repos (python-oslo-config, python-*client)
|
@ -0,0 +1 @@
|
||||
centos7
|
@ -0,0 +1,3 @@
|
||||
# uninstall fedora's heat-cfntools so it can be installed from pip
|
||||
rdo_release_juno_package:
|
||||
phase: pre-install.d
|
@ -0,0 +1,5 @@
|
||||
{
|
||||
"default": {
|
||||
"rdo_release_juno_package": "https://repos.fedorapeople.org/repos/openstack/openstack-juno/rdo-release-juno-1.noarch.rpm"
|
||||
}
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
Installs packages required by heat agent tools.
|
||||
|
||||
These are the dependencies for the following projects which make up the
|
||||
heat agent tools
|
||||
|
||||
- os-collect-config
|
||||
- os-apply-config
|
||||
- os-refresh-config
|
||||
- dib-utils
|
||||
- heat-cfntools
|
@ -0,0 +1 @@
|
||||
package-installs
|
15
hot/software-config/test-image/elements/heat-agent-pkg-requires/package-installs.yaml
Normal file
15
hot/software-config/test-image/elements/heat-agent-pkg-requires/package-installs.yaml
Normal file
@ -0,0 +1,15 @@
|
||||
python_setuptools_package:
|
||||
python_argparse_package:
|
||||
python_anyjson_package:
|
||||
python_dogpile_cache_package:
|
||||
python_eventlet_package:
|
||||
python_heatclient_package:
|
||||
python_keystoneclient_package:
|
||||
python_requests_package:
|
||||
python_iso8601_package:
|
||||
python_lxml_package:
|
||||
python_six_package:
|
||||
python_oslo_config_package:
|
||||
pystache_package:
|
||||
python_pbr_package:
|
||||
python_boto_package:
|
@ -0,0 +1,39 @@
|
||||
|
||||
{
|
||||
"family": {
|
||||
"redhat": {
|
||||
"python_setuptools_package": "python-setuptools",
|
||||
"python_argparse_package": "python-argparse",
|
||||
"python_anyjson_package": "python-anyjson",
|
||||
"python_dogpile_cache_package": "python-dogpile-cache",
|
||||
"python_eventlet_package": "python-eventlet",
|
||||
"python_heatclient_package": "python-heatclient",
|
||||
"python_keystoneclient_package": "python-keystoneclient",
|
||||
"python_requests_package": "python-requests",
|
||||
"python_iso8601_package": "python-iso8601",
|
||||
"python_lxml_package": "python-lxml",
|
||||
"python_six_package": "python-six",
|
||||
"python_oslo_config_package": "python-oslo-config",
|
||||
"pystache_package": "pystache",
|
||||
"python_pbr_package": "python-pbr",
|
||||
"python_boto_package": "python-boto"
|
||||
},
|
||||
"debian": {
|
||||
"python_setuptools_package": "python-setuptools",
|
||||
"python_argparse_package": "python-argparse",
|
||||
"python_anyjson_package": "python-anyjson",
|
||||
"python_dogpile_cache_package": "python-dogpile.cache",
|
||||
"python_eventlet_package": "python-eventlet",
|
||||
"python_heatclient_package": "python-heatclient",
|
||||
"python_keystoneclient_package": "python-keystoneclient",
|
||||
"python_requests_package": "python-requests",
|
||||
"python_iso8601_package": "python-iso8601",
|
||||
"python_lxml_package": "python-lxml",
|
||||
"python_six_package": "python-six",
|
||||
"python_oslo_config_package": "python-oslo-config",
|
||||
"pystache_package": "python-pystache",
|
||||
"python_pbr_package": "python-pbr",
|
||||
"python_boto_package": "python-boto"
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
Configuration tools required by tested heat-config hooks
|
||||
|
||||
This element installs the configuration tools required by some heat-config
|
||||
hooks so that they are available for testing. Current tools installed are:
|
||||
|
||||
- ansible
|
||||
- puppet
|
||||
- salt-minion
|
@ -0,0 +1 @@
|
||||
package-installs
|
3
hot/software-config/test-image/elements/heat-config-hook-requires/package-installs.yaml
Normal file
3
hot/software-config/test-image/elements/heat-config-hook-requires/package-installs.yaml
Normal file
@ -0,0 +1,3 @@
|
||||
puppet_package:
|
||||
ansible_package:
|
||||
salt_minion_package:
|
@ -0,0 +1,7 @@
|
||||
{
|
||||
"default": {
|
||||
"puppet_package": "puppet",
|
||||
"ansible_package": "ansible",
|
||||
"salt_minion_package": "salt-minion"
|
||||
}
|
||||
}
|
@ -0,0 +1,4 @@
|
||||
Install packages for common pip install dependencies
|
||||
|
||||
This element installs packages needed for common pip installs, including
|
||||
devel packages need by pip build of packages like PyYAML, lxml, pyOpenSSL.
|
@ -0,0 +1 @@
|
||||
package-installs
|
@ -0,0 +1,9 @@
|
||||
python_pip_package:
|
||||
git_package:
|
||||
gcc_package:
|
||||
python_devel_package:
|
||||
libyaml_devel_package:
|
||||
openssl_devel_package:
|
||||
libffi_devel_package:
|
||||
libxml2_devel_package:
|
||||
libxslt_devel_package:
|
27
hot/software-config/test-image/elements/python-dev/pkg-map
Normal file
27
hot/software-config/test-image/elements/python-dev/pkg-map
Normal file
@ -0,0 +1,27 @@
|
||||
|
||||
{
|
||||
"family": {
|
||||
"redhat": {
|
||||
"python_pip_package": "python-pip",
|
||||
"gcc_package": "gcc",
|
||||
"git_package": "git-core",
|
||||
"python_devel_package": "python-devel",
|
||||
"libyaml_devel_package": "libyaml-devel",
|
||||
"openssl_devel_package": "openssl-devel",
|
||||
"libffi_devel_package": "libffi-devel",
|
||||
"libxml2_devel_package": "libxml2-devel",
|
||||
"libxslt_devel_package": "libxslt-devel"
|
||||
},
|
||||
"debian": {
|
||||
"python_pip_package": "python-pip",
|
||||
"git_package": "git",
|
||||
"gcc_package": "gcc",
|
||||
"python_devel_package": "python-dev",
|
||||
"libyaml_devel_package": "libyaml-dev",
|
||||
"openssl_devel_package": "libssl-dev",
|
||||
"libffi_devel_package": "libffi-dev",
|
||||
"libxml2_devel_package": "libxml2-dev",
|
||||
"libxslt_devel_package": "libxslt1-dev"
|
||||
}
|
||||
}
|
||||
}
|
@ -5,7 +5,7 @@ import subprocess
|
||||
import sys
|
||||
|
||||
|
||||
EXCLUDED_DIRS = ('contrib',)
|
||||
EXCLUDED_DIRS = ('contrib', 'elements')
|
||||
|
||||
|
||||
def main(args):
|
||||
|
Loading…
x
Reference in New Issue
Block a user