PrepareHost¶
-
class
playback.prepare_host.
PrepareHost
(user='ubuntu', hosts=None, key_filename=None, password=None, parallel=True, *args, **kwargs)¶ Bases:
playback.common.Common
Prepare the OpenStack environment
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 an instance of PrepareHost p = PrepareHost( user='ubuntu', hosts=['haproxy1','haproxy2','controller1','controller2','compute1','compute2','compute3','compute4'] ) # setup the external interface p.setup_external_interface(public_interface='eth1') # setup ntp p.setup_ntp() # setup repo p.setup_openstack_repository()
-
set_openstack_repository
()¶ Install OpenStack repository only for trusty.
This method install cloud-archive:mitaka on trusty, when xenial using the default xenial repo.
Returns: None
-
setup_external_interface
(*args, **kwargs)¶ host networking
Parameters: public_interface(str) – the public interface Returns: None
-
setup_ntp
()¶ Setup ntp service
Returns: None