def install(): # pylxd is installed here manually rather than using the apt layer or the # wheelhouse. The latter cannot be used as the package relies on C modules # to be compiled. The apt package is out of date, as we need the fix at # https://github.com/lxc/pylxd/issues/232 in xenial. # TODO(frankban) We can remove this in favor of installing via apt when # xenial is updated with the fixed package. jujushell.call('pip', 'install', 'pylxd==2.2.6') set_flag('jujushell.install')
def install_jujushell(): hookenv.status_set('maintenance', 'fetching jujushell') path = jujushell.jujushell_path() try: jujushell.save_resource('jujushell', path) os.chmod(path, 0o775) # Allow for running jujushell on privileged ports. jujushell.call('setcap', 'CAP_NET_BIND_SERVICE=+eip', path) except OSError as err: hookenv.status_set('blocked', 'jujushell resource not available: {}'.format(err))