Skip to content

Instantly share code, notes, and snippets.

@danlopez
Last active August 29, 2015 14:11
Show Gist options
  • Select an option

  • Save danlopez/dc0166fe85f39f15c4a7 to your computer and use it in GitHub Desktop.

Select an option

Save danlopez/dc0166fe85f39f15c4a7 to your computer and use it in GitHub Desktop.

Revisions

  1. danlopez191 revised this gist Dec 19, 2014. 1 changed file with 10 additions and 2 deletions.
    12 changes: 10 additions & 2 deletions orchestrate
    Original file line number Diff line number Diff line change
    @@ -1,9 +1,17 @@
    case $1 in
    deploy)
    docker run -it --rm -e "AWS_ACCESS_KEY_ID=$(printenv AWS_ACCESS_KEY_ID)" -e "AWS_SECRET_ACCESS_KEY=$(printenv AWS_SECRET_ACCESS_KEY)" -v ~/.ssh:/host-ssh apprennet/orchestrate /bin/bash -c "cp /host-ssh/* /root/.ssh/ && chmod 400 /root/.ssh/* && ruby tasks/trigger_deploy_pull.rb $2"
    docker run -it --rm -e "AWS_ACCESS_KEY_ID=$(printenv AWS_ACCESS_KEY_ID)" -e "AWS_SECRET_ACCESS_KEY=$(printenv AWS_SECRET_ACCESS_KEY)" -v ~/.ssh:/host-ssh apprennet/orchestrate /bin/bash -c \
    "cp /host-ssh/* /root/.ssh/ && chmod 400 /root/.ssh/* && ruby tasks/trigger_deploy_pull.rb $2"
    ;;
    status)
    docker run -it --rm -e "AWS_ACCESS_KEY_ID=$(printenv AWS_ACCESS_KEY_ID)" -e "AWS_SECRET_ACCESS_KEY=$(printenv AWS_SECRET_ACCESS_KEY)" -v ~/.ssh:/host-ssh apprennet/orchestrate /bin/bash -c \
    "watch -n 3 ruby tasks/container_status.rb $2"
    ;;
    esac
    shell)
    docker run -it --rm -e "AWS_ACCESS_KEY_ID=$(printenv AWS_ACCESS_KEY_ID)" -e "AWS_SECRET_ACCESS_KEY=$(printenv AWS_SECRET_ACCESS_KEY)" -v ~/.ssh:/host-ssh apprennet/orchestrate /bin/bash -c \
    "/bin/bash"
    ;;
    *)
    echo "Usage: orchestrate [deploy|status|shell] [development|staging|production]"
    exit 1
    esac
  2. danlopez191 created this gist Dec 19, 2014.
    9 changes: 9 additions & 0 deletions orchestrate
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    case $1 in
    deploy)
    docker run -it --rm -e "AWS_ACCESS_KEY_ID=$(printenv AWS_ACCESS_KEY_ID)" -e "AWS_SECRET_ACCESS_KEY=$(printenv AWS_SECRET_ACCESS_KEY)" -v ~/.ssh:/host-ssh apprennet/orchestrate /bin/bash -c "cp /host-ssh/* /root/.ssh/ && chmod 400 /root/.ssh/* && ruby tasks/trigger_deploy_pull.rb $2"
    ;;
    status)
    docker run -it --rm -e "AWS_ACCESS_KEY_ID=$(printenv AWS_ACCESS_KEY_ID)" -e "AWS_SECRET_ACCESS_KEY=$(printenv AWS_SECRET_ACCESS_KEY)" -v ~/.ssh:/host-ssh apprennet/orchestrate /bin/bash -c \
    "watch -n 3 ruby tasks/container_status.rb $2"
    ;;
    esac