Commit Graph

60 Commits

Author SHA1 Message Date
Jonathan Herlin 67c18d7034 Fix spelling mistakes
Just some various spelling mistakes I noticed while reading

Change-Id: Icc95027153b7fa86f856906630f1cfbde9149b25
2021-08-27 16:15:42 +02:00
Mohammed Naser b20198146e Automatically create and import keypair if it doesn't exist
This will automatically build a keypair if none exists with the
name that's provided and octavia_ssh_enabled is set to true.

Depends-On: https://review.opendev.org/c/openstack/openstack-ansible/+/765673
Change-Id: I12b1b7d18c5efd1438585153fa6b2db467758419
2020-12-05 22:48:58 +00:00
Dmitriy Rabotyagov e00cb9c563 Drop octavia v1 api options
Octavia v1 options have been dropped from upstream on Train. They have
no effect nowadays so no reason to futher carry it's codebase

Change-Id: I1c8f9723ca2ac2b468725c2954adcdaff54dbdf0
2020-12-02 14:27:43 +00:00
Marc Gariepy 35f2dcef3c Cleanup ansible_python_interpreter
ansible_pyhton_interpreter is set to auto, it's not needed anywhere now.

Change-Id: Ibc2ec7c926df022e44299765cf610326ceccee25
2020-06-17 11:14:04 -04:00
Dmitriy Rabotyagov fa21c6f52a Cleanup after repo_build and pip_install retirement
Change-Id: I66a06583eb6646903eba365768bad35e8c28cd90
2020-05-12 22:41:41 +03:00
Dmitriy Rabotyagov 333e6f1fc7 Start using uWSGI role
Move service to use uWSGI role instead of iternal task for uwsgi
deployment. This aims to ease the maintenance of uWSGI and speedup
metal deployments as the same uwsgi environment will be used
across all services.

Change-Id: Iaeb10f2e3018f8b19d47d5a557e6fc7beb0fb9cf
2019-09-05 15:26:52 +03:00
Zuul d69de581e6 Merge "Use systemd-journald instead of log files" 2019-07-17 06:57:38 +00:00
Dmitriy Rabotyagov 048a43bd81 Use systemd-journald instead of log files
This patch aims to migrate service from usage of regular syslog files
to journald. We also disable uwsgi logging, since it dublicates
requests that are logged by service itself.

Depends-On: https://review.opendev.org/670824/
Change-Id: I8cfdd46a57a91ef3b1879bf85b03cced74234451
2019-07-17 00:18:58 +03:00
melissaml 98fe25ea6c Replace git.openstack.org URLs with opendev.org URLs
Change-Id: Ife9bef4ad60233a45e7761c7c11e4cf6d0e4ab0e
2019-07-10 23:06:23 +08:00
Zuul 60f0254180 Merge "octavia container network address pool" 2018-11-02 14:47:18 +00:00
Vadim Kuznetsov 4bed7d3410 octavia container network address pool
octavia provider network address pool is incorrectly identified
by net_name field of a provider network

.. code-block:: yaml

     - network:
        container_bridge: "br-lbaas"
        container_type: "veth"
        container_interface: "eth14"
        host_bind_override: "eth14"
        ip_from_q: "octavia"
        type: "flat"
        net_name: "octavia"
        group_binds:
          - neutron_linuxbridge_agent
          - octavia-worker
          - octavia-housekeeping
          - octavia-health-manager

In the example ip_from_q and net_name confusingly have the same
value octavia. However ip_from_q refers to cidr_network i.e. address pool
and net_name refers to physical network.

container_network name "octavia_address" comes from ip_from_q value.

Change-Id: Ibbe4636e9b92f2967cbf89a585b8c84a8a56668c
2018-10-25 07:42:30 -04:00
Jimmy McCrory 441c8b6b81 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: I9ab81228a29133e7f50629db3b604eeab6bedf5a
2018-10-20 15:28:29 -07:00
Zuul 8a6c9371b2 Merge "use include_tasks instead of include" 2018-09-16 05:28:33 +00:00
Zuul 5fb279c1b9 Merge "Trivial: Fix the pep8 warning" 2018-09-14 05:06:55 +00:00
ZhijunWei 4930628136 use include_tasks instead of include
include is marked as deprecated since ansible 2.4[0]
[0] https://docs.ansible.com/ansible/2.4/include_module.html#deprecated

Change-Id: I83c9ef75eac99edcc0da0880bd80635895802366
2018-09-08 14:29:57 +00:00
German Eichberger bc1f010b2f Increase Amp Active timeout for tests
We have seen gate tests recently fail on the amp going active in
nova. This doubles the timeout.

Change-Id: Ibd805890645d8c3ba1afeab47104a393a9ab1da2
2018-08-19 19:33:53 +00:00
Jesse Pretorius bd9f0c0723 Clean up tests a bit
1. Remove tests/test-configure-octavia.yml because the 'shade' package
   does not need to be installed again - this is already done by the
   role test preparation.

2. Remove the key generation as the keys are already generated in the
   common tests playbook 'test-prepare-keys.yml'.

3. Add some spacing between tasks to make it more readable.

4. Implement the extra packages needed in test-requirements.txt instead
   of trying to use a task to install them, because doing it in Ansible
   makes understanding the venv in relation to the inventory complicated..

5. Move the vars_files argument to the top of the play to make it easier
   to find and more uniform with other plays in OSA.

6. Switch from using octavia_ansible_endpoint_type to a hard-coded
   endpoint, then remove the octavia_ansible_endpoint_type var.

7. Switch from using the 'endpoint_type' argument for the openstack
   modules to using the more modern 'interface' argument.

8. Remove the 'run_once' argument on the 'Upload key to nova' task
   because only localhost is targeted, so the argument is moot.

9. Remove the 'Set VIP fact' task in favor of just using the 'vip_output'
   register in the 'Test the Listener' task. Setting a fact is pointless.

10. To help the existing patches pass, we add python-pip to the distro
    packages. This will be reverted later once the required changes
    to remove this requirement have merged.

Depends-On: https://review.openstack.org/589248
Change-Id: I46962090f7baf4227e838e125fd318245f2bcb85
2018-08-19 18:16:30 +01:00
wangqi 2dddbf4dd9 Trivial: Fix the pep8 warning
The yaml should start with "---"

Change-Id: I55287e644ef39b4b24f522fda23e3039c647f4b6
2018-08-06 07:49:15 +00:00
German Eichberger f4e3670971 ssh-key should land in $HOME
During a gate test I discovered that the ssh key wasn't
generated in /root/.ssh but /home/zuul - causing an error.
This will create the key in the home directory of the user.

Change-Id: Ic095d0d05342c93f6be52b7f44bf2082d2556780
2018-08-03 22:36:09 +02:00
Jesse Pretorius 7783857675 Clean up test override vars
Several override vars aren't used, or are only used in one
test playbook will will get revamped to eliminate the need
for them after the service delegation patch merges.

As such, we remove the unnecessary vars and move those to
be cleaned up later into the play to make it simpler to do.

Change-Id: Idfcf5fb400079eadd080b30992a90cc758e1cac8
2018-08-01 19:58:40 +00:00
Jesse Pretorius b6d495c9c9 Move MQ vhost/user creation into role
There is no record for why we implement the MQ vhost/user creation
outside of the role in the playbook, when we could do it inside the
role.

Implementing it inside the role allows us to reduce the quantity of
group_vars duplicated from the role, and allows us to better document
the required variables in the role. The delegation can still be done
as it is done in the playbook too.

In this patch we implement two new variables:
- octavia_oslomsg_rpc_setup_host
- octavia_oslomsg_notify_setup_host

These are used in the role to allow delegation of the MQ vhost/user
setup for each type to any host, but they default to using the first
member of the applicable oslomsg host group.

We also adjust some of the defaults to automatically inherit existing
vars set in group_vars form the integrated build so that we do not
need to do the wiring in the integrated build's group vars. We still
default them in the role too for independent role usage.

Finally, we remove the test mq setup tasks and clean up any unused
or unnecessary variables configured in tests.

We also rename the ubuntu-16.04.yml file to ubuntu.yml to cover both
xenial and bionic. This has become necessary because the
'Gather variables for each operating system' task in the galera_client
role is picking up this role's vars file instead of its own.

Change-Id: If7e3712dd70eb083b5dffc98e0c981ec4f513533
2018-08-01 18:56:29 +01:00
Zuul 4dd27f67f8 Merge "Fix usage of "|" for tests" 2018-07-25 18:32:39 +00:00
German Eichberger 90a4c1b3be Fixes compute error
We observed a compute error in  the tests due to a change
(# I94f5af2055d1b6b41a9a170ca9b4daf57363c972) increasing
the disk to 20 GB in production. This will set it for tests
back to 3 GB which should avoid the gates failing on disk
failure.

We also observed a pip error and I think it should be fixed
with If2f1ab03ccd9400fe05e2948ddfe33c8796dbd97 - so
make tye pip install become: true to work around this
until the other patch merges.

Change-Id: I31b6c5d20cedb0df6648925566afd312d7f1dda9
2018-07-20 10:21:39 +01:00
Jesse Pretorius 87af014b16 Switch compute to use different inventory_hostname
Our role tests execute as non-root users, and the roles
need to access the environment variables for that non-root
user. Ansible, when targeting localhost, changes to
'connection: local' and thus breaks everything we need
to do against localhost as root unless we use 'become: true',
but we if generally use that against remote hosts we lose
the environment variables for the non-root user.

As such, we switch the inventory to target 'compute1' instead,
which has the address '10.1.1.1' (br-mgmt), so that we do not
have to deal with the implict connection type changes implemented
by Ansible.

Depends-On: https://review.openstack.org/584033
Change-Id: I3c29bab37b5dbbd0faec246c02e3a39fe4c1033a
2018-07-20 10:21:12 +01:00
Jean-Philippe Evrard 64e9f5ad30 Fix usage of "|" for tests
With the more recent versions of ansible, we should now use
"is" instead of the "|" sign for the tests.

This should fix it.

Change-Id: I639c18dda7950243fc70028c9b795c3f24ef8e7a
2018-07-18 13:51:51 +00:00
Jesse Pretorius 21384bc4eb Move database creation into role
There is no record for why we implement the database creation outside
of the role in the playbook, when we could do it inside the role.

Implementing it inside the role allows us to reduce the quantity of
group_vars duplicated from the role, and allows us to better document
the required variables in the role. The delegation can still be done
as it is done in the playbook too.

In this patch we implement a new variable called 'octavia_db_setup_host'
which is used in the role to allow delegation of the database setup
task to any host, but defaults to the first member of the galera_all
host group. We also document the variable 'octavia_galera_address' which
has been used for a long time, but never documented. A bunch of unused
variables have also been removed.

Change-Id: I89a5a519e35058ad65ba3dbf31051e848894b35d
2018-06-28 16:28:02 +01:00
Zuul b5f369f91c Merge "Adds the issuer to the CAs" 2018-06-26 00:44:14 +00:00
German Eichberger fbda283da8 Adds the issuer to the CAs
Octavia is using certificate authorities to manage
the amp communication but the built-in ansible
certificate commands can't generate proper CA
certificates (they omit the necessary X509 extensions)
nor properly sign CSRs and reference the CA.

The changes here replace the parts where ansible's
certificate commands fall short with running the
openssl command directly. To do so it sets up
the necessary files, directories, and templates
an openssl config file.

Once ansible's certificate capabilities improve we
can retire those commands.

Also improve tests so we gate when this fails.

Change-Id: Iaae462844d783bd6086ce6a2816ea01cafc14e6d
2018-06-22 08:46:14 -07:00
Andrew Smith 1ee708ffb6 Update to use oslo.messaging services for RPC and Notify
This introduces oslo.messaging variables that define the RPC and
Notify transports for the OpenStack services. These parameters replace
the rabbitmq values and are used to generate the messaging
transport_url for the service. The association of the messaging
backend server to the oslo.messaging services will then be transparent
to the octavia service.

This patch:
* Add oslo.messaging variable for RPC and Notify to defaults
* Update transport_url generation
* Add oslo.messaging to tests inventory
* Update tests
* Add release note

Change-Id: Ibfd9b5325bf89414439a1a516d1bbde0896904b5
2018-06-12 13:21:33 -04:00
Zuul f050a982f7 Merge "An OSA password needs to end with _password" 2018-06-01 01:13:20 +00:00
German Eichberger dbaf963de9 An OSA password needs to end with _password
This means we need to rename our cert client password.

Change-Id: Ifd2562b08eab9c3a8c98ef969691c41fa8940ccb
2018-05-31 22:52:58 +00:00
German Eichberger e711ce4f51 Adds constraints to all pip installs
Recently we ran into trouble with the cmd2 extension's
latest version being python3 only. This exposed the need
to constrain all pip installs (as it should have been)

Change-Id: I8f27bddd45905c14bec486c515b5b190c66eaf20
2018-05-30 08:52:26 -07:00
Albert Mikaelyan e75abe946e Remove unneded url v2 variables
We are setting an unnecessary url_v2 variables which translates to uri
variables. This change removes url_v2 variables and just uses uri
variables directly instead.

Change-Id: I891b94a8fb452e9fb5166e7c322d152060efdcce
2018-05-18 14:36:14 +03:00
German Eichberger 1515ca276b Adds certificate generation
This will generate self-signed certificates needed
for Octavia during install.

Change-Id: I39bbc4c43633b844b55f463723ba1b72d79fd206
2018-04-24 14:38:58 -07:00
German Eichberger 95eee6bc11 Downloads amphora images from artifact storage
This will download a test amphora image per default form the
Open Stack artifact storage to speed up tests. Operators can
configure their won artifact storage to simplify deploys.

Change-Id: I408d4128d35aab889dbe89fd9497d83a7830129b
2018-04-17 16:31:59 -07:00
Jesse Pretorius e3611bb437 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: Icc9ef674918babd49b7992c3a60c0a6bf4e2cde7
2018-03-28 10:15:43 +01:00
Zuul e879ab2941 Merge "ansible-role-requirements: Use systemd_service role from openstack namespace" 2018-03-25 17:44:11 +00:00
Jesse Pretorius 80b0b2145b 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: If46d04a52a7e9ed8253b78f761f9994036544082
2018-03-25 16:20:57 +01:00
Jesse Pretorius 149d51f5d8 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: I96a4bff650aa50ba7e388bb34084524543c08a8f
Implements: blueprint python-build-install-simplification
Signed-off-by: Jesse Pretorius <jesse.pretorius@rackspace.co.uk>
2018-03-24 23:21:07 +00:00
Jesse Pretorius f39795f7e5 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: I5d00e83122b40220ff07f046aeb87e2066093b94
2018-03-13 16:51:33 +00:00
German Eichberger 1c1f769adc Fixes Lint errors and improve tests
* adds skip_ansible_lint where necessary
* moves tests to openstack client

Change-Id: Ib0d0250be713c547f87007cc84ea373978220505
2018-02-26 11:46:02 +00:00
OpenStack Proposal Bot 879550a550 Updated from OpenStack Ansible Tests
Change-Id: If85abf55de2647f69c3165055a9f3878fc32d3a0
2018-02-14 20:06:55 +00:00
Zuul 25f3446fab Merge "Create Octavia policy roles and legacy admin-owner rules" 2017-12-05 08:03:15 +00:00
Jesse Pretorius 3eee3a1025 ansible-role-requirements: Switch ODL git repo to the github mirror
Cloning from the official ODL git repository fails far too often with
the following error

fatal: unable to access 'https://git.opendaylight.org/gerrit/p/integration/packaging/ansible-opendaylight.git/': gnutls_handshake() failed: Error in the pull function

Lets switch to the github mirror which may be more reliable.

Change-Id: Ic8a1599b260ca3183e3cc78a9243f45f944899dc
2017-11-28 23:16:05 +00:00
German Eichberger 03767ae49c Create Octavia policy roles and legacy admin-owner rules
Octavia has introduced new roles for more granular access policies.
This will create those keystone roles and if the legacy parameter
is set create admin or user rules which are similar what Neutron
allowed before.

Change-Id: I2d6b7278d7d4af2669cba7ac760dae0bc8e6f183
2017-11-28 23:15:51 +00:00
German Eichberger fed40c9b73 Adds some skip linters to the tests
Change-Id: I936f751a0e06f883ab93c61eba602692013f0c45
2017-11-27 15:46:59 -08:00
OpenStack Proposal Bot 6e12ffd4ef Updated from OpenStack Ansible Tests
Change-Id: I6a4a53d29e511610a8cd99e5006079b7fdd5fb2e
2017-10-29 10:59:30 +00:00
Michael Johnson b9d8aa3fd6 Add zuul v3 support/jobs
Setup support for running the linters and functional tests under zuulv3.

Depends-On: I6490979d208938634373c08d164461e9d5d1150a
Change-Id: I04d1d38b6fb80400ffbe38e803f760b99eadf232
2017-10-27 10:45:17 -07:00
Jesse Pretorius f84cc21887 Add opendaylight role to tests a-r-r
In order to pass the lint test, all meta-dep
roles for the roles we execute in the test must
be present. As the os_neutron role recently got
the opendaylight role added as a meta-dep it is
now required here too.

Change-Id: If34464a2c2d87efa5857da804428231f9045c235
2017-09-04 14:28:05 +01:00
Andy McCrae b1fe866f42 Implement uWSGI for octavia-api
As part of the Pike goals we are moving api services to run as WSGI
apps. octavia-api service is set up as a wsgi app, and this patch
moves it over to uWSGI.

Since this is just a drop in replacement for the existing eventlet
service, operators an deployers should notice no difference.

Additionally, fix bug whereby git_install_branch was set to
"stable/ocata" for testing.

Change-Id: I0c473977e015015bd252a486c7191a95781b38a4
Implements: blueprint goal-deploy-api-in-wsgi
2017-08-04 13:20:54 +01:00