Update config, readme; remove power-specific ties.

This commit is contained in:
Ryan Beisner 2016-10-05 21:54:44 +00:00
parent 263b4cd879
commit fe7310b362
6 changed files with 61 additions and 44 deletions

46
README
View File

@ -1,24 +1,40 @@
# Overview
The nova-compute-power charm deploys openstack to a given Power8 compute node.
*This charm is in ALPHA state, currently in active development.*
*Developers can be reached on freenode channel #openstack-charms.*
The nova-compute-proxy charm deploys OpenStack Nova Compute to a
pre-existing rpm-based Power8 PowerKVM or s390x z/KVM machine,
where the remainder of the Ubuntu OpenStack control plane and storage
applications are deployed to machines via MAAS.
# Usage
To deploy a nova-compute-power service you have to have the following:
To deploy a nova-compute-proxy service, have the following prepared in
advance:
* 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
RPMs.
* Sudo password-less configured for the user on the compute node.
* PowerKVM or z/KVM machine(s) manually provisioned, booted, accessible from
the control plane units, with network interfaces and storage ready to use.
* An ssh key that the charm can use to remotely execute installation and
configuration operations.
* Yum repository/repositories or .iso file(s) which contain the appropriate
IBM OpenStack RPMs. If using .iso file(s), they must be loop-mounted
on the compute node host.
* Password-less sudo for the specified user configured 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.
* power-repo: Yum repository url.
* power-hosts: IP address of power node
* Place the key to the nova-compute node in the files directory of the
charm.
* Apply the following charm config:
* remote-user: username used to access and configure the power node.
* remote-repo: Yum repository url or file url
* remote-hosts: IP address of power node
* Example:
```
remote-user: youruser
remote-repo: file:///tmp/openstack-iso/openstack
remote-key: id_dsa
remote-hosts: 10.10.10.10 10.10.10.11
```

View File

@ -1,28 +1,28 @@
options:
openstack-release:
type: string
default: icehouse
description: OpenStack release to use for configuration of POWER hypervisor.
power-user:
default: mitaka
description: OpenStack release to use for configuration of remote compute node.
remote-user:
type: string
default:
description: Username used to access POWER hypervisors.
power-key:
description: Username used to access remote compute nodes.
remote-key:
type: string
default:
description: SSH key to use to accesss POWER hypervisors.
power-repo:
description: SSH key to use to access remote compute nodes.
remote-repo:
type: string
default:
description: RPM repository of OpenStack packages to deploy to POWER hypervisors.
power-hosts:
description: RPM repository of OpenStack packages to deploy to remote compute nodes.
remote-hosts:
type: string
default:
description: POWER hosts to manager; space delimited.
power-password:
description: Remote compute node hosts to manager; space delimited.
remote-password:
type: string
default:
description: sudo password on POWER hypervisor
description: sudo password on remote compute node (NOT recommended). Use ssh key instead.
rabbit-user:
default: nova
type: string
@ -52,7 +52,9 @@ options:
config-flags:
type: string
default:
description: Comma separated list of key=value config flags to be set in nova.conf.
description: |
Comma-separated list of key=value config flags. These values will be
placed in the nova.conf [DEFAULT] section. Use with caution.
data-port:
type: string
default:
@ -68,4 +70,3 @@ options:
.
BE CAREFUL - this option allows you to disable all port level security within
an OpenStack cloud.

View File

@ -236,7 +236,7 @@ class CloudComputeContext(context.OSContextGenerator):
return ctxt
class NeutronPowerComputeContext(context.NeutronContext):
class NeutronRemoteComputeContext(context.NeutronContext):
interfaces = []
@property
@ -252,11 +252,11 @@ class NeutronPowerComputeContext(context.NeutronContext):
return _neutron_security_groups()
def _ensure_packages(self):
# NOTE(jamespage) no-op for nova-compute-power
# NOTE(jamespage) no-op for nova-compute-proxy
pass
def _save_flag_file(self):
# NOTE(jamespage) no-op for nova-compute-power
# NOTE(jamespage) no-op for nova-compute-proxy
pass
def ovs_ctxt(self):

View File

@ -34,17 +34,17 @@ from nova_compute_utils import (
NOVA_CONF,
)
from nova_compute_proxy import (
POWERProxy,
REMOTEProxy,
restart_on_change,
)
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'))
proxy = REMOTEProxy(user=config('remote-user'),
ssh_key=config('remote-key'),
hosts=config('remote-hosts'),
repository=config('remote-repo'),
password=config('remote-password'))
@hooks.hook()

View File

@ -69,7 +69,7 @@ CONFIG_FILES = [
'/etc/nova/nova.conf']
class POWERProxy():
class REMOTEProxy():
def __init__(self, user, ssh_key, hosts,
repository, password):
@ -107,7 +107,7 @@ class POWERProxy():
with open(filename, 'w') as f:
f.write(_render_template('yum.template', context))
execute(copy_file_as_root, filename,
'/etc/yum.repos.d/openstack-power.repo')
'/etc/yum.repos.d/openstack-nova-compute-proxy.repo')
os.unlink(filename)
def _install_packages(self):

View File

@ -27,7 +27,7 @@ from charmhelpers.contrib.openstack import templating, context
from nova_compute_context import (
CloudComputeContext,
NovaComputeVirtContext,
NeutronPowerComputeContext,
NeutronRemoteComputeContext,
)
TEMPLATES = 'templates/'
@ -60,7 +60,7 @@ NEUTRON_CONF = '%s/neutron.conf' % NEUTRON_CONF_DIR
NEUTRON_RESOURCES = {
NEUTRON_CONF: {
'services': ['neutron-openvswitch-agent'],
'contexts': [NeutronPowerComputeContext(),
'contexts': [NeutronRemoteComputeContext(),
context.AMQPContext(ssl_dir=NEUTRON_CONF_DIR),
context.SyslogContext(),
context.LogLevelContext()],
@ -93,13 +93,13 @@ def resource_map():
resource_map[conf] = {}
resource_map[conf]['services'] = ['neutron-openvswitch-agent']
resource_map[conf]['contexts'] = [NeutronPowerComputeContext()]
resource_map[conf]['contexts'] = [NeutronRemoteComputeContext()]
else:
raise ValueError("Only Neutron ml2/ovs plugin "
"is supported on this platform")
resource_map[NOVA_CONF]['contexts'].append(
NeutronPowerComputeContext())
NeutronRemoteComputeContext())
for conf in resource_map:
mkdir(os.path.dirname(conf))