NovaCompute

class playback.nova_compute.NovaCompute(user='ubuntu', hosts=None, key_filename=None, password=None, parallel=True, *args, **kwargs)

Bases: playback.common.Common

Deploy Nova compute

Parameters:
  • user(str) – the user for remote server to login
  • hosts(list) – this is a second param
  • key_filename(str) – the ssh private key to used, default None
  • password(str) – the password for remote server
  • parallel(bool) – paralleler execute on remote server, default True
Returns:

None

Examples:
# create nova compute instances
nova_compute1 = NovaCompute(user='ubuntu', hosts=['compute1'])
nova_compute2 = NovaCompute(user='ubuntu', hosts=['compute2'])
nova_compute3 = NovaCompute(user='ubuntu', hosts=['compute3'])
nova_compute4 = NovaCompute(user='ubuntu', hosts=['compute4'])

# install nova compute
nova_compute1.install(
    my_ip='192.168.1.11',
    rabbit_hosts='controller1,controller2',
    rabbit_user='openstack',
    rabbit_pass='changeme',
    auth_uri='http://192.168.1.1:5000',
    auth_url='http://192.168.1.1:35357',
    nova_pass='changeme',
    novncproxy_base_url='http://192.168.1.1:6080/vnc_auto.html',
    glance_api_servers='http://192.168.1.1:9292',
    neutron_endpoint='http://192.168.1.1:9696',
    neutron_pass='changeme',
    rbd_secret_uuid='changeme-0000-0000-0000-000000000000',
    memcached_servers='controller1:11211,controller2:11211'
)
nova_compute2.install(
    my_ip='192.168.1.12',
    rabbit_hosts='controller1,controller2',
    rabbit_user='openstack',
    rabbit_pass='changeme',
    auth_uri='http://192.168.1.1:5000',
    auth_url='http://192.168.1.1:35357',
    nova_pass='changeme',
    novncproxy_base_url='http://192.168.1.1:6080/vnc_auto.html',
    glance_api_servers='http://192.168.1.1:9292',
    neutron_endpoint='http://192.168.1.1:9696',
    neutron_pass='changeme',
    rbd_secret_uuid='changeme-0000-0000-0000-000000000000',
    memcached_servers='controller1:11211,controller2:11211'
)
nova_compute3.install(
    my_ip='192.168.1.13',
    rabbit_hosts='controller1,controller2',
    rabbit_user='openstack',
    rabbit_pass='changeme',
    auth_uri='http://192.168.1.1:5000',
    auth_url='http://192.168.1.1:35357',
    nova_pass='changeme',
    novncproxy_base_url='http://192.168.1.1:6080/vnc_auto.html',
    glance_api_servers='http://192.168.1.1:9292',
    neutron_endpoint='http://192.168.1.1:9696',
    neutron_pass='changeme',
    rbd_secret_uuid='changeme-0000-0000-0000-000000000000',
    memcached_servers='controller1:11211,controller2:11211'
)
nova_compute4.install(
    my_ip='192.168.1.14',
    rabbit_hosts='controller1,controller2',
    rabbit_user='openstack',
    rabbit_pass='changeme',
    auth_uri='http://192.168.1.1:5000',
    auth_url='http://192.168.1.1:35357',
    nova_pass='changeme',
    novncproxy_base_url='http://192.168.1.1:6080/vnc_auto.html',
    glance_api_servers='http://192.168.1.1:9292',
    neutron_endpoint='http://192.168.1.1:9696',
    neutron_pass='changeme',
    rbd_secret_uuid='changeme-0000-0000-0000-000000000000',
    memcached_servers='controller1:11211,controller2:11211'
)
install(*args, **kwargs)

Install nova compute

Parameters:
  • my_ip – (String) IP address of this host
  • rabbit_hosts – RabbitMQ HA cluster host:port pairs. (list value) e.g. CONTROLLER1,CONTROLLER2
  • rabbit_user – The RabbitMQ userid. (string value) e.g. openstack
  • rabbit_pass – The RabbitMQ password. (string value)
  • auth_uri – (String) Complete public Identity API endpoint. e.g. http://CONTROLLER_VIP:5000
  • auth_url – (String) Authentication endpoint e.g. http://CONTROLLER_VIP:35357
  • nova_pass – passowrd of nova user
  • novncproxy_base_url – (String) Public address of noVNC VNC console proxy. The VNC proxy is an OpenStack component that enables compute service users to access their instances through VNC clients. noVNC provides VNC support through a websocket-based client. This option sets the public base URL to which client systems will connect. noVNC clients can use this address to connect to the noVNC instance and, by extension, the VNC sessions. Possible values: * A URL Services which consume this: * nova-compute Related options: * novncproxy_host * novncproxy_port e.g. http://CONTROLLER_VIP:6080/vnc_auto.html
  • glance_api_servers – (List) A list of the glance api servers endpoints available to nova. These should be fully qualified urls of the form scheme://hostname:port[/path] e.g. http://CONTROLLER_VIP:9292
  • neutron_endpoint – neutron endpoint e.g. http://CONTROLLER_VIP:9696
  • neutron_pass – the password of neutron user
  • rbd_secret_uuid – ceph rbd secret for nova libvirt , generated by uuidgen
  • memcached_servers – A list of memcached server(s) to use for caching. (list value) e.g. CONTROLLER1:11211,CONTROLLER2:11211
Returns:

None