172 Commits

Author SHA1 Message Date
Michael Johnson
f935a51fe4 Switch to ubuntu-minimal for default amphora image
Previously we were using the "ubuntu" diskimage-builder base element as the
default base OS to build the amphora image.
The "ubuntu" element is based on the ubuntu cloud image. This image includes
packages we do not need for the amphora image. At this point it's not clear
that Ubuntu will ship an 18.04 LTS cloud image in the format the "ubuntu"
element requires.
This patch switches the default Ubuntu amphora image to build with the
"ubuntu-minimal" diskimage-builder element.

This patch also moves the amphora agent into a virtual environment inside
the amphora.

It also sets up support for Ubuntu 18.04 (bionic beaver) and HAProxy 1.8.

Change-Id: I84a85ca1363bce2e0f13da64540ec7ba3575e818
2018-04-16 18:07:31 -07:00
Michał Dulko
f66f08ff9c Install client from pip if not in LIBS_FROM_GIT
It shouldn't be a requirement to put python-octaviaclient into
LIBS_FROM_GIT in local.conf. This commit makes Octavia's DevStack plugin
install it from pip if it's not present in LIBS_FROM_GIT.

Story: 2001830
Task: 12587
Change-Id: I37014a766e27f6117c96aef976fa1e0b5a9ca031
2018-04-12 11:45:29 +02:00
Michael Johnson
ae1ab563e5 Move o-hm0 dhcp config under /etc/dhcp
Apparmor will block dhclient from accessing the o-hm0 configuration file
under /etc/octavia. This patch moves our dhclient.conf under /etc/dhcp/octavia
to allow the dhclient to access the file when apparmor is running.

Change-Id: I3153f8bd9237470f406a9edeb4e2a0767fc747b8
Story: 1673269
Task: 5434
2018-04-10 09:55:45 -07:00
Zuul
b07faa03e0 Merge "Add a devstack variable for legacy RBAC" 2018-04-09 07:12:10 +00:00
Vadim Ponomarev
2a94e10f3a Change used keystone token provider in devstack
This patch changes used keystone token provider from 'uuid' to 'fernet'
in devstack creation script new-octavia-devstack.sh, because the uuid
type deprecated. Changes in keystone:
I76d5c29f6b1572ee3ec7f2b1af63ff31572de2ce

Change-Id: Ia42d8afe62413aa086d9a3751171d42042a700a8
Blueprint: removed-as-of-rocky
Story: 2001732
2018-03-25 12:15:48 +03:00
Michael Johnson
949261f342 Add a devstack variable for legacy RBAC
This patch adds the OCTAVIA_USE_LEGACY_RBAC variable to our devstack plugin.
When set to True it will install the legacy Admin/Owner RBAC policy.json file
for the devstack Octavia install.
This is useful for tempest testing the neutron-lbaas proxy driver that passes
neutron LBaaSv2 API requests through to the Octavia API.

Change-Id: I5f112131b9c57e394349f29fa1b675643784b867
2018-03-16 11:43:27 -07:00
Zuul
be26842229 Merge "Split up extra init steps and start processes" 2018-03-16 10:27:04 +00:00
Adam Harwell
53dc41d06f Devstack plugin image build option quoting fix
Options that are unset should not use '' as their default because it
actually puts them literally into the command which will cause it to
skip parsing args after any empty quotes.

Change-Id: I54c0170bad28adb26df87024bd16f31827702f1e
2018-03-14 05:13:37 +00:00
Zuul
fbd48859a9 Merge "Rename q- to neutron- services" 2018-03-13 01:21:47 +00:00
Daniel Mellado
6eb4c1f332 Rename q- to neutron- services
We were using neutron lib/neutron-legacy on our devstack plugin as we
were enabling legacy services. This commit changes it so we rely on
lib/neutron.

Co-Authored-By: Carlos Goncalves <cgoncalves@redhat.com>

Change-Id: I159dd4b371b870dc752fa01f738a2910263e3918
2018-03-12 10:48:26 +01:00
Carlos Goncalves
303b339836 Split up extra init steps and start processes
By spliting them up, we can now start Octavia without going through the
extra initialization steps, which are not idempotent (or meant to be
anyway), exiting with error code and preventing from continuing the
so desired start process of Octavia. The split-up will allow Grenade to
call out octavia_start solely for the purpose of starting Octavia
services.

This patch also fixes awk from matching itself when stopping Octavia.
This keeps awk from showing itself in the output, grabbing only relevant
PIDs. Otherwise awk PID is added to PID list resulting in kill command
exiting with error as awk is no longer running. This is equially
important and required grenading Octavia, else an exit error would be
thrown.

Change-Id: I1b53076953eaf1a6c6934a10439d00977c875fec
2018-03-11 18:26:52 +00:00
Adam Harwell
1020a3bceb Fix kvm-centos.7 gate
Somehow it was pulling in barbican-tempest-plugin incorrectly, and
didn't have image size set right for centos.

Also fix the devstack plugin to size the flavor correctly based on the
image size variable.

Change-Id: I724f5064309d07fe05f86fcf2c7a488d9319e54c
2018-03-08 12:54:37 -08:00
Bar RH
bf9dffc815 Update configuration samples (QoS)
Enable QoS support.
We rely on Neutron's devstack plugin script to set the correct
configuration.

Change-Id: Idd99af81cafd4c8fc541ca8664c844b5473bb39a
2018-02-26 18:31:30 +00:00
Nir Magnezi
662485e2d2 Update devstack plugin and examples
The devstack plugin should only use the openstackclient to
interact with OpenStack services via CLI.

This patch fixes both the devstack plugin and the examples.

Task: 5678
Task: 5680
Task: 5698
Story: 2001183

Change-Id: Id30ab0484edb350f0a424a0fc90c381357614b8e
2017-11-26 23:20:33 +02:00
Vu Cong Tuan
b2d5604203 Remove SCREEN_LOGDIR from devstack
SCREEN_LOGDIR has already been deprecated [1]
[1] https://review.openstack.org/#/c/499186

Change-Id: I0f2100008cb866da99e117cab6b41c872e2e8b73
2017-10-05 17:08:57 +07:00
Luis Tomas Bolivar
3e3416113e Ensure DIB_REPOREF_amphora_agent is set
This patch ensure that the proper git format is used based on
the git version, i.e., if the git version is below 1.8.5, it
forces to use git -c -- since -C option is not available.
Otherwise it used git -C.

Change-Id: I9522765fae633f096c095a60f470467c0ff221c0
Story: 2001204
Task: 5709
2017-09-19 17:05:35 +02:00
Omer Anson
ca69044222 devstack: Allow 3rd party neutron backends deployment
In plugin.sh, there is only support for neutron reference
implementation, with either openvswitch or linuxbridge agent.

This change allows external devstack plugins to define hooks needed in
devstack.

Change-Id: I1d5797a1becb4201d76c0e522f84dad09804c5b6
Closes-Bug: #1712077
2017-08-24 09:25:35 +03:00
Michael Johnson
aa5552e0d4 Fix octavia logging to be more friendly
Configures the octavia devstack plugin to use devstack's setup_logging
function to standardize the octavia gate log format.
Octavia processes will now print the version string to the logs on startup.

Change-Id: I094636a983fb0bcac2a1a1445b3487eac88a5e75
Closes-Bug: #1694588
2017-08-12 11:57:42 -07:00
Michael Johnson
6e71722bc9 Update devstack readme.md
Change-Id: I34437efccab1f1f4e183d6cf322207c34b1c49aa
2017-08-09 12:22:45 -07:00
Jenkins
73d4f356e4 Merge "Remove key_path from devstack plugin" 2017-07-20 23:15:08 +00:00
Nir Magnezi
2dd53b5bba Remove key_path from devstack plugin
Removing key_path, because it is not being referenced
from anywhere in the code.

Change-Id: I5d7255d7a5cff33d69206a8373aade7353539865
2017-07-20 15:30:03 +03:00
Jacky Hu
099921c14c Add placement service to new-octavia-devstack.sh
As a followup to I273c3c8299ee329bed425f3e7cd4b583ed1187a4,
adding nova placement services which are mandatory starting Ocata.

Change-Id: I8a4474a52766f01086501564c52e4fc3a2ced7dc
2017-07-04 16:59:57 +08:00
Jenkins
4a9beeb885 Merge "Enable uwsgi support for octavia devstack" 2017-06-29 03:19:33 +00:00
Jenkins
dac945260d Merge "Change default vagrant box to xenial64(16.04)" 2017-06-29 00:51:13 +00:00
Michael Johnson
55305c5f6c Enable uwsgi support for octavia devstack
The Pike goal [1] has changed to requiring uwsgi for projects.
This patch enables octavia to run under uwsgi.

[1] https://governance.openstack.org/tc/goals/pike/deploy-api-in-wsgi.html

Change-Id: I4f5bafe8d194b23a55cb4de0ba42ad7b6eb7a6cc
2017-06-28 15:59:00 -07:00
ckji
79a7698bfd Fix nova secgroup-add-rule which is unavailable
Nova secgroup-add-rule is not available anymore.
Change it to 'openstack security group rule create'.

Change-Id: I43befb0635ea4f8978b0d863722599cff3863a03
2017-06-28 15:17:04 +08:00
ckji
a7256e15ed Change default vagrant box to xenial64(16.04)
Because current devstack don't support ubuntu 14.04. Change default
vagrant box from trusty64 to xenial64.

See:
https://docs.openstack.org/developer/devstack/#install-linux

Change-Id: Id49167e6d60babcc6145c0f4cbd5b15231d12c88
2017-06-28 11:29:49 +08:00
Michael Johnson
335c00ac18 Add RBAC enforcement to quotas v2 API
This patch adds policies and enforcement to the Octavia v2 API for quotas.

Change-Id: I5f2fa38973fce595ea3ec03cdff924336e0e71c8
Partial-Bug: #1690481
2017-06-20 18:52:05 -07:00
Michael Johnson
0ce46fe8d0 Add RBAC enforcement to Octavia v2 API
This patch adds policies and enforcement to the Octavia v2 API for
load balancers and listeners.  Child patches will add the rest of the API.

In this patch I also correct some improper functional tests.

Change-Id: Id8a2d15c117c54bd45fc8bb76bf71aff1b3c8fe9
Closes-Bug: #1690481
2017-06-20 13:43:47 +03:00
Michael Johnson
be27e4f0e8 Remove deprecated signing_dir config setting
keystonemiddleware has deprecated the "signing_dir" configuration
option [1].
This patch also removes reference to it from octavia.

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

Change-Id: Idda46ab1459584eafd58097ec42b9f0fcea41759
2017-06-12 17:04:53 -07:00
Nir Magnezi
717bee352d Devstack plugin should mark the HM ovs port for cleanup skip
The Octavia Devstack plugin change should reflect the issue
mentioned in: If483d0ee027596999370ab0d21b1743d4ef16acb

Related-Bug: #1685223

Change-Id: Ia1f728081a589b0848c699836c22841c29b0f6da
Depends-On: If483d0ee027596999370ab0d21b1743d4ef16acb
2017-05-29 11:23:23 +00:00
Nir Magnezi
15feef13c3 Remove nova cert from devstack examples
As a followup to I2c78a0c6599b92040146cf9f0042cff8fd2509c3, the nova
cert service should be removed from the devstack local.conf examples.

Without this fix, stacking will fail is USE_SCREEN=True

Change-Id: Ifb7fc1e423abf6f1509a0724e45b352fdb908def
2017-05-23 00:02:33 +03:00
Michael Johnson
24ee552102 Fix devstack plugin to stop octavia processes
The octavia devstack plugin was missing the methods to actually stop
the devstack processes on devstack shutdown.  This patch makes the
appropriate devstack function calls to stop the processes.

Change-Id: I0a7b4c5b2bd3664fd113d588a533c0d4e16493e8
2017-05-02 16:10:35 -07:00
Nir Magnezi
75c1c5f22a Change auth_strategy default to keystone
The current default for auth_strategy is noauth, which is not how it is
expected to be set in production environments.

Note: Functional tests should be good with noauth.

Co-Authored-By: Adam Harwell <flux.adam@gmail.com>
Co-Authored-By: Michael Johnson <johnsomor@gmail.com>
Change-Id: Ifc80fff06a1d793d7cee0b207af10061784e48db
2017-05-01 11:33:37 +09:00
Shashank Kumar Shankar
a669d7e4f1 Run Octavia API in a WSGI server
This patch is to enable the API to run in a WSGI server like
apache2/httpd.

Co-Authored-By: Adam Harwell <flux.adam@gmail.com>
Co-Authored-By: Michael Johnson <johnsomor@gmail.com>
Change-Id: I296c046f653dcf78cdca2d0df1896d27f2ba1544
2017-04-30 08:36:44 +00:00
Adam Harwell
2aca12b7cf Set up octaviaclient as part of devstack
Change-Id: Iea9204469fb69715eab4a5b1d11beb61437bb9ec
2017-04-30 12:20:41 +09:00
Adam Harwell
78d7aec1fd Install DIB from source so depends-on will work
Depends-On: Ia1028972bfc0517b468b279aab9decdbcd7424ca
Change-Id: I1c5e5558cac6d54fdc5730599293852f0abd0749
2017-04-24 14:28:23 +00:00
Adam Harwell
9027154a5a Removing dependency on eventlet and oslo.service
Change-Id: I453e9b86d4edfedd63cc59e47bf745e166ff836f
2017-04-21 07:07:12 +09:00
Michael Johnson
0e7bb3a764 Update keystone URL to be consistent
Updates the octavia devstack plugin to use the same keystone URL environment
variable as other projects, OS_AUTH_URL.

Change-Id: I3089bc440980f44bd9ec19a01bf7c0f2fcdceb85
2017-04-18 13:21:29 -07:00
Jenkins
53cb09d7b2 Merge "DIB: drop some dependencies" 2017-03-29 17:35:04 +00:00
Michael Johnson
583c7f7382 Changing the service-type to load-balancer
Per the discussion in the service-types-authority repository [1]
updating octavia to use "load-balancer" as the service type.

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

Change-Id: I4faa327c064f6291c578d3e04f8ee8624940ce08
2017-03-28 11:11:59 -07:00
Bernard Cafarelli
d5f1ffd703
DIB: drop some dependencies
kpartx is not called anymore in amphora creation
'jq' package is not required anymore, so drop epel element dependency
For rpm-based distributions, qemu-img package is enough
Drop Centos 6 specific check, it is not supported with current releases
Merge some Fedora/CentOS checks

Change-Id: I469486b48231489e0c4ea8b9986cb0c2347eb14f
2017-03-24 11:33:52 +01:00
Jenkins
fc675669d6 Merge "devstack: install qemu-kvm on RHEL-based distros" 2017-03-16 01:15:27 +00:00
Bernard Cafarelli
8aa15008bb
devstack: install qemu-kvm on RHEL-based distros
On these systems, asking to install qemu will bring in the default OS
older version, which causes problem with nova, for more details:
https://review.openstack.org/#/c/438325

Ask for qemu-kvm instead, which should install the proper version

Change-Id: I60eca649ca1ae53c341d68670d4ab1f3559ac31d
Related-Bug: #1668164
2017-03-15 17:34:49 +01:00
Kobi Samoray
ad4829557d Devstack plugin: API only mode
devstack plugin should initialize at API-service mode for third party
vendor handlers, which do not use amphorae.

Change-Id: Ie41580565eb1a32c3d00c38c895ad3ac4e246049
2017-03-15 11:55:04 +00:00
ckji
3251ee0598 Fix typo
s/bellow/below

Change-Id: I119fa3acbea1dbe152d0f28f06593022cb1c9435
2017-03-14 17:55:39 +08:00
Adam Harwell
cf9a8c8f77 Look for diskimage-builder not dib-utils when building amps
Also ignore E402 and W503 pep8 issues

Change-Id: I7937d0a21c7a748cd682511bd429de8cf0ffe498
2017-03-09 02:30:39 +00:00
Nir Magnezi
b2494dd531 Adds devstack plugin support for all amp base OS
Set OCTAVIA_AMP_BASE_OS to pass any option accepted by the
diskimage-create.sh script: ubuntu | fedora | centos | rhel

Set OCTAVIA_AMP_DISTRIBUTION_RELEASE_ID to pass release name for the
selected (either by OCTAVIA_AMP_BASE_OS or by default) operating
system.

Set OCTAVIA_AMP_IMAGE_SIZE to pass the image size (by GB).

If unset, the above mentioned options are not used in the script call
and thus, the script will use its default values.

Related-Bug #1548070

Change-Id: If1139594cf23d9de413ce2603aaa5c1e012c7790
2017-03-01 16:45:36 +00:00
johnsom
a2fb049780 Fix the service type for octavia
This patch updates the devstack plugin to specify the service type as
"load-balancing" instead of just listing "octavia".

Change-Id: I2ffaaa5e81d2e4676fae9ca90298f094f08ff51a
2017-02-15 10:07:00 -08:00
Nir Magnezi
2f5e3b4db8 Add placement services to devstack example files
As a followup to I273c3c8299ee329bed425f3e7cd4b583ed1187a4, adding
nova placement services which are mandatory starting Ocata.

Change-Id: I74adfd6aa3bc0cb1061427ef6d66fc8d3c20d776
2017-02-01 15:53:44 +02:00