Remote configurationΒΆ


Improving remote use is significant goal for Tarbell 1.2.

To run Tarbell on a remote server, you’ll want to generate a credentials file locally and transfer your Tarbell configuration directory to the server.

Assuming you have Tarbell properly configured, create a credentials file:

tarbell credentials > ~/.tarbell/credentials.json

Now copy the ~/.tarbell directory to your server. You could use scp, rsync. A preferred way of doing it is to use a private git repository:

ssh myuser@myserver.tld
git clone .tarbell

Once the credentials file is in place on the server, you could create a for deployment from your server.

from fabric.api import *

env.hosts = ['servername']
env.user = 'myuser' = '/home/myuser/virtualenvs/project'

def publish(target='staging'):
    with cd(
        with prefix('workon tarbell'):
            run('tarbell publish {0}'.format(target))

Now you can run fab publish:production and deploy from your server.

Or perhaps a simple cron job, with a line like this in the crontab:

*/15 * * * * myuser /home/myuser/projects/myproject/

And a little bash script like this.


workon myproject
cd /home/myuser/projects/myproject
tarbell publish production