Put your app online with anynines
Created by Floor Drees, @floordrees
COACH: Talk about the benefits of deploying to anynines vs utilising US data centers.
Get yourself some anynines
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:
COACH: 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 firstname.lastname@example.org.