Documentation


Git deployment

Add your app to Git

Git is a perfect option to deploy apps to EvenNode. To start with git deployment, initialize git repository on your machine with the following commands:

$ cd path-to-your-app
$ git init
$ git add .
$ git commit -m "first commit"

How to deploy via Git?

You will need a private and a public key to deploy via git. If you don't have a public/private key, following these guides to create a new key pair:

Add your public key to your EvenNode's profile to gain access to EvenNode's git repository.

Now we need to tell git how to deploy your app to EvenNode.
Open the web console and locate your app's information tab. It shows you a link to your git repository – for example git@git.evennode.com:your_app_here
Copy the link and configure your local git repository:

$ cd path-to-your-app
$ git remote add evennode git@git.evennode.com:your_app_here

Now you're ready to push your app to EvenNode via git push command:

$ git push evennode master

After the push is finished, your app is automatically deployed to our servers and restarted.

What happens during Git deploy?

Every application running on EvenNode has its own git repository. You can use it to push your app into repository through git and automatically deploy the code. Here's what happens with each push to EvenNode:

  • Your code is pushed into EvenNode's git repository
  • The code is checked out to our servers
  • We check the cache to see if node modules have already been installed in the past
  • npm install runs on your code
  • Your app is restarted

How do I add my public key?

In order to use EvenNode's git, you will need to add your public key.
(if you don't already have a public/private key, read Windows or Unix sections below for how to create new ssh keys)

Open your application through the web console and locate git section in the Information tab.

Click the "Manage public keys" link, paste your public key into the "Public key for Git" text box and save. Make sure that you add exactly one public key per line only. Each public key usually starts with ssh-rsa ...

Wait until the change propagates to our servers (usually within 1 minute).

How do I create public/private key on Windows?

The recommended way is to use PuTTYgen.

  1. Download and run PuTTYgen
  2. Click Generate button
  3. Move your mouse over PuTTYgen until the key is generated
  4. Click menu Conversions -> Export OpenSSH key and save your private key to %USERPROFILE%\.ssh\id_rsa
    The path depends on your system, but it is usually in C:\Users\your_username\.ssh\id_rsa
  5. Copy your public key directly from PuTTYgen interface from the top section which is labeled Public key for pasting and add the key to EvenNode (see How do I add my public key?)

How do I create public/private key on Linux/OS X?

  1. Run ssh-keygen -t rsa -C "your_email@example.com"
  2. Save your key to /home/you/.ssh/id_rsa
  3. Run cat ~/.ssh/id_rsa.pub
  4. Copy the output (your public key) and add it to EvenNode (see How do I add my public key?)