Adds Rackspace Cloud Files support to quickstart and fabfile

This commit is contained in:
Nicholas Kuechler 2013-06-11 21:43:23 -05:00
commit 6b68d94079
3 changed files with 30 additions and 2 deletions

View file

@ -4,12 +4,17 @@ import os
# Local path configuration (can be absolute or relative to fabfile)
env.deploy_path = 'output'
DEPLOY_PATH = env.deploy_path
# Remote server configuration
production = '$ssh_user@$ssh_host:$ssh_port'
dest_path = '$ssh_target_dir'
DEPLOY_PATH = env.deploy_path
# Rackspace Cloud Files configuration settings
env.cloudfiles_username = '$cloudfiles_username'
env.cloudfiles_api_key = '$cloudfiles_api_key'
env.cloudfiles_container = '$cloudfiles_container'
def clean():
if os.path.isdir(DEPLOY_PATH):
@ -36,6 +41,14 @@ def reserve():
def preview():
local('pelican -s publishconf.py')
def cf_upload():
rebuild()
local('cd {deploy_path} && '
'swift -v -A https://auth.api.rackspacecloud.com/v1.0 '
'-U {cloudfiles_username} '
'-K {cloudfiles_api_key} '
'upload -c {cloudfiles_container} .'.format(**env))
@hosts(production)
def publish():
local('pelican -s publishconf.py')