Deploying Your First Node App

What you’ll need

Before you can deploy your app please check you have the following:

An account with your cloud provider of choice. Cloud 66 supports AWS, Google Cloud, Azure, Linode, DigitalOcean, Packet, Rackspace and Cloud A.

Lets get started — Log into Cloud 66 website, if you're a new user you'll see four panels on your Apps Dashboard. In the Rails panel click the Start Trial.

Accessing your Git Repo

Cloud 66 supports both public and private Git repositories. If you're using a private Git repository you'll need to Add and approve the Cloud 66 public SSH key with your Git provider.

Public Repository

If your code is in a public repository, you don't need to do anything.

Private Repository

To grant access to a private Github repository, you need to add your public SSH key you see on the screen to your Github account.

Adding your Public Key to GitHub

Copy the public SSH Key (starts with ssh-rsa and ends with the email address you used to sign up) and then Click Go to GitHub. The GitHub SSH keys page will open in a new browser tab. Click the New SSH key button and paste your public key.

Defining Your Stack

Now you need to tell us a bit of info about your app, then we can deploy, Please fill in the following fields:

Fill in the information about your app: Git repo, name and environment

Now click the Analyze button. Hang tight, the results will be displayed in a few seconds...

Configuring Your Stack

Once the analysis is complete you'll see a yellow Information Box that you can use to verify the analysis is correct.

Rails Stack - analysis information

If there are any problems you can make changes and click Reanalyze my code. If necessary, you can also Add Environment Variables.

Advanced Configurations

You can configure many aspects of your Stack using the Toolbelt or a manifest file.

Choosing a Deployment Target

If you're deploying for the first time you need to add your Cloud provider credentials:

Amazon Web Services

  • Give this cloud key a name — This is to give you the option of deploying to multiple AWS accounts. If you are deploying to a single account only, you can leave it as default.

  • AWS Access key ID — You get this info from your AWS account Dashboard.

  • AWS Secret Access Key — You get this info from your AWS account dashboard, when you create your AWS account.

Once you've added your AWS Cloud credentials you need to choose the following:

  • Server Region — For example US East (Northern Virginia), Europe (London)

  • Server Size — For example Compute optimized (C4.large)

  • AWS platform — EC2 Classic or EC2-VPC (Learn more about AWS Platforms)

Google Compute Engine

  • GCE Client Email — You get this info from your GCE account Dashboard. Under Service AccountsAPI'sCredentials

  • GCE Project Id — You get this info from your GCE Dashboard. It's located at the top of the Overview page.

  • GCE Key — This is a JSON file you need to upload, you get this from your GCE Dashboard.

Once you've added your GCE Cloud credentials you need to choose the following:

  • Server Region — For example US East (Northern Virginia), Europe (London)

  • Server Size — For example Compute optimized (C4.large)

Microsoft Azure

  • Azure Subscription ID — You get this info from your Azure cloud Dashboard.

  • Client ID — You get this info from your Azure Dashboard.

  • Client Secret — You get this info from your Azure Dashboard.

  • Tenant ID — You get this info from your Azure Dashboard.

DigitalOcean

  • Give this cloud key a name — this is to give you the option of deploying to multiple accounts with the same cloud provider. If you only have 1 account you can leave it as default.

  • Click Add Cloud — this will redirect you to the DigitalOcean dashboard. You'll need to login to DigitalOcean to finish adding the key.

Once the DigitalOcean key is validated you'll need to choose the following:

  • Server Region — For example Amsterdam 2, Netherlands

  • Server Size — For example 2GB - 2 CPU (Standard)

Linode

  • Give this cloud key a name — this is to give you the option of deploying to multiple Linode different Linode accounts. If you only have one account you can leave it as default.

  • Linode API Key — You get this information from your Linode Cloud Dashboard. my profileAPI Keys tab.

Once the Linode key is validated you'll need to choose your deployment options:

  • Server Region — For example Dallas, TX, USA

  • Server Size — For example Linode 2048

Packet

  • Packet API Key — You get this info from your Packet Cloud Dashboard.

Rackspace

  • Rackspace Username — You get this info from your Rackspace Cloud Dashboard.

  • Rackspace API Key — You get this info from your Rackspace Cloud Dashboard.

  • Rackspace user base — Select either UK or US.

Cloud A

  • CloudA Username — You get this info from your CloudA Dashboard.

  • CloudA API Key — You get this info from your CloudA Dashboard.

Your Own Servers

  • Registered Servers — First you need to Register your server as a deployment target with Cloud 66. Click on the Add Registered Servers link. You can also navigate to the Registered Servers page from the right hand menu of the Cloud 66 Stacks Dashboard.

  • Copy & run the command — Run the provided command in the terminal on your server. Once this has successfully completed you can then approve the server and it will become available as a Cloud 66 deployment target.

Finalizing Deployment Details

Now you can decide how you want to configure your Frontend (Web) and Database Servers. They can be shared or deployed to separate servers.

Deploying to Production

For production environments we always recommend separate servers. If you need fine grained control for more advanced deployments you can use a manifest file.

Choose where to deploy your database

That's it! Now just click Deploy Stack.