Commit Graph

140 Commits

Author SHA1 Message Date
Takashi Kajinami d9693fee50 Enable healthcheck middleware by default
Healthcheck middleware provides the /healthcheck endpoint which is
useful for loadbalancer or monitoring tools to check health of api
services. This change enables the middleware by default.

Note that this endpoint has no authentication. The /healthcheck entry
should be removed from api-paste.ini to disable the middleware again.

Change-Id: I1bc61afff2851bb8efac3ec5101a5198f204f41e
2021-08-21 11:04:23 +09:00
Luigi Toscano 8a026b95bd Focal-related fixes: libguestfs, mysql 8, requirements
- use the the python3 guestfs bindings, not the old python2
  (not availbale anymore on the newer systems);
- fix the compatibility with mysql 8, which unfortunately
  removes the shortend for user creation + password setting;
- bump the values in lower-requirements.txt (also requirements.txt
  and test-requirements.txt when needed) so they they work with
  python 3.8 (inspired by other similar bumps).

Change-Id: Icaa3c008bbe179098244f7bb9d80790068430fe2
2020-09-22 18:10:10 +02:00
Hervé Beraud 81bae85a9a Stop to use the __future__ module.
The __future__ module [1] was used in this context to ensure compatibility
between python 2 and python 3.

We previously dropped the support of python 2.7 [2] and now we only support
python 3 so we don't need to continue to use this module and the imports
listed below.

Imports commonly used and their related PEPs:
- `division` is related to PEP 238 [3]
- `print_function` is related to PEP 3105 [4]
- `unicode_literals` is related to PEP 3112 [5]
- `with_statement` is related to PEP 343 [6]
- `absolute_import` is related to PEP 328 [7]

[1] https://docs.python.org/3/library/__future__.html
[2] https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html
[3] https://www.python.org/dev/peps/pep-0238
[4] https://www.python.org/dev/peps/pep-3105
[5] https://www.python.org/dev/peps/pep-3112
[6] https://www.python.org/dev/peps/pep-0343
[7] https://www.python.org/dev/peps/pep-0328

Change-Id: Iab3b7c54b1e3830924030ebf25e7b829c7f31ac9
2020-06-02 20:56:50 +02:00
Jeremy Freudberg 865858460c Remove some files not worth maintaining
Change-Id: I4d7fc4b212a42c29839e1c6915ec6aab3ee4ed15
2019-06-20 09:59:19 -04:00
Telles Nobrega f6afe5b733 Adding spark build image job
Depends-on: https://review.openstack.org/#/c/632141/
Change-Id: Id8e8b57b16691125f7af4b277bca649398949a6b
2019-02-08 19:09:28 +01:00
Telles Nobrega 55bd5da57f Dynamically loading plugins
Since plugins are not part of Sahara core anymore, loading plugins
like we currently do fails when plugins are not installed.
Currently we check the list of loaded plugins by checking the CONF
file plugins session. To fix that, we are changing to check the list
of loaded plugins on the PluginManager variable loaded_plugins, this
way we can instead of failing to start sahara if a desired plugin
is not installed, we can warn that the plugin was not loaded and
continue the application.

Change-Id: Iaae3a75cd75b06e94bc4492e5dc654a6281fdff4
2019-02-05 11:30:09 -03:00
Luigi Toscano 6f66893c2a Switch the coverage tox target to stestr
Use coverage+stestr for the cover tox target.
With this change, testrepository is not required anymore.

Change-Id: Ia294ee8003ccc10104f68777bea6921ff97bacef
2018-06-27 00:23:56 +02:00
Telles Nobrega 17509c3626 Updating plugins status for Rocky
For Rocky we are removing some plugins versions:

- CDH: removing 5.5.0
- MapR: removing 5.1.0
- Spark: removing 1.3.1
- Storm: removing 0.9.2

Also, we are marking some versions as deprecated:

- CDH: deprecating 5.7.0
- Spark: deprecating 1.6.0 and 2.1
- Storm: deprecating 1.0.1

Change-Id: I2dcec1344db4225263be179366eb408d62b9e108
2018-06-13 17:14:46 -03:00
Telles Nobrega 28eb4ce1b7 Adding CDH 5.13
We are adding a new version of CDH to the list of supported plugins.

Change-Id: Ia55c6729dc6c4640b83e1d2d4dba88d8bba29e36
Story: #2002183
Task: #20056
2018-06-13 11:06:14 -03:00
Telles Nobrega 976992a702 Adding sahara-policy-generator.conf
This conf file is necessary to generate policy file.

Change-Id: I076f897115acdae820330164c7fcaac7b56d3aa4
Closes-bug: #1745285
2018-01-30 16:14:22 -03:00
Telles Nobrega 14f38d4007 Image generation for MapR
Adds image generation and validation for MapR

Change-Id: Ib2d3bf2fa43db96437682d7479df1e897b997674
2018-01-11 10:50:05 -03:00
Telles Nobrega 03c6ebaecf Image generation for CDH 5.11.0
Adds image generation and validation for CDH 5.11.0

Change-Id: I09ea1e092e1ba05e7f36191869c4da798e94b287
2017-10-26 11:52:24 -03:00
Zuul 4294a8bae5 Merge "Image generation for CDH 5.9.0" 2017-10-20 01:40:31 +00:00
Telles Nobrega 157ce33a2b Image generation for CDH 5.9.0
Adds image generation and validation for CDH 5.9.0

Change-Id: Id1d63ffb695b66df6252da96fc8540b50871eaa3
2017-10-19 09:55:10 -03:00
Telles Nobrega d214c228a0 Image generation for Ambari Plugin
Adds image generation for Ambari

Change-Id: I0e798696de7fb2fcf72d826ad6b7356f526db836
2017-10-18 09:58:44 -03:00
Telles Nobrega 412f330a2a Image generation for CDH Plugin
Adds image generation and validation for CDH

Change-Id: I689035fd0bb14709fb00b48473f816419b1add9a
2017-07-19 14:19:32 -03:00
Luigi Toscano 4630a89a42 Fix the tox environment used for image building
The "images" environment has sitepackages=True, required by the
Python binding for libguestfs (not on pip).

Also, set the Ubuntu kernel so that it can be read by normal.
This affected (and was fixed) many other users of libguestfs. See:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/759725

Change-Id: Icf21a7ee9b575d832d6be5e662d4cfa7b8933611
2017-05-09 19:13:47 +02:00
Luigi Toscano b0785d1696 Basic script for pack-based build image
Each review which adds support for another plugin should change
the support matrix defined in the script.

Add the binary dependencies required for the sahara-image-pack
command.

Change-Id: Ibc294bd572ee4da298f125f9d9c4bff87ce5da9d
2017-05-05 11:04:20 +02:00
Andreas Jaeger 15f735a8c8 Prepare for using standard python tests
Add simple script to setup mysql and postgresql databases, this script
can be run by users during testing and will be run by CI systems for
specific setup before running unit tests. This is exactly what is
currently done by OpenStack CI in project-config.

This allows to change in project-config the python-db jobs to
python-jobs since python-jobs will call this script initially.

See also
http://lists.openstack.org/pipermail/openstack-dev/2016-November/107784.html

Change-Id: I7827b3e9ea341108e139f69bf342ec7a7f297a49
Needed-By: Ie775b9ebb989f2625faa38240a4ada59f05fab5c
2017-02-04 13:38:47 +01:00
zhangyanxian fd5dd9d873 Fix typo in cover.sh
TrivialFix

Change-Id: I6dbedf49ff84bc27f84ac802cfc1bdd590a8315d
2016-12-16 02:43:23 +00:00
Jeremy Liu c0f43c2c5f Use http_proxy_to_wsgi middleware
This sets up the HTTPProxyToWSGI middleware in front of Sahara.
The purpose of this middleware is to set up the request URL
correctly in case there is a proxy (For instance, a loadbalancer
such as HAProxy) in front of Sahara.

The HTTPProxyToWSGI is off by default and needs to be enabled
via a configuration value.

Change-Id: Ica7e8671e3880c0db90d382bec89b0994f75b36d
Closes-bug: #1590608
2016-10-16 23:25:29 +08:00
Vitaly Gridnev f4cb71dfa3 replace import of future to the top
Change-Id: I6ce2f45a7623ad94d9cb6baabc2a4389b66bad28
2016-07-07 07:21:28 +00:00
Maria Malyarova 5dfc7a8b2c The addition of the parentheses for py3
The goal is this code move toward being py3 compatible.
TrivialFix

Change-Id: Iba4cc70b06362576baaea30df0f541118d44277c
2016-07-06 15:07:04 +00:00
Luigi Toscano 145a41a2b0 Remove outdated tools
All wrappers to simple tools; install_venv was removed from Tempest too.
Most of the run_* and build_docs are wrapper around a simple tox call.

Replace the tools with the proper tox call in documentation.
Change-Id: I6ef28e9d778a8ce5a88f8fde94cf96beda862a58
2016-06-29 13:56:23 +02:00
ChangBo Guo(gcb) de5977d5b5 Remove openstack/common related stuff
openstack/common directory was used to keep files from oslo-incubator.
There is no file from oslo-incubator now, so don't need handle
particular case for openstack/common.

Note: method split_path will be merged in oslo.utils[1], then we
can remove this directory forever.

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

Change-Id: I60628204f928753ad930c0a2da631473c7f4fdc3
2016-05-09 18:25:14 +08:00
Jenkins ada5df7c5f Merge "Updating get_auth_token to use keystonemiddleware" 2016-03-15 22:32:12 +00:00
Chad Roberts bbfe2fff5f Updating get_auth_token to use keystonemiddleware
Now using keystonemiddleware.auth_token rather than
keystoneclient.middleware.auth_token.  This change
fixes get_auth_token.py.

Change-Id: Ia00c065d7684005277e82ab12db9ae2c550b5a1e
Closes-Bug: #1550522
2016-02-26 16:15:22 -05:00
Luigi Toscano 7fd9c63284 Use ostestr instead of the custom pretty_tox.sh
Switch to os-testr as wrapper of testr, instead of the custom
script pretty_tox.sh.

Change-Id: Ia9b8860f4cbbc5500f35a0a59c2d2ef1089b8415
2016-02-25 22:55:15 +01:00
Evgeny Sikachev 7a29eda040 Remove scenario tests and related files
Removed etc/scenario,
        etc/edp-examples,
        sahara/tests/scenario,
        sahara/tests/scenario_unit,
        tools/gate
From tox.ini removed envs scenario, py27-scenario-unit
bp: move-scenario-tests-to-separate-repo

Change-Id: I36917d56a2ea233213f2913d17589bdc66fd4fec
2016-01-22 14:04:41 +03:00
Jenkins 41a2fabd9f Merge "Migrate to new repository in gate checks" 2016-01-21 11:25:33 +00:00
Evgeny Sikachev 13276363e3 Migrate to new repository in gate checks
All sahara scenario files moved to new sahara tests repository,
need migrate gates to files from this repository
Depends-On: I0cfa9c7cfa9840ee127e84105a212a021d9588e1

Change-Id: I1efff0465e0a048af45c96fcf6b7810202c651b5
2016-01-20 11:54:52 +00:00
Bo Wang 2a3a06c19e Fix python 2,3 compatibility issue with six
ConfigParser is available in python2 but not in python3.
ref:http://www.diveintopython3.net/porting-code-to-python-3-with-2to3.html

Change-Id: I2bee4944e9d65de694cadd8359e7915b944f1323
2016-01-20 17:17:57 +08:00
Vitaly Gridnev 14cb366225 Always enable heat service in devstack plugin
Change-Id: I250e3ed78c71826feed60b6fc3a8fca27495a0cf
2015-12-10 09:53:59 +00:00
Vitaly Gridnev 33794a8627 Enable heat_enable_wait_condition by default
Set heat_enable_wait_condition to True by the default. Also
disable that in gate-sahara-dsvm-scenario-nova-heat job.

Related-bug: 1516784

Change-Id: If2e8a4ad010d516f65e2f9ae4449d70cc30d8e44
2015-11-24 13:16:57 +00:00
Vitaly Gridnev 02412ce50b Remove old integration tests for sahara codebase
Old integration tests are no longer gated, so we
can remove this 'dead' code from sahara repository.

Change-Id: Ief0984d34898c134e831d9949e0f16617dd62004
2015-11-19 07:59:15 +00:00
Sergey Reshetnyak 2679167bfb Use oslo.service for launching sahara
Changes:
* use launcher for running sahara modules
* use wsgi server from oslo.service library

Change-Id: I9ba8f1e751ce9bb9b9adcebda6509107b98e2fc8
2015-11-10 18:50:07 +03:00
Sergey Lukjanov 83966a043b Cleanup config-generator.sahara.conf
Add wrap len and sort oslo namespaces

Change-Id: I7ff6f61277af11757d58c3034817bfdad9f1df35
2015-10-21 20:19:35 +00:00
Vitaly Gridnev 4408e837b4 Use explicit version of image client in gates
DevStack uses v2 version for openstack image client, but
this version doesn't support --property as well.
So, let's use v1 version for registering image for Sahara.

Closes-bug: 1499309
Change-Id: Iec6aa6b42e5575690631fed585eaa8d6ff2501a1
2015-09-24 13:00:18 +00:00
Jenkins 80974a2cb2 Merge "Use custom flavor in gate" 2015-09-10 17:29:17 +00:00
Vitaly Gridnev 69d472ab35 Use custom flavor in gate
Recent builds of gate were failed because of error
during creating instances: 'Flavor's disk is too small
for requested image.'. That is why we should use custom
sahara flavor in gate.

Closes-bug: 1493403
Change-Id: I0b074ada2375edc6c80c332cc71caa9bec1053fd
2015-09-08 18:42:56 +00:00
Dong Ma 2dacda140e Added CORS middleware to Sahara
This adds the CORS support middleware to Sahara, allowing a deployer
to optionally configure rules under which a javascript client may
break the single-origin policy and access the API directly.

OpenStack Spec:
   http://specs.openstack.org/openstack/openstack-specs/specs/cors-support.html
Oslo_Middleware Docs:
   http://docs.openstack.org/developer/oslo.middleware/cors.html
OpenStack Cloud Admin Guide:
   http://docs.openstack.org/admin-guide-cloud/cross_project_cors.html

Change-Id: I839e2adc0a13271cfb590a52a6626660cc17190e
2015-09-01 10:58:32 -07:00
Sergey Lukjanov c5c28361cc Use demo user and tenant for testing
It will allow us to test how Sahara works for non-admin user.
Register image in Sahara under admin user and make it public.

Change-Id: Iae0684d865951e8bd419498a3de4e50c603b61ae
2015-08-28 15:30:55 +03:00
Sergey Lukjanov 2748f6eb18 Explicitly set infra engine based on job type
Change-Id: Ibc60dff02cd62e53510089b8424c32dea465d807
2015-08-28 15:15:49 +03:00
Sergey Lukjanov 2c888728d4 Use less resources in sceanrio gate job
There are many failures now due to the timeout for instances creation
and so let's try to use less resources - m1.tiny flavor and 1GB vol.

Change-Id: I2f56112013033824d46f6e460a52efeffda5548a
2015-08-28 15:06:56 +03:00
Sergey Lukjanov 0ea4152356 Fail if FAILED in the scenario tests run log
Change-Id: Id1c771ae92dd7df72006b3a24a44f66242df6ca3
2015-08-22 22:39:50 +03:00
Sergey Lukjanov 2e7687e250 Actually install Heat for the Hest-based jobs
Change-Id: I56dade7de0b95d3b9a5a350ebdae61c472329f3f
2015-08-22 22:39:40 +03:00
Jenkins 1a0960cf1b Merge "Run scenario tests for the fake plugin in gate" 2015-08-19 11:51:28 +00:00
Jenkins 3db90b32a3 Merge "Make tools/pretty_tox.sh more informative and reliable" 2015-08-19 01:27:41 +00:00
Jenkins 2e4b155961 Merge "Add script to report uncovered new lines" 2015-08-19 01:26:58 +00:00
Sergey Lukjanov 9413b830df Run scenario tests for the fake plugin in gate
Generate template_vars.ini for the scenario testing framework
and run it using existing templates for sahara-ci (tmp).

Change-Id: Ibfd787247bf04b3c75d7341c3fecd6a5c5621e0d
2015-08-18 17:28:46 +03:00