Put your app online with anynines
Created by Floor Drees, @floordrees
Talk about the benefits of deploying to anynines vs utilising US data centers.
Get yourself some anynines
Create an anynines account.
Download and install the Command Line Interface to interact with anynines.
Now select the anynines api endpoint as target and authenticate using your user credentials:
Or if that doesn’t work for you, use:
… which will prompt you for your email address and password.
Wonder what that
cf stands for? It’s short for Cloud Foundry, a system anynines is using behind the scenes.
Push your app online
Let’s push this source code from your local machine to anynines:
This will fail miserably since the example application needs a MySQL database to start. So, lets create one! The command below will create a MySQl service with a free service plan. After the plan name you have to specify a name for the service instance. This name will be used for further commands to refer to this service instance:
$> cf create-service mysql Pluto-free [service-name-you-can-choose]
(Really, you can use any name. Make it count!)
Next, binding the MySQL service instance to the application, to grant the application access to the MySQL instance, type:
Finally we have to restart the application to make sure the service binding takes effect:
You will see this:
Push successful! App 'railsgirls' available at railsgirls.de.a9sapp.eu. Score!
We need to add our new code to version control. You can do this by running the following in the terminal:
This would be a great time to talk about version control systems and git, if you haven’t already.
You can check all available cf sub-commands by typing
In case your terminal does not have all the answers, the anynines team probably does. Just shoot them a mail at email@example.com.
If you’re ever stuck during a guide, please ask your coach for help and also consult this handy cheatsheet for Ruby, Rails, the console, the Text Editor etc.
- Guide 1: Start of the guide
- Guide 2: Get to know the tools
- Guide 3: Guide to install Rails
- Guide 4: Build Your First App
- Guide 5: Style your app using HTML and CSS
- Guide 6: Add a new page to your app
- Guide 7: Add a new homepage to your app
- Guide 8: Add picture uploads
- Guide 9: Push Your App to GitHub
- Guide 10: Put your app online with one of these services:
- Guide 11: Style the idea pages using HTML and CSS
- Guide 12: Add comments to your app
- Guide 13: Create picture thumbnails
- Guide 14: Test your app with RSpec
View all guides