Update config, readme; remove power-specific ties.
This commit is contained in:
parent
263b4cd879
commit
fe7310b362
46
README
46
README
|
@ -1,24 +1,40 @@
|
||||||
# Overview
|
# 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
|
# 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
|
* PowerKVM or z/KVM machine(s) manually provisioned, booted, accessible from
|
||||||
to start installing RPMS and configuration file
|
the control plane units, with network interfaces and storage ready to use.
|
||||||
* A yum repository which contains the appropriate IBM Openstack Icehouse
|
* An ssh key that the charm can use to remotely execute installation and
|
||||||
RPMs.
|
configuration operations.
|
||||||
* Sudo password-less configured for the user on the compute node.
|
* 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:
|
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
|
* Place the key to the nova-compute node in the files directory of the
|
||||||
charm.
|
charm.
|
||||||
2. Create a config.yaml that has the following:
|
* Apply the following charm config:
|
||||||
|
* remote-user: username used to access and configure the power node.
|
||||||
* power-user: username used to access and configure the power node.
|
* remote-repo: Yum repository url or file url
|
||||||
* power-repo: Yum repository url.
|
* remote-hosts: IP address of power node
|
||||||
* power-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
|
||||||
|
```
|
||||||
|
|
29
config.yaml
29
config.yaml
|
@ -1,28 +1,28 @@
|
||||||
options:
|
options:
|
||||||
openstack-release:
|
openstack-release:
|
||||||
type: string
|
type: string
|
||||||
default: icehouse
|
default: mitaka
|
||||||
description: OpenStack release to use for configuration of POWER hypervisor.
|
description: OpenStack release to use for configuration of remote compute node.
|
||||||
power-user:
|
remote-user:
|
||||||
type: string
|
type: string
|
||||||
default:
|
default:
|
||||||
description: Username used to access POWER hypervisors.
|
description: Username used to access remote compute nodes.
|
||||||
power-key:
|
remote-key:
|
||||||
type: string
|
type: string
|
||||||
default:
|
default:
|
||||||
description: SSH key to use to accesss POWER hypervisors.
|
description: SSH key to use to access remote compute nodes.
|
||||||
power-repo:
|
remote-repo:
|
||||||
type: string
|
type: string
|
||||||
default:
|
default:
|
||||||
description: RPM repository of OpenStack packages to deploy to POWER hypervisors.
|
description: RPM repository of OpenStack packages to deploy to remote compute nodes.
|
||||||
power-hosts:
|
remote-hosts:
|
||||||
type: string
|
type: string
|
||||||
default:
|
default:
|
||||||
description: POWER hosts to manager; space delimited.
|
description: Remote compute node hosts to manager; space delimited.
|
||||||
power-password:
|
remote-password:
|
||||||
type: string
|
type: string
|
||||||
default:
|
default:
|
||||||
description: sudo password on POWER hypervisor
|
description: sudo password on remote compute node (NOT recommended). Use ssh key instead.
|
||||||
rabbit-user:
|
rabbit-user:
|
||||||
default: nova
|
default: nova
|
||||||
type: string
|
type: string
|
||||||
|
@ -52,7 +52,9 @@ options:
|
||||||
config-flags:
|
config-flags:
|
||||||
type: string
|
type: string
|
||||||
default:
|
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:
|
data-port:
|
||||||
type: string
|
type: string
|
||||||
default:
|
default:
|
||||||
|
@ -68,4 +70,3 @@ options:
|
||||||
.
|
.
|
||||||
BE CAREFUL - this option allows you to disable all port level security within
|
BE CAREFUL - this option allows you to disable all port level security within
|
||||||
an OpenStack cloud.
|
an OpenStack cloud.
|
||||||
|
|
||||||
|
|
|
@ -236,7 +236,7 @@ class CloudComputeContext(context.OSContextGenerator):
|
||||||
return ctxt
|
return ctxt
|
||||||
|
|
||||||
|
|
||||||
class NeutronPowerComputeContext(context.NeutronContext):
|
class NeutronRemoteComputeContext(context.NeutronContext):
|
||||||
interfaces = []
|
interfaces = []
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
@ -252,11 +252,11 @@ class NeutronPowerComputeContext(context.NeutronContext):
|
||||||
return _neutron_security_groups()
|
return _neutron_security_groups()
|
||||||
|
|
||||||
def _ensure_packages(self):
|
def _ensure_packages(self):
|
||||||
# NOTE(jamespage) no-op for nova-compute-power
|
# NOTE(jamespage) no-op for nova-compute-proxy
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def _save_flag_file(self):
|
def _save_flag_file(self):
|
||||||
# NOTE(jamespage) no-op for nova-compute-power
|
# NOTE(jamespage) no-op for nova-compute-proxy
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def ovs_ctxt(self):
|
def ovs_ctxt(self):
|
||||||
|
|
|
@ -34,17 +34,17 @@ from nova_compute_utils import (
|
||||||
NOVA_CONF,
|
NOVA_CONF,
|
||||||
)
|
)
|
||||||
from nova_compute_proxy import (
|
from nova_compute_proxy import (
|
||||||
POWERProxy,
|
REMOTEProxy,
|
||||||
restart_on_change,
|
restart_on_change,
|
||||||
)
|
)
|
||||||
|
|
||||||
hooks = Hooks()
|
hooks = Hooks()
|
||||||
CONFIGS = register_configs()
|
CONFIGS = register_configs()
|
||||||
proxy = POWERProxy(user=config('power-user'),
|
proxy = REMOTEProxy(user=config('remote-user'),
|
||||||
ssh_key=config('power-key'),
|
ssh_key=config('remote-key'),
|
||||||
hosts=config('power-hosts'),
|
hosts=config('remote-hosts'),
|
||||||
repository=config('power-repo'),
|
repository=config('remote-repo'),
|
||||||
password=config('power-password'))
|
password=config('remote-password'))
|
||||||
|
|
||||||
|
|
||||||
@hooks.hook()
|
@hooks.hook()
|
||||||
|
|
|
@ -69,7 +69,7 @@ CONFIG_FILES = [
|
||||||
'/etc/nova/nova.conf']
|
'/etc/nova/nova.conf']
|
||||||
|
|
||||||
|
|
||||||
class POWERProxy():
|
class REMOTEProxy():
|
||||||
|
|
||||||
def __init__(self, user, ssh_key, hosts,
|
def __init__(self, user, ssh_key, hosts,
|
||||||
repository, password):
|
repository, password):
|
||||||
|
@ -107,7 +107,7 @@ class POWERProxy():
|
||||||
with open(filename, 'w') as f:
|
with open(filename, 'w') as f:
|
||||||
f.write(_render_template('yum.template', context))
|
f.write(_render_template('yum.template', context))
|
||||||
execute(copy_file_as_root, filename,
|
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)
|
os.unlink(filename)
|
||||||
|
|
||||||
def _install_packages(self):
|
def _install_packages(self):
|
||||||
|
|
|
@ -27,7 +27,7 @@ from charmhelpers.contrib.openstack import templating, context
|
||||||
from nova_compute_context import (
|
from nova_compute_context import (
|
||||||
CloudComputeContext,
|
CloudComputeContext,
|
||||||
NovaComputeVirtContext,
|
NovaComputeVirtContext,
|
||||||
NeutronPowerComputeContext,
|
NeutronRemoteComputeContext,
|
||||||
)
|
)
|
||||||
|
|
||||||
TEMPLATES = 'templates/'
|
TEMPLATES = 'templates/'
|
||||||
|
@ -60,7 +60,7 @@ NEUTRON_CONF = '%s/neutron.conf' % NEUTRON_CONF_DIR
|
||||||
NEUTRON_RESOURCES = {
|
NEUTRON_RESOURCES = {
|
||||||
NEUTRON_CONF: {
|
NEUTRON_CONF: {
|
||||||
'services': ['neutron-openvswitch-agent'],
|
'services': ['neutron-openvswitch-agent'],
|
||||||
'contexts': [NeutronPowerComputeContext(),
|
'contexts': [NeutronRemoteComputeContext(),
|
||||||
context.AMQPContext(ssl_dir=NEUTRON_CONF_DIR),
|
context.AMQPContext(ssl_dir=NEUTRON_CONF_DIR),
|
||||||
context.SyslogContext(),
|
context.SyslogContext(),
|
||||||
context.LogLevelContext()],
|
context.LogLevelContext()],
|
||||||
|
@ -93,13 +93,13 @@ def resource_map():
|
||||||
|
|
||||||
resource_map[conf] = {}
|
resource_map[conf] = {}
|
||||||
resource_map[conf]['services'] = ['neutron-openvswitch-agent']
|
resource_map[conf]['services'] = ['neutron-openvswitch-agent']
|
||||||
resource_map[conf]['contexts'] = [NeutronPowerComputeContext()]
|
resource_map[conf]['contexts'] = [NeutronRemoteComputeContext()]
|
||||||
else:
|
else:
|
||||||
raise ValueError("Only Neutron ml2/ovs plugin "
|
raise ValueError("Only Neutron ml2/ovs plugin "
|
||||||
"is supported on this platform")
|
"is supported on this platform")
|
||||||
|
|
||||||
resource_map[NOVA_CONF]['contexts'].append(
|
resource_map[NOVA_CONF]['contexts'].append(
|
||||||
NeutronPowerComputeContext())
|
NeutronRemoteComputeContext())
|
||||||
|
|
||||||
for conf in resource_map:
|
for conf in resource_map:
|
||||||
mkdir(os.path.dirname(conf))
|
mkdir(os.path.dirname(conf))
|
||||||
|
|
Loading…
Reference in New Issue