-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use multithreading to create machines #166
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Deepshikha Khandelwal <[email protected]>
Why implement our own code and not:
Ansible could easily run multiple VMs and not wait for the result, no? (and then you wait for it as an asyc task) |
Function to check if there's successful ssh connection can be established | ||
Function to create a node on cloud | ||
''' | ||
name = 'distributed-testing.'+str(uuid.uuid4()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you use a hyphen here. This has always annoyed me :)
if not isinstance(pubkey, str): | ||
pubkey = str(pubkey) | ||
|
||
step = SSHKeyDeployment(pubkey) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You may need to have that str/unicode hack in here.
name = 'distributed-testing.'+str(uuid.uuid4()) | ||
node = conn.deploy_node( | ||
name=name, image=image, size=flavor, deploy=step) | ||
time.sleep(5) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you still need this sleep? I believe a Deployment waits until the node is ready to copy the key over anyway.
Signed-off-by: Deepshikha Khandelwal <[email protected]>
Signed-off-by: Deepshikha Khandelwal [email protected]