314 Commits

Author SHA1 Message Date
Steve Martinelli
84f6c0fa68 remove the keystone bash completion install step
keytone has removed it's CLI and will release a new version
when Newton begins. As part of the removal process we also
need to remove the bash completion script, which is currently
failing devstack gates.

Change-Id: I132b862bde5b4173bf34beae12a7a882f5a96314
2016-03-11 22:39:12 -05:00
Ronald Bradford
8ff298a871 Updated deprecated keystone_authtoken option
* memcache_servers is a deprecated name for memcached_servers.
  See: keystonemiddleware/auth_token/__init__.py#n287

NOTE: memcache_serves in the cache section is valid option for
    oslo.cache.  See oslo_cache/_opts.py#n65

Depends-on: Id65f1bff8e38c777fa406d88ac6a2355d6033d94
Change-Id: I3e1230b139e710a0433e71ce118ca246d7c6a0e6
2016-03-08 18:59:44 +00:00
Jamie Lennox
32bf2c4f6f Use extended keystone-manage bootstrap parameters
Use the additional keystone-manage parameters to setup the identity
endpoint in the service catalog rather than manually fetching a token
for this.

Change-Id: I6f5be1df205dee8f3251b4eb413e00ae64f00f07
2016-03-07 20:49:13 -06:00
Jenkins
b01a3c3baf Merge "Followup comment fix from alt_demo user creation" 2016-02-25 00:55:54 +00:00
Jenkins
6bb429359d Merge "Fix uwsgi keystone" 2016-02-24 19:35:53 +00:00
Mehdi Abaakouk
13fe6f59d1 Fix telemetry integration gate jobs
Since https://review.openstack.org/#/c/281779/2 have been
merged the telemetry integration job is broken.

Unfortunatly, it can't be fixed on our side, because we have to
rename SERVICE_TENANT_NAME in many devstack plugin, we can't merge thing
until all plugins have been fixed.

So this change restores SERVICE_TENANT_NAME, to be able to switch to SERVICE_PROJECT_NAME.

Related-bug: #1548634
Change-Id: I14ebf23aa63f0f153b934ad213a6209d22e73e9d
2016-02-23 13:04:12 +01:00
Brant Knudson
d8589fa01a Fix uwsgi keystone
The uwsgi keystone jobs are failing with an error like

 + devstack/functions-common:_run_process:L1391:   setsid uwsgi /etc/keystone/keystone-uwsgi-admin.ini
 + devstack/functions-common:_run_process:L1395:   exit 0
 execvp: No such file or directory

I think this is because uwsgi isn't installed on the images. The fix
is to pip install it.

Also, use the full path to the uwsgi executable (even though execvp
is used) because eventlet (calling keystone-all) does.

Also, the uwsgi process wasn't shutting down on ./unstack.sh. This
is worked around by not running master process.

Change-Id: Id02e16c5149ba3dfa13051e87cfccd8e505b7362
2016-02-22 13:59:34 -06:00
Sean Dague
7580a0c3e3 Replace TENANT => PROJECT phase 1
This replaces the use of TENANT variables with PROJECT ones during the
initial setup. The openrc will still export a OS_TENANT_NAME because
many tools (cinderclient, glanceclient amoung them) will not function
without it. We warn when we do that.

Change-Id: I824b1121842eb5821034071874bf1bb2d7c3631e
2016-02-22 11:55:17 +11:00
Brant Knudson
edc11c2f83 Keystone support deploy in uwsgi
Keystone is going to remove support for eventlet. Rather than only
have one way to run keystone (in Apache Httpd with mod_wsgi), we
should continue to gate on multiple wsgi containers to ensure that
keystone remains container-agnostic. The suggested alternative
container is uwsgi.

To run keystone in uwsgi rather than httpd or eventlet, set the
following env var in local.conf:

 KEYSTONE_DEPLOY=uwsgi

There's a lot of options to uwsgi. Here's some protips:
http://uwsgi-docs.readthedocs.org/en/latest/ThingsToKnow.html

Change-Id: If3b49879ce5181c16f0f0ab0db12fa55fe810a41
2016-02-15 08:45:22 -06:00
Brant Knudson
a03053660a Keystone deploy switch
Currently there's a boolean KEYSTONE_USE_MOD_WSGI to switch between
running keystone in mod_wsgi and eventlet. We've got a need to
support more/different deployment options (e.g., uwsgi), so a
boolean is inadequate.

A new input variable KEYSTONE_DEPLOY is introduced that can be
set to mod_wsgi or eventlet (and other values in future) to
control how keystone is deployed. KEYSTONE_USE_MOD_WSGI is
deprecated.

Change-Id: I9b2815e6f007309f088346df9ac48e6a24ae3656
2016-02-15 08:45:22 -06:00
Sean Dague
985e958dda remove keystone templated catalog
This is just another code path for little benefit in devstack which is
going to rot out. We should be opinionated here and only support the
dynamic catalog.

Change-Id: I4e5c7e86aefe72fc21c77d423033e9b169318fec
2016-02-10 15:39:31 -05:00
Sean Dague
d6f922364e push out some deprecations to figure out what's using these bits
There are some parts of devstack we should really delete, but we have
no idea who is using them. Push out some deprecations so we can look
at this through logstash.

Change-Id: Id5c8748606cce16f64e978ad7ac9309bebac0eb7
2016-02-09 06:34:36 -05:00
Morgan Fainberg
da1cc5780d Remove microseconds from apache log(s)
Remove the microseconds from the apache logs and move back to using
milliseconds. There is no longer any 2.2 workarounds in the keystone
setup process.

Change-Id: I8787eee41fbde1f9794aeffe1e862af0d5117bc3
2016-02-08 11:36:37 -08:00
Dean Troyer
50f75a9f64 Followup comment fix from alt_demo user creation
Tweak a code comment based on a review comment from Steve Martinelli in
https://review.openstack.org/#/c/275121/ where the alt_demo user is now
always created.

Change-Id: I9e9a769f601e52c030e9f6953f1746788c24a185
2016-02-04 03:25:46 +00:00
Sean Dague
c67d22e2ed make the alt_demo user during normal install
For testing reasons it's typically very useful to have a second non
admin user to cross check that it can't do a thing to the first
user. It was useful enough we always created it with tempest (though
we didn't always use it).

This makes devstack always create an alt_demo user, which is available
in occ as devstack-alt. This will help us unwind some of the keystone
v3 breaks with functional tests using keystone cli to build this
second user.

Change-Id: Iaaf02469180563e2d8c413fee0ee66ada2296cfa
2016-02-02 05:51:14 -05:00
Morgan Fainberg
a8ffe8a473 Enable keystone caching
Enable keystone caching since there is now a memcache server available
for the middlewares to cache validation. Offload queries to the
keystone backend to memcache as well.

Change-Id: I6d1d28f5b974e79d44d1e86ea53c666e3f5771df
2016-01-27 13:21:00 -06:00
Morgan Fainberg
5997ce3ab6 Always cache tokens in a shared memcache
Instead of using in-process caching for tokens per service per
worker (disabled by default now), use a shared memcache to cache
token validation(s). This should both offload/speedup validations
and avoid the issues surrounding inconsistent validation responses
when using in-process caching [since each worker caches separately].

Change-Id: Ifc17c27744dac5ad55e84752ca6f68169c2f5a86
2016-01-22 00:04:57 +00:00
Jenkins
3106c2d7d4 Merge "Add support for role and resource keystone backends" 2016-01-16 13:38:55 +00:00
Steve Martinelli
923be5f791 bootstrap keystone using new bootstrap command
Be gone ADMIN_TOKEN, long live keystone-manage bootstrap.

This patch reworks the initial setup for keystone by using
the new bootstrap command. After a minimal service catalog
has been created, using this process, we simply authenticate
as usual.

implements bp: bootstrap
Depends-On: I113c6934b6b83ceff23a94101967a6df1126873f
Change-Id: Ia1475d461eab60b68c6a0356714b21c7f92e0194
2016-01-09 20:26:48 -05:00
Jenkins
8df31a107d Merge "Assign admin role for admin user on default domain" 2016-01-09 07:49:35 +00:00
Jenkins
828936c6ac Merge "Use keystone[ldap] for ldap packages" 2016-01-08 10:11:53 +00:00
Jenkins
9f8cf83e69 Merge "Option "auth_plugin" is deprecated." 2016-01-06 18:23:21 +00:00
Steve Martinelli
3526276a08 Add support for role and resource keystone backends
Keystone further broken apart the assignment backend into: role,
resource, and assignment. We should define the backends in the
config file and allow users to override the default by passing in
their own value.

Change-Id: Ieb22c428609d3db852814c7eceb77efa6bbde633
2016-01-05 23:56:40 -05:00
Brant Knudson
6a4d3eb55f Use keystone[ldap] for ldap packages
Keystone now provides an "ldap" in extras to install its ldap
dependencies so devstack doesn't have to track the python
dependencies itself.

Installation of the extras is done in an extra install line. This is
slightly redundant, however this pattern works much better from an
install stand point as it supports an arbitrarily large number of
extras.

Partial-Bug: 1479962
Change-Id: If0f0ff48f3d6b3c414f2d6fcd747ecf45a397658
2016-01-05 07:41:35 -05:00
Jenkins
e8788c0129 Merge "Specify HTTPS URLs to fix tls-proxy mode" 2016-01-02 13:23:13 +00:00
Hua Wang
f7dc06cb89 Option "auth_plugin" is deprecated.
Option "auth_plugin" from group "keystone_authtoken" is deprecated.
Use option "auth_type" from group "keystone_authtoken".

Change-Id: I01371bd924114d6470e960a91a3045fe7dc22339
Closes-Bug: #1528746
2015-12-23 12:23:25 +08:00
Dave Chen
97b9e970b2 Remove the support for keystone extensions
All keystone extensions have been moved into cores and are
enabled by default, there is no need to configure the extension
in devstack but configure it in devstack will block the
install process.

Change-Id: I7d21b122c641f601295ee7ece3583404b3874dbd
Closes-Bug: #1526033
2015-12-15 03:42:17 +08:00
gordon chung
e42306d9db only set admin_* options for eventlet
keystone+apache don't need these values set.

Change-Id: Iebdb31b5f0888613e0454f09a426933d6fcd71b3
see: http://lists.openstack.org/pipermail/openstack-dev/2015-December/081984.html
2015-12-10 14:54:01 -05:00
Ian Wienand
523f488036 Namespace XTRACE commands
I noticed this when debugging some grenade issues failures.

An include of grenade/functions stores the current value of XTRACE
(on) and disables xtrace for the rest of the import.

We then include devstack's "functions" library, which now overwrites
the stored value of XTRACE the current state; i.e. disabled.

When it finishes it restores the prior state (disabled), and then
grenade restores the same value of XTRACE (disabled).

The result is that xtrace is incorrectly disabled until the next time
it just happens to be turned on.

The solution is to name-space the store of the current-value of xtrace
so when we finish sourcing a file, we always restore the tracing value
to what it was when we entered.

Some files had already discovered this.  In general there is
inconsistency around the setting of the variable, and a lot of obvious
copy-paste.  This brings consistency across all files by using
_XTRACE_* prefixes for the sotre/restore of tracing values.

Change-Id: Iba7739eada5711d9c269cb4127fa712e9f961695
2015-11-27 15:36:04 +11:00
Rob Crittenden
cdba7b0e53 Specify HTTPS URLs to fix tls-proxy mode
A number of new settings are required for glance, cinder
and keystone to be installable when the tls-proxy
service is enabled.

For cinder a new public_endpoint option was added and this
needs to be set to the secure port.

Keystone needs the admin_endpoint and public_endpoints
defined otherwise during discovery the default,
non-secure versions, will be returned.

The keystone authtoken identity_uri was set at its default value
in the glance registry and API configuration files.

Change-Id: Ibb944ad7eb000edc6bccfcded765d1976d4d46d0
Closes-Bug: #1460807
2015-11-17 19:39:54 +00:00
Jenkins
310cedf677 Merge "Use swift port variable in keystone and cinder" 2015-10-29 04:57:22 +00:00
Falk Reimann
22f747b8df Use swift port variable in keystone and cinder
This patch alows specifiying a deviation of the swift default port 8080 with
variable SWIFT_DEFAULT_BIND_PORT. The created endpoints in keystone for
object-store and the backup_swift_url in cinder.conf will use variable
SWIFT_DEFAULT_BIND_PORT instead of the fixed port 8080.

Change-Id: I47bbcf77368c430718fb8f29b7de1ff305e64422
Closes-Bug: #1489767
2015-10-23 09:19:32 +02:00
Ian Wienand
ada886dd43 Don't mix declaration and set of locals
Ia0957b47187c3dcadd46154b17022c4213781112 proposes to have bashate
find instances of setting a local value.  The issue is that "local"
always returns 0, thus hiding any failure in the commands running to
set the variable.

This is an automated replacement of such instances

Depends-On: I676c805e8f0401f75cc5367eee83b3d880cdef81
Change-Id: I9c8912a8fd596535589b207d7fc553b9d951d3fe
2015-10-07 17:03:32 +11:00
Roxana Gherle
59c6377ae5 Assign admin role for admin user on default domain
This patch adds an admin role assignment for the admin user on
the default domain as part of the Keystone configuration stage.

Closes-Bug: #1494081
Change-Id: I91c88917bd51be4572e4970c94e65d866798df26
2015-09-22 10:15:28 -07:00
Jenkins
2f746c5243 Merge "Use keystone wsgi_scripts" 2015-09-14 05:21:26 +00:00
Hidekazu Nakamura
17fe88a72c Fix typo in lib/keystone
nonadmin => nonadmins

Change-Id: I9d51e079c10f7c48b962a1d6f4577e8a6ec4a229
2015-09-11 19:52:18 +09:00
Brant Knudson
2ad1a42ca6 Use keystone wsgi_scripts
Devstack was setting up a separate directory and copying
http/keystone.py into it for the admin and public endpoints.

Keystone now defines wsgi_scripts entrypoints so that
keystone-wsgi-admin and keystone-wsgi-public are created on
install so devstack can reference these files instead.

See http://httpd.apache.org/docs/2.4/upgrading.html#access for
the apache docs with examples for the Allow|Deny/Require
directives.

Depends-On: Ic9c03e6c00408f3698c10012ca98cfc6ea9b6ace
Change-Id: Ided688be62b64066d90776313c963ec5016363f2
2015-08-25 11:01:05 -04:00
Jenkins
3805b3770c Merge "Allow installing keystoneauth from git" 2015-07-23 14:17:49 +00:00
Jenkins
474e96d02b Merge "Support fernet token provider" 2015-07-16 14:03:24 +00:00
Jamie Lennox
b17ad7560d Use identity V3 API for endpoint creation
Always use the keystone V3 API when creating services and endpoints. The syntax
here is slightly different but we maintain the function interface.

Change-Id: Ib3a375918a45fd6e37d873a1a5c0c4b26bdbb5d8
Implements: bp keystonev3
2015-07-08 05:17:00 +10:00
Jamie Lennox
21a9077d7c Allow installing keystoneauth from git
Keystoneauth is not marked as stable yet however to ensure that the
integration between it, keystoneclient and other services don't break
compatibility we want to test it with tempest.

Unfortunately you can't put -e links in requirements.txt files so add
it to devstack so we can set the test environment. This will also make
it available when keystoneauth is released.

Change-Id: I43ca1df9c6ae2f0ac1a687c9ce1e2ccb97e81652
2015-07-06 23:17:15 +00:00
Brant Knudson
cef5e40e0c Support fernet token provider
Keystone added the "fernet" token provider in Kilo. This adds
support for it.

Change-Id: I6b7342ea67157a40edc8b9ba3d84d118e39d86ed
2015-06-26 15:34:15 -05:00
Jamie Lennox
9d7e776b70 Use Keystone v3 API for user creation
This includes requiring a domain when creating a user. This will allow us to
control where users are created in a later patch.

Adding the token to the user creation call is required because of a bad
interaction between OpenStackClient, os-client-config and keystoneclient
when dealing with v2 authentication but v3 API calls. It will be cleaned
up when we switch to v3 credentials.

Change-Id: I6ef50fd384d423bc0f13ee1016a8bdbb0650ecd9
Implements: bp keystonev3
2015-06-16 10:06:39 +08:00
Jamie Lennox
b632c9ef81 Use keystone v3 API for projects
Always use the keystone v3 API for project creation. Make domain a
required argument. Whilst we could simply default this value within the
function I think it's better to make this explicit as these are things
deployers and services need to consider.

In future we will want to figure out how we want devstack to organize domains
however I don't believe that it belongs in this patch.

Change-Id: Ib9587193c5c8419dc4b5a608246709baaddd2a52
Implements: bp keystonev3
2015-06-16 08:38:09 +08:00
Jenkins
d986c59d6b Merge "Honor the flag for Identity v3 API only jobs" 2015-05-28 00:04:47 +00:00
Samuel de Medeiros Queiroz
3fd71d6893 Honor the flag for Identity v3 API only jobs
When the property ENABLE_IDENTITY_V2 is set to
False in the local.conf file, devstack will:

* Disable the v2 API in Keystone paste config;
* Set Tempest to skip Identity v2 tests and use
  v3 auth tokens to run all the other tests;
* Set Horizon to use v3 API and v3 auth tokens;
* Register the Identity endpoint as v3.

Change-Id: I2575a516244b848e5ed461e7f488c59edc41068d
2015-05-27 14:27:30 -03:00
Jenkins
cf56d4e35c Merge "Remove KEYSTONE_AUTH_CACHE_DIR" 2015-05-22 02:09:57 +00:00
Jenkins
3d1ef5f3de Merge "Remove setting nonexistant [ec2] driver option in keystone" 2015-05-22 02:09:03 +00:00
Jenkins
db7809880b Merge "Use stevedore for keystone backends" 2015-05-15 22:59:18 +00:00
Chris Dent
3a2c86aabf Add python_version function to functions-common
This makes it possible to list virtual site-package directories
without statically stating the python version, which is a bit ugly.

Change-Id: I3e7ac39eb43cdc4f656e0c90f3bfb23545722aef
2015-05-12 18:30:31 +00:00