Skip to content

Commit 249e36d

Browse files
committed
Remove lib/dib
diskimage-builder is a utility rather than a service, and is already installed in devstack via pip when required. lib/dib was created to allow an image to be created during a devstack run for the heat functional tests, however this approach is no longer being taken and there are no other known uses for lib/dib. This change removes lib/dib and moves the pip mirror building to lib/heat so that snapshot pip packages of the heat agent projects can be made available to servers which the heat functional tests boot. This also removes tripleo-image-elements, which has never been utilised, and since images won't be created during heat functional test runs it is no longer required. Change-Id: Ic77f841437ea23c0645d3a34d9dd6bfd1ee28714
1 parent cfbf8a1 commit 249e36d

8 files changed

Lines changed: 65 additions & 228 deletions

File tree

doc/source/index.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,6 @@ Scripts
158158
* `lib/cinder <lib/cinder.html>`__
159159
* `lib/config <lib/config.html>`__
160160
* `lib/database <lib/database.html>`__
161-
* `lib/dib <lib/dib.html>`__
162161
* `lib/dstat <lib/dstat.html>`__
163162
* `lib/glance <lib/glance.html>`__
164163
* `lib/heat <lib/heat.html>`__
@@ -181,7 +180,6 @@ Scripts
181180
* `clean.sh <clean.sh.html>`__
182181
* `run\_tests.sh <run_tests.sh.html>`__
183182

184-
* `extras.d/40-dib.sh <extras.d/40-dib.sh.html>`__
185183
* `extras.d/50-ironic.sh <extras.d/50-ironic.sh.html>`__
186184
* `extras.d/60-ceph.sh <extras.d/60-ceph.sh.html>`__
187185
* `extras.d/70-sahara.sh <extras.d/70-sahara.sh.html>`__

extras.d/40-dib.sh

Lines changed: 0 additions & 27 deletions
This file was deleted.

files/apache-dib-pip-repo.template

Lines changed: 0 additions & 15 deletions
This file was deleted.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
Listen %HEAT_PIP_REPO_PORT%
2+
3+
<VirtualHost *:%HEAT_PIP_REPO_PORT%>
4+
DocumentRoot %HEAT_PIP_REPO%
5+
<Directory %HEAT_PIP_REPO%>
6+
DirectoryIndex index.html
7+
Require all granted
8+
Order allow,deny
9+
allow from all
10+
</Directory>
11+
12+
ErrorLog /var/log/%APACHE_NAME%/heat_pip_repo_error.log
13+
LogLevel warn
14+
CustomLog /var/log/%APACHE_NAME%/heat_pip_repo_access.log combined
15+
</VirtualHost>

lib/dib

Lines changed: 0 additions & 149 deletions
This file was deleted.

lib/heat

Lines changed: 46 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@
88
# ENABLED_SERVICES+=,heat,h-api,h-api-cfn,h-api-cw,h-eng
99

1010
# Dependencies:
11-
#
12-
# - functions
13-
# - dib (if HEAT_CREATE_TEST_IMAGE=True)
11+
# (none)
1412

1513
# stack.sh
1614
# ---------
@@ -37,6 +35,13 @@ GITDIR["python-heatclient"]=$DEST/python-heatclient
3735
HEAT_DIR=$DEST/heat
3836
HEAT_CFNTOOLS_DIR=$DEST/heat-cfntools
3937
HEAT_TEMPLATES_REPO_DIR=$DEST/heat-templates
38+
OCC_DIR=$DEST/os-collect-config
39+
ORC_DIR=$DEST/os-refresh-config
40+
OAC_DIR=$DEST/os-apply-config
41+
42+
HEAT_PIP_REPO=$DATA_DIR/heat-pip-repo
43+
HEAT_PIP_REPO_PORT=${HEAT_PIP_REPO_PORT:-8899}
44+
4045
HEAT_AUTH_CACHE_DIR=${HEAT_AUTH_CACHE_DIR:-/var/cache/heat}
4146
HEAT_STANDALONE=$(trueorfalse False HEAT_STANDALONE)
4247
HEAT_ENABLE_ADOPT_ABANDON=$(trueorfalse False HEAT_ENABLE_ADOPT_ABANDON)
@@ -47,10 +52,6 @@ HEAT_TEMPLATES_DIR=$HEAT_CONF_DIR/templates
4752
HEAT_STACK_DOMAIN=$(trueorfalse True HEAT_STACK_DOMAIN)
4853
HEAT_API_HOST=${HEAT_API_HOST:-$HOST_IP}
4954
HEAT_API_PORT=${HEAT_API_PORT:-8004}
50-
HEAT_FUNCTIONAL_IMAGE_ELEMENTS=${HEAT_FUNCTIONAL_IMAGE_ELEMENTS:-\
51-
vm fedora selinux-permissive pypi os-collect-config os-refresh-config \
52-
os-apply-config heat-cfntools heat-config heat-config-cfn-init \
53-
heat-config-puppet heat-config-script}
5455

5556

5657
# other default options
@@ -296,22 +297,44 @@ function create_heat_accounts {
296297
fi
297298
}
298299

299-
# build_heat_functional_test_image() - Build and upload functional test image
300-
function build_heat_functional_test_image {
301-
if is_service_enabled dib; then
302-
build_dib_pip_repo "$OCC_DIR $OAC_DIR $ORC_DIR $HEAT_CFNTOOLS_DIR"
303-
local image_name=heat-functional-tests-image
304-
305-
# Elements path for tripleo-image-elements and heat-templates software-config
306-
local elements_path=$TIE_DIR/elements:$HEAT_TEMPLATES_REPO_DIR/hot/software-config/elements
307-
308-
disk_image_create_upload "$image_name" "$HEAT_FUNCTIONAL_IMAGE_ELEMENTS" "$elements_path"
309-
iniset $TEMPEST_CONFIG orchestration image_ref $image_name
310-
else
311-
echo "Error, HEAT_CREATE_TEST_IMAGE=True requires dib" >&2
312-
echo "Add \"enable_service dib\" to your localrc" >&2
313-
exit 1
314-
fi
300+
# build_heat_pip_mirror() - Build a pip mirror containing heat agent projects
301+
function build_heat_pip_mirror {
302+
local project_dirs="$OCC_DIR $OAC_DIR $ORC_DIR $HEAT_CFNTOOLS_DIR"
303+
local projpath proj package
304+
305+
rm -rf $HEAT_PIP_REPO
306+
mkdir -p $HEAT_PIP_REPO
307+
308+
echo "<html><body>" > $HEAT_PIP_REPO/index.html
309+
for projpath in $project_dirs; do
310+
proj=$(basename $projpath)
311+
mkdir -p $HEAT_PIP_REPO/$proj
312+
pushd $projpath
313+
rm -rf dist
314+
python setup.py sdist
315+
pushd dist
316+
package=$(ls *)
317+
mv $package $HEAT_PIP_REPO/$proj/$package
318+
popd
319+
320+
echo "<html><body><a href=\"$package\">$package</a></body></html>" > $HEAT_PIP_REPO/$proj/index.html
321+
echo "<a href=\"$proj\">$proj</a><br/>" >> $HEAT_PIP_REPO/index.html
322+
323+
popd
324+
done
325+
326+
echo "</body></html>" >> $HEAT_PIP_REPO/index.html
327+
328+
local heat_pip_repo_apache_conf=$(apache_site_config_for heat_pip_repo)
329+
330+
sudo cp $FILES/apache-heat-pip-repo.template $heat_pip_repo_apache_conf
331+
sudo sed -e "
332+
s|%HEAT_PIP_REPO%|$HEAT_PIP_REPO|g;
333+
s|%HEAT_PIP_REPO_PORT%|$HEAT_PIP_REPO_PORT|g;
334+
s|%APACHE_NAME%|$APACHE_NAME|g;
335+
" -i $heat_pip_repo_apache_conf
336+
enable_apache_site heat_pip_repo
337+
restart_apache_server
315338
}
316339

317340
# Restore xtrace

stack.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1227,9 +1227,9 @@ if is_service_enabled heat; then
12271227
init_heat
12281228
echo_summary "Starting Heat"
12291229
start_heat
1230-
if [ "$HEAT_CREATE_TEST_IMAGE" = "True" ]; then
1231-
echo_summary "Building Heat functional test image"
1232-
build_heat_functional_test_image
1230+
if [ "$HEAT_BUILD_PIP_MIRROR" = "True" ]; then
1231+
echo_summary "Building Heat pip mirror"
1232+
build_heat_pip_mirror
12331233
fi
12341234
fi
12351235

stackrc

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -419,14 +419,10 @@ GITBRANCH["ceilometermiddleware"]=${CEILOMETERMIDDLEWARE_BRANCH:-master}
419419

420420
##################
421421
#
422-
# TripleO Components
422+
# TripleO / Heat Agent Components
423423
#
424424
##################
425425

426-
# diskimage-builder
427-
DIB_REPO=${DIB_REPO:-${GIT_BASE}/openstack/diskimage-builder.git}
428-
DIB_BRANCH=${DIB_BRANCH:-master}
429-
430426
# os-apply-config configuration template tool
431427
OAC_REPO=${OAC_REPO:-${GIT_BASE}/openstack/os-apply-config.git}
432428
OAC_BRANCH=${OAC_BRANCH:-master}
@@ -439,10 +435,6 @@ OCC_BRANCH=${OCC_BRANCH:-master}
439435
ORC_REPO=${ORC_REPO:-${GIT_BASE}/openstack/os-refresh-config.git}
440436
ORC_BRANCH=${ORC_BRANCH:-master}
441437

442-
# Tripleo elements for diskimage-builder images
443-
TIE_REPO=${TIE_REPO:-${GIT_BASE}/openstack/tripleo-image-elements.git}
444-
TIE_BRANCH=${TIE_BRANCH:-master}
445-
446438
#################
447439
#
448440
# 3rd Party Components (non pip installable)

0 commit comments

Comments
 (0)