Effortless Python Hosting from Idea to Launch

An Introduction to Gondor

Sites vs Instances

A site is a particular website you want to deploy but Gondor lets you have one or more instances of the project. You might have a production instance, a couple of staging instances and many dev instances. Or, initially, you might just start off with a single dev instance. It's up to you. But for a given project, they are all instances of a single site.

Global setup

To let Gondor know who you are, you'll need to set up a .gondor file in your home directory with the structure:

auth:
    username: <username>
    key: <key>

where the username is used for this website and your key can be found in your account. Run chmod 600 ~/.gondor to ensure no one else can see your API key.

Installing Gondor client

You must have the Gondor client installed to perform deployments and other actions on Gondor. You can get going by using pip:

pip install gondor

Ultimately, you will want to pin the version of gondor in the requirements file of your project. The client requires Python 2.6+.

Site setup

A site is created via this website. Just go to the Sites tab and click Create a site. You will be prompted for the name of the site.

You will then be shown instructions for how to set up your global settings (described above) and how to initialize your project for the newly created site.

The key command is:

gondor init <site-key>

which must be run inside your repository (i.e. the same directory containing the VCS files like .git or .hg). This will create a gondor.yml file. This file will contain the site-specific information needed to deploy. You will need to edit this file for configuration specific to your project.

Instances

Multiple instances of a site can be deployed. While you'll typically have only one production instance of site, you may have one or two staging instances, and many dev instances. Each instance is able to have a label that helps identify it further.

Your production instance may have the label primary but your dev instances might be named after a branch or feature that you're wanting to deploy.

Instances are created with:

gondor create <instance-label>

which will create a dev instance or:

gondor create --kind=<kind> <instance-label>

where <kind> is production or staging.

Deployment

Deployment is as simple as:

gondor deploy <instance-label> <git-ref|mercurial-revision>

So if you wanted to deploy master to the primary instance you'd do:

gondor deploy primary master

or if you wanted to deploy default to the primary instance you'd do:

gondor deploy primary default

You will want to consult the documentation specific to the framework you are looking to deploy for more information about how to successfully deploy. However, we do encourage trial-and-error testing.


If you need any help please email us at support@gondor.io or find us on freenode in the #gondor channel.