npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

ecs-aws

v0.18.0

Published

Deploy easily docker containers into AWS ECS

Downloads

27

Readme

ecs-aws npm version

Deploy easily docker containers into AWS ECS

disclaimer

This script was made to simplify the deployement process and is used internally on production level but is not exempted of bugs. Use at your own risk and I cannot be held responsible for any errors that might occur.

This software was built to allow developers to deploy and check their respective containers/services. You need to have an AWS account to be able to use this. With the right IAM permissions, the AWS admin can control who has access to what and specific team members can deploy and monitor without ever touching the baseline configuration.

No access or secret keys are stored by this script.

installation

npm install -g ecs-aws

dependencies

This CLI uses the AWS CLI key/secretKey to do the requests. Please set that up before.

AWS CLI min 1.11.167: https://aws.amazon.com/cli

docker & docker-machine: https://docs.docker.com/engine/installation/

usage

ecs-aws allows you to deploy an ECS service without having to modify all the configuration and task definition over and over.

This script is not meant to be for creating services directly. Set that up in your ECR environment or the AWS Console first

The task definition and container name have to be the same. This will be changed in later versions.

A docker file needs to be in the directory. It will be requested during the init and you can have multiple ones in the same directory for different services (ex: scheduled services)

Initialise a directory where you have a Dockerfile and code using ecs-aws init [--profile profilename]. You will be requested an AWS cli profile (you can setup one by doing aws configure [--profile profilename]) in order to retrieve the different services and clusters. The script will create ECSConfig[profilename].json in the directory after setup.

after initialisation you can:

configuration

  • ecs-aws configure [--profile profilename] to change configuration
  • ecs-aws check [--profile profilename] to check the configuration
  • ecs-aws info [--profile profilename] to view the configuration

deployment

  • ecs-aws deploy [--profile profilename] to deploy the code into ECR & ECS (The GIT short hash will be used as version if available)

service commit

  • ecs-aws commit [--profile profilename] commit your code changes

This command is available if the directory is a GIT repository

service info

  • ecs-aws logs [--profile profilename] to view the service's logs
  • ecs-aws events [--profile profilename] to view the service's events
  • ecs-aws dash [--profile profilename] to view the dashboard [BETA]

local testing

  • ecs-aws run [--profile profilename] to run the container locally
  • ecs-aws rebuild [--profile profilename] to rebuild the container image

Other parameters:

  • --help: help
  • -c: alias to ecs-aws commit
  • -d: alias to ecs-aws deploy

Run your container locally

The old ecs-aws versions used to generate an image everytime ecs-aws run was launched and removed it afterwards. This is no longer the case; ecs-aws will create a container image from the Dockerfile setup in the configuration profile and keep it after the script has stopped.

This allows for a faster and more reliable testing with a full usage of the Dockerfile.

If the Dockerfile has been modified run ecs-aws rebuild [--profile profilename] to rebuild the docker image to the latest version.

The local testing will use the maximum memory set in the configuration profile file

Dashboard

A beta version of the dashboard is available by calling ecs-aws dash [--profile profilename]

You can copy the ECSConfig.json file and run ecs-aws to see the monitoring if you wish to setup a screen,

TO-DO

  • Being able to setup scheduled containers