The first wait_for runs into a timeout (the usual SDK timeout is 60 seconds, not the specified 1000 seconds => over 16 minutes).
So here my questions:
- Do you have any experience in this topic? Is this creation-time "normal"?
- Is there an error in my code?
I'd be glad for any hint.
I cannot speak toward whether the volume creation time is normal as I used much smaller volume sizes while building/testing the profitbricks-sdk-ruby library. Perhaps someone at ProfitBricks can chime in on that topic?
I did reply to the GitHub issue you opened. To summarize the ticket response, I plan to research and test the REST API behavior that should allow a server to be created with associated resources built and attached through a single API request. Once confirmed, I'll schedule some time to add the code and then we can begin testing parallel calls.
thank you very much for your replies. I'm looking forward for the changes and will let you know if there is any new information from my side.
I have updated your GitHub ticket. I have released a new gem that allows composite server creation where a server and associated volumes/nics/firewalls can all be provisioned with a single request. The ticket and repo docs have been updated with examples, but I will include an example here:
Note that I am adjusting the wait_for() timeout to 20 minutes. The timeout can also be increased globally. Here are the results I encountered:
$ ruby provision.rb
Server server0 provisioned in 84.808051 seconds.
Server server3 provisioned in 163.58047 seconds.
Server server4 provisioned in 242.067224 seconds.
Server server2 provisioned in 322.901173 seconds.
Server server1 provisioned in 404.822336 seconds.
While the composite server create requests are initiated immediately, it appears the backend is provisioning them one after another. Each build seems to take ~82 seconds. I hope this helps you or others who may be automating large deployments.
The previous comment made reference to location: 'us/lasdev' which is no longer available. Please substitute 'us/las' or another valid location.