33 Commits

Author SHA1 Message Date
Attila Fazekas
5813265ce5 remove OS_AUTH_TYPE from the userrc files
The openstack client just gets more confused when it is specified.

Change-Id: I8b498be835b63733cb38d33b02c3a8531a2da45b
2016-07-14 12:55:51 +02:00
John L. Villalovos
daa7a41e21 Export the 'short_source' function & don't keep PS4 in sudo
Export the 'short_source' function so that it will be present in the
environment for child shell scripts. Do this because we are passing PS4
to the child shell scripts and it is using 'short_source'

Don't do an 'env_keep' in the sudoers file for PS4, since it is
difficult to also pass along the 'short_source' function.

Change-Id: I9781010d6eb336d02939c7fd47f18bedeae5ccc6
Closes-Bug: #1563443
2016-05-06 10:50:58 -07:00
Sean Dague
646085d701 Add colorful PS4
PS4 can include functions, so when running in the LOG_COLORS=True mode
provide a grey function line so that it's easier to visually
distinguish the content from the location.

Also make it so the main prompt chunks off all the common path, which
means we can printf to 40 characters and have a pretty reasonable and
readable PS4.

Change-Id: I4a10a49db97d413349bcfceeb8c4164936fbcc40
2016-03-23 07:37:44 -04:00
Ian Wienand
3bf69e835a Remove EC2 API from devstack
This all started with an investigation into Fedora's use of ecua2ools
package.  This package is a bit of a nightmare because it pulls in a
lot of other system-python packages.

For Ubuntu, this package was removed in
I47b7e787771683c2fc4404e586f11c1a19aac15c.  However, it is not
actually a "pure python" package as described in that change, in that
it is not installable from pypi.  I can't see how you could actually
run exercises/euca.sh on Ubuntu unless you installed euca2ools by hand
-- ergo I suggest it is totally unused, because nobody seems to have
reported problems.

In the mean time, ec2 api has moved to a plugin [1] anyway where the
recommendation in their README is to use the aws cli from amazon.

Thus remove all the parts related to EC2 and ecua2ools from base
devstack.

[1] https://git.openstack.org/cgit/openstack/ec2-api

Change-Id: I8a07320b59ea6cd7d1fe8bce61af84b5a28fb39e
2016-03-15 13:32:23 +11:00
Sean Dague
74b91c3eaf Revert "Move default Keystone API version to v3"
It seems like the fallout from this was not well sorted.
A lot of things aren't working, and there is still vestigial
v2 bits left behind.

This should have come with a much greater warning and some
spot checking of additional services working with this.

This reverts commit b162a1d58cdecfb32847b59bd341e06c26efb1ed.

Change-Id: Ia792b23119c00089542ba08879dca1c29dc80945
2016-02-01 14:58:20 +00:00
Paulo Ewerton
b162a1d58c Move default Keystone API version to v3
This patch sets Keystone v3 as default in services
configuration files and in the openrc and stackrc scripts.

Change-Id: I24546f02067ea23d088d383b85e3a78d7b43f165
Partially-Implements: bp keystonev3
2016-01-26 14:27:02 +00:00
Dmitry Tantsur
f90c0b7d29 Stop referencing no longer existing SERVICE_ENDPOINT variable
It was probably finally removed by one of recent refactoring changes.
Now ironic gate fails due to Swift trying to access it to override OS_AUTH_URL.
This change drops this override and just uses OS_AUTH_URL.

Closes-Bug: #1535245
Change-Id: I145bec110c4299e61f2bce49df41dcd82e5d462d
2016-01-18 10:53:01 +01:00
Steve Martinelli
3567d6103a remove SERVICE_TOKEN from the docs
there are a few lingering instances of SERVICE_TOKEN in the docs
and some of the scripts in tools.

Change-Id: I9d2147eea6639db1f4ea15a259c147eecfc339ff
2016-01-10 01:29:39 +00: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
Andrey Pavlov
485c962667 Fix create_userrc.sh script
Patchset fixes calculating EC2_URL/S3_URL for user rc files in 'accrc' directory.
Currently calculation of these url's uses 'openstack endpoint show' command
without specifying os-identity-v3 flag. But output is empty without such flag.
So this patchset uses same construction as exists in functions-common.

Change-Id: Ia4f2510750fa0f46e2f1d58cf0a7a16782f022b3
2015-08-24 22:55:19 +03:00
Jamie Lennox
c54d4ab910 Include domain variables in accrc
Include the user and project domain parameters in the generated user rc files.
This is fairly simplistic, if we were to follow the existing attitudes we
should iterate over the domains and add a new level of folders however this
would change the output location for files that may be depended upon.

Change-Id: I5e9e78406b11382751a591d91f711161bb98f47a
2015-07-07 19:33:18 +00:00
Jamie Lennox
9d6d8f8015 Use project instead of tenant in create_userrc
The create_userrc file is littered with references to a tenant. The tenant
concept has been deprecated long enough that we should use project instead.

I have not attempted to maintain compatibility with the --os-tenant-X flags
because I have not found reference to anyone using this script outside of
devstack.

Change-Id: I613f1bdc6673f0c4bfe29aaab7b514348a617a8c
2015-07-07 19:21:06 +00:00
Andrey Pavlov
0ea8b72a20 Make EC2 compatible with current AWS CLI.
Nova listens for EC2 calls now at the URL without path -
http://some.server.com:8773/
I was made in review -
https://review.openstack.org/#/c/152496/

So I suggest to change EC2 urls in keystone catalog.

Change-Id: Ia2975ce0f6a30eed6016733e12c98b5f97648307
Closes-Bug: 1417555
2015-02-06 22:51:07 +03:00
JordanP
7c6d005eed Fix account rc files creation for Swift users
Id02ebdfa5cb3f6c763293876c6bb031184ebd663 introduced a small
regression which makes the command x509-create-cert fail with
'ERROR (CommandError): Invalid OpenStack Nova credentials.' for
Swift users.

The handling of specific password for Swift users was introduced
in Ifb57a43aad439ffe041e98465719a8a8eceae544

Change-Id: I3f328b1358bad0bdf7056796eabfe846dd5bae3a
2014-10-09 09:58:51 +02:00
Jenkins
e5dbec252a Merge "Fix docs build errors" 2014-10-08 22:14:51 +00:00
Dean Troyer
3324f19f5a Fix docs build errors
Fix shocco errors during docs generation

Closes-Bug: 1362691
Change-Id: I2b7fb008c89f0b4e7280b2d0a054320765e83e47
2014-10-02 15:30:50 -05:00
Steve Baker
e389aed5bd Allow heat standalone to work devstack stack
For functional testing of heat-standalone it is desirable for
heat to orchestrate on the rest of the cloud which is brought up
by devstack. This change makes the following changes to enable
this when HEAT_STANDALONE=True:

- Don't register the orchestration endpoint or create any dedicated
  heat accounts
- Install and configure the heat keystone V2 auth plugin instead of
  the default v3
- set heat.conf [clients_heat] url so that heat can call its own
  API when no orchestration endpoint is registered
- Modify create_userrc.sh to set the required heat client env
  variables to work with the standalone heat

Change-Id: Idae33bf1a9d550e2575e6390d2d7c8d3b94c401d
2014-09-23 17:18:04 +12:00
Ian Wienand
bcdce9ea12 Handle failure of openstack endpoint
Change 4f7bf6963a1e9ae03bc0ae9189874cba561ad62f introduced finding the
endpoint via "openstack endpoint show" only.  Previously that output
was piped through grep, etc. so it handled fell back to a blank
output when the endpoints were not available.

Ignore failures of this command so the blank output is matched

Change-Id: Iae2f09784ffa38efd2f858513bf284c84c32edac
2014-06-24 15:06:02 +10:00
ftersin
4f7bf6963a Fix getting EC2 and S3 urls in create_userrc
Invalid parsing of openstackclient output was introduced in
I03c17cfc9740c3eb257152c95d9c4f021db2c89e. Here command lines
was changed to get urls with no parsing.

Also default EC2_URL was fixed.

Change-Id: Ic46a9989321cf6310c56edeeb737c603a4f9c1ed
2014-05-21 22:09:46 +04:00
Steve Martinelli
bce8899cde Update create_userrc to openstackclient commands
Updated keystoneclient commands in tools/create_userrc.sh
to their openstackclient equivalents.

Change-Id: I03c17cfc9740c3eb257152c95d9c4f021db2c89e
2014-04-16 00:32:53 -05:00
Ian Wienand
aee18c749b Enforce function declaration format in bash8
Check that function calls look like ^function foo {$ in bash8, and fix
all existing failures of that check.  Add a note to HACKING.rst

Change-Id: Ic19eecb39e0b20273d1bcd551a42fe400d54e938
2014-02-28 07:59:03 +11:00
Jenkins
92558b8f5e Merge "Fix shocco errors" 2014-02-22 05:06:55 +00:00
Jenkins
3ccd768db0 Merge "Rename Openstack to OpenStack" 2014-02-18 07:43:37 +00:00
Dean Troyer
d8864feae9 Fix shocco errors
Clean up comments to fix errors seen while processing with shocco

Change-Id: I0e97ad27613313f03e47c107051ea93b115d4744
2014-02-17 11:18:12 -06:00
Sahid Orentino Ferdjaoui
1814e671d3 Fix bug "Invalid OpenStack Nova credentials." on the gate
During the process, when create_userrc.sh tries to creates
certificates and sourcable rc, it assumes that all users have
the same password.

Change-Id: Ifb57a43aad439ffe041e98465719a8a8eceae544
Closes-Bug: #1260723
2014-02-12 17:36:35 +01:00
tanlin
2b69f23625 Rename Openstack to OpenStack
Change-Id: I78ac040e926ef8040ee674b6fea3223a8ab4ae99
2014-02-12 17:52:17 +08:00
Chmouel Boudjnah
86a8e97679 Add while/until to the for/do rule
Like 'for/do' check that the while/until operator are on
the same line with the do.

Fixes some pep8 error along the way.

Change-Id: I440afe60691263365bf35310bf4212d94f30c339
2014-02-05 07:52:54 +01:00
Jamie Lennox
bd24a8d0f8 Allow deploying keystone with SSL certificates
Allow providing certificates through environment variables to be used
for keystone, and provide the basis for doing this for other services.
It cannot be used in conjunction with tls-proxy as the service provides
it's own encrypted endpoint.

Impletmenting: blueprint devstack-https
Change-Id: I8cf4c9c8c8a6911ae56ebcd14600a9d24cca99a0
2013-11-25 22:27:51 +00:00
Sean Dague
0b865a55f2 final bash8 files for the rest of devstack
With this devstack/master is bash8 clean, and ready for enforcement

Change-Id: I03fc89b401e6b7a23224d71472122c1bfa3ad0bd
2013-10-22 13:06:18 -04:00
Adam Spiers
c85ade7720 set errexit and xtrace in helper scripts
stack.sh invokes some helper scripts as separate processes, rather than
by source'ing them.  As with stack.sh itself, abort immediately on the
first error, so that errors don't compound and result in confusing error
messages.  If one of these helper scripts aborts, stack.sh itself will
also abort in the usual manner.

Due to the change in behaviour, tweak some mv invocations to ensure that
they don't trigger false failures.

As with stack.sh itself, also enable xtrace so we can see exactly what's
happening.  In particular this allows us to see the cause of any
premature termination due to a command failing whilst errexit is
enabled.

Change-Id: I7a55784c31e5395e29ab9bbe2bb112b83b9be693
2013-10-01 17:54:40 +01:00
Dean Troyer
0f2d954b82 Fix create_userrc.sh private key hang
tools/create_userrc.sh hangs in a couple of mv commands now that
private keys are created with mode 400.  mv is prompting to
override the permissions, so let's just -f it all.

Change-Id: I8fbb24da6582edcff741653ffdf8bf683b79851a
2013-02-20 17:55:04 -06:00
Attila Fazekas
5b813bc489 Fix role creation in tools/create_userrc.sh
* use role-create instead of tenant-create
* add some missing quote

Change-Id: I3e263bfbfe63a35c5a95248f05d78bd6a1c2e593
2013-01-08 16:51:05 +01:00
Attila Fazekas
22ef573172 Add generic account rc creater
* Creates account rc files for all tenant user
* Able to create new accounts
* The rc files contains certificates for image bundle
* euca related steps can be simpler in the future

Change-Id: I917bffb64e09a5d85c84cde45777c49eaca65e64
2012-12-20 18:01:13 +01:00