Example #1
0
 def pre_install(self):
     hue_version = jujuresources.config_get("hue-version")
     packages = [
         "ant",
         "g++",
         "libsasl2-modules-gssapi-mit",
         "libtidy-0.99-0",
         "python2.7-dev",
         "maven",
         "python-dev",
         "python-simplejson",
         "python-setuptools",
         "make",
         "libsasl2-dev",
         "libmysqlclient-dev",
         "libkrb5-dev",
         "libxml2-dev",
         "libxslt-dev",
         "libxslt1-dev",
         "libsqlite3-dev",
         "libssl-dev",
         "libldap2-dev",
         "python-pip"
     ]
     fetch.apt_install(packages)
Example #2
0
def bootstrap_resources():
    """
    Attempt to load and install resources defined in resources.yaml
    """
    if unitdata.kv().get('charm.bootstrapped', False):
        return True
    hookenv.status_set('maintenance', 'Installing base resources')
    mirror_url = jujuresources.config_get('resources_mirror')
    if not jujuresources.fetch(mirror_url=mirror_url):
        missing = jujuresources.invalid()
        hookenv.status_set('blocked', 'Unable to fetch required resource%s: %s' % (
            's' if len(missing) > 1 else '',
            ', '.join(missing),
        ))
        return False
    jujuresources.install(['pathlib', 'jujubigdata'])
    unitdata.kv().set('charm.bootstrapped', True)
    return True
Example #3
0
def bootstrap_resources():
    """
    Install required resources defined in resources.yaml
    """
    if unitdata.kv().get('charm.bootstrapped', False):
        return True
    hookenv.status_set('maintenance', 'Installing base resources')
    mirror_url = jujuresources.config_get('resources_mirror')
    if not jujuresources.fetch(mirror_url=mirror_url):
        missing = jujuresources.invalid()
        hookenv.status_set('blocked', 'Unable to fetch required resource%s: %s' % (
            's' if len(missing) > 1 else '',
            ', '.join(missing),
        ))
        return False
    jujuresources.install(['pathlib', 'jujubigdata'])
    unitdata.kv().set('charm.bootstrapped', True)
    return True