2 # SPDX-License-Identifier: EPL-1.0
3 ##############################################################################
4 # Copyright (c) 2017, 2018 The Linux Foundation and others.
6 # All rights reserved. This program and the accompanying materials
7 # are made available under the terms of the Eclipse Public License v1.0
8 # which accompanies this distribution, and is available at
9 # http://www.eclipse.org/legal/epl-v10.html
10 ##############################################################################
11 echo "---> Create HEAT stack"
13 os_cloud="${OS_CLOUD:-vex}"
14 stack_name="${OS_STACK_NAME}"
15 stack_template="${OS_STACK_TEMPLATE}"
16 stack_template_dir="/opt/ciman/${OS_STACK_TEMPLATE_DIR:-openstack-hot}"
17 stack_parameters="$WORKSPACE/stack-parameters.yaml"
21 # shellcheck disable=SC1090
24 # Check if openstack venv was previously created
25 if [ -f "/tmp/.os_lf_venv" ]; then
26 os_lf_venv=$(cat "/tmp/.os_lf_venv")
29 if [ -d "${os_lf_venv}" ] && [ -f "${os_lf_venv}/bin/openstack" ]; then
30 echo "Re-use existing venv: ${os_lf_venv}"
31 PATH=$os_lf_venv/bin:$PATH
33 lf-activate-venv --python python3 "cryptography<3.4" \
34 "lftools[openstack]" \
38 python-openstackclient \
44 openstack --os-cloud "$os_cloud" limits show --absolute
46 pushd "$stack_template_dir" || exit 1
47 lftools openstack --os-cloud "$os_cloud" stack create \
48 "$stack_name" "$stack_template" "$stack_parameters"