Package: deployfish
_            _              __ _     _
     | |          | |            / _(_)   | |
   __| | ___ _ __ | | ___  _   _| |_ _ ___| |__
  / _` |/ _ \ '_ \| |/ _ \| | | |  _| / __| '_ \
 | (_| |  __/ |_) | | (_) | |_| | | | \__ \ | | |
  \__,_|\___| .__/|_|\___/ \__, |_| |_|___/_| |_|
            | |             __/ |
            |_|            |___/deployfishhas commands for managing the whole lifecycle of your application:Safely and easily create, update, destroy and restart ECS servicesSafely and easily create, update, run, schedule and unschedule ECS tasksExtensive support for ECS related services like load balancing, application
autoscaling and service discoveryEasily scale the number of containers in your service, optionally scaling its
associated autoscaling group at the same timeManage multiple environments for your service (test, qa, prod, etc.) in
multiple AWS accounts.Uses AWS Parameter Store for secrets for your containersView the configuration and status of running ECS servicesRun a one-off command related to your serviceEasily exec through your VPC bastion host into your running containers, or
ssh into a ECS container machine in your cluster.Setup SSH tunnels to the private AWS resources in VPC that your service
uses so that you can connect to them from your work machine.Extensible! Add additional functionality through custom deployfish modules.Works great in CodeBuild steps in a CodePipeline based CI/CD system!Additionally,deployfishintegrates withterraformstate files so that you can use the
values of terraform outputs directly in yourdeployfishconfigurations.To usedeployfish, youInstalldeployfishDefine your service indeployfish.ymlUsedeployto start managing your serviceA simpledeployfish.ymllooks like this:services:
  - name: my-service
    environment: prod
    cluster: my-cluster
    count: 2
    load_balancer:
      service_role_arn: arn:aws:iam::123142123547:role/ecsServiceRole
      load_balancer_name: my-service-elb
      container_name: my-service
      container_port: 80
    family: my-service
    network_mode: bridge
    task_role_arn: arn:aws:iam::123142123547:role/myTaskRole
    containers:
      - name: my-service
        image: 123142123547.dkr.ecr.us-west-2.amazonaws.com/my-service:0.0.1
        cpu: 128
        memory: 256
        memoryReservation: 128
        ports:
          - "80"
        environment:
          - ENVIRONMENT=prod
          - ANOTHER_ENV_VAR=value
          - THIRD_ENV_VAR=valueSee theexamples/folder in this repository for exampledeployfish.ymlfiles.Documentationdeployfish.readthedocs.iois the full
reference for deployfish, including a fulldeployfish.ymlreference and
tutorials.Installing deployfishdeployfish is a pure python package.  As such, it can be installed in the
usual python ways.  For the following instructions, either install it into your
global python install, or use a pythonvirtual environmentto install it
without polluting your global python environment.Install deployfishpip install deployfishInstall AWS CLI v2deployfish requries AWS CLI v2 for some of its functionality, notably EXEC'ing into FARGATE containers.  While AWS CLI
v1 was installable viapip, AWS CLI v2 is not, so we have to do the install manually.  Here's how to set that up on a
Mac:# Uninstall any old versions of the cli
pip uninstall awscli

# Deactivate any pyenv environment so we can be in the system-wide Python interpreter
cd ~

# Install the new AWS CLI from brew -- it's no longer pip installable
brew update
brew install awscli

# Install the Session Manager plugin
curl "https://s3.amazonaws.com/session-manager-downloads/plugin/latest/mac/sessionmanager-bundle.zip" -o "sessionmanager-bundle.zip"
unzip sessionmanager-bundle.zip
sudo ./sessionmanager-bundle/install -i /usr/local/sessionmanagerplugin -b /usr/local/bin/session-manager-pluginIf later on you have issues with EXEC'ing or with theawscommand in general, check to ensure you're getting your
global version ofawsinstead of an old one in your current virtual environment:aws --versionIf the version string shows version < 2:pip uninstall awscli