Skip to content
This repository has been archived by the owner on May 2, 2018. It is now read-only.

Commit

Permalink
Merge branch 'patch-1' of https://github.com/robd/docs.brightbox.com
Browse files Browse the repository at this point in the history
  • Loading branch information
johnl committed Mar 22, 2015
2 parents 768727f + 0e125d9 commit 6dcc09e
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions content/docs/guides/ruby/fog.md
Expand Up @@ -38,7 +38,7 @@ new connection. Let's create a script to list images and call it

compute = Fog::Compute.new(
:provider => :brightbox,
:brightbox_client_id => "your_api_client_id"
:brightbox_client_id => "your_api_client_id",
:brightbox_secret => "your_secret"
)

Expand Down Expand Up @@ -80,23 +80,23 @@ create a server with that image:
If we don't specify any image or other details, Fog will create a `nano`
server type instance with Ubuntu Precise 12.04 server within zone `gb1-a`.

Now let's add a Cloud IP to this server. We start by allocating a
Cloud IP and then we map it to the ID of our newly created server:

cloud_ip = compute.cloud_ips.allocate
cloud_ip.map(server)

That's it. We can check the status of our server using:
We can check the status of our server using:

server.reload.state

Or we can wait until Fog determines that the server is ready:

server.wait_for { ready? }

That's it. As soon as the server is ready the ruby script will
As soon as the server is ready the ruby script will
continue and we can start using our server.

Now let's add a Cloud IP to this server. We start by allocating a
Cloud IP and then we map it to the ID of our newly created server:

cloud_ip = compute.cloud_ips.allocate
cloud_ip.map(server)

It's also worth noting that we can snapshot a server and spawn
multiple copies of it later. We could, for example, create a worker
image and then just create more of them as demand for our app
Expand Down

0 comments on commit 6dcc09e

Please sign in to comment.