blob: 12c315ad78abde5497eaa2bd1dc2188aa708dc70 [file] [log] [blame]
Sean Daguee263c822014-12-05 14:25:28 -05001#!/bin/bash
2#
Dean Troyer4a43b7b2012-08-28 17:43:40 -05003# stackrc
4#
John Huaa4693b52015-08-06 13:53:35 +01005
6# ensure we don't re-source this in the same environment
7[[ -z "$_DEVSTACK_STACKRC" ]] || return 0
8declare -r _DEVSTACK_STACKRC=1
9
Dean Troyer0bd24102012-03-08 00:33:54 -060010# Find the other rc files
Peter Feiner388e36c2013-10-24 18:51:44 -040011RC_DIR=$(cd $(dirname "${BASH_SOURCE:-$0}") && pwd)
Dean Troyer0bd24102012-03-08 00:33:54 -060012
Dean Troyerdc97cb72015-03-28 08:20:50 -050013# Source required DevStack functions and globals
Adam Gandelman0e4cd032014-10-03 13:27:17 -070014source $RC_DIR/functions
15
Dean Troyer1214d9d2012-07-06 09:39:07 -050016# Destination path for installation
17DEST=/opt/stack
18
Dean Troyerc83a7e12012-11-29 11:47:58 -060019# Destination for working data
20DATA_DIR=${DEST}/data
21
Dean Troyer9fc87922013-05-22 17:19:06 -050022# Destination for status files
23SERVICE_DIR=${DEST}/status
24
Dean Troyer74759aa2013-01-24 14:19:55 -060025# Determine stack user
26if [[ $EUID -eq 0 ]]; then
27 STACK_USER=stack
28else
29 STACK_USER=$(whoami)
30fi
Attila Fazekas91b8d132013-01-06 22:40:09 +010031
Bartosz Górski0abde392014-02-28 14:15:19 +010032# Specify region name Region
33REGION_NAME=${REGION_NAME:-RegionOne}
34
Chmouel Boudjnah8da56562012-03-09 14:21:40 +000035# Specify which services to launch. These generally correspond to
Dean Troyer4a43b7b2012-08-28 17:43:40 -050036# screen tabs. To change the default list, use the ``enable_service`` and
Dean Troyera79617c2014-04-13 18:16:54 -050037# ``disable_service`` functions in ``local.conf``.
38# For example, to enable Swift add this to ``local.conf``:
39# enable_service s-proxy s-object s-container s-account
Sean Daguee3e9b222015-02-05 12:34:12 +000040# In order to enable Neutron (a single node setup) add the following
41# settings in ``local.conf``:
Shuichiro MAKIGAKIb968b0c2015-01-04 17:53:12 +090042# [[local|localrc]]
Sean Daguee3e9b222015-02-05 12:34:12 +000043# disable_service n-net
44# enable_service q-svc
45# enable_service q-agt
46# enable_service q-dhcp
47# enable_service q-l3
48# enable_service q-meta
Dean Troyerdc97cb72015-03-28 08:20:50 -050049# # Optional, to enable tempest configuration as part of DevStack
Oleg Bondarev1f11f9a2013-03-25 05:34:23 -070050# enable_service tempest
Sean Daguea42541a2014-02-13 09:39:15 -050051
Dean Troyerdc97cb72015-03-28 08:20:50 -050052# This allows us to pass ``ENABLED_SERVICES``
Sean Dague53753292014-12-04 19:38:15 -050053if ! isset ENABLED_SERVICES ; then
Sean Dague279cfe72015-04-01 07:33:55 -040054 # Keystone - nothing works without keystone
55 ENABLED_SERVICES=key
56 # Nova - services to support libvirt based openstack clouds
Yalei Wang2443c372015-04-24 10:58:52 +080057 ENABLED_SERVICES+=,n-api,n-cpu,n-net,n-cond,n-sch,n-novnc,n-crt,n-cauth
Sean Dague279cfe72015-04-01 07:33:55 -040058 # Glance services needed for Nova
Sushil Kumar72a33122015-04-03 09:28:50 +000059 ENABLED_SERVICES+=,g-api,g-reg
Dean Troyerdc97cb72015-03-28 08:20:50 -050060 # Cinder
Sean Daguefafb62b2014-06-30 16:49:30 -040061 ENABLED_SERVICES+=,c-sch,c-api,c-vol
Dean Troyerdc97cb72015-03-28 08:20:50 -050062 # Dashboard
Sean Daguefafb62b2014-06-30 16:49:30 -040063 ENABLED_SERVICES+=,horizon
Dean Troyerdc97cb72015-03-28 08:20:50 -050064 # Additional services
Sean Dague279cfe72015-04-01 07:33:55 -040065 ENABLED_SERVICES+=,rabbit,tempest,mysql,dstat
Sean Daguefafb62b2014-06-30 16:49:30 -040066fi
Chmouel Boudjnah8da56562012-03-09 14:21:40 +000067
ihrachyshkacbea3442014-06-28 18:09:54 +020068# SQLAlchemy supports multiple database drivers for each database server
69# type. For example, deployer may use MySQLdb, MySQLConnector, or oursql
70# to access MySQL database.
71#
72# When defined, the variable controls which database driver is used to
73# connect to database server. Otherwise using default driver defined for
74# each database type.
75#
76# You can find the list of currently supported drivers for each database
77# type at: http://docs.sqlalchemy.org/en/rel_0_9/core/engines.html
78# SQLALCHEMY_DATABASE_DRIVER="mysqldb"
79
Morgan Fainberg46455a32014-06-20 10:37:18 -070080# Global toggle for enabling services under mod_wsgi. If this is set to
81# ``True`` all services that use HTTPD + mod_wsgi as the preferred method of
82# deployment, will be deployed under Apache. If this is set to ``False`` all
83# services will rely on the local toggle variable (e.g. ``KEYSTONE_USE_MOD_WSGI``)
84ENABLE_HTTPD_MOD_WSGI_SERVICES=True
85
Dean Troyer67787e62012-05-02 11:48:15 -050086# Set the default Nova APIs to enable
Andrew Laski6e7e1c92012-10-31 16:11:37 -040087NOVA_ENABLED_APIS=ec2,osapi_compute,metadata
Dean Troyer67787e62012-05-02 11:48:15 -050088
David Lyle7b105c52015-07-27 17:14:32 -060089# Set the root URL for Horizon
90HORIZON_APACHE_ROOT="/dashboard"
91
Vishvananda Ishaya58e21342013-02-11 16:48:12 -080092# Whether to use 'dev mode' for screen windows. Dev mode works by
93# stuffing text into the screen windows so that a developer can use
94# ctrl-c, up-arrow, enter to restart the service. Starting services
95# this way is slightly unreliable, and a bit slower, so this can
Dean Troyer681f3fd2013-02-27 19:00:39 -060096# be disabled for automated testing by setting this value to False.
97USE_SCREEN=True
Vishvananda Ishaya58e21342013-02-11 16:48:12 -080098
Maru Newbya81dcaa2013-03-26 00:15:34 -040099# allow local overrides of env variables, including repo config
Dean Troyer893e6632013-09-13 15:05:51 -0500100if [[ -f $RC_DIR/localrc ]]; then
101 # Old-style user-supplied config
Maru Newbya81dcaa2013-03-26 00:15:34 -0400102 source $RC_DIR/localrc
Dean Troyer893e6632013-09-13 15:05:51 -0500103elif [[ -f $RC_DIR/.localrc.auto ]]; then
104 # New-style user-supplied config extracted from local.conf
105 source $RC_DIR/.localrc.auto
Maru Newbya81dcaa2013-03-26 00:15:34 -0400106fi
107
Samuel de Medeiros Queiroz3fd71d62015-05-03 14:54:45 -0300108# Configure Identity API version: 2.0, 3
109IDENTITY_API_VERSION=${IDENTITY_API_VERSION:-2.0}
110
111# Set the option ENABLE_IDENTITY_V2 to True. It defines whether the DevStack
112# deployment will be deploying the Identity v2 pipelines. If this option is set
113# to ``False``, DevStack will: i) disable Identity v2; ii) configure Tempest to
114# skip Identity v2 specific tests; and iii) configure Horizon to use Identity
115# v3. When this option is set to ``False``, the option IDENTITY_API_VERSION
116# will to be set to ``3`` in order to make DevStack register the Identity
117# endpoint as v3. This flag is experimental and will be used as basis to
118# identify the projects which still have issues to operate with Identity v3.
119ENABLE_IDENTITY_V2=$(trueorfalse True ENABLE_IDENTITY_V2)
120if [ "$ENABLE_IDENTITY_V2" == "False" ]; then
121 IDENTITY_API_VERSION=3
122fi
123
Dean Troyer5686dbc2015-03-09 14:27:51 -0500124# Enable use of Python virtual environments. Individual project use of
125# venvs are controlled by the PROJECT_VENV array; every project with
126# an entry in the array will be installed into the named venv.
127# By default this will put each project into its own venv.
128USE_VENV=$(trueorfalse False USE_VENV)
129
130# Add packages that need to be installed into a venv but are not in any
131# requirmenets files here, in a comma-separated list
132ADDITIONAL_VENV_PACKAGES=${ADITIONAL_VENV_PACKAGES:-""}
133
Dean Troyerb1d8e8e2015-02-16 13:58:35 -0600134# Configure wheel cache location
135export WHEELHOUSE=${WHEELHOUSE:-$DEST/.wheelhouse}
136export PIP_WHEEL_DIR=${PIP_WHEEL_DIR:-$WHEELHOUSE}
137export PIP_FIND_LINKS=${PIP_FIND_LINKS:-file://$WHEELHOUSE}
138
Jeremy Stanleyc4f47342014-01-25 01:10:31 +0000139# This can be used to turn database query logging on and off
140# (currently only implemented for MySQL backend)
Daniel P. Berrange20a3dbd2015-02-16 13:24:35 +0000141DATABASE_QUERY_LOGGING=$(trueorfalse False DATABASE_QUERY_LOGGING)
Dean Troyercc6b4432013-04-08 15:38:03 -0500142
Ian Wienandd53ad0b2014-02-20 13:55:13 +1100143# Set a timeout for git operations. If git is still running when the
144# timeout expires, the command will be retried up to 3 times. This is
145# in the format for timeout(1);
146#
147# DURATION is a floating point number with an optional suffix: 's'
148# for seconds (the default), 'm' for minutes, 'h' for hours or 'd'
149# for days.
150#
151# Zero disables timeouts
152GIT_TIMEOUT=${GIT_TIMEOUT:-0}
153
Dean Troyer4a43b7b2012-08-28 17:43:40 -0500154# Repositories
155# ------------
156
Monty Taylord5b18ec2012-07-26 09:21:01 -0500157# Base GIT Repo URL
Dean Troyer3324f192014-09-18 09:26:39 -0500158# Another option is https://git.openstack.org
Steve Kowalik047cac52013-11-07 22:36:10 +1100159GIT_BASE=${GIT_BASE:-git://git.openstack.org}
Monty Taylord5b18ec2012-07-26 09:21:01 -0500160
Clark Boylan05aa3842015-08-03 11:14:13 -0700161# The location of REQUIREMENTS once cloned
162REQUIREMENTS_DIR=$DEST/requirements
163
Sean Dague07d7e5b2014-11-17 07:10:14 -0500164# Which libraries should we install from git instead of using released
165# versions on pypi?
166#
Dean Troyerdc97cb72015-03-28 08:20:50 -0500167# By default DevStack is now installing libraries from pypi instead of
Sean Dague07d7e5b2014-11-17 07:10:14 -0500168# from git repositories by default. This works great if you are
169# developing server components, but if you want to develop libraries
Dean Troyerdc97cb72015-03-28 08:20:50 -0500170# and see them live in DevStack you need to tell DevStack it should
Sean Dague07d7e5b2014-11-17 07:10:14 -0500171# install them from git.
172#
173# ex: LIBS_FROM_GIT=python-keystoneclient,oslo.config
174#
175# Will install those 2 libraries from git, the rest from pypi.
176
Dean Troyerdc97cb72015-03-28 08:20:50 -0500177
Sean Dague24516d02014-10-02 12:29:08 -0400178##############
179#
180# OpenStack Server Components
181#
182##############
183
Sean Dagueee5ae7b2014-11-13 13:23:27 -0500184# block storage service
Maru Newbya81dcaa2013-03-26 00:15:34 -0400185CINDER_REPO=${CINDER_REPO:-${GIT_BASE}/openstack/cinder.git}
186CINDER_BRANCH=${CINDER_BRANCH:-master}
Dean Troyer67787e62012-05-02 11:48:15 -0500187
Dean Troyer1a6d4492013-06-03 16:47:36 -0500188# image catalog service
189GLANCE_REPO=${GLANCE_REPO:-${GIT_BASE}/openstack/glance.git}
190GLANCE_BRANCH=${GLANCE_BRANCH:-master}
191
Dean Troyer1a6d4492013-06-03 16:47:36 -0500192# heat service
193HEAT_REPO=${HEAT_REPO:-${GIT_BASE}/openstack/heat.git}
194HEAT_BRANCH=${HEAT_BRANCH:-master}
195
Dean Troyer1a6d4492013-06-03 16:47:36 -0500196# django powered web control panel for openstack
197HORIZON_REPO=${HORIZON_REPO:-${GIT_BASE}/openstack/horizon.git}
198HORIZON_BRANCH=${HORIZON_BRANCH:-master}
199
Jim Rollenhagenf00766b2014-08-15 01:08:11 +0000200# baremetal provisioning service
Roman Prykhodchenkoce696b62013-08-09 10:40:45 +0300201IRONIC_REPO=${IRONIC_REPO:-${GIT_BASE}/openstack/ironic.git}
202IRONIC_BRANCH=${IRONIC_BRANCH:-master}
Roman Prykhodchenko43e00662013-10-15 17:03:15 +0300203
Dean Troyer1a6d4492013-06-03 16:47:36 -0500204# unified auth system (manages accounts/tokens)
205KEYSTONE_REPO=${KEYSTONE_REPO:-${GIT_BASE}/openstack/keystone.git}
206KEYSTONE_BRANCH=${KEYSTONE_BRANCH:-master}
207
Sean Dague24516d02014-10-02 12:29:08 -0400208# neutron service
209NEUTRON_REPO=${NEUTRON_REPO:-${GIT_BASE}/openstack/neutron.git}
210NEUTRON_BRANCH=${NEUTRON_BRANCH:-master}
Morgan Fainberg58936fd2014-06-24 12:26:07 -0700211
Kyle Mestery20b839f2014-12-08 06:17:27 +0000212# neutron fwaas service
213NEUTRON_FWAAS_REPO=${NEUTRON_FWAAS_REPO:-${GIT_BASE}/openstack/neutron-fwaas.git}
214NEUTRON_FWAAS_BRANCH=${NEUTRON_FWAAS_BRANCH:-master}
215
216# neutron lbaas service
217NEUTRON_LBAAS_REPO=${NEUTRON_LBAAS_REPO:-${GIT_BASE}/openstack/neutron-lbaas.git}
218NEUTRON_LBAAS_BRANCH=${NEUTRON_LBAAS_BRANCH:-master}
219
220# neutron vpnaas service
221NEUTRON_VPNAAS_REPO=${NEUTRON_VPNAAS_REPO:-${GIT_BASE}/openstack/neutron-vpnaas.git}
222NEUTRON_VPNAAS_BRANCH=${NEUTRON_VPNAAS_BRANCH:-master}
223
Anthony Young096fb5a2011-09-26 13:14:46 -0700224# compute service
Maru Newbya81dcaa2013-03-26 00:15:34 -0400225NOVA_REPO=${NOVA_REPO:-${GIT_BASE}/openstack/nova.git}
226NOVA_BRANCH=${NOVA_BRANCH:-master}
Anthony Young096fb5a2011-09-26 13:14:46 -0700227
Sean Dagueee5ae7b2014-11-13 13:23:27 -0500228# object storage service
Sean Dague24516d02014-10-02 12:29:08 -0400229SWIFT_REPO=${SWIFT_REPO:-${GIT_BASE}/openstack/swift.git}
230SWIFT_BRANCH=${SWIFT_BRANCH:-master}
231
Sean Dague24516d02014-10-02 12:29:08 -0400232##############
233#
234# Testing Components
235#
236##############
237
238# consolidated openstack requirements
239REQUIREMENTS_REPO=${REQUIREMENTS_REPO:-${GIT_BASE}/openstack/requirements.git}
240REQUIREMENTS_BRANCH=${REQUIREMENTS_BRANCH:-master}
241
242# Tempest test suite
243TEMPEST_REPO=${TEMPEST_REPO:-${GIT_BASE}/openstack/tempest.git}
244TEMPEST_BRANCH=${TEMPEST_BRANCH:-master}
245
246# TODO(sdague): this should end up as a library component like below
Sean Dague91b22902014-11-18 07:13:35 -0500247GITREPO["tempest-lib"]=${TEMPEST_LIB_REPO:-${GIT_BASE}/openstack/tempest-lib.git}
248GITBRANCH["tempest-lib"]=${TEMPEST_LIB_BRANCH:-master}
Sean Dague24516d02014-10-02 12:29:08 -0400249
250
251##############
252#
253# OpenStack Client Library Componets
254#
255##############
256
Sean Dague24516d02014-10-02 12:29:08 -0400257# volume client
Sean Daguee08ab102014-11-13 17:09:28 -0500258GITREPO["python-cinderclient"]=${CINDERCLIENT_REPO:-${GIT_BASE}/openstack/python-cinderclient.git}
Chris Dent425e8442014-11-14 11:09:16 +0000259GITBRANCH["python-cinderclient"]=${CINDERCLIENT_BRANCH:-master}
Sean Dague24516d02014-10-02 12:29:08 -0400260
261# python glance client library
Sean Daguee08ab102014-11-13 17:09:28 -0500262GITREPO["python-glanceclient"]=${GLANCECLIENT_REPO:-${GIT_BASE}/openstack/python-glanceclient.git}
263GITBRANCH["python-glanceclient"]=${GLANCECLIENT_BRANCH:-master}
Sean Dague24516d02014-10-02 12:29:08 -0400264
265# python heat client library
Sean Daguee08ab102014-11-13 17:09:28 -0500266GITREPO["python-heatclient"]=${HEATCLIENT_REPO:-${GIT_BASE}/openstack/python-heatclient.git}
267GITBRANCH["python-heatclient"]=${HEATCLIENT_BRANCH:-master}
Sean Dague24516d02014-10-02 12:29:08 -0400268
269# ironic client
Sean Daguee08ab102014-11-13 17:09:28 -0500270GITREPO["python-ironicclient"]=${IRONICCLIENT_REPO:-${GIT_BASE}/openstack/python-ironicclient.git}
271GITBRANCH["python-ironicclient"]=${IRONICCLIENT_BRANCH:-master}
Sean Dague24516d02014-10-02 12:29:08 -0400272
Jamie Lennox21a90772015-07-03 11:54:38 +1000273# the base authentication plugins that clients use to authenticate
274GITREPO["keystoneauth"]=${KEYSTONEAUTH_REPO:-${GIT_BASE}/openstack/keystoneauth.git}
275GITBRANCH["keystoneauth"]=${KEYSTONEAUTH_BRANCH:-master}
276
Sean Dague24516d02014-10-02 12:29:08 -0400277# python keystone client library to nova that horizon uses
Sean Daguee08ab102014-11-13 17:09:28 -0500278GITREPO["python-keystoneclient"]=${KEYSTONECLIENT_REPO:-${GIT_BASE}/openstack/python-keystoneclient.git}
279GITBRANCH["python-keystoneclient"]=${KEYSTONECLIENT_BRANCH:-master}
Sean Dague24516d02014-10-02 12:29:08 -0400280
281# neutron client
Sean Daguee08ab102014-11-13 17:09:28 -0500282GITREPO["python-neutronclient"]=${NEUTRONCLIENT_REPO:-${GIT_BASE}/openstack/python-neutronclient.git}
283GITBRANCH["python-neutronclient"]=${NEUTRONCLIENT_BRANCH:-master}
Sean Dague24516d02014-10-02 12:29:08 -0400284
Dean Troyer1a6d4492013-06-03 16:47:36 -0500285# python client library to nova that horizon (and others) use
Sean Daguee08ab102014-11-13 17:09:28 -0500286GITREPO["python-novaclient"]=${NOVACLIENT_REPO:-${GIT_BASE}/openstack/python-novaclient.git}
287GITBRANCH["python-novaclient"]=${NOVACLIENT_BRANCH:-master}
Dean Troyer1a6d4492013-06-03 16:47:36 -0500288
Sean Dague24516d02014-10-02 12:29:08 -0400289# python swift client library
Sean Daguee08ab102014-11-13 17:09:28 -0500290GITREPO["python-swiftclient"]=${SWIFTCLIENT_REPO:-${GIT_BASE}/openstack/python-swiftclient.git}
291GITBRANCH["python-swiftclient"]=${SWIFTCLIENT_BRANCH:-master}
Steve Baker122ab702014-05-05 16:06:17 +1200292
Dean Troyer1a6d4492013-06-03 16:47:36 -0500293# consolidated openstack python client
Sean Daguee08ab102014-11-13 17:09:28 -0500294GITREPO["python-openstackclient"]=${OPENSTACKCLIENT_REPO:-${GIT_BASE}/openstack/python-openstackclient.git}
295GITBRANCH["python-openstackclient"]=${OPENSTACKCLIENT_BRANCH:-master}
Sean Dagueaecd1892014-11-19 15:19:51 -0500296# this doesn't exist in a lib file, so set it here
297GITDIR["python-openstackclient"]=$DEST/python-openstackclient
Dean Troyer1a6d4492013-06-03 16:47:36 -0500298
Dean Troyerdc97cb72015-03-28 08:20:50 -0500299
Sean Dague24516d02014-10-02 12:29:08 -0400300###################
301#
302# Oslo Libraries
303#
304###################
Steve Baker122ab702014-05-05 16:06:17 +1200305
Doug Hellmann6b1cb102014-02-10 09:59:43 -0800306# cliff command line framework
Sean Daguecc524062014-10-01 09:06:43 -0400307GITREPO["cliff"]=${CLIFF_REPO:-${GIT_BASE}/openstack/cliff.git}
308GITBRANCH["cliff"]=${CLIFF_BRANCH:-master}
Doug Hellmann6b1cb102014-02-10 09:59:43 -0800309
Joshua Harlowe3a640d2015-06-08 16:44:21 -0700310# async framework/helpers
311GITREPO["futurist"]=${FUTURIST_REPO:-${GIT_BASE}/openstack/futurist.git}
312GITBRANCH["futurist"]=${FUTURIST_BRANCH:-master}
313
Joshua Harlowee9064b2015-02-19 15:06:23 -0800314# debtcollector deprecation framework/helpers
315GITREPO["debtcollector"]=${DEBTCOLLECTOR_REPO:-${GIT_BASE}/openstack/debtcollector.git}
316GITBRANCH["debtcollector"]=${DEBTCOLLECTOR_BRANCH:-master}
317
Joshua Harlow96c6b2d2015-06-08 16:48:49 -0700318# helpful state machines
319GITREPO["automaton"]=${AUTOMATON_REPO:-${GIT_BASE}/openstack/automaton.git}
320GITBRANCH["automaton"]=${AUTOMATON_BRANCH:-master}
321
Steve Martinelli531017c2015-06-27 03:37:39 +0000322# oslo.cache
323GITREPO["oslo.cache"]=${OSLOCACHE_REPO:-${GIT_BASE}/openstack/oslo.cache.git}
324GITBRANCH["oslo.cache"]=${OSLOCACHE_BRANCH:-master}
325
Davanum Srinivas0b9464d2014-08-27 12:50:17 -0400326# oslo.concurrency
Sean Daguecc524062014-10-01 09:06:43 -0400327GITREPO["oslo.concurrency"]=${OSLOCON_REPO:-${GIT_BASE}/openstack/oslo.concurrency.git}
Sean Dagueb7cda382014-10-03 08:00:52 -0400328GITBRANCH["oslo.concurrency"]=${OSLOCON_BRANCH:-master}
Davanum Srinivas0b9464d2014-08-27 12:50:17 -0400329
Sean Dague1b6b5312013-07-31 06:46:34 -0400330# oslo.config
Sean Daguecc524062014-10-01 09:06:43 -0400331GITREPO["oslo.config"]=${OSLOCFG_REPO:-${GIT_BASE}/openstack/oslo.config.git}
332GITBRANCH["oslo.config"]=${OSLOCFG_BRANCH:-master}
Sean Dague1b6b5312013-07-31 06:46:34 -0400333
Davanum Srinivas958111e2014-11-17 17:35:40 -0500334# oslo.context
335GITREPO["oslo.context"]=${OSLOCTX_REPO:-${GIT_BASE}/openstack/oslo.context.git}
336GITBRANCH["oslo.context"]=${OSLOCTX_BRANCH:-master}
337
Victor Sergeyevda945f32014-04-28 15:44:29 +0300338# oslo.db
Sean Dagueb7cda382014-10-03 08:00:52 -0400339GITREPO["oslo.db"]=${OSLODB_REPO:-${GIT_BASE}/openstack/oslo.db.git}
340GITBRANCH["oslo.db"]=${OSLODB_BRANCH:-master}
Victor Sergeyevda945f32014-04-28 15:44:29 +0300341
Doug Hellmanncd5c8132014-07-02 11:58:35 -0700342# oslo.i18n
Sean Dagueb7cda382014-10-03 08:00:52 -0400343GITREPO["oslo.i18n"]=${OSLOI18N_REPO:-${GIT_BASE}/openstack/oslo.i18n.git}
344GITBRANCH["oslo.i18n"]=${OSLOI18N_BRANCH:-master}
Doug Hellmanncd5c8132014-07-02 11:58:35 -0700345
Davanum Srinivas13249f82014-09-02 09:50:21 -0400346# oslo.log
Sean Dagueb7cda382014-10-03 08:00:52 -0400347GITREPO["oslo.log"]=${OSLOLOG_REPO:-${GIT_BASE}/openstack/oslo.log.git}
348GITBRANCH["oslo.log"]=${OSLOLOG_BRANCH:-master}
Davanum Srinivas13249f82014-09-02 09:50:21 -0400349
Sean Dague1b6b5312013-07-31 06:46:34 -0400350# oslo.messaging
Sean Dagueb7cda382014-10-03 08:00:52 -0400351GITREPO["oslo.messaging"]=${OSLOMSG_REPO:-${GIT_BASE}/openstack/oslo.messaging.git}
352GITBRANCH["oslo.messaging"]=${OSLOMSG_BRANCH:-master}
Sean Dague1b6b5312013-07-31 06:46:34 -0400353
Davanum Srinivas0b9464d2014-08-27 12:50:17 -0400354# oslo.middleware
Sean Daguecc524062014-10-01 09:06:43 -0400355GITREPO["oslo.middleware"]=${OSLOMID_REPO:-${GIT_BASE}/openstack/oslo.middleware.git}
356GITBRANCH["oslo.middleware"]=${OSLOMID_BRANCH:-master}
Davanum Srinivas0b9464d2014-08-27 12:50:17 -0400357
Steve Martinelli20b027b2015-02-04 02:38:13 -0500358# oslo.policy
359GITREPO["oslo.policy"]=${OSLOPOLICY_REPO:-${GIT_BASE}/openstack/oslo.policy.git}
360GITBRANCH["oslo.policy"]=${OSLOPOLICY_BRANCH:-master}
361
Davanum Srinivas77a7d112015-06-22 16:44:13 -0400362# oslo.reports
363GITREPO["oslo.reports"]=${OSLOREPORTS_REPO:-${GIT_BASE}/openstack/oslo.reports.git}
364GITBRANCH["oslo.reports"]=${OSLOREPORTS_BRANCH:-master}
365
Thierry Carrez0915e0c2014-01-02 15:05:41 +0100366# oslo.rootwrap
Sean Dagueb7cda382014-10-03 08:00:52 -0400367GITREPO["oslo.rootwrap"]=${OSLORWRAP_REPO:-${GIT_BASE}/openstack/oslo.rootwrap.git}
368GITBRANCH["oslo.rootwrap"]=${OSLORWRAP_BRANCH:-master}
Thierry Carrez0915e0c2014-01-02 15:05:41 +0100369
Doug Hellmann5cd17f72014-08-27 09:42:41 -0400370# oslo.serialization
Sean Dagueb7cda382014-10-03 08:00:52 -0400371GITREPO["oslo.serialization"]=${OSLOSERIALIZATION_REPO:-${GIT_BASE}/openstack/oslo.serialization.git}
372GITBRANCH["oslo.serialization"]=${OSLOSERIALIZATION_BRANCH:-master}
Doug Hellmann5cd17f72014-08-27 09:42:41 -0400373
Davanum Srinivas18d1cca2015-06-18 06:32:00 -0400374# oslo.service
375GITREPO["oslo.service"]=${OSLOSERVICE_REPO:-${GIT_BASE}/openstack/oslo.service.git}
376GITBRANCH["oslo.service"]=${OSLOSERVICE_BRANCH:-master}
377
Doug Hellmann5cd17f72014-08-27 09:42:41 -0400378# oslo.utils
Sean Dagueb7cda382014-10-03 08:00:52 -0400379GITREPO["oslo.utils"]=${OSLOUTILS_REPO:-${GIT_BASE}/openstack/oslo.utils.git}
380GITBRANCH["oslo.utils"]=${OSLOUTILS_BRANCH:-master}
Doug Hellmann5cd17f72014-08-27 09:42:41 -0400381
Dan Smithaca8a7f2015-03-03 08:50:27 -0800382# oslo.versionedobjects
383GITREPO["oslo.versionedobjects"]=${OSLOVERSIONEDOBJECTS_REPO:-${GIT_BASE}/openstack/oslo.versionedobjects.git}
384GITBRANCH["oslo.versionedobjects"]=${OSLOVERSIONEDOBJECTS_BRANCH:-master}
385
Davanum Srinivasf5aa05c2014-02-21 22:03:59 -0500386# oslo.vmware
Sean Dagueb7cda382014-10-03 08:00:52 -0400387GITREPO["oslo.vmware"]=${OSLOVMWARE_REPO:-${GIT_BASE}/openstack/oslo.vmware.git}
388GITBRANCH["oslo.vmware"]=${OSLOVMWARE_BRANCH:-master}
Davanum Srinivasf5aa05c2014-02-21 22:03:59 -0500389
Doug Hellmann6b1cb102014-02-10 09:59:43 -0800390# pycadf auditing library
Sean Daguecc524062014-10-01 09:06:43 -0400391GITREPO["pycadf"]=${PYCADF_REPO:-${GIT_BASE}/openstack/pycadf.git}
392GITBRANCH["pycadf"]=${PYCADF_BRANCH:-master}
Doug Hellmann6b1cb102014-02-10 09:59:43 -0800393
394# stevedore plugin manager
Sean Daguecc524062014-10-01 09:06:43 -0400395GITREPO["stevedore"]=${STEVEDORE_REPO:-${GIT_BASE}/openstack/stevedore.git}
396GITBRANCH["stevedore"]=${STEVEDORE_BRANCH:-master}
Doug Hellmann6b1cb102014-02-10 09:59:43 -0800397
398# taskflow plugin manager
Sean Daguecc524062014-10-01 09:06:43 -0400399GITREPO["taskflow"]=${TASKFLOW_REPO:-${GIT_BASE}/openstack/taskflow.git}
400GITBRANCH["taskflow"]=${TASKFLOW_BRANCH:-master}
Doug Hellmann6b1cb102014-02-10 09:59:43 -0800401
Julien Danjouc187b882014-12-09 15:41:55 +0100402# tooz plugin manager
403GITREPO["tooz"]=${TOOZ_REPO:-${GIT_BASE}/openstack/tooz.git}
404GITBRANCH["tooz"]=${TOOZ_BRANCH:-master}
405
Dean Troyer1a6d4492013-06-03 16:47:36 -0500406# pbr drives the setuptools configs
Sean Daguecc524062014-10-01 09:06:43 -0400407GITREPO["pbr"]=${PBR_REPO:-${GIT_BASE}/openstack-dev/pbr.git}
408GITBRANCH["pbr"]=${PBR_BRANCH:-master}
Dean Troyer1a6d4492013-06-03 16:47:36 -0500409
Dean Troyerdc97cb72015-03-28 08:20:50 -0500410
Sean Dague24516d02014-10-02 12:29:08 -0400411##################
412#
413# Libraries managed by OpenStack programs (non oslo)
414#
415##################
Dean Troyer1a6d4492013-06-03 16:47:36 -0500416
Sean Dague24516d02014-10-02 12:29:08 -0400417# glance store library
Sean Dagueee5ae7b2014-11-13 13:23:27 -0500418GITREPO["glance_store"]=${GLANCE_STORE_REPO:-${GIT_BASE}/openstack/glance_store.git}
419GITBRANCH["glance_store"]=${GLANCE_STORE_BRANCH:-master}
Dean Troyer1a6d4492013-06-03 16:47:36 -0500420
Sean Dague24516d02014-10-02 12:29:08 -0400421# heat-cfntools server agent
422HEAT_CFNTOOLS_REPO=${HEAT_CFNTOOLS_REPO:-${GIT_BASE}/openstack/heat-cfntools.git}
423HEAT_CFNTOOLS_BRANCH=${HEAT_CFNTOOLS_BRANCH:-master}
Sean Dague0392a102013-07-31 13:07:45 -0400424
Sean Dague24516d02014-10-02 12:29:08 -0400425# heat example templates and elements
426HEAT_TEMPLATES_REPO=${HEAT_TEMPLATES_REPO:-${GIT_BASE}/openstack/heat-templates.git}
427HEAT_TEMPLATES_BRANCH=${HEAT_TEMPLATES_BRANCH:-master}
428
429# django openstack_auth library
Sean Dague3c8973a2014-11-14 09:31:02 -0500430GITREPO["django_openstack_auth"]=${HORIZONAUTH_REPO:-${GIT_BASE}/openstack/django_openstack_auth.git}
431GITBRANCH["django_openstack_auth"]=${HORIZONAUTH_BRANCH:-master}
Sean Dague24516d02014-10-02 12:29:08 -0400432
433# keystone middleware
Sean Dague658312c2014-11-14 11:35:56 -0500434GITREPO["keystonemiddleware"]=${KEYSTONEMIDDLEWARE_REPO:-${GIT_BASE}/openstack/keystonemiddleware.git}
435GITBRANCH["keystonemiddleware"]=${KEYSTONEMIDDLEWARE_BRANCH:-master}
Sean Dague24516d02014-10-02 12:29:08 -0400436
437# s3 support for swift
Chmouel Boudjnah43577d52014-03-25 23:45:05 +0000438SWIFT3_REPO=${SWIFT3_REPO:-${GIT_BASE}/stackforge/swift3.git}
Maru Newbya81dcaa2013-03-26 00:15:34 -0400439SWIFT3_BRANCH=${SWIFT3_BRANCH:-master}
Joe Gordon42b1aa92012-05-24 14:11:01 -0700440
gordon chungad61e7f2015-02-12 15:17:25 -0500441# ceilometer middleware
442GITREPO["ceilometermiddleware"]=${CEILOMETERMIDDLEWARE_REPO:-${GIT_BASE}/openstack/ceilometermiddleware.git}
443GITBRANCH["ceilometermiddleware"]=${CEILOMETERMIDDLEWARE_BRANCH:-master}
Chris Dente9a47502015-06-27 11:29:09 +0000444GITDIR["ceilometermiddleware"]=$DEST/ceilometermiddleware
gordon chungad61e7f2015-02-12 15:17:25 -0500445
Ramy Asselin10e1fd42015-06-04 12:12:15 -0700446# os-brick library to manage local volume attaches
447GITREPO["os-brick"]=${OS_BRICK_REPO:-${GIT_BASE}/openstack/os-brick.git}
448GITBRANCH["os-brick"]=${OS_BRICK_BRANCH:-master}
449
Dmitry Tantsur869b72b2015-08-13 13:36:23 +0200450# ironic common lib
451GITREPO["ironic-lib"]=${IRONIC_LIB_REPO:-${GIT_BASE}/openstack/ironic-lib.git}
452GITBRANCH["ironic-lib"]=${IRONIC_LIB_BRANCH:-master}
453
Chmouel Boudjnahfda9df82012-05-22 10:27:08 +0000454
Sean Dague24516d02014-10-02 12:29:08 -0400455##################
456#
Steve Baker249e36d2015-03-05 14:01:45 +1300457# TripleO / Heat Agent Components
Sean Dague24516d02014-10-02 12:29:08 -0400458#
459##################
Dean Troyerb0e57cf2011-11-04 12:13:43 -0500460
Steve Baker16819952015-03-18 13:45:40 +1300461# run-parts script required by os-refresh-config
462DIB_UTILS_REPO=${DIB_UTILS_REPO:-${GIT_BASE}/openstack/dib-utils.git}
463DIB_UTILS_BRANCH=${DIB_UTILS_BRANCH:-master}
464
Sean Dague24516d02014-10-02 12:29:08 -0400465# os-apply-config configuration template tool
466OAC_REPO=${OAC_REPO:-${GIT_BASE}/openstack/os-apply-config.git}
467OAC_BRANCH=${OAC_BRANCH:-master}
468
469# os-collect-config configuration agent
470OCC_REPO=${OCC_REPO:-${GIT_BASE}/openstack/os-collect-config.git}
471OCC_BRANCH=${OCC_BRANCH:-master}
472
473# os-refresh-config configuration run-parts tool
474ORC_REPO=${ORC_REPO:-${GIT_BASE}/openstack/os-refresh-config.git}
475ORC_BRANCH=${ORC_BRANCH:-master}
Matthew Treinish34723862014-09-08 14:01:21 -0400476
Dean Troyerdc97cb72015-03-28 08:20:50 -0500477
Sean Dague24516d02014-10-02 12:29:08 -0400478#################
479#
Sean Dague24516d02014-10-02 12:29:08 -0400480# 3rd Party Components (non pip installable)
481#
482# NOTE(sdague): these should be converted to release version installs or removed
483#
484#################
485
486# ironic python agent
487IRONIC_PYTHON_AGENT_REPO=${IRONIC_PYTHON_AGENT_REPO:-${GIT_BASE}/openstack/ironic-python-agent.git}
488IRONIC_PYTHON_AGENT_BRANCH=${IRONIC_PYTHON_AGENT_BRANCH:-master}
489
490# a websockets/html5 or flash powered VNC console for vm instances
491NOVNC_REPO=${NOVNC_REPO:-https://github.com/kanaka/noVNC.git}
492NOVNC_BRANCH=${NOVNC_BRANCH:-master}
493
Sean Dague24516d02014-10-02 12:29:08 -0400494# a websockets/html5 or flash powered SPICE console for vm instances
495SPICE_REPO=${SPICE_REPO:-http://anongit.freedesktop.org/git/spice/spice-html5.git}
496SPICE_BRANCH=${SPICE_BRANCH:-master}
497
498
Devananda van der Veenc0c6f002012-07-06 17:49:12 -0700499# Nova hypervisor configuration. We default to libvirt with **kvm** but will
500# drop back to **qemu** if we are unable to load the kvm module. ``stack.sh`` can
Bob Ball32e16032013-07-29 15:51:43 +0100501# also install an **LXC**, **OpenVZ** or **XenAPI** based system. If xenserver-core
502# is installed, the default will be XenAPI
503DEFAULT_VIRT_DRIVER=libvirt
504is_package_installed xenserver-core && DEFAULT_VIRT_DRIVER=xenserver
505VIRT_DRIVER=${VIRT_DRIVER:-$DEFAULT_VIRT_DRIVER}
Bob Ball337bd812013-05-16 14:27:01 +0100506case "$VIRT_DRIVER" in
Alexander Gordeev06fb29c2014-01-31 18:02:07 +0400507 ironic|libvirt)
Bob Ball337bd812013-05-16 14:27:01 +0100508 LIBVIRT_TYPE=${LIBVIRT_TYPE:-kvm}
509 if [[ "$os_VENDOR" =~ (Debian) ]]; then
510 LIBVIRT_GROUP=libvirt
511 else
512 LIBVIRT_GROUP=libvirtd
513 fi
514 ;;
Joe Gordon2c94ee52013-08-02 02:02:01 +0000515 fake)
516 NUMBER_FAKE_NOVA_COMPUTE=${NUMBER_FAKE_NOVA_COMPUTE:-1}
517 ;;
Bob Ball337bd812013-05-16 14:27:01 +0100518 xenserver)
Mark McClainb05c8762013-07-06 23:29:39 -0400519 # Xen config common to nova and neutron
Bob Ball337bd812013-05-16 14:27:01 +0100520 XENAPI_USER=${XENAPI_USER:-"root"}
Mate Lakatd15c8a02014-02-04 12:38:14 +0000521 # This user will be used for dom0 - domU communication
522 # should be able to log in to dom0 without a password
523 # will be used to install the plugins
524 DOMZERO_USER=${DOMZERO_USER:-"domzero"}
Bob Ball337bd812013-05-16 14:27:01 +0100525 ;;
526 *)
527 ;;
528esac
Devananda van der Veenc0c6f002012-07-06 17:49:12 -0700529
Dean Troyer1a6d4492013-06-03 16:47:36 -0500530
531# Images
532# ------
533
534# Specify a comma-separated list of images to download and install into glance.
535# Supported urls here are:
Scott Moser4f6d7b62011-12-08 16:22:51 -0500536# * "uec-style" images:
537# If the file ends in .tar.gz, uncompress the tarball and and select the first
538# .img file inside it as the image. If present, use "*-vmlinuz*" as the kernel
539# and "*-initrd*" as the ramdisk
Dean Troyer1a6d4492013-06-03 16:47:36 -0500540# example: http://cloud-images.ubuntu.com/releases/precise/release/ubuntu-12.04-server-cloudimg-amd64.tar.gz
Scott Moser4f6d7b62011-12-08 16:22:51 -0500541# * disk image (*.img,*.img.gz)
542# if file ends in .img, then it will be uploaded and registered as a to
543# glance as a disk image. If it ends in .gz, it is uncompressed first.
Jason Kölker64a90662012-01-23 11:17:27 -0600544# example:
Dean Troyer1a6d4492013-06-03 16:47:36 -0500545# http://cloud-images.ubuntu.com/releases/precise/release/ubuntu-12.04-server-cloudimg-armel-disk1.img
Adalberto Medeiros53971532014-07-10 16:55:49 -0300546# http://download.cirros-cloud.net/${CIRROS_VERSION}/cirros-${CIRROS_VERSION}-${CIRROS_ARCH}-rootfs.img.gz
Dean Troyer4a43b7b2012-08-28 17:43:40 -0500547# * OpenVZ image:
548# OpenVZ uses its own format of image, and does not support UEC style images
549
Scott Moser3584e552011-12-08 16:23:27 -0500550#IMAGE_URLS="http://smoser.brickies.net/ubuntu/ttylinux-uec/ttylinux-uec-amd64-11.2_2.6.35-15_1.tar.gz" # old ttylinux-uec image
Adalberto Medeiros53971532014-07-10 16:55:49 -0300551#IMAGE_URLS="http://download.cirros-cloud.net/${CIRROS_VERSION}/cirros-${CIRROS_VERSION}-${CIRROS_ARCH}-disk.img" # cirros full disk image
Attila Fazekas2d4c8da2014-03-19 10:42:01 +0100552
Jens Rosenboom9fd75f52015-03-23 11:45:00 +0100553CIRROS_VERSION=${CIRROS_VERSION:-"0.3.4"}
Adalberto Medeiros53971532014-07-10 16:55:49 -0300554CIRROS_ARCH=${CIRROS_ARCH:-"x86_64"}
Dean Troyer4a43b7b2012-08-28 17:43:40 -0500555
556# Set default image based on ``VIRT_DRIVER`` and ``LIBVIRT_TYPE``, either of
Shuichiro MAKIGAKIb968b0c2015-01-04 17:53:12 +0900557# which may be set in ``local.conf``. Also allow ``DEFAULT_IMAGE_NAME`` and
558# ``IMAGE_URLS`` to be set in the `localrc` section of ``local.conf``.
John Huaa4693b52015-08-06 13:53:35 +0100559DOWNLOAD_DEFAULT_IMAGES=$(trueorfalse True DOWNLOAD_DEFAULT_IMAGES)
560if [[ "$DOWNLOAD_DEFAULT_IMAGES" == "True" ]]; then
Mikhail Feoktistov0c3a3b02015-09-03 18:15:28 +0300561 if [[ -n "$IMAGE_URLS" ]]; then
John Huaa4693b52015-08-06 13:53:35 +0100562 IMAGE_URLS+=","
563 fi
564 case "$VIRT_DRIVER" in
565 openvz)
566 DEFAULT_IMAGE_NAME=${DEFAULT_IMAGE_NAME:-ubuntu-12.04-x86_64}
567 IMAGE_URLS+="http://download.openvz.org/template/precreated/ubuntu-12.04-x86_64.tar.gz";;
568 libvirt)
569 case "$LIBVIRT_TYPE" in
570 lxc) # the cirros root disk in the uec tarball is empty, so it will not work for lxc
571 DEFAULT_IMAGE_NAME=${DEFAULT_IMAGE_NAME:-cirros-${CIRROS_VERSION}-${CIRROS_ARCH}-rootfs}
572 IMAGE_URLS+="http://download.cirros-cloud.net/${CIRROS_VERSION}/cirros-${CIRROS_VERSION}-${CIRROS_ARCH}-rootfs.img.gz";;
573 *) # otherwise, use the uec style image (with kernel, ramdisk, disk)
574 DEFAULT_IMAGE_NAME=${DEFAULT_IMAGE_NAME:-cirros-${CIRROS_VERSION}-${CIRROS_ARCH}-uec}
575 IMAGE_URLS+="http://download.cirros-cloud.net/${CIRROS_VERSION}/cirros-${CIRROS_VERSION}-${CIRROS_ARCH}-uec.tar.gz";;
576 esac
577 ;;
578 vsphere)
579 DEFAULT_IMAGE_NAME=${DEFAULT_IMAGE_NAME:-cirros-0.3.2-i386-disk.vmdk}
580 IMAGE_URLS+="http://partnerweb.vmware.com/programs/vmdkimage/cirros-0.3.2-i386-disk.vmdk";;
581 xenserver)
582 DEFAULT_IMAGE_NAME=${DEFAULT_IMAGE_NAME:-cirros-0.3.4-x86_64-disk}
583 IMAGE_URLS+="http://ca.downloads.xensource.com/OpenStack/cirros-0.3.4-x86_64-disk.vhd.tgz"
584 IMAGE_URLS+=",http://download.cirros-cloud.net/${CIRROS_VERSION}/cirros-${CIRROS_VERSION}-x86_64-uec.tar.gz";;
585 ironic)
586 # Ironic can do both partition and full disk images, depending on the driver
587 if [[ "$IRONIC_DEPLOY_DRIVER" == "agent_ssh" ]]; then
588 DEFAULT_IMAGE_NAME=${DEFAULT_IMAGE_NAME:-cirros-${CIRROS_VERSION}-x86_64-disk}
589 else
590 DEFAULT_IMAGE_NAME=${DEFAULT_IMAGE_NAME:-cirros-${CIRROS_VERSION}-x86_64-uec}
591 fi
592 IMAGE_URLS+="http://download.cirros-cloud.net/${CIRROS_VERSION}/cirros-${CIRROS_VERSION}-x86_64-uec.tar.gz"
593 IMAGE_URLS+=",http://download.cirros-cloud.net/${CIRROS_VERSION}/cirros-${CIRROS_VERSION}-x86_64-disk.img";;
594 *) # Default to Cirros with kernel, ramdisk and disk image
595 DEFAULT_IMAGE_NAME=${DEFAULT_IMAGE_NAME:-cirros-${CIRROS_VERSION}-${CIRROS_ARCH}-uec}
596 IMAGE_URLS+="http://download.cirros-cloud.net/${CIRROS_VERSION}/cirros-${CIRROS_VERSION}-${CIRROS_ARCH}-uec.tar.gz";;
597 esac
598 DOWNLOAD_DEFAULT_IMAGES=False
599fi
Anthony Young0ab1d462011-10-13 23:03:23 -0700600
James E. Blair9e220b92015-03-24 16:32:03 -0700601# Staging Area for New Images, have them here for at least 24hrs for nodepool
602# to cache them otherwise the failure rates in the gate are too high
603PRECACHE_IMAGES=$(trueorfalse False PRECACHE_IMAGES)
604if [[ "$PRECACHE_IMAGES" == "True" ]]; then
605
606 IMAGE_URL="http://tarballs.openstack.org/trove/images/ubuntu/mysql.qcow2"
607 if ! [[ "$IMAGE_URLS" =~ "$IMAGE_URL" ]]; then
608 IMAGE_URLS+=",$IMAGE_URL"
609 fi
Sean Daguefafb62b2014-06-30 16:49:30 -0400610fi
611
John Huaa4693b52015-08-06 13:53:35 +0100612# Detect duplicate values in IMAGE_URLS
613for image_url in ${IMAGE_URLS//,/ }; do
614 if [ $(echo "$IMAGE_URLS" | grep -o -F "$image_url" | wc -l) -gt 1 ]; then
615 die $LINENO "$image_url is duplicate, please remove it from IMAGE_URLS."
616 fi
617done
618
Matthew Treinish4c030342013-06-20 17:02:44 -0400619# 10Gb default volume backing file size
620VOLUME_BACKING_FILE_SIZE=${VOLUME_BACKING_FILE_SIZE:-10250M}
Nachi Uenofda946e2012-10-24 17:26:02 -0700621
Dean Troyer09718332014-07-03 10:46:57 -0500622# Prefixes for volume and instance names
Dean Troyerb3236912013-03-17 15:17:05 -0500623VOLUME_NAME_PREFIX=${VOLUME_NAME_PREFIX:-volume-}
624INSTANCE_NAME_PREFIX=${INSTANCE_NAME_PREFIX:-instance-}
625
Dean Troyerb7490da2013-03-18 16:07:56 -0500626# Set default port for nova-objectstore
627S3_SERVICE_PORT=${S3_SERVICE_PORT:-3333}
628
629# Common network names
Nachi Uenofda946e2012-10-24 17:26:02 -0700630PRIVATE_NETWORK_NAME=${PRIVATE_NETWORK_NAME:-"private"}
Aaron Rosen640f1e42013-03-26 16:52:53 -0700631PUBLIC_NETWORK_NAME=${PUBLIC_NETWORK_NAME:-"public"}
Dean Troyer681f3fd2013-02-27 19:00:39 -0600632
633# Compatibility until it's eradicated from CI
634USE_SCREEN=${SCREEN_DEV:-$USE_SCREEN}
Sean Dague584d90e2013-03-29 14:34:53 -0400635
Jiajun Liuf02be852013-05-22 08:55:25 +0000636# Set default screen name
637SCREEN_NAME=${SCREEN_NAME:-stack}
638
Rob Crittenden26867a62014-07-23 20:29:57 -0400639# Allow the use of an alternate protocol (such as https) for service endpoints
640SERVICE_PROTOCOL=${SERVICE_PROTOCOL:-http}
641
Dean Troyer05bd7b82014-09-16 17:25:33 -0500642# Sets the maximum number of workers for most services to reduce
Bob Ball2f720502014-08-28 14:50:04 +0100643# the memory used where there are a large number of CPUs present
644# (the default number of workers for many services is the number of CPUs)
Dean Troyer05bd7b82014-09-16 17:25:33 -0500645# Also sets the minimum number of workers to 2.
646API_WORKERS=${API_WORKERS:=$(( ($(nproc)/2)<2 ? 2 : ($(nproc)/2) ))}
Bob Ball2f720502014-08-28 14:50:04 +0100647
John Griffith44e16e02014-09-19 10:26:51 -0600648# Service startup timeout
649SERVICE_TIMEOUT=${SERVICE_TIMEOUT:-60}
650
Daniel P. Berrange63d25d92014-12-09 15:21:22 +0000651# Support alternative yum -- in future Fedora 'dnf' will become the
652# only supported installer, but for now 'yum' and 'dnf' are both
653# available in parallel with compatible CLIs. Allow manual switching
654# till we get to the point we need to handle this automatically
655YUM=${YUM:-yum}
656
Sean Dague53753292014-12-04 19:38:15 -0500657# Common Configuration
658# --------------------
659
660# Set ``OFFLINE`` to ``True`` to configure ``stack.sh`` to run cleanly without
661# Internet access. ``stack.sh`` must have been previously run with Internet
662# access to install prerequisites and fetch repositories.
663OFFLINE=$(trueorfalse False OFFLINE)
664
665# Set ``ERROR_ON_CLONE`` to ``True`` to configure ``stack.sh`` to exit if
666# the destination git repository does not exist during the ``git_clone``
667# operation.
668ERROR_ON_CLONE=$(trueorfalse False ERROR_ON_CLONE)
669
670# Whether to enable the debug log level in OpenStack services
671ENABLE_DEBUG_LOG_LEVEL=$(trueorfalse True ENABLE_DEBUG_LOG_LEVEL)
672
673# Set fixed and floating range here so we can make sure not to use addresses
674# from either range when attempting to guess the IP to use for the host.
Dean Troyerdc97cb72015-03-28 08:20:50 -0500675# Note that setting ``FIXED_RANGE`` may be necessary when running DevStack
Sean Dague53753292014-12-04 19:38:15 -0500676# in an OpenStack cloud that uses either of these address ranges internally.
677FLOATING_RANGE=${FLOATING_RANGE:-172.24.4.0/24}
678FIXED_RANGE=${FIXED_RANGE:-10.0.0.0/24}
679FIXED_NETWORK_SIZE=${FIXED_NETWORK_SIZE:-256}
680HOST_IP_IFACE=${HOST_IP_IFACE:-}
681HOST_IP=${HOST_IP:-}
Brian Haley180f5eb2015-06-16 13:14:31 -0400682HOST_IPV6=${HOST_IPV6:-}
Sean Dague53753292014-12-04 19:38:15 -0500683
Brian Haley180f5eb2015-06-16 13:14:31 -0400684HOST_IP=$(get_default_host_ip "$FIXED_RANGE" "$FLOATING_RANGE" "$HOST_IP_IFACE" "$HOST_IP" "inet")
Sean Dague53753292014-12-04 19:38:15 -0500685if [ "$HOST_IP" == "" ]; then
686 die $LINENO "Could not determine host ip address. See local.conf for suggestions on setting HOST_IP."
687fi
688
Brian Haley180f5eb2015-06-16 13:14:31 -0400689HOST_IPV6=$(get_default_host_ip "" "" "$HOST_IP_IFACE" "$HOST_IPV6" "inet6")
690
691# SERVICE IP version
692# This is the IP version that services should be listening on, as well
693# as using to register their endpoints with keystone.
694SERVICE_IP_VERSION=${SERVICE_IP_VERSION:-4}
695
696# Validate SERVICE_IP_VERSION
697# It would be nice to support "4+6" here as well, but that will require
698# multiple calls into keystone to register endpoints, so for now let's
699# just support one or the other.
700if [[ $SERVICE_IP_VERSION != "4" ]] && [[ $SERVICE_IP_VERSION != "6" ]]; then
701 die $LINENO "SERVICE_IP_VERSION must be either 4 or 6"
702fi
703
704if [[ "$SERVICE_IP_VERSION" == 4 ]]; then
705 DEF_SERVICE_HOST=$HOST_IP
706 DEF_SERVICE_LOCAL_HOST=127.0.0.1
707 DEF_SERVICE_LISTEN_ADDRESS=0.0.0.0
708fi
709
710if [[ "$SERVICE_IP_VERSION" == 6 ]]; then
711 if [ "$HOST_IPV6" == "" ]; then
712 die $LINENO "Could not determine host IPv6 address. See local.conf for suggestions on setting HOST_IPV6."
713 fi
714
715 DEF_SERVICE_HOST=[$HOST_IPV6]
716 DEF_SERVICE_LOCAL_HOST=::1
717 DEF_SERVICE_LISTEN_ADDRESS=::
718fi
719
720# This is either 0.0.0.0 for IPv4 or :: for IPv6
721SERVICE_LISTEN_ADDRESS=${SERVICE_LISTEN_ADDRESS:-${DEF_SERVICE_LISTEN_ADDRESS}}
722
723# Allow the use of an alternate hostname (such as localhost/127.0.0.1) for
724# service endpoints. Default is dependent on SERVICE_IP_VERSION above.
725SERVICE_HOST=${SERVICE_HOST:-${DEF_SERVICE_HOST}}
726# This is either 127.0.0.1 for IPv4 or ::1 for IPv6
727SERVICE_LOCAL_HOST=${SERVICE_LOCAL_HOST:-${DEF_SERVICE_LOCAL_HOST}}
728
729REGION_NAME=${REGION_NAME:-RegionOne}
Sean Dague53753292014-12-04 19:38:15 -0500730
731# Configure services to use syslog instead of writing to individual log files
732SYSLOG=$(trueorfalse False SYSLOG)
733SYSLOG_HOST=${SYSLOG_HOST:-$HOST_IP}
734SYSLOG_PORT=${SYSLOG_PORT:-516}
735
736# Use color for logging output (only available if syslog is not used)
737LOG_COLOR=$(trueorfalse True LOG_COLOR)
738
739# Set global ``GIT_DEPTH=<number>`` to limit the history depth of the git clone
Kevin Benton59d52f32015-01-17 11:29:12 -0800740# Set to 0 to disable shallow cloning
741GIT_DEPTH=${GIT_DEPTH:-0}
Sean Dague53753292014-12-04 19:38:15 -0500742
Dean Troyerdc97cb72015-03-28 08:20:50 -0500743# Use native SSL for servers in ``SSL_ENABLED_SERVICES``
Sean Dague53753292014-12-04 19:38:15 -0500744USE_SSL=$(trueorfalse False USE_SSL)
745
Dean Troyerdc97cb72015-03-28 08:20:50 -0500746
John Griffith44e16e02014-09-19 10:26:51 -0600747# Following entries need to be last items in file
748
Dean Troyerdde41d02014-12-09 17:47:57 -0600749# Compatibility bits required by other callers like Grenade
750
751# Old way was using SCREEN_LOGDIR to locate those logs and LOGFILE for the stack.sh trace log.
752# LOGFILE SCREEN_LOGDIR output
753# not set not set no log files
754# set not set stack.sh log to LOGFILE
755# not set set screen logs to SCREEN_LOGDIR
756# set set stack.sh log to LOGFILE, screen logs to SCREEN_LOGDIR
757
758# New way is LOGDIR for all logs and LOGFILE for stack.sh trace log, but if not fully-qualified will be in LOGDIR
759# LOGFILE LOGDIR output
760# not set not set (new) set LOGDIR from default
761# set not set stack.sh log to LOGFILE, (new) set LOGDIR from LOGFILE
762# not set set screen logs to LOGDIR
763# set set stack.sh log to LOGFILE, screen logs to LOGDIR
764
765# For compat, if SCREEN_LOGDIR is set, it will be used to create back-compat symlinks to the LOGDIR
766# symlinks to SCREEN_LOGDIR (compat)
767
Dean Troyerdde41d02014-12-09 17:47:57 -0600768# Set up new logging defaults
769if [[ -z "${LOGDIR:-}" ]]; then
770 default_logdir=$DEST/logs
771 if [[ -z "${LOGFILE:-}" ]]; then
772 # Nothing is set, we need a default
773 LOGDIR="$default_logdir"
774 else
775 # Set default LOGDIR
776 LOGDIR="${LOGFILE%/*}"
777 logfile="${LOGFILE##*/}"
778 if [[ -z "$LOGDIR" || "$LOGDIR" == "$logfile" ]]; then
779 # LOGFILE had no path, set a default
780 LOGDIR="$default_logdir"
781 fi
782
783 # Check for duplication
784 if [[ "${SCREEN_LOGDIR:-}" == "${LOGDIR}" ]]; then
785 # We don't need the symlinks since it's the same directory
786 unset SCREEN_LOGDIR
787 fi
788 fi
789 unset default_logdir logfile
790fi
791
Dean Troyerdc97cb72015-03-28 08:20:50 -0500792# ``LOGDIR`` is always set at this point so it is not useful as a 'enable' for service logs
793# ``SCREEN_LOGDIR`` may be set, it is useful to enable the compat symlinks
Dean Troyerdde41d02014-12-09 17:47:57 -0600794
Sean Dague584d90e2013-03-29 14:34:53 -0400795# Local variables:
796# mode: shell-script
797# End: