https://github.com/redturtle/rt.commands
deployment commands for RT (mainly fabric)
https://github.com/redturtle/rt.commands
Last synced: 8 months ago
JSON representation
deployment commands for RT (mainly fabric)
- Host: GitHub
- URL: https://github.com/redturtle/rt.commands
- Owner: RedTurtle
- Created: 2013-04-29T14:27:46.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2015-12-02T14:49:57.000Z (over 10 years ago)
- Last Synced: 2024-04-09T15:16:15.352Z (about 2 years ago)
- Language: Python
- Size: 22.5 KB
- Stars: 1
- Watchers: 11
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.rst
- Changelog: CHANGELOG.rst
Awesome Lists containing this project
README
rt.commands
===========
deployment commands for RT (mainly fabric scripts)
Your fabfile
------------
To use rt.commands import it in your fabfile and
set some environment variables.
For example, you can start from this template::
# this is necessary to make the fabric commands available
from fabric.api import env
from rt.commands import *
from rt.commands.project import *
from rt.commands.buildout_components import *
# This is the main python version
env.python_version = '2.7'
# This is the buildout script to use
env.buildout_cfg = 'buildout.cfg'
# And some hosts
env.staging_user = 'plone'
env.staging_host = 'staging.example.com'
env.staging_dir = '/opt/www.demo.example.com'
env.production_user = 'plone'
env.production_host = 'example.com'
env.production_dir = '/opt/www.example.com'
rt.commands
-----------
production:
Pushes into the env.hosts the production server
staging:
Pushes into the env.hosts the production server
rt.commands.buildout_components
-------------------------------
sync_var:
Requires *staging* or *production* before.
Sync component's buildout var folder
It accepts the component parameter (default=plone)
You can pass .. to get the var at the buildout root
rt.commands.components.plone
----------------------------
Special functions to sync plone.
Given this fabfile::
# -*- coding: utf-8 -*-
from fabric.api import env
from rt.commands import production, staging
from rt.commands.components.plone import sync_blobstorage, sync_filestorage
env.staging_user = 'redturtle'
env.staging_host = 'somehost.redturtle.it'
env.staging_dir = '/opt/somedir'
You can invoke::
fab staging sync_blobstorage
fab staging sync_filestorage
In order to have those folders synced