Revert
This commit is contained in:
parent
587a6138e0
commit
0034764697
9
README
9
README
|
@ -1,22 +1,21 @@
|
|||
# Overview
|
||||
|
||||
The nova-compute-power charm deploys OpenStack to a set IBM Power8 servers running PowerKVM.
|
||||
The nova-compute-power charm deploys openstack to a given Power8 compute node.
|
||||
|
||||
# Usage
|
||||
|
||||
To deploy a nova-compute-power service you have to have the following:
|
||||
|
||||
* Generate a ssh key that the charm can use to login to the compute node
|
||||
to start installing RPMS and configuration file.
|
||||
* A yum repository which contains the appropriate IBM Openstack Icehouse
|
||||
to start installing RPMS and configuration file
|
||||
* A yum repository which contains the appropriate IBM Openstack Icehouse
|
||||
RPMs.
|
||||
* sudo password-less configuration for the user on the compute node.
|
||||
* Sudo password-less configured for the user on the compute node.
|
||||
|
||||
Once you have this setup you must configure the charm as follow:
|
||||
|
||||
1. Place the key to the nova-compute node in the files directory of the
|
||||
charm.
|
||||
|
||||
2. Create a config.yaml that has the following:
|
||||
|
||||
* power-user: username used to access and configure the power node.
|
||||
|
|
|
@ -7,6 +7,10 @@ options:
|
|||
type: string
|
||||
default:
|
||||
description: Username used to access POWER hypervisors.
|
||||
power-key:
|
||||
type: string
|
||||
default:
|
||||
description: SSH key to use to accesss POWER hypervisors.
|
||||
power-repo:
|
||||
type: string
|
||||
default:
|
||||
|
@ -14,7 +18,7 @@ options:
|
|||
power-hosts:
|
||||
type: string
|
||||
default:
|
||||
description: POWER hosts to manager; space delimited and must be IP addresses.
|
||||
description: POWER hosts to manager; space delimited.
|
||||
power-password:
|
||||
type: string
|
||||
default:
|
||||
|
|
|
@ -38,9 +38,8 @@ def add_bridge(bridge_name):
|
|||
|
||||
|
||||
def add_bridge_port(bridge_name, port):
|
||||
sudo('ovs-vsctl -- --may-exist '
|
||||
'add-port %s %s' % (bridge_name,
|
||||
port))
|
||||
sudo('ovs-vsctl -- --may-exist add-port %s %s' % (bridge_name,
|
||||
port))
|
||||
sudo('ip link set %s up' % port)
|
||||
sudo('ip link set %s promisc on' % port)
|
||||
|
||||
|
|
|
@ -28,6 +28,7 @@ from nova_compute_proxy import (
|
|||
hooks = Hooks()
|
||||
CONFIGS = register_configs()
|
||||
proxy = POWERProxy(user=config('power-user'),
|
||||
ssh_key=config('power-key'),
|
||||
hosts=config('power-hosts'),
|
||||
repository=config('power-repo'),
|
||||
password=config('power-password'))
|
||||
|
@ -35,7 +36,7 @@ proxy = POWERProxy(user=config('power-user'),
|
|||
|
||||
@hooks.hook()
|
||||
def install():
|
||||
apt_install('fabric', fatal=True)
|
||||
apt_install(['fabric'], fatal=True)
|
||||
proxy.install()
|
||||
|
||||
|
||||
|
|
|
@ -56,24 +56,29 @@ CONFIG_FILES = [
|
|||
|
||||
class POWERProxy():
|
||||
|
||||
def __init__(self, user, hosts,
|
||||
def __init__(self, user, ssh_key, hosts,
|
||||
repository, password):
|
||||
if None in [user, hosts, repository]:
|
||||
raise ValueError('Missing configuration')
|
||||
if None in [user, ssh_key, hosts, repository]:
|
||||
raise Exception('Missing configuration')
|
||||
self.user = user
|
||||
self.ssh_key = ssh_key
|
||||
self.hosts = hosts.split()
|
||||
self.repository = repository
|
||||
self.password = password
|
||||
self.key_filename = self._write_key()
|
||||
self._init_fabric()
|
||||
|
||||
def _write_key(self):
|
||||
return os.path.join(charm_dir(), 'files', self.ssh_key)
|
||||
|
||||
def _init_fabric(self):
|
||||
env.warn_only = True
|
||||
env.connection_attempts = 10
|
||||
env.timeout = 10
|
||||
env.user = self.user
|
||||
env.key_filename = self.key_filename
|
||||
env.hosts = self.hosts
|
||||
env.password = self.password
|
||||
env.use_ssh_config = True
|
||||
|
||||
def install(self):
|
||||
self._setup_yum()
|
||||
|
|
Loading…
Reference in New Issue