Nova¶
-
class
playback.nova.
Nova
(user='ubuntu', hosts=None, key_filename=None, password=None, parallel=True, *args, **kwargs)¶ Bases:
playback.common.Common
Deploy Nova
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 two instances nova1 = Nova( user='ubuntu', hosts=['controller1'] ) nova2 = Nova( user='ubuntu', hosts=['controller2'] ) # create nova database nova1.create_nova_db( root_db_pass='changeme', nova_db_pass='changeme' ) # create service credentials nova1.create_service_credentials( os_password='changeme', os_auth_url='http://192.168.1.1:35357/v3', nova_pass='changeme' public_endpoint='http://192.168.1.1:8774/v2.1/%\(tenant_id\)s' internal_endpoint='http://192.168.1.1:8774/v2.1/%\(tenant_id\)s' admin_endpoint='http://192.168.1.1:8774/v2.1/%\(tenant_id\)s' ) # install nova nova1.install_nova( connection='mysql+pymysql://nova:changeme@192.168.1.1/nova', api_connection='mysql+pymysql://nova:changeme@192.168.1.1/nova_api', auth_uri='http://192.168.1.1:5000', auth_url='http://192.168.1.1:35357', nova_pass='changeme', my_ip='192.168.1.2', memcached_servers='controller1:11211,controller2:11211', rabbit_hosts='controller1,controller2', rabbit_user='openstack', rabbit_pass='changeme', glance_api_servers='http://192.168.1.1:9292', neutron_endpoint='http://192.168.1.1:9696', neutron_pass='changeme', metadata_proxy_shared_secret='changeme', populate=True ) nova2.install_nova( connection='mysql+pymysql://nova:changeme@192.168.1.1/nova', api_connection='mysql+pymysql://nova:changeme@192.168.1.1/nova_api', auth_uri='http://192.168.1.1:5000', auth_url='http://192.168.1.1:35357', nova_pass='changeme', my_ip='192.168.1.3', memcached_servers='controller1:11211,controller2:11211', rabbit_hosts='controller1,controller2', rabbit_user='openstack', rabbit_pass='changeme', glance_api_servers='http://192.168.1.1:9292', neutron_endpoint='http://192.168.1.1:9696', neutron_pass='changeme', metadata_proxy_shared_secret='changeme' )
-
create_nova_db
(*args, **kwargs)¶ Create the nova and nova_api database and the user named nova
Parameters: - root_db_pass – the password of mysql database root user
- nova_db_pass – the password of nova database user
Returns: None
-
create_service_credentials
(*args, **kwargs)¶ Create the nova service credentials
Parameters: - os_password – the password of openstack admin user
- os_auth_url – keystone endpoint url e.g. http://CONTROLLER_VIP:35357/v3
- nova_pass – passowrd of nova user
- public_endpoint – public endpoint for nova service e.g. http://CONTROLLER_VIP:8774/v2.1/%\(tenant_id\)s
- internal_endpoint – internal endpoint for nova service e.g. http://CONTROLLER_VIP:8774/v2.1/%\(tenant_id\)s
- admin_endpoint – admin endpoint for nova service e.g. http://CONTROLLER_VIP:8774/v2.1/%\(tenant_id\)s
Returns: None
-
install_nova
(*args, **kwargs)¶ Install nova
Parameters: - connection – (String) The SQLAlchemy connection string to use to connect to the Nova API database. e.g. mysql+pymysql://nova:NOVA_PASS@CONTROLLER_VIP/nova
- api_connection – mysql nova_api database SQLAlchemy connection string e.g. mysql+pymysql://nova:NOVA_PASS@CONTROLLER_VIP/nova_api
- 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
- my_ip – (String) IP address of this host
- memcached_servers – A list of memcached server(s) to use for caching. (list value) e.g. CONTROLLER1:11211,CONTROLLER2:11211
- 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)
- 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
- metadata_proxy_shared_secret – (String) Shared secret to validate proxies Neutron metadata requests
- populate – populate the nova database
Returns: None