Commit Graph

101 Commits

Author SHA1 Message Date
Takashi Kajinami d2acd60870 Horizon: Install pymemcached
... so that we can use PyMemcacheCache backend. The MemcachedCache
backend, which has been used previously, has been removed in recent
Django, and we are switching the default backend in [1].

[1] https://review.opendev.org/c/openstack/horizon/+/891828

Change-Id: Ie1da8970628e34c41721198cdada8c7bb3b26ec0
2023-10-16 15:04:13 +09:00
Clark Boylan a40f9cb91f Add option to install everything in global venvs
Since we are python3 only for openstack we create a single python3
virtualenv to install all the packages into. This gives us the benefits
of installing into a virtualenv while still ensuring coinstallability.
This is a major change and will likely break many things.

There are several reasons for this. The change that started this effort
was pip stopped uninstalling packages which used distutils to generate
their package installation. Many distro packages do this which meant
that pip installed packages and distro packages could not coexist in the
global install space. More recently git has made pip installing repos as
root more difficult due to file ownership concerns.

Currently the switch to the global venv is optional, but if we go down
this path we should very quickly remove the old global installation
method as it has only caused us problems.

Major hurdles we have to get over are convincing rootwrap to trust
binaries in the virtualenvs (so you'll notice we update rootwrap
configs).

Some distros still have issues, keep them using the old setup for now.

Depends-On: https://review.opendev.org/c/openstack/grenade/+/880266
Co-Authored-By: Dr. Jens Harbott <frickler@offenerstapel.de>
Change-Id: If9bc7ba45522189d03f19b86cb681bb150ee2f25
2023-08-02 07:07:25 +02:00
Martin Kopec ec07b343d2 Remove support for opensuse
We haven't been testing the distro for a while in CI, e.g. in
Tempest, the jobs on opensuse15 haven't been executed for a year
now.
Therefore the patch removes opensuse support from devstack.

Closes-Bug: #2002900
Change-Id: I0f5e4c644e2d14d1b8bb5bc0096d1469febe5fcc
2023-02-16 12:01:39 +01:00
Akihiro Motoki deb3ff50f1 lib/horizon: no need to specify keystone v3 to API version
keystone v3 is the default API version in horizon now,
so there is no need to specify it in local_settings.py explicitly.

This commit also makes minor changes in lib/horizon
_horizon_config_set().

* Do not insert a blank line after each setting.
* Use the local variable $file to specify the target file
  consistently.

Change-Id: I5faea3e1f357726a256d2b48fc1afeabfead4998
2019-10-02 16:33:46 +09:00
Lance Bragstad a7d0c6fa2c Use `member` instead of `Member`
Keystone now provides a set of default roles in addition to `admin`
by default [0]. This is done during the `keystone-manage bootstrap`
process.

This change aligns the `Member` role override from devstack with the
`member` role provided from keystone.

[0] https://review.openstack.org/#/c/572243/

Change-Id: I3da3530aa73a8a1500116bcefdcba7b947d5e05e
Closes-Bug: 1777359
2018-06-18 15:54:36 +00:00
Akihiro Motoki f8dc558486 Drop django_openstack_auth related code
In Queens cycle, the code of django_openstack_auth was merged into
the horizon repository. The master branch of django_openstack_auth
will be retired. (horizon blueprint merge-openstack-auth)
This commit drops django_openstack_auth related code from DevStack.

_prepare_message_catalog_compilation in lib/horizon was used only
in install_django_openstack_auth, so it is dropped too.

Change-Id: If9467c520a1e07d1968b29e485df0097330356bc
2017-12-24 08:21:15 +09:00
Sean Dague 0eebeb415a clean up screen and tail_log references
Change-Id: I6bcfa09931ed1f70e071ccb16688c15c7ef2898f
2017-09-01 15:08:17 -04:00
Leticia Wanderley cc36397134 Fixes devstack ldap plugin
When the ldap service is enable on local.conf devstack ldap
plugin starts slapd service using its default config on Ubuntu
and installs ldap-utils package.
Enables domain specific drivers on Keystone and creates LDAP
domain 'Users' with a demo user.

Change-Id: I8d7aa260b01f675e4ed201ef93bfd66474f4b228
2017-07-10 17:06:16 -03:00
Davanum Srinivas 51ecf0a869 Introduce a PYTHON env var
* $PYTHON will have the path to python runtime to be used
* Use $PYTHON to run all the scripts

Change-Id: Ib5ab7820fc18cae5e50ea47302b610494197ad47
2017-01-05 18:41:29 -05:00
Davanum Srinivas afa8a00c14 Switch to python 3.5
Use trueorfalse to normalize the values for USE_PYTHON3

Install 3.5 instead of 3.4 When USE_PYTHON3 is specified.
Also, since not many packages are classified correctly, fallback
to looking for just "Programming Language :: Python :: 3" and
log a message for the package to highlight the problem.

Also special case some services that are *almost* ready

Depends-On: Id48e1b328230fcdf97ed1cb4b97f4c3f9cf6eb8a
Depends-On: Ib7d9aa0e0b74a936002e0eea0b3af05102b06a62
Change-Id: I243ea4b76f0d5ef57a03b5b0798a05468ee6de9b
2016-12-23 13:15:03 -05:00
Jenkins a5bd682d47 Merge "remove listen directive bound to only ipv4" 2016-11-30 21:22:11 +00:00
Jenkins a8f57af273 Merge "Remove Horizon setup scripts usage of run_tests.sh" 2016-11-28 23:43:49 +00:00
Rob Cresswell f0252a9d81 Remove Horizon setup scripts usage of run_tests.sh
Horizon is removing run_tests in favour of tox during Ocata, as part of
https://blueprints.launchpad.net/horizon/+spec/enhance-tox. To complete
this move, we need to remove any reliance on run_tests.

Change-Id: Ia8ad073aee68d1660d3bb5a68ec07516d8ce0665
2016-11-25 11:32:04 +00:00
Tomasz Trębski 868a663172 Always set ALLOWED_HOSTS=['*'] for horizon
If devstack is deployed in the VM with defined
public IP address (like 192.168.10.6) it is not possible to
access the Horizon from the browser.
This is because DEBUG=True means that ALLOWED_HOSTS, if not set,
is equal to ['localhost', '127.0.0.1', '[::1]'] according
to Django's documentation.

Change-Id: I0ab2b57e459dbfa3b01b3e9388bbcefac076a142
Co-Authored-By: David Lyle <dklyle0@gmail.com>
Closes-Bug: #1643050
2016-11-23 15:32:29 +00:00
Dan Kolb 5c4691af3e remove listen directive bound to only ipv4
Using devstack on a  RHEL based system results in
"Listen 0.0.0.0:80" being added to the
/etc/httpd/conf/httpd.conf.
This configures Apache to only listen to port 80 on an IPv4 interface.
This makes it not possible to access Horizon via IPv6 without
re-configuring and restarting httpd.

Removing this sed leaves the default "Listen 80" from the rpm package,
 which binds to all interfaces and will allow connection to Horizon
via IPv6.

Change-Id: I9fe8cbebff0ca6a30ceeaae0f7e035c9bb828d44
2016-11-23 09:26:15 -06:00
David Lyle 2ccd120342 Revert "Always set ALLOWED_HOSTS for horizon"
This reverts commit 37f48f3c20.

Change-Id: I8c853c35c5b0b61925c27b461ad625266381f73b
2016-11-21 22:16:17 +00:00
Tomasz Trębski 37f48f3c20 Always set ALLOWED_HOSTS for horizon
If devstack is deployed in the VM with defined
public IP address (like 192.168.10.6) it is not possible to
access the Horizon from the browser.
This is because DEBUG=True means that ALLOWED_HOSTS, if not set,
is equal to ['localhost', '127.0.0.1', '[::1]'] according
to Django's documentation.

Change-Id: I74ae99569dafa10eee7066713a05fb49183e3fca
2016-11-18 04:54:38 +00:00
Rob Crittenden 5631ca5e12 Clean up Horizon Apache configuration files in clean.sh
The horizon cleanup function wasn't being called at all during
cleanup which left the Apache configuration.

Change-Id: Iff5336d0c5e79cfc82f1c648afaabb869d86020e
2016-08-02 15:28:19 -04:00
Brant Knudson e86b91ba78 Reference keystone URIs rather than building URI
lib/keystone sets KEYSTONE_AUTH_URI and KEYSTONE_SERVICE_URI that
other projects should use rather than building the URL themselves.
This will allow us to more easily drop the port altogether.

Change-Id: I7467aae680215f3045d32a088af2187e1eba8169
2016-05-19 21:44:43 +00:00
David Lyle 076ef7f0fb Remove CUSTOM_THEME_PATH setting
Horizon now uses the WEBROOT to populate the value of $webroot in
the CSS code. The CUSTOM_THEME_PATH pointing to the webroot theme
to explicitly set the same value is no longer necessary.

Closes-Bug: 1540801
Change-Id: Ic212796ee0905751ac3fd619bbbc902d25ea10d5
2016-02-11 03:35:18 +00:00
Akihiro Motoki 43f62c0849 Move horizon config and start to appropriate phase in stack.sh
Previously horizon configuration and start are done too early
and as a result horizon init and start need to be run twice
after horizon plugins are enabled.
- horizon config was done before "run_phase stack install"
- horizon init and start were done before "run_phase stack post-config"

This commit rearrange horizon setup to the appropriate phases
defined in the devstack plugin interface.

- Configuration of horizon settings is moved to configure_horizon.
- horizon config is now called between run_phase stack install
  and post-config.
- horizon init and start are now called between run_phase stack
  post-config and extra.

Change-Id: I8bf2ceaf7734c4f7cec68bc05d7cdbae81ef311e
2015-12-15 16:44:41 +09: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
Jenkins 4f262a109d Merge "Configure horizon with identity v3" 2015-11-13 05:51:14 +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
Sean Dague 346edcc532 check all possible services when configuring tempest
The previous approach assumed that devstack in tree service support
would always be a super set of tempest. That's not necessarily
true. Instead when configuring tempest we should look at all the
possible services that tempest could know about, which will let us
disable services we don't have support for.

Change-Id: I9c24705e494689f09a885eb0a640efd50db33fcf
2015-08-26 09:38:37 -04:00
Jamie Lennox 05076fb7ea Configure horizon with identity v3
Currently horizon configures keystone using v3 only if v2 is not
available. Really we should just always be using v3.

Change-Id: Icac4d90b617209da75abf33f8e25ffc021c45fdb
2015-08-15 19:01:59 +10:00
David Lyle 7b105c572e Move horizon apache root to /dashboard
With keystone's move to /identity, a conflict in for resources was
created as both keystone and horizon used /identity. The keystone
config took precedence and rendered API output in the horizon UI.

This patch sets the root for horizon to /dashboard and serves all
horizon content from there. Additionally, a RedirectMatch has been added
to the apache config for horizon to redirect '/' to '/dashboard' this
will allow the implementation to change without being immediately
painful to users.

Also made the path '/dashboard/' configurable in stackrc.

Closes-Bug: #1478306
Depends-On: I9a04f936ed6d8c14775a332dc28e903992806c42

for devstack-gate changes to remove hard coded horizon url structure
assumptions.

Change-Id: I6fbca5cea9e44df160afbccc71bd045437657320
2015-08-13 01:41:57 +00:00
David Lyle 7ef246492c Fixing keystone v3 version use for horizon
The setting for overriding Horizon's OPENSTACK_API_VERSIONS is not
the correct format. The version should be a number, not a string.

so should be 3, not "v3".

Change-Id: I193d21514b196336796eac067417dc2aaec56433
Closes-Bug: #1460190
2015-05-29 13:49:03 -06: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
Sean Dague 60996b1b60 introduce pip_install_gr
This creates a new pip_install_gr that installs from global
requirements allowed versions. Now that stable branches are getting
capped all of devstack needs to be fixed to do things like this.

Change-Id: I8fd0ef2bfc544ca2576fab09d3018f760b8848fe
2015-04-08 10:28:17 -04:00
Dean Troyer dc97cb71e8 Mostly docs cleanups
Fix documentation build errors and RST formatting

Change-Id: Id93153400c5b069dd9d772381558c7085f64c207
2015-03-28 14:35:12 -05:00
Attila Fazekas c4c27232c8 Use the Member role with horizon
Horizon by default using the _member_ role,
which is considered as a legacy role.

The tools/create_userrc.sh already creates the regular users,
with Member role.

Change-Id: Ibc07a0f28d0729f8a717a54e94fe014853363592
Closes-Bug: #1421616
2015-03-03 11:02:49 +01:00
Joe Gordon d5ac785247 Add new function get_from_global_requirements
Instead of specifying the version of a library in devstack, use the version from
global-requirements

Add new function get_from_global_requirements and use it
where it makes sense.

Change-Id: I6b2f062761ac05ef72fc6cc9993bc204faf06fa5
2015-02-17 11:48:06 -08:00
Attila Fazekas 1f316beb20 Remove rhel6 and py26 support
el6 is shipped with Python 2.6.x which is not expected
to be supported with the openstack kilo release.

For el6 support we need to do lot of thing differently,
which makes the code more complicated.

This change removes el6 and py26 support from devstack.

This change also removed a discontinued (1 year ago)
openSUSE 12.2 code path, which used a similar codepath as el6.

Several comment related to el6 also removed or modified.

Change-Id: Iea0b0c98a5e11fd85bb5e93c099f740fe05d2f3a
2015-01-27 09:22:52 +01:00
Sean Dague 537532931d Make changes such that -o nounset runs
This makes a bunch of variable cleanups that will let -o nounset
function, for the time being we hide nounset behind another setting
variable so that it's not on by default.

Because this is bash, and things are only executed on demand, this
probably only works in the config it was run in. Expect cleaning up
all the paths to be something that takes quite a while.

This also includes a new set of unit tests around the trueorfalse
function, because my change in how it worked, didn't. Tests are good
m'kay.

Change-Id: I71a896623ea9e1f042a73dc0678ce85acf0dc87d
2015-01-15 13:06:14 -05:00
gong yong sheng 1eb4c6a375 remove brackets around boolean condition expression
Change-Id: Ia550d4603d9520ddea84a144e5e042903456d96d
Closes-Bug: 1405319
2014-12-29 12:21:51 +08:00
Sean Dague ef844fd08d remove $KEYSTONE_TOKEN_HASH_ALGORITHM
Now that Keystone is back to UUID token defaults the use case for this
in devstack is extremely dubious, and it can be set through via
local.conf if anyone *really* cares.

Part of bp:devstack-nounset

Change-Id: I644b5b1579952959d253758b2a12b97d8a704657
2014-12-15 16:33:53 -05:00
Sean Dague e263c82e48 add shebang lines to all lib files
With gerrit 2.8, and the new change screen, this will trigger syntax
highlighting in gerrit. Thus making reviewing code a lot nicer.

Change-Id: Id238748417ffab53e02d59413dba66f61e724383
2014-12-10 11:28:05 -05:00
Mikhail S Medvedev 088e66028c Deal with different django-admin executables
After the recent patch [1] the devstack is broken for Fedora 20 with
the error "django-admin.py: command not found" during horizon setup.

This is due to differences in how django currently packaged for Fedora,
where we should use "django-admin", without the .py

This patch sets up executable alias by checking if "django-admin"
exists, and falling back on "django-admin.py".

[1] https://review.openstack.org/#/c/120940/

Change-Id: I2b6de25fe32446edbdc0418674fea8579ec739d9
2014-11-18 16:35:12 -06:00
David Lyle 45ce98275c Moving horizon compression offline
Making the horizon scss compilation and compression happen offline.
Potentially fixing an issue with parallel compression in devstack.

Related-Bug: #1345955
Change-Id: I066c80e06a92302a3f8dc5fd45d127fbde6cf99c
2014-11-18 15:07:10 +11:00
Sean Dague 3c8973a90a support installing django_openstack_auth from pypi
Part of the libs from pypi conversion, convert django_openstack_auth
to this format.

Change-Id: I97c8ea19d8aed1e0bdd62c06cfadd1d616573d76
2014-11-14 10:40:46 -05:00
Akihiro Motoki 6518c0b88e Compile Horizon message catalogs during stack.sh
Recently compiled message catalogs (mo files) were removed
in Horizon and django_openstack_auth repositories.
We need to compile message catalogs to make translations
available for Horizon users. It is useful for developers too.

Change-Id: I0831e8308205c116d8e3bb8b43be7f0dd6fa0c0a
2014-10-18 06:40:08 +09:00
Jenkins 32ec8358c1 Merge "Update Horizon Neutron-related settings" 2014-09-27 17:44:04 +00:00
Jenkins 14f6c50b18 Merge "Use mod_version to clean-up apache version matching" 2014-09-25 03:43:29 +00:00
Akihiro Motoki 0843f0ab05 Update Horizon Neutron-related settings
- Horizon no longer has "enable_security_group" setting
  so we need to remove it.
- There is no need to set enable_lb/firewall/vpn to True
  when q-lbaas/q-fwaas/q-vpn is enabled because Horizon now checks if
  Neutron ext-list and enables corresponding dashboards accordingly.

Change-Id: I37073d73e4cba0103ab1a3d935302f1cd0ef73c5
2014-09-24 04:51:57 +09:00
Brant Knudson 3951a94499 Configurable token hashing algorithm
The Keystone server and auth_token middleware were enhanced to
support a configurable hash algorithm.

With this change, the user can set

 KEYSTONE_TOKEN_HASH_ALGORITHM=sha256

in their localrc to use the SHA256 algorithm rather than the
default md5. Any hash algorithm supported by Python's hashlib can
be used. The MD5 algorithm doesn't provide enough protection from
hash collisions and some security standards mandate a SHA2 hash
algorithm.

Change-Id: I8b373291ceb760a03c4c14aebfeb53d8d0dfbcc1
Closes-Bug: #1174499
2014-09-21 13:55:39 -05:00
Chris Dent 2f27a0ed3c Replace screen_it() with run_process() throughout
run_process will use screen if USE_SCREEN=True (the default),
otherwise it will simply start the requested service. Therefore
wherever screen_it used, run_process can be instead.

Where stop_screen was found it has been replaced with stop_process.

A tail_log function has been added which will tail a logfile in a
screen if USE_SCREEN is True.

lib/template has been updated to reflect the use of the new
functions.

When using sg the quoting in run_process gets very complicated.
To get around this run_process and the functions it calls accepts
an optional third argument. If set it is a group to be used with sg.

Change-Id: Ia3843818014f7c6c7526ef3aa9676bbddb8a85ca
2014-09-11 18:59:39 +01:00
Noboru Iwamatsu b4495eb410 Use mod_version to clean-up apache version matching
This change uses mod_version (shipped by default on everything we care
about) to set-up version-specific config within apache rather than
within devstack scripts.

Clean up the horizon and keystone config file generation to use the
internal apache matching.

Since I6478db385fda2fa1c75ced12d3e886b2e1152852 the apache matching in
'functions' is actually duplicated.  just leave get_apache_version in
lib/apache as it is used for config-file name matching in there.

Change-Id: I6478db385fda2fa1c75ced12d3e886b2e1152852
2014-09-08 15:59:29 +10:00
Dean Troyer 1bbfcc7a79 Clean up local variable usage - Horizon
Change-Id: I1924ecdd68a9c7bf947c06f33aa79c38ada1d3b4
2014-08-13 11:26:46 -05:00
Sean Dague e837714244 use setup_install for django_openstack_auth
This is fundamentally a library. As such we should setup_install
so that we can possibly pin it, otherwise we *always* get the
git version instead.

Change-Id: Ia815f2675cf535bb05a7e8eda853690171559b86
2014-06-23 08:21:07 -04:00