Installing the Brightbox Gem
The Brightbox gem uses Capistrano “recipes” to manage the deployment of your Rails application onto your Brightbox.
Capistrano runs from a management machine, usually your local desktop computer, and runs commands remotely on your Brightbox. You can read more about Capistrano on the Capistrano website
Your management machine is often the machine where you have developed the application. However it doesn't need to be. All you need is a machine with RubyGems installed and which can access your Brightbox via SSH.
We're assuming you already have a machine with Ruby and RubyGems to act as your management machine.
Install the Brightbox deployment gem
Install the Brightbox deployment gem on your management machine, just like any other gem:
gem install brightbox
Brightboxify your Rails application
brightbox-capify command on your Rails app, to set up the recipes. Give it the name of your Brightbox, and the name of your app. You can find the name of your Brightbox from the control panel. You can chose any name for your app, just make sure each app on your Brightbox has a different name.
brightbox-capify -i example-001.vm.brightbox.net -a passenger -n myapp /Users/jeremy/Sites/myapp
This will create the file
config/deploy.rb containing the details needed to deploy your application with Capistrano. You can edit this file and change the settings as required, but the defaults should be fine for most basic apps (you can change most settings, such as the domain name, at any time).
If you'd prefer to use the old style Mongrel based deployment rather than Passenger, specify
-a mongrel instead.
Update your server gem
brightbox-server-tools gem needs to be installed on the server. Brightboxes come pre-installed with this gem but you can quickly make sure you have latest version with the following command:
cap COMMAND="gem install brightbox-server-tools" SUDO=1 invoke