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

deploy_manager_aws

v2.7.0

Published

Scripts for automated deployment of services to AWS

Downloads

12

Readme

AWS Deployment Manager

A node package to Automate Environment building, termination, and management within AWS EC2 Instances with Codeship and AWS Route53 via AWS Elastic Beanstalk. AWS EC2 Free accounts get 750 hours per month of t2.micro instances free. This is usually enough for an entire month, but wont incur more than $1 in charges either way unless instances are left unterminated for very long periods of time (all instance runtime counts towards the 750 hour free amount)

This module works by Codeship automatically creating a build, from github master and develop merges, and deploying these using the deploy.sh script in the project root, or wherever you decide to put it. This deploy script creates an AWS EC2 Instance with that commit, and you can use npm run whats-live to see which environments are live or beta, with their respective urls, and commit hashes, messages, and GitHub information. Running npm run promote <hash> <environment> with a matching environment to the Domain Name Groups in the deployer.ts file, will point the DNS of those domain names to that instance of EC2. You can run whats-live again to see when the environment switch is complete. It's best to wait 15 or so minutes for the DNS to completely change over, at which point you can run npm run terminate against the old commit hash. This will terminate that EC2 instance so that there are no further costs with that specific instance.

Required Environment Variables

  • SERVICE_NAME - The Name of the project for information purposes
  • NODE_ENV - Environment that this is part of; Good names include 'prod' and 'beta' - likely will be deprecated in future

Runtime arguments

--unattended: Run unattended. All default settings will be accepted, and the output is formatted to be parsed

Usage

Download this repository, and use it as a node module by putting it into a utilities folder, or deployment folder or whatever.

Move the scripts/deploy.sh file to the root of your project, this is what will be called in CodeShip to actually deploy the built instance

Edit the scripts/deployer.ts file with any config information at the bottom, for required environment variables and default values that your project will use

Add the following scripts to your package.json for TypeScript projects

"clean": "rm -rf ./bin", // You could substitute this command for whatever clean command
"build": "npm run clean && tsc", // You could substitute this command for whatever build command
"deploy": "npm run build && node path/to/scripts/deploy.js",
"terminate": "npm run build && node path/to/scripts/terminate.js",
"whats-live": "npm run build && node path/to/scripts/whats-live.js",
"promote": "npm run build && node path/to/scripts/promote.js"

Command Usage

  • npm run deploy <commit hash>
  • npm run terminate <commit hash>
  • npm run whats-live
  • npm run promote <commit hash> <environment (example: 'beta')>