System for quickly installing an OpenStack cloud from upstream git for testing and development.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

932 lines
36 KiB

  1. #!/bin/bash
  2. #
  3. # stackrc
  4. #
  5. # ensure we don't re-source this in the same environment
  6. [[ -z "$_DEVSTACK_STACKRC" ]] || return 0
  7. declare -r -g _DEVSTACK_STACKRC=1
  8. # Find the other rc files
  9. RC_DIR=$(cd $(dirname "${BASH_SOURCE:-$0}") && pwd)
  10. # Source required DevStack functions and globals
  11. source $RC_DIR/functions
  12. # Set the target branch. This is used so that stable branching
  13. # does not need to update each repo below.
  14. TARGET_BRANCH=master
  15. # Cycle trailing projects need to branch later than the others.
  16. TRAILING_TARGET_BRANCH=master
  17. # And some repos do not create stable branches, so this is used
  18. # to make it explicit and avoid accidentally setting to a stable
  19. # branch.
  20. BRANCHLESS_TARGET_BRANCH=master
  21. # Destination path for installation
  22. DEST=/opt/stack
  23. # Destination for working data
  24. DATA_DIR=${DEST}/data
  25. # Destination for status files
  26. SERVICE_DIR=${DEST}/status
  27. # Path for subunit output file
  28. SUBUNIT_OUTPUT=${DEST}/devstack.subunit
  29. # Determine stack user
  30. if [[ $EUID -eq 0 ]]; then
  31. STACK_USER=stack
  32. else
  33. STACK_USER=$(whoami)
  34. fi
  35. # Specify region name Region
  36. REGION_NAME=${REGION_NAME:-RegionOne}
  37. # Specify name of region where identity service endpoint is registered.
  38. # When deploying multiple DevStack instances in different regions with shared
  39. # Keystone, set KEYSTONE_REGION_NAME to the region where Keystone is running
  40. # for DevStack instances which do not host Keystone.
  41. KEYSTONE_REGION_NAME=${KEYSTONE_REGION_NAME:-$REGION_NAME}
  42. # Specify which services to launch. These generally correspond to
  43. # screen tabs. To change the default list, use the ``enable_service`` and
  44. # ``disable_service`` functions in ``local.conf``.
  45. # For example, to enable Swift as part of DevStack add the following
  46. # settings in ``local.conf``:
  47. # [[local|localrc]]
  48. # enable_service s-proxy s-object s-container s-account
  49. # This allows us to pass ``ENABLED_SERVICES``
  50. if ! isset ENABLED_SERVICES ; then
  51. # Keystone - nothing works without keystone
  52. ENABLED_SERVICES=key
  53. # Nova - services to support libvirt based openstack clouds
  54. ENABLED_SERVICES+=,n-api,n-cpu,n-cond,n-sch,n-novnc,n-api-meta
  55. # Placement service needed for Nova
  56. ENABLED_SERVICES+=,placement-api,placement-client
  57. # Glance services needed for Nova
  58. ENABLED_SERVICES+=,g-api
  59. # Cinder
  60. ENABLED_SERVICES+=,c-sch,c-api,c-vol
  61. # Neutron
  62. ENABLED_SERVICES+=,q-svc,q-dhcp,q-meta,q-agt,q-l3
  63. # Dashboard
  64. ENABLED_SERVICES+=,horizon
  65. # Additional services
  66. ENABLED_SERVICES+=,rabbit,tempest,mysql,etcd3,dstat
  67. fi
  68. # Global toggle for enabling services under mod_wsgi. If this is set to
  69. # ``True`` all services that use HTTPD + mod_wsgi as the preferred method of
  70. # deployment, will be deployed under Apache. If this is set to ``False`` all
  71. # services will rely on the local toggle variable (e.g. ``KEYSTONE_USE_MOD_WSGI``)
  72. ENABLE_HTTPD_MOD_WSGI_SERVICES=True
  73. # Set the default Nova APIs to enable
  74. NOVA_ENABLED_APIS=osapi_compute,metadata
  75. # allow local overrides of env variables, including repo config
  76. if [[ -f $RC_DIR/localrc ]]; then
  77. # Old-style user-supplied config
  78. source $RC_DIR/localrc
  79. elif [[ -f $RC_DIR/.localrc.auto ]]; then
  80. # New-style user-supplied config extracted from local.conf
  81. source $RC_DIR/.localrc.auto
  82. fi
  83. # CELLSV2_SETUP - how we should configure services with cells v2
  84. #
  85. # - superconductor - this is one conductor for the api services, and
  86. # one per cell managing the compute services. This is preferred
  87. # - singleconductor - this is one conductor for the whole deployment,
  88. # this is not recommended, and will be removed in the future.
  89. CELLSV2_SETUP=${CELLSV2_SETUP:-"superconductor"}
  90. # Set the root URL for Horizon
  91. HORIZON_APACHE_ROOT="/dashboard"
  92. # Whether to use user specific units for running services or global ones.
  93. USER_UNITS=$(trueorfalse False USER_UNITS)
  94. if [[ "$USER_UNITS" == "True" ]]; then
  95. SYSTEMD_DIR="$HOME/.local/share/systemd/user"
  96. SYSTEMCTL="systemctl --user"
  97. else
  98. SYSTEMD_DIR="/etc/systemd/system"
  99. SYSTEMCTL="sudo systemctl"
  100. fi
  101. # Whether or not to enable Kernel Samepage Merging (KSM) if available.
  102. # This allows programs that mark their memory as mergeable to share
  103. # memory pages if they are identical. This is particularly useful with
  104. # libvirt backends. This reduces memory usage at the cost of CPU overhead
  105. # to scan memory. We default to enabling it because we tend to be more
  106. # memory constrained than CPU bound.
  107. ENABLE_KSM=$(trueorfalse True ENABLE_KSM)
  108. # Passwords generated by interactive devstack runs
  109. if [[ -r $RC_DIR/.localrc.password ]]; then
  110. source $RC_DIR/.localrc.password
  111. fi
  112. # Control whether Python 3 should be used at all.
  113. # TODO(frickler): Drop this when all consumers are fixed
  114. export USE_PYTHON3=True
  115. # Adding the specific version of Python 3 to this variable will install
  116. # the app using that version of the interpreter instead of just 3.
  117. _DEFAULT_PYTHON3_VERSION="$(_get_python_version python3)"
  118. export PYTHON3_VERSION=${PYTHON3_VERSION:-${_DEFAULT_PYTHON3_VERSION:-3}}
  119. # Create a virtualenv with this
  120. # Use the built-in venv to avoid more dependencies
  121. export VIRTUALENV_CMD="python3 -m venv"
  122. # Default for log coloring is based on interactive-or-not.
  123. # Baseline assumption is that non-interactive invocations are for CI,
  124. # where logs are to be presented as browsable text files; hence color
  125. # codes should be omitted.
  126. # Simply override LOG_COLOR if your environment is different.
  127. if [ -t 1 ]; then
  128. _LOG_COLOR_DEFAULT=True
  129. else
  130. _LOG_COLOR_DEFAULT=False
  131. fi
  132. # Use color for logging output (only available if syslog is not used)
  133. LOG_COLOR=$(trueorfalse $_LOG_COLOR_DEFAULT LOG_COLOR)
  134. # Make tracing more educational
  135. if [[ "$LOG_COLOR" == "True" ]]; then
  136. # tput requires TERM or -T. If neither is present, use vt100, a
  137. # no-frills least common denominator supported everywhere.
  138. TPUT_T=
  139. if ! [ $TERM ]; then
  140. TPUT_T='-T vt100'
  141. fi
  142. export PS4='+\[$(tput '$TPUT_T' setaf 242)\]$(short_source)\[$(tput '$TPUT_T' sgr0)\] '
  143. else
  144. export PS4='+ $(short_source): '
  145. fi
  146. # Configure Identity API version: 2.0, 3
  147. IDENTITY_API_VERSION=${IDENTITY_API_VERSION:-3}
  148. # Set the option ENABLE_IDENTITY_V2 to True. It defines whether the DevStack
  149. # deployment will be deploying the Identity v2 pipelines. If this option is set
  150. # to ``False``, DevStack will: i) disable Identity v2; ii) configure Tempest to
  151. # skip Identity v2 specific tests; and iii) configure Horizon to use Identity
  152. # v3. When this option is set to ``False``, the option IDENTITY_API_VERSION
  153. # will to be set to ``3`` in order to make DevStack register the Identity
  154. # endpoint as v3. This flag is experimental and will be used as basis to
  155. # identify the projects which still have issues to operate with Identity v3.
  156. ENABLE_IDENTITY_V2=$(trueorfalse False ENABLE_IDENTITY_V2)
  157. if [ "$ENABLE_IDENTITY_V2" == "False" ]; then
  158. IDENTITY_API_VERSION=3
  159. fi
  160. # Enable use of Python virtual environments. Individual project use of
  161. # venvs are controlled by the PROJECT_VENV array; every project with
  162. # an entry in the array will be installed into the named venv.
  163. # By default this will put each project into its own venv.
  164. USE_VENV=$(trueorfalse False USE_VENV)
  165. # Add packages that need to be installed into a venv but are not in any
  166. # requirmenets files here, in a comma-separated list
  167. ADDITIONAL_VENV_PACKAGES=${ADITIONAL_VENV_PACKAGES:-""}
  168. # This can be used to turn database query logging on and off
  169. # (currently only implemented for MySQL backend)
  170. DATABASE_QUERY_LOGGING=$(trueorfalse False DATABASE_QUERY_LOGGING)
  171. # Set a timeout for git operations. If git is still running when the
  172. # timeout expires, the command will be retried up to 3 times. This is
  173. # in the format for timeout(1);
  174. #
  175. # DURATION is a floating point number with an optional suffix: 's'
  176. # for seconds (the default), 'm' for minutes, 'h' for hours or 'd'
  177. # for days.
  178. #
  179. # Zero disables timeouts
  180. GIT_TIMEOUT=${GIT_TIMEOUT:-0}
  181. # How should we be handling WSGI deployments. By default we're going
  182. # to allow for 2 modes, which is "uwsgi" which runs with an apache
  183. # proxy uwsgi in front of it, or "mod_wsgi", which runs in
  184. # apache. mod_wsgi is deprecated, don't use it.
  185. WSGI_MODE=${WSGI_MODE:-"uwsgi"}
  186. # Repositories
  187. # ------------
  188. # Base GIT Repo URL
  189. GIT_BASE=${GIT_BASE:-https://opendev.org}
  190. # The location of REQUIREMENTS once cloned
  191. REQUIREMENTS_DIR=${REQUIREMENTS_DIR:-$DEST/requirements}
  192. # Which libraries should we install from git instead of using released
  193. # versions on pypi?
  194. #
  195. # By default DevStack is now installing libraries from pypi instead of
  196. # from git repositories by default. This works great if you are
  197. # developing server components, but if you want to develop libraries
  198. # and see them live in DevStack you need to tell DevStack it should
  199. # install them from git.
  200. #
  201. # ex: LIBS_FROM_GIT=python-keystoneclient,oslo.config
  202. #
  203. # Will install those 2 libraries from git, the rest from pypi.
  204. #
  205. # Setting the variable to 'ALL' will activate the download for all
  206. # libraries.
  207. DEVSTACK_SERIES="wallaby"
  208. ##############
  209. #
  210. # OpenStack Server Components
  211. #
  212. ##############
  213. # block storage service
  214. CINDER_REPO=${CINDER_REPO:-${GIT_BASE}/openstack/cinder.git}
  215. CINDER_BRANCH=${CINDER_BRANCH:-$TARGET_BRANCH}
  216. # image catalog service
  217. GLANCE_REPO=${GLANCE_REPO:-${GIT_BASE}/openstack/glance.git}
  218. GLANCE_BRANCH=${GLANCE_BRANCH:-$TARGET_BRANCH}
  219. # django powered web control panel for openstack
  220. HORIZON_REPO=${HORIZON_REPO:-${GIT_BASE}/openstack/horizon.git}
  221. HORIZON_BRANCH=${HORIZON_BRANCH:-$TARGET_BRANCH}
  222. # unified auth system (manages accounts/tokens)
  223. KEYSTONE_REPO=${KEYSTONE_REPO:-${GIT_BASE}/openstack/keystone.git}
  224. KEYSTONE_BRANCH=${KEYSTONE_BRANCH:-$TARGET_BRANCH}
  225. # neutron service
  226. NEUTRON_REPO=${NEUTRON_REPO:-${GIT_BASE}/openstack/neutron.git}
  227. NEUTRON_BRANCH=${NEUTRON_BRANCH:-$TARGET_BRANCH}
  228. # compute service
  229. NOVA_REPO=${NOVA_REPO:-${GIT_BASE}/openstack/nova.git}
  230. NOVA_BRANCH=${NOVA_BRANCH:-$TARGET_BRANCH}
  231. # object storage service
  232. SWIFT_REPO=${SWIFT_REPO:-${GIT_BASE}/openstack/swift.git}
  233. SWIFT_BRANCH=${SWIFT_BRANCH:-$TARGET_BRANCH}
  234. # placement service
  235. PLACEMENT_REPO=${PLACEMENT_REPO:-${GIT_BASE}/openstack/placement.git}
  236. PLACEMENT_BRANCH=${PLACEMENT_BRANCH:-$TARGET_BRANCH}
  237. ##############
  238. #
  239. # Testing Components
  240. #
  241. ##############
  242. # consolidated openstack requirements
  243. REQUIREMENTS_REPO=${REQUIREMENTS_REPO:-${GIT_BASE}/openstack/requirements.git}
  244. REQUIREMENTS_BRANCH=${REQUIREMENTS_BRANCH:-$TARGET_BRANCH}
  245. # Tempest test suite
  246. TEMPEST_REPO=${TEMPEST_REPO:-${GIT_BASE}/openstack/tempest.git}
  247. TEMPEST_BRANCH=${TEMPEST_BRANCH:-$BRANCHLESS_TARGET_BRANCH}
  248. ##############
  249. #
  250. # OpenStack Client Library Components
  251. # Note default install is from pip, see LIBS_FROM_GIT
  252. #
  253. ##############
  254. # volume client
  255. GITREPO["python-cinderclient"]=${CINDERCLIENT_REPO:-${GIT_BASE}/openstack/python-cinderclient.git}
  256. GITBRANCH["python-cinderclient"]=${CINDERCLIENT_BRANCH:-$TARGET_BRANCH}
  257. # os-brick client for local volume attachement
  258. GITREPO["python-brick-cinderclient-ext"]=${BRICK_CINDERCLIENT_REPO:-${GIT_BASE}/openstack/python-brick-cinderclient-ext.git}
  259. GITBRANCH["python-brick-cinderclient-ext"]=${BRICK_CINDERCLIENT_BRANCH:-$TARGET_BRANCH}
  260. # python barbican client library
  261. GITREPO["python-barbicanclient"]=${BARBICANCLIENT_REPO:-${GIT_BASE}/openstack/python-barbicanclient.git}
  262. GITBRANCH["python-barbicanclient"]=${BARBICANCLIENT_BRANCH:-$TARGET_BRANCH}
  263. GITDIR["python-barbicanclient"]=$DEST/python-barbicanclient
  264. # python glance client library
  265. GITREPO["python-glanceclient"]=${GLANCECLIENT_REPO:-${GIT_BASE}/openstack/python-glanceclient.git}
  266. GITBRANCH["python-glanceclient"]=${GLANCECLIENT_BRANCH:-$TARGET_BRANCH}
  267. # ironic client
  268. GITREPO["python-ironicclient"]=${IRONICCLIENT_REPO:-${GIT_BASE}/openstack/python-ironicclient.git}
  269. GITBRANCH["python-ironicclient"]=${IRONICCLIENT_BRANCH:-$TARGET_BRANCH}
  270. # ironic plugin is out of tree, but nova uses it. set GITDIR here.
  271. GITDIR["python-ironicclient"]=$DEST/python-ironicclient
  272. # the base authentication plugins that clients use to authenticate
  273. GITREPO["keystoneauth"]=${KEYSTONEAUTH_REPO:-${GIT_BASE}/openstack/keystoneauth.git}
  274. GITBRANCH["keystoneauth"]=${KEYSTONEAUTH_BRANCH:-$TARGET_BRANCH}
  275. # python keystone client library to nova that horizon uses
  276. GITREPO["python-keystoneclient"]=${KEYSTONECLIENT_REPO:-${GIT_BASE}/openstack/python-keystoneclient.git}
  277. GITBRANCH["python-keystoneclient"]=${KEYSTONECLIENT_BRANCH:-$TARGET_BRANCH}
  278. # neutron client
  279. GITREPO["python-neutronclient"]=${NEUTRONCLIENT_REPO:-${GIT_BASE}/openstack/python-neutronclient.git}
  280. GITBRANCH["python-neutronclient"]=${NEUTRONCLIENT_BRANCH:-$TARGET_BRANCH}
  281. # python client library to nova that horizon (and others) use
  282. GITREPO["python-novaclient"]=${NOVACLIENT_REPO:-${GIT_BASE}/openstack/python-novaclient.git}
  283. GITBRANCH["python-novaclient"]=${NOVACLIENT_BRANCH:-$TARGET_BRANCH}
  284. # python swift client library
  285. GITREPO["python-swiftclient"]=${SWIFTCLIENT_REPO:-${GIT_BASE}/openstack/python-swiftclient.git}
  286. GITBRANCH["python-swiftclient"]=${SWIFTCLIENT_BRANCH:-$TARGET_BRANCH}
  287. # consolidated openstack python client
  288. GITREPO["python-openstackclient"]=${OPENSTACKCLIENT_REPO:-${GIT_BASE}/openstack/python-openstackclient.git}
  289. GITBRANCH["python-openstackclient"]=${OPENSTACKCLIENT_BRANCH:-$TARGET_BRANCH}
  290. # this doesn't exist in a lib file, so set it here
  291. GITDIR["python-openstackclient"]=$DEST/python-openstackclient
  292. # placement-api CLI
  293. GITREPO["osc-placement"]=${OSC_PLACEMENT_REPO:-${GIT_BASE}/openstack/osc-placement.git}
  294. GITBRANCH["osc-placement"]=${OSC_PLACEMENT_BRANCH:-$TARGET_BRANCH}
  295. ###################
  296. #
  297. # Oslo Libraries
  298. # Note default install is from pip, see LIBS_FROM_GIT
  299. #
  300. ###################
  301. # castellan key manager interface
  302. GITREPO["castellan"]=${CASTELLAN_REPO:-${GIT_BASE}/openstack/castellan.git}
  303. GITBRANCH["castellan"]=${CASTELLAN_BRANCH:-$TARGET_BRANCH}
  304. # cliff command line framework
  305. GITREPO["cliff"]=${CLIFF_REPO:-${GIT_BASE}/openstack/cliff.git}
  306. GITBRANCH["cliff"]=${CLIFF_BRANCH:-$TARGET_BRANCH}
  307. # async framework/helpers
  308. GITREPO["futurist"]=${FUTURIST_REPO:-${GIT_BASE}/openstack/futurist.git}
  309. GITBRANCH["futurist"]=${FUTURIST_BRANCH:-$TARGET_BRANCH}
  310. # debtcollector deprecation framework/helpers
  311. GITREPO["debtcollector"]=${DEBTCOLLECTOR_REPO:-${GIT_BASE}/openstack/debtcollector.git}
  312. GITBRANCH["debtcollector"]=${DEBTCOLLECTOR_BRANCH:-$TARGET_BRANCH}
  313. # helpful state machines
  314. GITREPO["automaton"]=${AUTOMATON_REPO:-${GIT_BASE}/openstack/automaton.git}
  315. GITBRANCH["automaton"]=${AUTOMATON_BRANCH:-$TARGET_BRANCH}
  316. # oslo.cache
  317. GITREPO["oslo.cache"]=${OSLOCACHE_REPO:-${GIT_BASE}/openstack/oslo.cache.git}
  318. GITBRANCH["oslo.cache"]=${OSLOCACHE_BRANCH:-$TARGET_BRANCH}
  319. # oslo.concurrency
  320. GITREPO["oslo.concurrency"]=${OSLOCON_REPO:-${GIT_BASE}/openstack/oslo.concurrency.git}
  321. GITBRANCH["oslo.concurrency"]=${OSLOCON_BRANCH:-$TARGET_BRANCH}
  322. # oslo.config
  323. GITREPO["oslo.config"]=${OSLOCFG_REPO:-${GIT_BASE}/openstack/oslo.config.git}
  324. GITBRANCH["oslo.config"]=${OSLOCFG_BRANCH:-$TARGET_BRANCH}
  325. # oslo.context
  326. GITREPO["oslo.context"]=${OSLOCTX_REPO:-${GIT_BASE}/openstack/oslo.context.git}
  327. GITBRANCH["oslo.context"]=${OSLOCTX_BRANCH:-$TARGET_BRANCH}
  328. # oslo.db
  329. GITREPO["oslo.db"]=${OSLODB_REPO:-${GIT_BASE}/openstack/oslo.db.git}
  330. GITBRANCH["oslo.db"]=${OSLODB_BRANCH:-$TARGET_BRANCH}
  331. # oslo.i18n
  332. GITREPO["oslo.i18n"]=${OSLOI18N_REPO:-${GIT_BASE}/openstack/oslo.i18n.git}
  333. GITBRANCH["oslo.i18n"]=${OSLOI18N_BRANCH:-$TARGET_BRANCH}
  334. # oslo.log
  335. GITREPO["oslo.log"]=${OSLOLOG_REPO:-${GIT_BASE}/openstack/oslo.log.git}
  336. GITBRANCH["oslo.log"]=${OSLOLOG_BRANCH:-$TARGET_BRANCH}
  337. # oslo.messaging
  338. GITREPO["oslo.messaging"]=${OSLOMSG_REPO:-${GIT_BASE}/openstack/oslo.messaging.git}
  339. GITBRANCH["oslo.messaging"]=${OSLOMSG_BRANCH:-$TARGET_BRANCH}
  340. # oslo.middleware
  341. GITREPO["oslo.middleware"]=${OSLOMID_REPO:-${GIT_BASE}/openstack/oslo.middleware.git}
  342. GITBRANCH["oslo.middleware"]=${OSLOMID_BRANCH:-$TARGET_BRANCH}
  343. # oslo.policy
  344. GITREPO["oslo.policy"]=${OSLOPOLICY_REPO:-${GIT_BASE}/openstack/oslo.policy.git}
  345. GITBRANCH["oslo.policy"]=${OSLOPOLICY_BRANCH:-$TARGET_BRANCH}
  346. # oslo.privsep
  347. GITREPO["oslo.privsep"]=${OSLOPRIVSEP_REPO:-${GIT_BASE}/openstack/oslo.privsep.git}
  348. GITBRANCH["oslo.privsep"]=${OSLOPRIVSEP_BRANCH:-$TARGET_BRANCH}
  349. # oslo.reports
  350. GITREPO["oslo.reports"]=${OSLOREPORTS_REPO:-${GIT_BASE}/openstack/oslo.reports.git}
  351. GITBRANCH["oslo.reports"]=${OSLOREPORTS_BRANCH:-$TARGET_BRANCH}
  352. # oslo.rootwrap
  353. GITREPO["oslo.rootwrap"]=${OSLORWRAP_REPO:-${GIT_BASE}/openstack/oslo.rootwrap.git}
  354. GITBRANCH["oslo.rootwrap"]=${OSLORWRAP_BRANCH:-$TARGET_BRANCH}
  355. # oslo.serialization
  356. GITREPO["oslo.serialization"]=${OSLOSERIALIZATION_REPO:-${GIT_BASE}/openstack/oslo.serialization.git}
  357. GITBRANCH["oslo.serialization"]=${OSLOSERIALIZATION_BRANCH:-$TARGET_BRANCH}
  358. # oslo.service
  359. GITREPO["oslo.service"]=${OSLOSERVICE_REPO:-${GIT_BASE}/openstack/oslo.service.git}
  360. GITBRANCH["oslo.service"]=${OSLOSERVICE_BRANCH:-$TARGET_BRANCH}
  361. # oslo.utils
  362. GITREPO["oslo.utils"]=${OSLOUTILS_REPO:-${GIT_BASE}/openstack/oslo.utils.git}
  363. GITBRANCH["oslo.utils"]=${OSLOUTILS_BRANCH:-$TARGET_BRANCH}
  364. # oslo.versionedobjects
  365. GITREPO["oslo.versionedobjects"]=${OSLOVERSIONEDOBJECTS_REPO:-${GIT_BASE}/openstack/oslo.versionedobjects.git}
  366. GITBRANCH["oslo.versionedobjects"]=${OSLOVERSIONEDOBJECTS_BRANCH:-$TARGET_BRANCH}
  367. # oslo.vmware
  368. GITREPO["oslo.vmware"]=${OSLOVMWARE_REPO:-${GIT_BASE}/openstack/oslo.vmware.git}
  369. GITBRANCH["oslo.vmware"]=${OSLOVMWARE_BRANCH:-$TARGET_BRANCH}
  370. # osprofiler
  371. GITREPO["osprofiler"]=${OSPROFILER_REPO:-${GIT_BASE}/openstack/osprofiler.git}
  372. GITBRANCH["osprofiler"]=${OSPROFILER_BRANCH:-$TARGET_BRANCH}
  373. # pycadf auditing library
  374. GITREPO["pycadf"]=${PYCADF_REPO:-${GIT_BASE}/openstack/pycadf.git}
  375. GITBRANCH["pycadf"]=${PYCADF_BRANCH:-$TARGET_BRANCH}
  376. # stevedore plugin manager
  377. GITREPO["stevedore"]=${STEVEDORE_REPO:-${GIT_BASE}/openstack/stevedore.git}
  378. GITBRANCH["stevedore"]=${STEVEDORE_BRANCH:-$TARGET_BRANCH}
  379. # taskflow plugin manager
  380. GITREPO["taskflow"]=${TASKFLOW_REPO:-${GIT_BASE}/openstack/taskflow.git}
  381. GITBRANCH["taskflow"]=${TASKFLOW_BRANCH:-$TARGET_BRANCH}
  382. # tooz plugin manager
  383. GITREPO["tooz"]=${TOOZ_REPO:-${GIT_BASE}/openstack/tooz.git}
  384. GITBRANCH["tooz"]=${TOOZ_BRANCH:-$TARGET_BRANCH}
  385. # pbr drives the setuptools configs
  386. GITREPO["pbr"]=${PBR_REPO:-${GIT_BASE}/openstack/pbr.git}
  387. GITBRANCH["pbr"]=${PBR_BRANCH:-$BRANCHLESS_TARGET_BRANCH}
  388. ##################
  389. #
  390. # Libraries managed by OpenStack programs (non oslo)
  391. #
  392. ##################
  393. # cursive library
  394. GITREPO["cursive"]=${CURSIVE_REPO:-${GIT_BASE}/openstack/cursive.git}
  395. GITBRANCH["cursive"]=${CURSIVE_BRANCH:-$TARGET_BRANCH}
  396. # glance store library
  397. GITREPO["glance_store"]=${GLANCE_STORE_REPO:-${GIT_BASE}/openstack/glance_store.git}
  398. GITBRANCH["glance_store"]=${GLANCE_STORE_BRANCH:-$TARGET_BRANCH}
  399. # keystone middleware
  400. GITREPO["keystonemiddleware"]=${KEYSTONEMIDDLEWARE_REPO:-${GIT_BASE}/openstack/keystonemiddleware.git}
  401. GITBRANCH["keystonemiddleware"]=${KEYSTONEMIDDLEWARE_BRANCH:-$TARGET_BRANCH}
  402. # ceilometer middleware
  403. GITREPO["ceilometermiddleware"]=${CEILOMETERMIDDLEWARE_REPO:-${GIT_BASE}/openstack/ceilometermiddleware.git}
  404. GITBRANCH["ceilometermiddleware"]=${CEILOMETERMIDDLEWARE_BRANCH:-$TARGET_BRANCH}
  405. GITDIR["ceilometermiddleware"]=$DEST/ceilometermiddleware
  406. # openstacksdk OpenStack Python SDK
  407. GITREPO["openstacksdk"]=${OPENSTACKSDK_REPO:-${GIT_BASE}/openstack/openstacksdk.git}
  408. GITBRANCH["openstacksdk"]=${OPENSTACKSDK_BRANCH:-$TARGET_BRANCH}
  409. # os-brick library to manage local volume attaches
  410. GITREPO["os-brick"]=${OS_BRICK_REPO:-${GIT_BASE}/openstack/os-brick.git}
  411. GITBRANCH["os-brick"]=${OS_BRICK_BRANCH:-$TARGET_BRANCH}
  412. # os-client-config to manage clouds.yaml and friends
  413. GITREPO["os-client-config"]=${OS_CLIENT_CONFIG_REPO:-${GIT_BASE}/openstack/os-client-config.git}
  414. GITBRANCH["os-client-config"]=${OS_CLIENT_CONFIG_BRANCH:-$TARGET_BRANCH}
  415. GITDIR["os-client-config"]=$DEST/os-client-config
  416. # os-vif library to communicate between Neutron to Nova
  417. GITREPO["os-vif"]=${OS_VIF_REPO:-${GIT_BASE}/openstack/os-vif.git}
  418. GITBRANCH["os-vif"]=${OS_VIF_BRANCH:-$TARGET_BRANCH}
  419. # osc-lib OpenStackClient common lib
  420. GITREPO["osc-lib"]=${OSC_LIB_REPO:-${GIT_BASE}/openstack/osc-lib.git}
  421. GITBRANCH["osc-lib"]=${OSC_LIB_BRANCH:-$TARGET_BRANCH}
  422. # ironic common lib
  423. GITREPO["ironic-lib"]=${IRONIC_LIB_REPO:-${GIT_BASE}/openstack/ironic-lib.git}
  424. GITBRANCH["ironic-lib"]=${IRONIC_LIB_BRANCH:-$TARGET_BRANCH}
  425. # this doesn't exist in a lib file, so set it here
  426. GITDIR["ironic-lib"]=$DEST/ironic-lib
  427. # diskimage-builder tool
  428. GITREPO["diskimage-builder"]=${DIB_REPO:-${GIT_BASE}/openstack/diskimage-builder.git}
  429. GITBRANCH["diskimage-builder"]=${DIB_BRANCH:-$BRANCHLESS_TARGET_BRANCH}
  430. GITDIR["diskimage-builder"]=$DEST/diskimage-builder
  431. # neutron-lib library containing neutron stable non-REST interfaces
  432. GITREPO["neutron-lib"]=${NEUTRON_LIB_REPO:-${GIT_BASE}/openstack/neutron-lib.git}
  433. GITBRANCH["neutron-lib"]=${NEUTRON_LIB_BRANCH:-$TARGET_BRANCH}
  434. GITDIR["neutron-lib"]=$DEST/neutron-lib
  435. # os-traits library for resource provider traits in the placement service
  436. GITREPO["os-traits"]=${OS_TRAITS_REPO:-${GIT_BASE}/openstack/os-traits.git}
  437. GITBRANCH["os-traits"]=${OS_TRAITS_BRANCH:-$TARGET_BRANCH}
  438. # ovsdbapp used by neutron
  439. GITREPO["ovsdbapp"]=${OVSDBAPP_REPO:-${GIT_BASE}/openstack/ovsdbapp.git}
  440. GITBRANCH["ovsdbapp"]=${OVSDBAPP_BRANCH:-$TARGET_BRANCH}
  441. GITDIR["ovsdbapp"]=$DEST/ovsdbapp
  442. ##################
  443. #
  444. # TripleO / Heat Agent Components
  445. #
  446. ##################
  447. # run-parts script required by os-refresh-config
  448. DIB_UTILS_REPO=${DIB_UTILS_REPO:-${GIT_BASE}/openstack/dib-utils.git}
  449. DIB_UTILS_BRANCH=${DIB_UTILS_BRANCH:-$BRANCHLESS_TARGET_BRANCH}
  450. # os-apply-config configuration template tool
  451. OAC_REPO=${OAC_REPO:-${GIT_BASE}/openstack/os-apply-config.git}
  452. OAC_BRANCH=${OAC_BRANCH:-$TRAILING_TARGET_BRANCH}
  453. # os-collect-config configuration agent
  454. OCC_REPO=${OCC_REPO:-${GIT_BASE}/openstack/os-collect-config.git}
  455. OCC_BRANCH=${OCC_BRANCH:-$TRAILING_TARGET_BRANCH}
  456. # os-refresh-config configuration run-parts tool
  457. ORC_REPO=${ORC_REPO:-${GIT_BASE}/openstack/os-refresh-config.git}
  458. ORC_BRANCH=${ORC_BRANCH:-$TRAILING_TARGET_BRANCH}
  459. #################
  460. #
  461. # 3rd Party Components (non pip installable)
  462. #
  463. # NOTE(sdague): these should be converted to release version installs or removed
  464. #
  465. #################
  466. # ironic python agent
  467. IRONIC_PYTHON_AGENT_REPO=${IRONIC_PYTHON_AGENT_REPO:-${GIT_BASE}/openstack/ironic-python-agent.git}
  468. IRONIC_PYTHON_AGENT_BRANCH=${IRONIC_PYTHON_AGENT_BRANCH:-$TARGET_BRANCH}
  469. # a websockets/html5 or flash powered VNC console for vm instances
  470. NOVNC_REPO=${NOVNC_REPO:-https://github.com/novnc/noVNC.git}
  471. NOVNC_BRANCH=${NOVNC_BRANCH:-v1.1.0}
  472. # a websockets/html5 or flash powered SPICE console for vm instances
  473. SPICE_REPO=${SPICE_REPO:-http://anongit.freedesktop.org/git/spice/spice-html5.git}
  474. SPICE_BRANCH=${SPICE_BRANCH:-$BRANCHLESS_TARGET_BRANCH}
  475. # Global flag used to configure Tempest and potentially other services if
  476. # volume multiattach is supported. In Queens, only the libvirt compute driver
  477. # and lvm volume driver support multiattach, and qemu must be less than 2.10
  478. # or libvirt must be greater than or equal to 3.10.
  479. ENABLE_VOLUME_MULTIATTACH=$(trueorfalse False ENABLE_VOLUME_MULTIATTACH)
  480. # Nova hypervisor configuration. We default to libvirt with **kvm** but will
  481. # drop back to **qemu** if we are unable to load the kvm module. ``stack.sh`` can
  482. # also install an **LXC**, **OpenVZ** or **XenAPI** based system. If xenserver-core
  483. # is installed, the default will be XenAPI
  484. DEFAULT_VIRT_DRIVER=libvirt
  485. is_package_installed xenserver-core && DEFAULT_VIRT_DRIVER=xenserver
  486. VIRT_DRIVER=${VIRT_DRIVER:-$DEFAULT_VIRT_DRIVER}
  487. case "$VIRT_DRIVER" in
  488. ironic|libvirt)
  489. LIBVIRT_TYPE=${LIBVIRT_TYPE:-kvm}
  490. LIBVIRT_CPU_MODE=${LIBVIRT_CPU_MODE:-none}
  491. if [[ "$os_VENDOR" =~ (Debian|Ubuntu) ]]; then
  492. # The groups change with newer libvirt. Older Ubuntu used
  493. # 'libvirtd', but now uses libvirt like Debian. Do a quick check
  494. # to see if libvirtd group already exists to handle grenade's case.
  495. LIBVIRT_GROUP=$(cut -d ':' -f 1 /etc/group | grep 'libvirtd$' || true)
  496. LIBVIRT_GROUP=${LIBVIRT_GROUP:-libvirt}
  497. else
  498. LIBVIRT_GROUP=libvirtd
  499. fi
  500. ;;
  501. lxd)
  502. LXD_GROUP=${LXD_GROUP:-"lxd"}
  503. ;;
  504. docker|zun)
  505. DOCKER_GROUP=${DOCKER_GROUP:-"docker"}
  506. ;;
  507. fake)
  508. NUMBER_FAKE_NOVA_COMPUTE=${NUMBER_FAKE_NOVA_COMPUTE:-1}
  509. ;;
  510. xenserver)
  511. # Xen config common to nova and neutron
  512. XENAPI_USER=${XENAPI_USER:-"root"}
  513. # This user will be used for dom0 - domU communication
  514. # should be able to log in to dom0 without a password
  515. # will be used to install the plugins
  516. DOMZERO_USER=${DOMZERO_USER:-"domzero"}
  517. ;;
  518. *)
  519. ;;
  520. esac
  521. # Images
  522. # ------
  523. # Specify a comma-separated list of images to download and install into glance.
  524. # Supported urls here are:
  525. # * "uec-style" images:
  526. # If the file ends in .tar.gz, uncompress the tarball and and select the first
  527. # .img file inside it as the image. If present, use "*-vmlinuz*" as the kernel
  528. # and "*-initrd*" as the ramdisk
  529. # example: http://cloud-images.ubuntu.com/releases/precise/release/ubuntu-12.04-server-cloudimg-amd64.tar.gz
  530. # * disk image (*.img,*.img.gz)
  531. # if file ends in .img, then it will be uploaded and registered as a to
  532. # glance as a disk image. If it ends in .gz, it is uncompressed first.
  533. # example:
  534. # http://cloud-images.ubuntu.com/releases/precise/release/ubuntu-12.04-server-cloudimg-armel-disk1.img
  535. # http://download.cirros-cloud.net/${CIRROS_VERSION}/cirros-${CIRROS_VERSION}-${CIRROS_ARCH}-rootfs.img.gz
  536. # * OpenVZ image:
  537. # OpenVZ uses its own format of image, and does not support UEC style images
  538. #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
  539. #IMAGE_URLS="http://download.cirros-cloud.net/${CIRROS_VERSION}/cirros-${CIRROS_VERSION}-${CIRROS_ARCH}-disk.img" # cirros full disk image
  540. CIRROS_VERSION=${CIRROS_VERSION:-"0.5.1"}
  541. CIRROS_ARCH=${CIRROS_ARCH:-"x86_64"}
  542. # Set default image based on ``VIRT_DRIVER`` and ``LIBVIRT_TYPE``, either of
  543. # which may be set in ``local.conf``. Also allow ``DEFAULT_IMAGE_NAME`` and
  544. # ``IMAGE_URLS`` to be set in the `localrc` section of ``local.conf``.
  545. DOWNLOAD_DEFAULT_IMAGES=$(trueorfalse True DOWNLOAD_DEFAULT_IMAGES)
  546. if [[ "$DOWNLOAD_DEFAULT_IMAGES" == "True" ]]; then
  547. if [[ -n "$IMAGE_URLS" ]]; then
  548. IMAGE_URLS+=","
  549. fi
  550. case "$VIRT_DRIVER" in
  551. libvirt)
  552. case "$LIBVIRT_TYPE" in
  553. lxc) # the cirros root disk in the uec tarball is empty, so it will not work for lxc
  554. DEFAULT_IMAGE_NAME=${DEFAULT_IMAGE_NAME:-cirros-${CIRROS_VERSION}-${CIRROS_ARCH}-rootfs}
  555. DEFAULT_IMAGE_FILE_NAME=${DEFAULT_IMAGE_FILE_NAME:-cirros-${CIRROS_VERSION}-${CIRROS_ARCH}-rootfs.img.gz}
  556. IMAGE_URLS+="http://download.cirros-cloud.net/${CIRROS_VERSION}/${DEFAULT_IMAGE_FILE_NAME}";;
  557. *) # otherwise, use the qcow image
  558. DEFAULT_IMAGE_NAME=${DEFAULT_IMAGE_NAME:-cirros-${CIRROS_VERSION}-${CIRROS_ARCH}-disk}
  559. DEFAULT_IMAGE_FILE_NAME=${DEFAULT_IMAGE_FILE_NAME:-cirros-${CIRROS_VERSION}-${CIRROS_ARCH}-disk.img}
  560. IMAGE_URLS+="http://download.cirros-cloud.net/${CIRROS_VERSION}/${DEFAULT_IMAGE_FILE_NAME}";;
  561. esac
  562. ;;
  563. vsphere)
  564. DEFAULT_IMAGE_NAME=${DEFAULT_IMAGE_NAME:-cirros-0.3.2-i386-disk.vmdk}
  565. DEFAULT_IMAGE_FILE_NAME=${DEFAULT_IMAGE_FILE_NAME:-$DEFAULT_IMAGE_NAME}
  566. IMAGE_URLS+="http://partnerweb.vmware.com/programs/vmdkimage/${DEFAULT_IMAGE_FILE_NAME}";;
  567. xenserver)
  568. DEFAULT_IMAGE_NAME=${DEFAULT_IMAGE_NAME:-cirros-0.3.5-x86_64-disk}
  569. DEFAULT_IMAGE_FILE_NAME=${DEFAULT_IMAGE_NAME:-cirros-0.3.5-x86_64-disk.vhd.tgz}
  570. IMAGE_URLS+="http://ca.downloads.xensource.com/OpenStack/cirros-0.3.5-x86_64-disk.vhd.tgz"
  571. IMAGE_URLS+=",http://download.cirros-cloud.net/${CIRROS_VERSION}/cirros-${CIRROS_VERSION}-x86_64-uec.tar.gz";;
  572. fake)
  573. # Use the same as the default for libvirt
  574. DEFAULT_IMAGE_NAME=${DEFAULT_IMAGE_NAME:-cirros-${CIRROS_VERSION}-${CIRROS_ARCH}-disk}
  575. DEFAULT_IMAGE_FILE_NAME=${DEFAULT_IMAGE_FILE_NAME:-cirros-${CIRROS_VERSION}-${CIRROS_ARCH}-disk.img}
  576. IMAGE_URLS+="http://download.cirros-cloud.net/${CIRROS_VERSION}/${DEFAULT_IMAGE_FILE_NAME}";;
  577. esac
  578. DOWNLOAD_DEFAULT_IMAGES=False
  579. fi
  580. # This is a comma separated list of extra URLS to be listed for
  581. # download by the tools/image_list.sh script. CI environments can
  582. # pre-download these URLS and place them in $FILES. Later scripts can
  583. # then use "get_extra_file <url>" which will print out the path to the
  584. # file; it will either be downloaded on demand or acquired from the
  585. # cache if there.
  586. EXTRA_CACHE_URLS=""
  587. # etcd3 defaults
  588. ETCD_VERSION=${ETCD_VERSION:-v3.3.12}
  589. ETCD_SHA256_AMD64=${ETCD_SHA256_AMD64:-"dc5d82df095dae0a2970e4d870b6929590689dd707ae3d33e7b86da0f7f211b6"}
  590. ETCD_SHA256_ARM64=${ETCD_SHA256_ARM64:-"170b848ac1a071fe7d495d404a868a2c0090750b2944f8a260ef1c6125b2b4f4"}
  591. ETCD_SHA256_PPC64=${ETCD_SHA256_PPC64:-"77f807b1b51abbf51e020bb05bdb8ce088cb58260fcd22749ea32eee710463d3"}
  592. # etcd v3.2.x doesn't have anything for s390x
  593. ETCD_SHA256_S390X=${ETCD_SHA256_S390X:-""}
  594. # Make sure etcd3 downloads the correct architecture
  595. if is_arch "x86_64"; then
  596. ETCD_ARCH="amd64"
  597. ETCD_SHA256=${ETCD_SHA256:-$ETCD_SHA256_AMD64}
  598. elif is_arch "aarch64"; then
  599. ETCD_ARCH="arm64"
  600. ETCD_SHA256=${ETCD_SHA256:-$ETCD_SHA256_ARM64}
  601. elif is_arch "ppc64le"; then
  602. ETCD_ARCH="ppc64le"
  603. ETCD_SHA256=${ETCD_SHA256:-$ETCD_SHA256_PPC64}
  604. elif is_arch "s390x"; then
  605. # An etcd3 binary for s390x is not available on github like it is
  606. # for other arches. Only continue if a custom download URL was
  607. # provided.
  608. if [[ -n "${ETCD_DOWNLOAD_URL}" ]]; then
  609. ETCD_ARCH="s390x"
  610. ETCD_SHA256=${ETCD_SHA256:-$ETCD_SHA256_S390X}
  611. else
  612. exit_distro_not_supported "etcd3. No custom ETCD_DOWNLOAD_URL provided."
  613. fi
  614. else
  615. exit_distro_not_supported "invalid hardware type - $ETCD_ARCH"
  616. fi
  617. ETCD_PORT=${ETCD_PORT:-2379}
  618. ETCD_PEER_PORT=${ETCD_PEER_PORT:-2380}
  619. ETCD_DOWNLOAD_URL=${ETCD_DOWNLOAD_URL:-https://github.com/etcd-io/etcd/releases/download}
  620. ETCD_NAME=etcd-$ETCD_VERSION-linux-$ETCD_ARCH
  621. ETCD_DOWNLOAD_FILE=$ETCD_NAME.tar.gz
  622. ETCD_DOWNLOAD_LOCATION=$ETCD_DOWNLOAD_URL/$ETCD_VERSION/$ETCD_DOWNLOAD_FILE
  623. # etcd is always required, so place it into list of pre-cached downloads
  624. EXTRA_CACHE_URLS+=",$ETCD_DOWNLOAD_LOCATION"
  625. # Cache settings
  626. CACHE_BACKEND=${CACHE_BACKEND:-"dogpile.cache.memcached"}
  627. MEMCACHE_SERVERS=${MEMCACHE_SERVERS:-"localhost:11211"}
  628. # Detect duplicate values in IMAGE_URLS
  629. for image_url in ${IMAGE_URLS//,/ }; do
  630. if [ $(echo "$IMAGE_URLS" | grep -o -F "$image_url" | wc -l) -gt 1 ]; then
  631. die $LINENO "$image_url is duplicate, please remove it from IMAGE_URLS."
  632. fi
  633. done
  634. # 24Gb default volume backing file size
  635. VOLUME_BACKING_FILE_SIZE=${VOLUME_BACKING_FILE_SIZE:-24G}
  636. # Prefixes for volume and instance names
  637. VOLUME_NAME_PREFIX=${VOLUME_NAME_PREFIX:-volume-}
  638. INSTANCE_NAME_PREFIX=${INSTANCE_NAME_PREFIX:-instance-}
  639. # Set default port for nova-objectstore
  640. S3_SERVICE_PORT=${S3_SERVICE_PORT:-3333}
  641. # Common network names
  642. PRIVATE_NETWORK_NAME=${PRIVATE_NETWORK_NAME:-"private"}
  643. PUBLIC_NETWORK_NAME=${PUBLIC_NETWORK_NAME:-"public"}
  644. PUBLIC_INTERFACE=${PUBLIC_INTERFACE:-""}
  645. # Allow the use of an alternate protocol (such as https) for service endpoints
  646. SERVICE_PROTOCOL=${SERVICE_PROTOCOL:-http}
  647. # Sets the maximum number of workers for most services to reduce
  648. # the memory used where there are a large number of CPUs present
  649. # (the default number of workers for many services is the number of CPUs)
  650. # Also sets the minimum number of workers to 2.
  651. API_WORKERS=${API_WORKERS:=$(( ($(nproc)/4)<2 ? 2 : ($(nproc)/4) ))}
  652. # Service startup timeout
  653. SERVICE_TIMEOUT=${SERVICE_TIMEOUT:-60}
  654. # Timeout for compute node registration in Nova
  655. NOVA_READY_TIMEOUT=${NOVA_READY_TIMEOUT:-$SERVICE_TIMEOUT}
  656. # Service graceful shutdown timeout
  657. SERVICE_GRACEFUL_SHUTDOWN_TIMEOUT=${SERVICE_GRACEFUL_SHUTDOWN_TIMEOUT:-5}
  658. # Service graceful shutdown timeout
  659. WORKER_TIMEOUT=${WORKER_TIMEOUT:-90}
  660. # Common Configuration
  661. # --------------------
  662. # Set ``OFFLINE`` to ``True`` to configure ``stack.sh`` to run cleanly without
  663. # Internet access. ``stack.sh`` must have been previously run with Internet
  664. # access to install prerequisites and fetch repositories.
  665. OFFLINE=$(trueorfalse False OFFLINE)
  666. # Set ``ERROR_ON_CLONE`` to ``True`` to configure ``stack.sh`` to exit if
  667. # the destination git repository does not exist during the ``git_clone``
  668. # operation.
  669. ERROR_ON_CLONE=$(trueorfalse False ERROR_ON_CLONE)
  670. # Whether to enable the debug log level in OpenStack services
  671. ENABLE_DEBUG_LOG_LEVEL=$(trueorfalse True ENABLE_DEBUG_LOG_LEVEL)
  672. # Set fixed and floating range here so we can make sure not to use addresses
  673. # from either range when attempting to guess the IP to use for the host.
  674. # Note that setting ``FIXED_RANGE`` may be necessary when running DevStack
  675. # in an OpenStack cloud that uses either of these address ranges internally.
  676. FLOATING_RANGE=${FLOATING_RANGE:-172.24.4.0/24}
  677. IPV4_ADDRS_SAFE_TO_USE=${IPV4_ADDRS_SAFE_TO_USE:-10.0.0.0/22}
  678. FIXED_RANGE=${FIXED_RANGE:-$IPV4_ADDRS_SAFE_TO_USE}
  679. HOST_IP_IFACE=${HOST_IP_IFACE:-}
  680. HOST_IP=${HOST_IP:-}
  681. HOST_IPV6=${HOST_IPV6:-}
  682. HOST_IP=$(get_default_host_ip "$FIXED_RANGE" "$FLOATING_RANGE" "$HOST_IP_IFACE" "$HOST_IP" "inet")
  683. if [ "$HOST_IP" == "" ]; then
  684. die $LINENO "Could not determine host ip address. See local.conf for suggestions on setting HOST_IP."
  685. fi
  686. HOST_IPV6=$(get_default_host_ip "" "" "$HOST_IP_IFACE" "$HOST_IPV6" "inet6")
  687. # Whether or not the port_security extension should be enabled for Neutron.
  688. NEUTRON_PORT_SECURITY=$(trueorfalse True NEUTRON_PORT_SECURITY)
  689. # SERVICE IP version
  690. # This is the IP version that services should be listening on, as well
  691. # as using to register their endpoints with keystone.
  692. SERVICE_IP_VERSION=${SERVICE_IP_VERSION:-4}
  693. # Validate SERVICE_IP_VERSION
  694. # It would be nice to support "4+6" here as well, but that will require
  695. # multiple calls into keystone to register endpoints, so for now let's
  696. # just support one or the other.
  697. if [[ $SERVICE_IP_VERSION != "4" ]] && [[ $SERVICE_IP_VERSION != "6" ]]; then
  698. die $LINENO "SERVICE_IP_VERSION must be either 4 or 6"
  699. fi
  700. if [[ "$SERVICE_IP_VERSION" == 4 ]]; then
  701. DEF_SERVICE_HOST=$HOST_IP
  702. DEF_SERVICE_LOCAL_HOST=127.0.0.1
  703. DEF_SERVICE_LISTEN_ADDRESS=0.0.0.0
  704. fi
  705. if [[ "$SERVICE_IP_VERSION" == 6 ]]; then
  706. if [ "$HOST_IPV6" == "" ]; then
  707. die $LINENO "Could not determine host IPv6 address. See local.conf for suggestions on setting HOST_IPV6."
  708. fi
  709. DEF_SERVICE_HOST=[$HOST_IPV6]
  710. DEF_SERVICE_LOCAL_HOST=::1
  711. DEF_SERVICE_LISTEN_ADDRESS="[::]"
  712. fi
  713. # This is either 0.0.0.0 for IPv4 or [::] for IPv6
  714. SERVICE_LISTEN_ADDRESS=${SERVICE_LISTEN_ADDRESS:-${DEF_SERVICE_LISTEN_ADDRESS}}
  715. # Allow the use of an alternate hostname (such as localhost/127.0.0.1) for
  716. # service endpoints. Default is dependent on SERVICE_IP_VERSION above.
  717. SERVICE_HOST=${SERVICE_HOST:-${DEF_SERVICE_HOST}}
  718. # This is either 127.0.0.1 for IPv4 or ::1 for IPv6
  719. SERVICE_LOCAL_HOST=${SERVICE_LOCAL_HOST:-${DEF_SERVICE_LOCAL_HOST}}
  720. REGION_NAME=${REGION_NAME:-RegionOne}
  721. # Configure services to use syslog instead of writing to individual log files
  722. SYSLOG=$(trueorfalse False SYSLOG)
  723. SYSLOG_HOST=${SYSLOG_HOST:-$HOST_IP}
  724. SYSLOG_PORT=${SYSLOG_PORT:-516}
  725. # Set global ``GIT_DEPTH=<number>`` to limit the history depth of the git clone
  726. # Set to 0 to disable shallow cloning
  727. GIT_DEPTH=${GIT_DEPTH:-0}
  728. # We may not need to recreate database in case 2 Keystone services
  729. # sharing the same database. It would be useful for multinode Grenade tests.
  730. RECREATE_KEYSTONE_DB=$(trueorfalse True RECREATE_KEYSTONE_DB)
  731. # Following entries need to be last items in file
  732. # New way is LOGDIR for all logs and LOGFILE for stack.sh trace log, but if not fully-qualified will be in LOGDIR
  733. # LOGFILE LOGDIR output
  734. # not set not set (new) set LOGDIR from default
  735. # set not set stack.sh log to LOGFILE, (new) set LOGDIR from LOGFILE
  736. # not set set screen logs to LOGDIR
  737. # set set stack.sh log to LOGFILE, screen logs to LOGDIR
  738. # Set up new logging defaults
  739. if [[ -z "${LOGDIR:-}" ]]; then
  740. default_logdir=$DEST/logs
  741. if [[ -z "${LOGFILE:-}" ]]; then
  742. # Nothing is set, we need a default
  743. LOGDIR="$default_logdir"
  744. else
  745. # Set default LOGDIR
  746. LOGDIR="${LOGFILE%/*}"
  747. logfile="${LOGFILE##*/}"
  748. if [[ -z "$LOGDIR" || "$LOGDIR" == "$logfile" ]]; then
  749. # LOGFILE had no path, set a default
  750. LOGDIR="$default_logdir"
  751. fi
  752. fi
  753. unset default_logdir logfile
  754. fi
  755. # ``LOGDIR`` is always set at this point so it is not useful as a 'enable' for service logs
  756. # System-wide ulimit file descriptors override
  757. ULIMIT_NOFILE=${ULIMIT_NOFILE:-2048}
  758. # Local variables:
  759. # mode: shell-script
  760. # End: