Esempio n. 1
0
def shiva_the_destroyer():
    """
    Deletes the app from s3
    """
    require('settings', provided_by=[production, staging])

    utils.confirm(
        colored("You are about to destroy everything deployed to %s for this project.\nDo you know what you're doing?')" % app_config.DEPLOYMENT_TARGET, "red")
    )

    with settings(warn_only=True):
        sync = 'aws s3 rm s3://%s/%s/ --recursive --region "%s"' % (
            app_config.S3_BUCKET['bucket_name'],
            app_config.PROJECT_SLUG,
            app_config.S3_BUCKET['region']
        ) 

        local(sync)

        if app_config.DEPLOY_TO_SERVERS:
            servers.delete_project()

            if app_config.DEPLOY_CRONTAB:
                servers.uninstall_crontab()

            if app_config.DEPLOY_SERVICES:
                servers.nuke_confs()
Esempio n. 2
0
def shiva_the_destroyer():
    """
    Deletes the app from s3
    """
    require('settings', provided_by=[production, staging])

    utils.confirm(
        colored(
            "You are about to destroy everything deployed to %s for this project.\nDo you know what you're doing?')"
            % app_config.DEPLOYMENT_TARGET, "red"))

    with settings(warn_only=True):
        sync = 'aws s3 rm %s --recursive --region "us-east-1"'

        for bucket in app_config.S3_BUCKETS:
            local(sync % ('s3://%s/%s/' % (bucket, app_config.PROJECT_SLUG)))

        if app_config.DEPLOY_TO_SERVERS:
            servers.delete_project()

            if app_config.DEPLOY_CRONTAB:
                servers.uninstall_crontab()

            if app_config.DEPLOY_SERVICES:
                servers.nuke_confs()
Esempio n. 3
0
def shiva_the_destroyer():
    """
    Deletes the app from s3
    """
    require("settings", provided_by=[production, staging])

    utils.confirm(
        colored(
            "You are about to destroy everything deployed to %s for this project.\nDo you know what you're doing?')"
            % app_config.DEPLOYMENT_TARGET,
            "red",
        )
    )

    with settings(warn_only=True):
        flat.delete_folder(app_config.PROJECT_SLUG)

        if app_config.DEPLOY_TO_SERVERS:
            servers.delete_project()

            if app_config.DEPLOY_CRONTAB:
                servers.uninstall_crontab()

            if app_config.DEPLOY_SERVICES:
                servers.nuke_confs()
Esempio n. 4
0
def shiva_the_destroyer():
    """
    Deletes the app from s3
    """
    require('settings', provided_by=[production, staging])

    utils.confirm(
        colored(
            "You are about to destroy everything deployed to %s for this project.\nDo you know what you're doing?')"
            % app_config.DEPLOYMENT_TARGET, "red"))

    with settings(warn_only=True):
        flat.delete_folder(
            app_config.S3_BUCKET,
            '%s%s' % (app_config.FACTCHECKS_DIRECTORY_PREFIX,
                      app_config.CURRENT_FACTCHECK))

        if app_config.DEPLOY_TO_SERVERS:
            servers.delete_project()

            if app_config.DEPLOY_CRONTAB:
                servers.uninstall_crontab()

            if app_config.DEPLOY_SERVICES:
                servers.nuke_confs()
Esempio n. 5
0
def shiva_the_destroyer():
    """
    Deletes the app.
    """
    require('settings', provided_by=[production, staging])

    utils.confirm(
        colored(
            "You are about to destroy everything deployed to %s for this project.\nDo you know what you're doing?')"
            % app_config.DEPLOYMENT_TARGET, "red"))

    with settings(warn_only=True):
        if app_config.DEPLOY_TO_SERVERS:
            servers.delete_project()

            if app_config.DEPLOY_CRONTAB:
                servers.uninstall_crontab()

            if app_config.DEPLOY_SERVICES:
                servers.nuke_confs()
Esempio n. 6
0
def shiva_the_destroyer():
    """
    Deletes the app from s3
    """
    require('settings', provided_by=[production, staging])

    utils.confirm("You are about to destroy everything deployed to %s for this project.\nDo you know what you're doing?" % app_config.DEPLOYMENT_TARGET)

    with settings(warn_only=True):
        sync = 'aws s3 rm %s --recursive --region "us-east-1"'

        for bucket in app_config.S3_BUCKETS:
            local(sync % ('s3://%s/%s/' % (bucket, app_config.PROJECT_SLUG)))

        if app_config.DEPLOY_TO_SERVERS:
            servers.delete_project()

            if app_config.DEPLOY_CRONTAB:
                servers.uninstall_crontab()

            if app_config.DEPLOY_SERVICES:
                servers.nuke_confs()
Esempio n. 7
0
def shiva_the_destroyer():
    """
    Deletes the app from s3
    """
    require('settings', provided_by=[random_prod, production, staging])

    utils.confirm(
        colored(
            "You are about to destroy everything deployed to %s for %s project.\nDo you know what you're doing?')"
            % (app_config.DEPLOYMENT_TARGET, app_config.PROJECT_SLUG), "red"))

    with settings(warn_only=True):
        flat.delete_folder(app_config.S3_BUCKET, app_config.PROJECT_SLUG)

        if app_config.DEPLOY_TO_SERVERS:
            servers.delete_project()

            if app_config.DEPLOY_CRONTAB:
                servers.uninstall_crontab()

            if app_config.DEPLOY_SERVICES:
                servers.nuke_confs()