Commit Graph

51 Commits

Author SHA1 Message Date
Damian Dabrowski 4686326650 Rename horizon_enable_ssl to horizon_backend_ssl
To standarize variable name across roles, this change renames
`horizon_enable_ssl` to `horizon_backend_ssl`.
All other roles use `<service>_backend_ssl` format.
It also better describes what it does. With `horizon_enable_ssl` it's
unclear whether it is about frontend or backend.

Backward compatibility will be kept until 2024.1.

Change-Id: I218d45b7be667732e4204316b8d18fa3e136962b
2023-04-11 19:35:19 +02:00
Ghanshyam Mann 3b32c5ca30 Use Tempest for dashboard test instead of tempest-horizon
All tests implemented in tempest-horizon have been merged to tempest[1]
and tempest-horizon will be retired, so we assume that we no longer
need to install tempest-horizon plugins.

[1] https://review.opendev.org/771727/

Change-Id: I2639127f9258298f48154f782d654858a71a7c36
2021-02-09 13:54:02 -06:00
Dmitriy Rabotyagov e7e94e786f Cleanup after repo_build and pip_install retirement
Change-Id: I07f892d2be98338defc355260c572c2bb0f7f147
2020-05-12 23:36:43 +03:00
Dmitriy Rabotyagov a66592b334 Replace git.openstack.org with opendev.org
This patch replaces git.openstack.org with opendev.org as redirection
from old path was enabled.
Also we change upper constraints url due to [1]

[1] http://lists.openstack.org/pipermail/openstack-discuss/2019-May/006478.html

Depends-On: https://review.opendev.org/693841/
Change-Id: I9f8a80437a315aeaae61105f3bc9e3017bc37cf7
2019-11-14 20:42:38 +02:00
melissaml 8794f98e1d Replace git.openstack.org URLs with opendev.org URLs
Change-Id: I8ea1ea89ba63ed043aaeb14472de9019fae116ea
2019-05-06 19:08:53 +08:00
Jimmy McCrory dfbf576ef1 Set container_name as host_var in test inventory
The connection plugin no longer falls back on using the
inventory_hostname as the container_name. Set container_name as a host
var for each container in the test inventory.

Change-Id: I5ded967cb1444024540e290ae1f1ea8679d0c3dd
2018-10-20 15:28:29 -07:00
Amy Marrich (spotz) 4283200534 Add ability for HTTP access to horizon
Horizon has, since OSA's inception, been deployed with HTTPS
access enabled, and has had no way to turn it off. Some use-cases
may want to access via HTTP instead, so this patch enables
the following:

1. Listen via HTTPS on a load balancer, but via HTTP on the
   horizon host and have the load balancer forward the correct
   headers. It will do this by default in the integrated build
   due to the presence of the load balancer, so the current
   behaviour is retained.

2. Enable HTTPS on the horizon host without a load balancer.
   This is the role's default behaviour which matches what it
   always has been.

3. Disable HTTPS entirely by setting ``haproxy_ssl: no`` (which
   will also disable https on haproxy. This setting is inherited
   by the new ``horizon_enable_ssl`` variable by default. This
   is a new option.

Co-Authored-By: Jesse Pretorius <jesse.pretorius@rackspace.co.uk>
Change-Id: I823f2f949258157e306dbf80570abe53373da0c3
Closes-Bug: 1794337
2018-10-17 11:56:26 +00:00
caoyuan b60abe9573 use include_tasks instead of include
include is marked as deprecated since ansible 2.4[0]

Switch to include_tasks or import_playbook as necessary

[0] https://docs.ansible.com/ansible/2.4/include_module.html#deprecated

Change-Id: I969209a4205fac9e205439dc97a96ddf3ea53800
2018-08-15 17:28:30 +08:00
Zuul 9aa822757d Merge "Trivial: Fix the pep8 warning" 2018-07-11 20:03:53 +00:00
Jesse Pretorius 4ac6093e36 Execute service setup against a delegated host using Ansible built-in modules
In order to reduce the packages required to pip install on to the hosts,
we allow the service setup to be delegated to a specific host, defaulting
to the deploy host. We also switch as many tasks as possible to using the
built-in Ansible modules which make use of the shade library.

The 'virtualenv' package is now installed appropriately by the openstack_hosts
role, so there's no need to install it any more. The 'httplib2' package is a
legacy Ansible requirement for the get_url/get_uri module which is no longer
needed. The keystone client library is not required any more now that we're
using the upstream modules. As there are no required packages left, the task
to install them is also removed.

With the dependent patches, the openstack_openrc role is now executed once
on the designated host, so it is no longer required as a meta-dependency for
the role.

Depends-On: https://review.openstack.org/579233
Depends-On: https://review.openstack.org/579959
Depends-On: https://review.openstack.org/580156
Change-Id: Ic3c0bb31c12a83fe8fe475091e97e5d5537fab6f
2018-07-05 19:41:30 +00:00
fpxie 69799c1ba0 Trivial: Fix the pep8 warning
The yaml should start with "---"

Change-Id: I03b578ad2704edfb527b86c9dde8afc33e92e042
2018-06-20 16:03:09 +08:00
Jesse Pretorius f20af16e4a Remove tests-repo-clone.sh
Now that run_tests.sh handles the tests repo clone, we can
remove the use of the older tests-repo-clone.sh script.

Change-Id: I14d165dd9cb14eddd79e3a09715bcc8b8a41fa2e
2018-03-28 10:14:17 +01:00
Zuul 6434040f07 Merge "ansible-role-requirements: Use systemd_service role from openstack namespace" 2018-03-25 17:44:11 +00:00
Jesse Pretorius 2c8d9052ad ansible-role-requirements: Use systemd_service role from openstack namespace
In order to ensure that the updated role is used for tests,
we adjust the a-r-r file to pull from the correct repo.

Change-Id: I36d113ed00c9b270915707499c64c22eb25beb03
2018-03-25 16:20:04 +01:00
Jesse Pretorius da3e2b8007 ansible-role-requirements: Add common python_venv_build role
In order to allow tests to work as the use of the common
role is implemented in the various roles, we pre-implement
the addition of the role into the a-r-r file.

Change-Id: Ia18ed3c3440b4de04e3e034303e1fc84ceede442
Implements: blueprint python-build-install-simplification
Signed-off-by: Jesse Pretorius <jesse.pretorius@rackspace.co.uk>
2018-03-24 23:20:09 +00:00
Jesse Pretorius 1b513643d4 ansible-role-requirements: Add common systemd_service role
In order to allow tests to work with https://review.openstack.org/551028
merged, add the role to the a-r-r file.

Change-Id: I8fdeded922cb683ba9eaf4c00da9c365faa48e12
2018-03-13 16:50:31 +00:00
OpenStack Proposal Bot 3526d06e2c Updated from OpenStack Ansible Tests
Change-Id: Ia23bcfc4a868b3b53bee084cf8748d2bb1df9a78
2018-02-14 20:05:51 +00:00
Jesse Pretorius bf53e0b3ee Initial OSA zuul v3 role jobs
This patch implements an initial set of jobs intended to match
the current job execution method. It does not intend to improve
how the jobs are executed - only to replicate what is currently
in openstack-infra/openstack-zuul-jobs and provide the platform
to iterate on.

Change-Id: Ia99b5dd4197b6e8cf0d3bc13d5f121250142d452
2017-10-17 18:11:21 +01:00
OpenStack Proposal Bot de4d0ed8ee Updated from OpenStack Ansible Tests
Change-Id: I8d6956fe4775d4d02599c40bcf7b40187189e6bd
2017-10-12 20:44:30 +00:00
OpenStack Proposal Bot 10e8e7c422 Updated from OpenStack Ansible Tests
Change-Id: I27521c427ec0d12fc705d2dc9c587cce581204c9
2017-06-22 15:19:34 +00:00
Jesse Pretorius 92816ca972 Use zuul-cloner for tests repo in OpenStack-CI
When executing the tests repo clone in OpenStack-CI,
use zuul-cloner instead of git to enable cross-repo
testing. This ensures that if a dependent patch from
the tests repo is noted using 'Depends-On: <change-id>'
in the commit message, that patch will be included.

Change-Id: I08de6a594629b5644a411a097d15f024dae7e33f
Depends-On: Idce7abebf32f24c356a27e099fbca954d917402b
2017-05-04 16:47:47 +01:00
Jimmy McCrory 73b47f723f Standardize test vars
Move test host vars from the inventory to individual files for each
host. 'ansible_become' has been removed from localhost's vars since it
should be handled on a playbook basis.

Change-Id: Ia782c502cccc1bfbd83a40047e59271906dfbf75
2017-04-19 18:36:00 -07:00
Andy McCrae aaa29f616d Use central testing repo Horizon plays
These were moved to allow work on translations testing infrastructure,
so we should utilise the central tests repo for horizon.

Change-Id: I32a41fb8bc0b5e584f05a79adc3cf90ce6e1c49c
2017-04-07 17:23:12 +01:00
Jimmy McCrory 6eca30751e Provide default horizon_ssl variables
Provide default 'horizon_ssl_protocol' and 'horizon_ssl_cipher_suite'
variables for when this role is run outside of an integrated
OpenStack-Ansible deployment.

Change-Id: I5aee1a06b161329c1d4ea9f92a3e65c485fda641
2017-02-09 17:42:07 -08:00
Donovan Francesco (drifterza) 111c03cc92 Using updated tempest method for horizon.
Change-Id: Id6798a982052fe299545a402820d8cff7618b25c
2016-11-22 12:51:34 +02:00
Marc Gariepy 596f76901b Standardize tests inventory
The config for tests inventory is based on the keystone configuration.

Change-Id: I95d4ff54b36ee1b055d6ffc86975c277d906f6c7
2016-11-18 11:21:49 -05:00
Deepak 3248bc36d2 Update test-vars.yml for repositories
Renamed in os_horizon role repo
Changed test-vars.yml to os_horizon-overrides.yml
Removed test-vars.yml

Change-Id: If3cf9b788fe8c20e2f2dff6fbd6cc2efba0c5efe
Partial-Bug: #1629284
2016-10-05 21:48:09 +05:30
Travis Truman 48dce11ea2 Use openstack/tempest-horizon instead of my fork
Now that I98f585ad0fbe4fb0ee913329a9269744fe4437bd has merged
there is no need to rely upon my personal fork for role gate
testing.

Change-Id: I340459e03a5e22bffff6240c03572e0ad37f0dc6
2016-09-29 15:33:57 -04:00
Jesse Pretorius 22bfbea3f0 Use centralised test scripts
This patch consumes the test scripts implemented by
https://review.openstack.org/375061 to ensure that
the tests and test preparation is consistent and
more maintainable.

Change-Id: I5acf2bc37b7d9a38e6c3f964bac719421de42ec0
2016-09-28 08:16:55 +00:00
Travis Truman 09185c5bbd Ansible 2.1.1 role testing
Change-Id: I36c72b4930dceb730371290461c5cdd1c22b70ea
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2016-09-26 08:55:39 -04:00
Jesse Pretorius 1f682b09ef Force Ansible to use dynamic includes
Ansible 2.1.1 introduces a regression in the way conditional
includes are handled which results in every task in the
included file being evaluated even if the condition for the
include is not met. This extends the run time significantly
for a deployment.

This patch forces all conditional includes to be dynamic.

Change-Id: I72dabf1abace382f0b25499aaa56366a9baefa48
Related-Bug: https://github.com/ansible/ansible/issues/17687
2016-09-22 13:54:02 +01:00
Jimmy McCrory 961d117048 Create nova endpoints for tempest test
Horizon tempest tests validate that the Project Overview page is
accessible after logging in. I1b2ddee0395ad9f55692111604b31618c4eaf69e
added permissions to this page, requiring that the compute service be
registered within the keystone catalog.

Add tasks to create the nova service and endpoints to allow the tempest
tests to complete.

Change-Id: Iec0f0f55477464979ef36eb71b9f606348857a52
2016-08-05 15:35:22 -07:00
Jenkins d3d96dc3a4 Merge "Removing unused test playbook" 2016-07-22 10:19:19 +00:00
Travis Truman ee4d926473 Removing unused test playbook
This file is not used, rather test-prepare-containers.yml
is used to perform the same function.

Change-Id: If34195d7b46d890300370d73c230af508a02f27b
2016-07-21 14:30:00 -04:00
Jimmy McCrory 7f7ad45cbb Remove openstack_hosts from test requirements
The openstack_hosts role is not used in any of the test playbooks
or required by dependent roles and can be removed from the test
role requirements.

Change-Id: I110520e864761aa697721cd24c81426a8d4ae940
2016-07-20 18:47:02 -07:00
Kevin Carter cc71003acb
Updated tests and role for Xenial support
These changes allow the role to be tested on Xenial hosts
while also ensuring that the tests are testing everything
within the container as expected.

Overview:
  * Included in this PR is a manual-test.rc. This has been
    added to  allow developers to run tests locally without
    having to invoke tox. This RC file was lifed from the
    os_keystone role.
  * The git package was added to the install list. This is
    needed on the target when the role is running with developer
    mode enabled.
  * Connection settings within the container create prep playbook
    were removed. A``connection: local`` setting forces all
    commands to be executed against the host regardless of a
    delegated task.
  * A task has been added to the horizon role to when SSL is
    enabled. This task ensures that that ca certificates are
    updated. Without this change, when running on Xenial,
    tempest will fail due to the following error:
      [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)
    By updating the ca certificats on tempest is able to verify
    the certificate and pass the tests. NOTE: This fix came from
    the puppet-OpenStack community where they ran into the same
    problems in Xenial as discussed here: [0]

[0] - https://irclogs.ubuntu.com/2016/05/18/%23ubuntu-server.html#t13:37

Change-Id: I1e6808c49a8faaba5b2748918be5d6b5a59fd3d1
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2016-07-12 09:05:46 -05:00
Jenkins 30f0d599f7 Merge "Only install to virtual environment" 2016-07-11 20:29:40 +00:00
Jesse Pretorius 9a104b5158 Update tox configuration
In order to prepare for implementing requirements management by the
OpenStack requirements management process, and to improve the
reliability and effectiveness of test execution, this patch implements
some changes to the tox configuration:

- The minimum tox version is increased in order to be able to use
  constraints for the python packages.
- The OpenStack upper-constraints are used when preparing the test
  venv for the linters checks.
- Any proxy environment variables set on the test host are passed
  into the venv to enable testing from behind a proxy.
- The environment variables used by Ansible tests are moved into
  a new venv called 'ansible' and this environment is inherited
  by all Ansible-related tests.
- The docs test will clean-up an existing build directory before
  executing the docs build.
- The releasenotes build cannot use upper-constraints at this point,
  so it doesn't.
- The Ansible role download will no longer ignore errors so that any
  problems discovered will result in a failed test.
- The human readable logging callback plugin is implemented for
  functional testing.
- The ansible test requirements are moved into tox.ini to ensure
  compliance for requirements.txt/test-requirements.txt for the
  global-requirements management contract.
- The ~/.ansible directory as a whole is not deleted. Instead only
  the plugins and roles folders are deleted to ensure that zuul's
  Ansible artifacts are left in-place.
- The ansible-lint version is updated to support execution against a
  folder, and the test now executes against the entire role to ensure
  that it captures all applicable files for lint testing.

This is a combined port of the following:
- https://review.openstack.org/323507
- https://review.openstack.org/338193
- https://review.openstack.org/332443
- https://review.openstack.org/338193
- https://review.openstack.org/339493

Change-Id: I7b68b4ccaf655e14a56804e3a004bb5abd4ec455
2016-07-08 15:36:20 +01:00
Jimmy McCrory 4559edf920 Only install to virtual environment
Remove all tasks and variables related to toggling between installation
of horizon inside or outside of a Python virtual environment.
Installing within a venv is now the only supported deployment.

Additionally, a few changes have been made to make the creation of the
venv more resistant to interruptions during a run of the role.
* unarchiving a pre-built venv will now also occur when the venv
  directory is created, not only after being downloaded
* virtualenv-tools is run against both pre-built and non pre-built venvs
  to account for interruptions during or prior to unarchiving

Change-Id: I8f5d33b90cc2c41beca2067f0f99d8c1283021e4
Implements: blueprint only-install-venvs
2016-07-08 06:16:12 -07:00
Kevin Carter 39839111c0 Added variable to allow for arbitrary HORIZON_CONFIG
A new variable has been added to allow a deployer to set arbitrary
configuration options.

Closes-Bug: #1598143
Change-Id: Ic2d83d5b581046314145ecd0201087cc1682716b
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2016-07-06 21:04:17 +00:00
Jesse Pretorius 16b8d25875 Clean up container cache prep in tests
This patch cleans up the container cache preparation in the tests
due to the following patches:

- https://review.openstack.org/307856 (new image build process)
- https://review.openstack.org/315114 (new apt config process)
- https://review.openstack.org/322188 (new resolver config process)

Change-Id: I33eacde14536057deb1828e2708e6c0d43d693ec
2016-06-17 18:44:42 +01:00
Jimmy McCrory cec81d754e Remove pip_lock_down dependency
The pip_install and pip_lock_down roles have been merged.

Remove pip_lock_down from the role's meta dependencies and test
requirements.

Change-Id: I960a9bfc558efbff8760ffb41d7619260bd59af0
2016-06-10 04:15:46 +00:00
Jimmy McCrory 7232b74628 Use tempest-horizon plugin
I2a69ebed2947a5ab5e5ca79557130bd093e168dd removed horizon scenario
testing from the integrated tempest repo.

Install the tempest-horizon plugin to continue running the same tests.

Change-Id: Ic144f66f1dbdf0147ee8c56d9abc54542dea2f7b
2016-06-09 01:57:31 -05:00
Kevin Carter 42e77eaf53 Removed the db create tasks
The db create tasks have been removed from the role and have been
relocated into the playbooks.

Change-Id: Ie4b026bdc36d6b508af4f2f7b529283039ef61d0
Depends-On: If58e482034a65c0e50241448dbe298a73c1ae71b
Depends-On: I0ca5b0403562537d2ecfdba0466a87fb0b874933
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2016-05-19 19:40:43 +00:00
Matt Thompson e66542cde3 Use tempest for role testing
This commit deploys horizon and tempest and then validates that horizon
is functioning using the dashboard scenario test.

Change-Id: Iba77ecdfc437ec72a1ed3580964837c6c8429d32
2016-05-13 11:21:25 +01:00
Jesse Pretorius f30714d6be Remove py_from_git role
The py_from_git role is removed as it is no longer required.

Change-Id: Id1bfc1efd3187d1398a888129be26cd3ec2e6cc9
2016-05-04 09:15:51 +01:00
Jesse Pretorius 125f1b090e Switch defaults/tests to use master branch
Change-Id: Iea819d417d75dd406991c64e9235635641e0f433
2016-04-03 12:59:17 +01:00
Jesse Pretorius 716e5976c0 Switch tests to using stable/mitaka
This patch switches the tests from using a fixed SHA to using
stable/mitaka for keystone, requirements and Horizon.

Change-Id: I6c8a5830a86b44177099de176891e1e52048e5a4
2016-03-31 19:10:33 +01:00
Matt Thompson e672a26592 Use upper-constraints file in developer mode
This commit adds the following new variables:

horizon_requirements_git_repo
horizon_requirements_git_install_branch

When in developer mode, This repo is then cloned in horizon_install.yml
and used as an upper constraint in the functional test to avoid us
installing and running into issues resulting from uncapped dependencies
being installed.

This commit also changes the pip_install_options fact name in
horizon_install.yml to pip_install_options_fact.  This allows us to
maintain the existing pip_install_options variable without overwriting
it with options when in developer mode, which ultimately means we can
have multiple services running in a container use a combination of
*_developer_mode: true and *_developer_mode: false.  At the moment,
if a service writes pip_install_options fact with the constraints
options, those options will persist to other services running in the
container even if *_developer_mode: false.

Change-Id: If481de123073e46825cd5816062f08332d2d98fb
2016-03-21 09:12:54 +00:00
Travis Truman 9f41da7883 Enable functional convergence testing
One container running infra services, one running Keystone, and another
running Horizon.

Closes-Bug: #1553979
Change-Id: Id67a1d9a0bd6e87427f5b0755f69ea8f77441839
2016-03-14 12:53:48 +00:00