[hopem,r=gnuoy] Add config option to allow apache2 and libapache-mod-fastcgi to
be installed from ceph.com. This enables support for patched packages contanining http 100-continue support.
This commit is contained in:
commit
98593108a0
10
config.yaml
10
config.yaml
@ -47,3 +47,13 @@ options:
|
|||||||
default: False
|
default: False
|
||||||
description: |
|
description: |
|
||||||
If set to True, supporting services will log to syslog.
|
If set to True, supporting services will log to syslog.
|
||||||
|
use-ceph-optimised-packages:
|
||||||
|
type: boolean
|
||||||
|
default: false
|
||||||
|
description: |
|
||||||
|
By default apache2 and libapache2-mod-fastcgi will be installed from the
|
||||||
|
Ubuntu archives. This option allows for an alternate ceph.com install
|
||||||
|
source which contains patched versions with added support for HTTP
|
||||||
|
100-continue. See the following page for more info:
|
||||||
|
|
||||||
|
http://ceph.com/docs/dumpling/radosgw/manual-install/#continue-support
|
||||||
|
@ -30,6 +30,7 @@ from charmhelpers.fetch import (
|
|||||||
apt_install,
|
apt_install,
|
||||||
add_source,
|
add_source,
|
||||||
)
|
)
|
||||||
|
from charmhelpers.core.host import lsb_release
|
||||||
from utils import (
|
from utils import (
|
||||||
render_template,
|
render_template,
|
||||||
get_host_ip,
|
get_host_ip,
|
||||||
@ -52,16 +53,38 @@ def install_www_scripts():
|
|||||||
NSS_DIR = '/var/lib/ceph/nss'
|
NSS_DIR = '/var/lib/ceph/nss'
|
||||||
|
|
||||||
|
|
||||||
@hooks.hook('install')
|
def install_ceph_optimised_packages():
|
||||||
def install():
|
"""Inktank provides patched/optimised packages for HTTP 100-continue
|
||||||
execd_preinstall()
|
support that does has not yet been ported to upstream. These can
|
||||||
enable_pocket('multiverse')
|
optionally be installed from ceph.com archives.
|
||||||
|
"""
|
||||||
|
prolog = "http://gitbuilder.ceph.com/"
|
||||||
|
epilog = "-x86_64-basic/ref/master"
|
||||||
|
rel = lsb_release()['DISTRIB_CODENAME']
|
||||||
|
fastcgi_source = "%slibapache-mod-fastcgi-deb-%s%s" % (prolog, rel, epilog)
|
||||||
|
apache_source = "%sapache2-deb-%s%s" % (prolog, rel, epilog)
|
||||||
|
|
||||||
|
for source in [fastcgi_source, apache_source]:
|
||||||
|
add_source(source, key='6EAEAE2203C3951A')
|
||||||
|
|
||||||
|
|
||||||
|
def install_packages():
|
||||||
add_source(config('source'), config('key'))
|
add_source(config('source'), config('key'))
|
||||||
|
if config('use-ceph-optimised-packages'):
|
||||||
|
install_ceph_optimised_packages()
|
||||||
|
|
||||||
apt_update(fatal=True)
|
apt_update(fatal=True)
|
||||||
apt_install(['radosgw',
|
apt_install(['radosgw',
|
||||||
'libapache2-mod-fastcgi',
|
'libapache2-mod-fastcgi',
|
||||||
'apache2',
|
'apache2',
|
||||||
'ntp'], fatal=True)
|
'ntp'], fatal=True)
|
||||||
|
|
||||||
|
|
||||||
|
@hooks.hook('install')
|
||||||
|
def install():
|
||||||
|
execd_preinstall()
|
||||||
|
enable_pocket('multiverse')
|
||||||
|
install_packages()
|
||||||
os.makedirs(NSS_DIR)
|
os.makedirs(NSS_DIR)
|
||||||
|
|
||||||
|
|
||||||
@ -121,6 +144,7 @@ def apache_reload():
|
|||||||
@hooks.hook('upgrade-charm',
|
@hooks.hook('upgrade-charm',
|
||||||
'config-changed')
|
'config-changed')
|
||||||
def config_changed():
|
def config_changed():
|
||||||
|
install_packages()
|
||||||
emit_cephconf()
|
emit_cephconf()
|
||||||
emit_apacheconf()
|
emit_apacheconf()
|
||||||
install_www_scripts()
|
install_www_scripts()
|
||||||
|
Loading…
Reference in New Issue
Block a user