Package Exports
- cim
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (cim) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Cloud Infrastructure Manager (CIM)
CIM takes the pain out of Infrastructure as Code and CloudFormation!
The importance of IaC has increased, due to the rise in popularity of cloud functions, event driven architectures, and the number of AWS services offered.
Logic has slowly been pulled out of our applications and into cloud service providers. This is amazing and allows our applications to scale and be cost effective but it changes how they look and feel
Infrastructure as Code is just as important, or more important, than the code itself. Implementing IaC at the onset of a new project is a must. But don't worry, CIM is here to help.
- CIM makes it easy to create, update, and delete stacks
- CIM allows you to create nested stacks
- CIM helps organize stack inputs (parameters)
- CIM provides templates to help you get started
- CIM has support for Lambda functions
- CIM has an extensible Plugin framework
Easily create your stack, build and deploy your code, and view your logs.
Table of contents:
Usage
# Install CIM
npm install cim -g
# See the available templates
cim templates
# Create your first stack using the lambda template
mkdir app
cd app
cim create --template=lambda-node
# Deploy your stack
cim stack-up
# Deploy your code
cim lambda-deploy
# View logs
cim lambda-logs --alias=hello --tail=true
# Delete you stack
cim stack-deleteSetup
Prerequisites
Install CIM
Use npm to install CIM globally.
npm install cim -gCommands
create
Create a new CIM package based on a give template.
At minimum a CIM package contains the following files:
Usage
mkdir app
cd app
cim create --template=<template>Where <template> is equal to one of the templates from cim templates.
Options
--template: The name of a template.- ex. --template=lambda-node
--dir: (optional) The directory where you wish the new package to be.- ex. --dir=/app
templates
View all the available templates. Templates are used in the create command.
Usage
cim templatesstack-up
Create or update your stack. Sends a create or update command to CloudFormation using the properties defined in your _cim.yml.
Usage
cim stack-up {OPTIONS}Options
--dir: (optional) The directory to run this command in. Defaults to the current directory.- ex. --dir=/app
--recursive: (optional) Recursively search for nested stacks to create or update. Any nested directory with a valid _cim.yml file. Default is 'false'.- ex. --recursive=true
--stage: (optional) Create or update the stack(s) using the give stage.- ex. --stage=prod
--profile: (optional) Your AWS credentials profile.- ex. --profile=prod_aws_account
stack-show
Show all the details about your CloudFormation stack. Helper method to see the status of your stack.
Usage
cim stack-show {OPTIONS}Options
--dir: (optional) The directory to run this command in. Defaults to the current directory.- ex. --dir=/app
--recursive: (optional) Recursively search for nested stacks to create or update. Any nested directory with a valid _cim.yml file. Default is 'false'.- ex. --recursive=true
--stage: (optional) Create or update the stack(s) using the give stage.- ex. --stage=prod
--profile: (optional) Your AWS credentials profile.- ex. --profile=prod_aws_account
stack-delete
Delete your stack. Sends a delete command to CloudFormation using the properties defined in your _cim.yml.
Usage
cim stack-delete {OPTIONS}Options
--dir: (optional) The directory to run this command in. Defaults to the current directory.- ex. --dir=/app
--recursive: (optional) Recursively search for nested stacks to create or update. Any nested directory with a valid _cim.yml file. Default is 'false'.- ex. --recursive=true
--stage: (optional) Create or update the stack(s) using the give stage.- ex. --stage=prod
--profile: (optional) Your AWS credentials profile.- ex. --profile=prod_aws_account
lambda-deploy
Deploy you Lambda functions.
Usage
cim lambda-deploy {OPTIONS}Options
--dir: (optional) The directory to run this command in. Defaults to the current directory.- ex. --dir=/app
--recursive: (optional) Recursively search for nested stacks to deploy. Any nested directory with a valid _cim.yml file. Default is 'false'.- ex. --recursive=true
--alias: (optional) Restrict to a single Lambda function by its alias.- ex. --alias=function1
--stage: (optional) Create or update the stack(s) using the give stage.- ex. --stage=prod
--profile: (optional) Your AWS credentials profile.- ex. --profile=prod_aws_account
lambda-logs
Show the CloudWatch Logs for a single Lambda function.
Usage
cim lambda-logs {OPTIONS}Options
--dir: (optional) The directory to run this command in. Defaults to the current directory.- ex. --dir=/app
--alias: Restrict to a single Lambda function by its alias.- ex. --alias=function1
--tail: (optional) Tail the logs. Default is false.- ex. --tail=true
--startTime: (optional) Start fetching logs from this time. Time in minutes. Ex. '30s' minutes ago. Default is '30s'.- ex. --startTime=30s
--internal: (optional) Interval, in milliseconds, between calls to CloudWatch Logs when using 'tail'. Default is 5000.- ex. --internal=5000
--filterPattern: (optional) CloudWatch Logs filter pattern.- ex. --filterPattern=ERROR
--stage: (optional) Create or update the stack(s) using the give stage.- ex. --stage=prod
--profile: (optional) Your AWS credentials profile.- ex. --profile=prod_aws_account
help
Usage
View all the available commands.
cim helpView a single command.
cim <command> --help_cim.yml
Templates
Plugin Framework
TODO
- Add all lambda event triggers as templates
- Add multiple CloudFormation scripts per package