Skip to content

Commit

Permalink
Updates to support xenial-pike
Browse files Browse the repository at this point in the history
Add apache2 configuration template to switch to using the horizon
user for wsgi processes.

Resync charmhelpers for pike support.

Change-Id: I0bc4753ac1b228e695eedb14840d7d1901d5ddc8
  • Loading branch information
javacruft committed May 12, 2017
1 parent ad5f2f7 commit 3b31754
Show file tree
Hide file tree
Showing 10 changed files with 131 additions and 2 deletions.
6 changes: 5 additions & 1 deletion hooks/charmhelpers/contrib/openstack/amulet/deployment.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,8 @@ def _get_openstack_release(self):
# Must be ordered by OpenStack release (not by Ubuntu release):
(self.trusty_icehouse, self.trusty_kilo, self.trusty_liberty,
self.trusty_mitaka, self.xenial_mitaka, self.xenial_newton,
self.yakkety_newton, self.xenial_ocata, self.zesty_ocata) = range(9)
self.yakkety_newton, self.xenial_ocata, self.zesty_ocata,
self.xenial_pike, self.artful_pike) = range(11)

releases = {
('trusty', None): self.trusty_icehouse,
Expand All @@ -272,8 +273,10 @@ def _get_openstack_release(self):
('xenial', None): self.xenial_mitaka,
('xenial', 'cloud:xenial-newton'): self.xenial_newton,
('xenial', 'cloud:xenial-ocata'): self.xenial_ocata,
('xenial', 'cloud:xenial-pike'): self.xenial_pike,
('yakkety', None): self.yakkety_newton,
('zesty', None): self.zesty_ocata,
('artful', None): self.artful_pike,
}
return releases[(self.series, self.openstack)]

Expand All @@ -287,6 +290,7 @@ def _get_openstack_release_string(self):
('xenial', 'mitaka'),
('yakkety', 'newton'),
('zesty', 'ocata'),
('artful', 'pike'),
])
if self.openstack:
os_origin = self.openstack.split(':')[1]
Expand Down
4 changes: 4 additions & 0 deletions hooks/charmhelpers/contrib/openstack/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -1393,6 +1393,10 @@ def __call__(self):
'rel_key': 'enable-l3ha',
'default': False,
},
'dns_domain': {
'rel_key': 'dns-domain',
'default': None,
},
}
ctxt = self.get_neutron_options({})
for rid in relation_ids('neutron-plugin-api'):
Expand Down
37 changes: 37 additions & 0 deletions hooks/charmhelpers/contrib/openstack/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@
'newton',
'ocata',
'pike',
'queens',
'rocky',
)

UBUNTU_OPENSTACK_RELEASE = OrderedDict([
Expand All @@ -126,6 +128,7 @@
('xenial', 'mitaka'),
('yakkety', 'newton'),
('zesty', 'ocata'),
('artful', 'pike'),
])


Expand All @@ -142,6 +145,7 @@
('2016.1', 'mitaka'),
('2016.2', 'newton'),
('2017.1', 'ocata'),
('2017.2', 'pike'),
])

# The ugly duckling - must list releases oldest to newest
Expand Down Expand Up @@ -179,54 +183,81 @@
('13', 'mitaka'),
('14', 'newton'),
('15', 'ocata'),
('16', 'pike'),
('17', 'queens'),
('18', 'rocky'),
]),
'neutron-common': OrderedDict([
('7', 'liberty'),
('8', 'mitaka'),
('9', 'newton'),
('10', 'ocata'),
('11', 'pike'),
('12', 'queens'),
('13', 'rocky'),
]),
'cinder-common': OrderedDict([
('7', 'liberty'),
('8', 'mitaka'),
('9', 'newton'),
('10', 'ocata'),
('11', 'pike'),
('12', 'queens'),
('13', 'rocky'),
]),
'keystone': OrderedDict([
('8', 'liberty'),
('9', 'mitaka'),
('10', 'newton'),
('11', 'ocata'),
('12', 'pike'),
('13', 'queens'),
('14', 'rocky'),
]),
'horizon-common': OrderedDict([
('8', 'liberty'),
('9', 'mitaka'),
('10', 'newton'),
('11', 'ocata'),
('12', 'pike'),
('13', 'queens'),
('14', 'rocky'),
]),
'ceilometer-common': OrderedDict([
('5', 'liberty'),
('6', 'mitaka'),
('7', 'newton'),
('8', 'ocata'),
('9', 'pike'),
('10', 'queens'),
('11', 'rocky'),
]),
'heat-common': OrderedDict([
('5', 'liberty'),
('6', 'mitaka'),
('7', 'newton'),
('8', 'ocata'),
('9', 'pike'),
('10', 'queens'),
('11', 'rocky'),
]),
'glance-common': OrderedDict([
('11', 'liberty'),
('12', 'mitaka'),
('13', 'newton'),
('14', 'ocata'),
('15', 'pike'),
('16', 'queens'),
('17', 'rocky'),
]),
'openstack-dashboard': OrderedDict([
('8', 'liberty'),
('9', 'mitaka'),
('10', 'newton'),
('11', 'ocata'),
('12', 'pike'),
('13', 'queens'),
('14', 'rocky'),
]),
}

Expand Down Expand Up @@ -579,6 +610,12 @@ def configure_installation_source(rel):
'ocata': 'xenial-updates/ocata',
'ocata/updates': 'xenial-updates/ocata',
'ocata/proposed': 'xenial-proposed/ocata',
'pike': 'xenial-updates/pike',
'pike/updates': 'xenial-updates/pike',
'pike/proposed': 'xenial-proposed/pike',
'queens': 'xenial-updates/queens',
'queens/updates': 'xenial-updates/queens',
'queens/proposed': 'xenial-proposed/queens',
}

try:
Expand Down
1 change: 1 addition & 0 deletions hooks/charmhelpers/core/host_factory/ubuntu.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
'xenial',
'yakkety',
'zesty',
'artful',
)


Expand Down
16 changes: 16 additions & 0 deletions hooks/charmhelpers/fetch/ubuntu.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,22 @@
'ocata/proposed': 'xenial-proposed/ocata',
'xenial-ocata/proposed': 'xenial-proposed/ocata',
'xenial-ocata/newton': 'xenial-proposed/ocata',
# Pike
'pike': 'xenial-updates/pike',
'xenial-pike': 'xenial-updates/pike',
'xenial-pike/updates': 'xenial-updates/pike',
'xenial-updates/pike': 'xenial-updates/pike',
'pike/proposed': 'xenial-proposed/pike',
'xenial-pike/proposed': 'xenial-proposed/pike',
'xenial-pike/newton': 'xenial-proposed/pike',
# Queens
'queens': 'xenial-updates/queens',
'xenial-queens': 'xenial-updates/queens',
'xenial-queens/updates': 'xenial-updates/queens',
'xenial-updates/queens': 'xenial-updates/queens',
'queens/proposed': 'xenial-proposed/queens',
'xenial-queens/proposed': 'xenial-proposed/queens',
'xenial-queens/newton': 'xenial-proposed/queens',
}

APT_NO_LOCK = 100 # The return code for "couldn't acquire lock" in APT.
Expand Down
14 changes: 14 additions & 0 deletions templates/pike/openstack-dashboard.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
WSGIScriptAlias {{ webroot }} /usr/share/openstack-dashboard/openstack_dashboard/wsgi/django.wsgi
WSGIDaemonProcess horizon user=horizon group=horizon processes=3 threads=10
WSGIProcessGroup horizon
{% if virtualenv %}
WSGIPythonHome {{ virtualenv }}
{% endif %}
Alias /static /var/lib/openstack-dashboard/static/
Alias /horizon/static /var/lib/openstack-dashboard/static/
<Directory /usr/share/openstack-dashboard/openstack_dashboard/wsgi>
Require all granted
</Directory>
<Directory /var/lib/openstack-dashboard/static>
Require all granted
</Directory>
6 changes: 5 additions & 1 deletion tests/charmhelpers/contrib/openstack/amulet/deployment.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,8 @@ def _get_openstack_release(self):
# Must be ordered by OpenStack release (not by Ubuntu release):
(self.trusty_icehouse, self.trusty_kilo, self.trusty_liberty,
self.trusty_mitaka, self.xenial_mitaka, self.xenial_newton,
self.yakkety_newton, self.xenial_ocata, self.zesty_ocata) = range(9)
self.yakkety_newton, self.xenial_ocata, self.zesty_ocata,
self.xenial_pike, self.artful_pike) = range(11)

releases = {
('trusty', None): self.trusty_icehouse,
Expand All @@ -272,8 +273,10 @@ def _get_openstack_release(self):
('xenial', None): self.xenial_mitaka,
('xenial', 'cloud:xenial-newton'): self.xenial_newton,
('xenial', 'cloud:xenial-ocata'): self.xenial_ocata,
('xenial', 'cloud:xenial-pike'): self.xenial_pike,
('yakkety', None): self.yakkety_newton,
('zesty', None): self.zesty_ocata,
('artful', None): self.artful_pike,
}
return releases[(self.series, self.openstack)]

Expand All @@ -287,6 +290,7 @@ def _get_openstack_release_string(self):
('xenial', 'mitaka'),
('yakkety', 'newton'),
('zesty', 'ocata'),
('artful', 'pike'),
])
if self.openstack:
os_origin = self.openstack.split(':')[1]
Expand Down
1 change: 1 addition & 0 deletions tests/charmhelpers/core/host_factory/ubuntu.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
'xenial',
'yakkety',
'zesty',
'artful',
)


Expand Down
23 changes: 23 additions & 0 deletions tests/gate-basic-artful-pike
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/usr/bin/env python
#
# Copyright 2016 Canonical Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""Amulet tests on a basic openstack-dashboard deployment on artful-pike."""

from basic_deployment import OpenstackDashboardBasicDeployment

if __name__ == '__main__':
deployment = OpenstackDashboardBasicDeployment(series='artful')
deployment.run_tests()
25 changes: 25 additions & 0 deletions tests/gate-basic-xenial-pike
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/usr/bin/env python
#
# Copyright 2016 Canonical Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""Amulet tests on a basic openstack-dashboard deployment on xenial-pike."""

from basic_deployment import OpenstackDashboardBasicDeployment

if __name__ == '__main__':
deployment = OpenstackDashboardBasicDeployment(series='xenial',
openstack='cloud:xenial-pike',
source='cloud:xenial-updates/pike')
deployment.run_tests()

0 comments on commit 3b31754

Please sign in to comment.