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

scottcidilabs-deploy

v1.0.1

Published

Deployment module for Cidilabs infrastructure

Downloads

1,030

Readme

ScottiCidiLabs Deploy

A powerful AWS CDK deployment tool with resource management capabilities. This tool simplifies the deployment process by handling AWS resource lookups, secret management, and environment configuration.

Installation

npm install scottcidilabs-deploy

Features

  • Automatic AWS resource discovery and configuration
  • Secrets management with AWS Secrets Manager
  • Environment-specific deployments
  • Git branch management
  • CDK context handling
  • Support for multiple AWS services:
    • Application Load Balancer
    • ACM Certificates
    • EFS File Systems
    • RDS Snapshots
    • CodeStar Connections
    • SNS Topics
    • Route53 Hosted Zones
    • EC2 AMIs

Usage

Basic usage with command line arguments:

scottcidilabs-deploy --projectName myProject --region us-east-1 --profile myProfile --env-type dev

Using a config file:

scottcidilabs-deploy --config ./my-config.json --profile myProfile --env-type dev

Options: --projectName Project name --region AWS region (default: "us-east-1") --loadBalancerArn Load balancer ARN --acmCertificateArn ACM certificate ARN --efsId EFS ID --efsAccessPointId EFS access point ID --env-type Environment type (required) --config Path to config.json file (default: "config.json") --profile AWS profile (default: "Sandbox") --directory Directory to run the deployment in --command CDK command to run (synth or deploy) (default: "synth") --rds-snapshot-arn RDS snapshot ARN to restore from --gitlab-connection-arn GitLab CodeStar connection ARN

Configuration File (config.json)

Here's a comprehensive example of a configuration file:

{
    "projectName": "MyAwesomeProject",
    "region": "us-east-1",
    "required": [
        "loadBalancerArn",
        "acmCertArn",
        "efsId",
        "efsAccessPointId",
        "gitlabConnection",
        "rdsSnapshotArn",
        "snsTopicArn",
        "privateHostedZoneName",
        "abbyyAmiId"
    ],
    "environments": {
    "dev": {
    "branch": "develop",
    "domain": "dev.example.com",
    "readygoDomain": "dev-test.example.com"
    },
    "staging": {
    "branch": "staging",
    "domain": "staging.example.com",
    "readygoDomain": "staging-test.example.com"
    },
    "prod": {
    "branch": "main",
    "domain": "example.com",
    "readygoDomain": "test.example.com"
    }
    },
    "secrets": [
        {
        "name": "my-app/database",
        "keys": [
        "EXAMPLE_KEY",
        "EXAMPLE_KEY_2",
        "EXAMPLE_KEY_3"
        ]
        },
        {
        "name": "my-app/api",
        "keys": [
        "EXAMPLE_KEY_4",
        "EXAMPLE_KEY_5",
        "EXAMPLE_KEY_6"
            ]
        }
    ]
}

Example Deployment Scenarios

1. Basic Development Deployment

scottcidilabs-deploy --projectName myApp --env-type dev --profile myAwsProfile

2. Production Deployment with Config File

scottcidilabs-deploy --config ./config.json --env-type prod --profile production --command deploy

3. Staging Environment with Custom Directory

scottcidilabs-deploy --config ./config.json --env-type staging --profile staging --directory ./cdk

Resource Management

The tool automatically handles:

  • Load balancer discovery and listener configuration
  • SSL certificate management
  • EFS file system and access point setup
  • Secret creation and validation
  • RDS snapshot selection
  • GitLab connection setup
  • SNS topic configuration
  • Route53 private hosted zone management
  • AMI selection

Git Integration

The tool includes Git integration for:

  • Automatic branch checkout based on environment
  • CDK context management with automatic branch creation
  • Context changes version control

Error Handling

The tool provides comprehensive error handling and validation:

  • AWS resource validation
  • Secret existence and validation
  • Environment variable verification
  • CDK context validation

Environment Variables

All discovered resources and configurations are automatically set as environment variables for use in your CDK app:

  • PROJECT_NAME
  • REGION
  • ENVIRONMENT_TYPE
  • BRANCH_NAME
  • DOMAIN_NAME
  • LOAD_BALANCER_ARN
  • ACM_CERT_ARN
  • EFS_ID
  • ACCESS_POINT_ID
  • GITLAB_CONNECTION_ARN
  • RDS_SNAPSHOT_ARN
  • SNS_TOPIC_ARN
  • PRIVATE_HOSTED_ZONE_NAME
  • ABBYY_AMI_ID

License

MIT