Deploying Rails on Linode with Cloud 66

Last week Linode celebrated their 18th Birthday. Happy Birthday Linode! As a long standing Linode partner we thought it would be a good idea to showcase how easy it is to deploy and manage Rails application on Linode with Cloud 66.

Why do developers deploy on Linode?

Linode supports 11 regions, offering their services to developers who build and scale applications for startups and small, medium businesses all over the world.  

Linode is developer-centric and these are just a few of the reasons why developers choose Linode:

  • Because of Linux! Let's start from the beginning, what does Linode stand for? The name was created from the following words Linux and node. It offers an end-to-end workflow for Linux based application, and since the majority of developers choose Linux for their development and deployment environment, Linode is a winner.
  • Linode offers competitive pricing. After all, they introduced the flat pricing model before anyone else in the cloud computing world.
  • Linode believe in Open Cloud, where developers are free to move their application from one cloud to another without vendor lock-in. They have even created a service comparison with other cloud providers.

This is the perfect solution for web development agencies, where their clients dictate the cloud provider used. Combined with Cloud 66, the switch would be possible without changing any tools or processes - just the deployment destination.

  • Linode's mission is to make developers lives easier by creating new tools and features. They provide an extensive API that allows you to manage servers via custom code, e.g. set up Linode servers, open support tickets etc.
  • Linode offers free support (by humans) via a number of different channels.
  • Linode is an independent cloud that only focuses on the cloud computing. For nearly two decades they have built their business based on customer needs rather than investor demands.

Why do developers deploy on Linode with Cloud 66?

Linode and Cloud 66 share the same philosophy:  'by developers for developers' 💚. While Linode offers servers, Cloud 66 simplifies DevOps by offering Heroku-like functionality. Developers can easily deploy, manage and scale any application on Linode, or any other cloud, from one fully integrated toolset that will keep your costs manageable and stable.

Cloud 66 support any application through the following products:

  • Cloud 66 for Rails -  lets you deploy your Ruby on Rails (or any other Rack-based) applications to any cloud. Cloud 66 for Rails offers ease of management and reduces the load on your DevOps resources.
  • Cloud 66 Maestro - Kubernetes, made simple. Maestro builds a Kubernetes cluster on your own servers. It builds your code into Docker images. It takes care of databases, firewalls, and networking for your applications. It's a great way to deploy any application (any language, any framework) that has a Dockerfile.

There is no vendor lock-in, and we offer a 4-week free trial, with no credit card required, so you can fully experience how Cloud 66 fits your infrastructure. After that, we charge $14.99 per server per month, with a  pay-as-you-go model.

To see how to deploy Ruby on Rails application on Linode with Cloud 66 follow the guide below:

Before you begin deployment:

Before you begin, please make sure that you have access to the following:

Git Repo + Linode and Cloud 66 account

Once you have access to all the above accounts, we need to link them together via the Cloud 66 dashboard. This process will not take long. Follow the steps below:

Step 1: Connect Git with Cloud 66 account.

Go to Cloud 66 dashboard and choose Cloud 66 for Rails. The first thing we will ask you to do is to connect your application code.

If you have a  GitHub account, you can connect your repo by clicking the Link with my GitHub account button (in the top section of the dashboard with the yellow background). You will need to log into GitHub to authorize Cloud 66's access to your code.

Note: For private Git repos, you'll need to add and approve the Cloud 66 public SSH key with your Git provider. Cloud 66 allows you to use any Git provider, such as GitHub, BitBucket, Assembla or you can use your own privately hosted repo.

Next, fill in the info about your application. Paste in the Git URL, specify the branch, the environment and give your app a name. For this example, we're using our sample Rails app: https://github.com/cloud66-samples/rails-mysql.

Next, click Analyse. Cloud 66 will now pull your code from your repository and return a suggested configuration for you, based on that code.

This analysis tells us that our sample app uses Ruby v.2.7.2, Rails v.6.0.3.2, Phusion Passenger as a webserver and MySQL for a database. We also know that we are deploying to a production environment.

If you need to update your code you can always make the changes in your repo and click Reanalyze my Code and we will update your app. You can add an environment variable with the click of the button.

Step 2: Connect Linode account with Cloud 66

Next, we add Linode as a cloud provider. Note, you'll need to create an API key on Linode first (visit Linode help page to learn more about Linode API Keys).

Click on Add Deployment Target button. From the dropdown menu select "Linode" and add your Linode Key to grant access.

Once Linode is added, select the server region and size that best suit your app. Note: For the purpose of this demo we have selected that MySQL will share the server with Rails. We would not recommend this option for applications in a production environment.

Deploying Rails to Linode

Your Git code, Linode and Cloud 66 accounts are connected. We are ready to deploy!

Click on the Deploy Application button.

The time taken to deploy depends on your application's size and complexity. You don't need to wait until it's completed - we will email you once the deployment is finished. Alternatively, you can have a look at our LiveLogs to monitor the deployment process in real-time.

Manage Rails on Linode

Congratulations! Your Rails application is now deployed on Linode. Have a look at Cloud 66 dashboard and take the advantage of all the other features to enhance your application. All features are included in your account. The menu bar on the right-hand side gives you access to many of our most useful features.

Right-hand side menu - tab by tab:

Overview allows you to monitor your application components in the dashboard. You can click on each server, e.g. 'Rails Servers' for more detailed info.

Deployments shows you a timeline of your deployments with information on who deployed what, and when. Additionally, you can track when specific code commits were deployed.

Configuration allows you to edit environment variables, configs, and configuration files. E.g. your Manifest, MySQL, Nginx.

Network Settings allows you to manage your firewall and traffic rules as well as common redirects.

ActiveProtect protects your application and servers against denial of service and brute-force attacks. You can see a log of it's interventions and alerts here.

LiveLogs collects and displays real-time logs that can help you find and eliminate bugs in your Rails app.

Setting & Information allows you to edit your application settings e.g. change your deployment strategy. You can also set up notifications here.

Clone your application - if you need another application with the same settings you can clone your application with a click of the button instead of building your app from the scratch. You can change the deployment destination to a different region as needed.

See how others deploy applications on Linode with Cloud 66

  • PeopleForce is a smart HR management platform that helps small and medium-sized businesses to build a high-performance working culture. PeopleForce chose to deploy their infrastructure on Linode with Cloud 66 for Rails, after reviewing Heroku, Elastic Beanstalk and Doku. Read the case study.
  • Helium Development, a digital creative agency, that specialises in Shopify website design and web app development deploys to Linode and Google Cloud with Cloud 66. Read the case study.

More Articles:

Try Cloud 66 for Free, No credit card required