コード例 #1
0
def initial_deploy():
    """ Performs a complete deploy of the project. """

    # put ssh key
    set_deploy_key()

    # github host handshake
    run('ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts')
    # bitbucket host handshake
    run('ssh-keyscan -t rsa bitbucket.org >> ~/.ssh/known_hosts')

    # install necessary dependencies to handle the project
    install_project_handling_dependencies()

    # clone repository
    git_clone(env.server_git_url, env.server_root_dir)

    # checkout branch
    with cd(env.server_root_dir):
        git_checkout(env.branch)

    # dependencies installation (quickstart)
    with cd(env.server_root_dir):
        run('./quickstart.sh')

    # gunicorn installation and configuration
    gunicorn.install()
    gunicorn.add_gunicorn_service()
    gunicorn.start()

    # nginx installation and configuration
    nginx.install()
    nginx.add_django_site()
    nginx.start()
コード例 #2
0
ファイル: __init__.py プロジェクト: guilouro/fabfile
def bootstrap():
    """
    :: Initialize remote host environment.
    """
    require('project', provided_by=('staging', 'production'))

    # Create virtualenv to wrap the environment
    setup.virtualenv()
    # Send the project to the remote host
    deploy.send()
    # Install dependencies on the virtualenv
    setup.requirements()
    # Execute collectstatic
    deploy.collectstatic()
    # Create the database
    db.syncdb()

    if env.server == 'apache':
        apache.upload_apache_conf()
    elif env.server == 'gunicorn':
        # Start gunicorn
        gunicorn.start()
コード例 #3
0
ファイル: project.py プロジェクト: Joacoco/nosotrosusamos
def initial_deploy():
    """ Performs a complete deploy of the project. """

    # put ssh key
    set_deploy_key()

    # github host handshake
    run('ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts')

    # install necessary dependencies to handle the project
    install_project_handling_dependencies()

    # clone repository
    git_clone(env.server_git_url, env.server_root_dir)

    # checkout branch
    with cd(env.server_root_dir):
        git_checkout(env.branch)

    # mysql installation
    install_mysql()

    # dependencies installation (quickstart)
    with cd(env.server_root_dir):
        run('./quickstart.sh')

    # bower installation
    bower.install()

    # gunicorn installation and configuration
    gunicorn.install()
    gunicorn.add_gunicorn_service()
    gunicorn.start()

    # nginx installation and configuration
    nginx.install()
    nginx.add_django_site()
    nginx.start()
コード例 #4
0
ファイル: project.py プロジェクト: magnet-cl/magnet-random
def initial_deploy():
    """ Performs a complete deploy of the project. """

    # put ssh key
    ssh_key = '%s/fabfile/templates/ssh_key'
    ssh_key %= env.local_root_dir
    run('mkdir -p -m 0700 .ssh')
    put(ssh_key, '.ssh/id_rsa', mode=0600)

    # github host handshake
    run('ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts')

    # clone repository
    deb_handler.install('git')
    git_clone(env.server_git_url, env.server_root_dir)

    # checkout branch
    with cd(env.server_root_dir):
        git_checkout(env.branch)

    # mysql installation
    install_mysql()

    # dependencies installation (quickstart)
    with cd(env.server_root_dir):
        run('./quickstart.sh')

    # gunicorn installation and configuration
    gunicorn.install()
    gunicorn.add_gunicorn_service()
    gunicorn.start()

    # nginx installation and configuration
    nginx.install()
    nginx.add_django_site()
    nginx.start()
コード例 #5
0
def start():
    """ Starts gunicorn and nginx. """
    gunicorn.start()
    nginx.start()
コード例 #6
0
def start():
    """ Starts gunicorn and nginx. """
    gunicorn.start()
    nginx.start()