Meteor Multiverse Manager (a.k.a. mmm
) is a custom CLI for working with Meteor Multiverse environments on Amazon AWS OpsWorks
- Node.js >=
0.10.x
- NPM >=
2.x
- An Amazon AWS account with:
- access to the following services:
- IAM: Identity & Access Management
- EC2: Elastic Compute Cloud
- VPC: Virtual Private Cloud (technically part of EC2)
- OpsWorks
- Route53
- at least 1 HostedZone (domain) available in Route53 for sub-domaining
- an active IAM Access Key for accessing the AWS REST API via the AWS CLI
- policy permissions for your "role" as detailed below
- access to the following services:
- Running the tool on:
- Mac OSX
- Linux/UNIX environments with Bash
- Maaaaybe on Windows environments with a Bash-compatible shell like Git Bash (msysgit)
sudo npm install -g meteor-multiverse-manager
sudo
is used here to ensure that a global symlink can be created for running the resulting mmm
command anywhere.
mmm <command> [options] [args]
To learn about all of the available commands, run:
mmm --help
To learn about each command's available options and arguments, run:
mmm <command> --help
This example will guide you through initializing a new stack config file:
mmm init -c my-stack-config
Again, to learn about all of the available commands, run:
mmm --help
However, for the sake of learning more about what Meteor Multiverse Manager is capable of without having to install it first, here is the current list of available commands and a brief description of each:
init
— Initialize a brand new OpsWorks stack configuration through an interactive series of promptscreate
— Create a new OpsWorks stackget
— Get a thorough JSON representation of an existing OpsWorks stackdelete
— Delete an existing OpsWorks stackdns
— Forcibly sync up the Route53 DNS records for an existing OpsWorks stackbad
— Build a local Meteor app, push it, and deploy it to an existing OpsWorks stackbuild
— Build a local Meteor app configured as if for an existing OpsWorks stackpush
— Push a locally built Meteor app bundle to the release repo for an existing OpsWorks stackdeploy
— Deploy the latest pushed Meteor app bundle from the release repo to an existing OpsWorks stackupdate-env
— Update the App environment variables of an existing OpsWorks stackcook
— Update the Chef cookbooks for an existing OpsWorks stackexec
— Execute a command against an existing OpsWorks stackheal
— Forcibly auto-heal any instances that failed to start within an existing OpsWorks stackup
— Ensure all of the Meteor app servers within an existing OpsWorks stack are upscale
— Synchronize the schedule of all time-based scaling instances and the metrics used for all load-based scaling instances within an existing OpsWorks stacklock
— Lock all SSHD entry points of an existing OpsWorks stackunlock
— Unlock all SSHD entry points of an existing OpsWorksmongo
— Connect to the Mongo database of an existing OpsWorks stack with the Mongo Shellsim
— Simulate running as an existing OpsWorks stack by reconfiguring local environment variables to utilize the same resources (e.g. Mongo databases, etc.)ssh
— SSH connect to an instance in an existing OpsWorks stack via a Bastion Host
The IAM Policy Permissions necessary to create and destroy Stacks.
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "IamAccessForStackOwners",
"Action": [
"iam:ListRoles",
"iam:GetRole",
"iam:CreateRole",
"iam:ListRolePolicies",
"iam:ListAttachedRolePolicies",
"iam:GetRolePolicy",
"iam:GetPolicy",
"iam:PutRolePolicy",
"iam:DetachRolePolicy",
"iam:DeleteRolePolicy",
"iam:*InstanceProfile"
],
"Effect": "Allow",
"Resource": "*"
},
{
"Sid": "VpcAccessForStackOwners",
"Action": [
"ec2:Describe*",
"ec2:CreateTags",
"ec2:*Vpc",
"ec2:*InternetGateway",
"ec2:*RouteTable",
"ec2:CreateRoute",
"ec2:DeleteRoute",
"ec2:*NetworkAcl",
"ec2:*NetworkAclEntry",
"ec2:*Subnet",
"ec2:ReplaceNetworkAclAssociation",
"ec2:AllocateAddress",
"ec2:ReleaseAddress",
"ec2:*NatGateway",
"ec2:*SecurityGroup",
"ec2:*SecurityGroupEgress",
"ec2:*SecurityGroupIngress",
"ec2:*VpcPeeringConnection"
],
"Effect": "Allow",
"Resource": "*"
},
{
"Sid": "Ec2AccessForStackOwners",
"Action": [
"ec2:DescribeInstance*"
"ec2:StartInstances",
"ec2:StopInstances",
"ec2:TerminateInstances",
"ec2:ModifyInstanceAttribute"
],
"Effect": "Allow",
"Resource": "*"
},
{
"Sid": "OpsworksAccessForStackOwners",
"Action": [
"opsworks:*"
],
"Effect": "Allow",
"Resource": "*"
},
{
"Sid": "Route53AccessForStackOwners",
"Action": [
"route53:ListHostedZonesByName",
"route53:CreateHostedZone",
"route53:ListResourceRecordSets",
"route53:ChangeResourceRecordSets",
"route53:GetChange"
],
"Effect": "Allow",
"Resource": "*"
}
]
}
The IAM Policy Permissions necessary to operate/maintain existing Stacks.
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "OpsworksAccessForStackOperators",
"Action": [
"opsworks:Describe*",
"opsworks:CreateDeployment",
"opsworks:UpdateApp",
"opsworks:UpdateStack",
"opsworks:StartStack",
"opsworks:StopStack",
"opsworks:StartInstance",
"opsworks:StopInstance",
"opsworks:SetLoadBasedAutoScaling",
"opsworks:SetTimeBasedAutoScaling"
],
"Effect": "Allow",
"Resource": "*"
},
{
"Sid": "Ec2AccessForStackOperators",
"Action": [
"ec2:DescribeInstance*"
"ec2:StartInstances",
"ec2:StopInstances",
"ec2:TerminateInstances",
"ec2:ModifyInstanceAttribute"
],
"Effect": "Allow",
"Resource": "*"
}
]
}
The IAM Policy Permissions necessary to deploy to existing Stacks.
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "OpsworksAccessForStackDeployers",
"Action": [
"opsworks:Describe*",
"opsworks:CreateDeployment",
"opsworks:UpdateApp",
"opsworks:UpdateStack"
],
"Effect": "Allow",
"Resource": "*"
},
{
"Sid": "Ec2AccessForStackDeployers",
"Action": [
"ec2:DescribeInstance*"
],
"Effect": "Allow",
"Resource": "*"
}
]
}
The IAM Policy Permissions necessary to view existing Stacks.
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "OpsworksAccessForStackReaders"
"Action": [
"opsworks:Describe*",
],
"Effect": "Allow",
"Resource": "*"
},
{
"Sid": "Ec2AccessForStackReaders",
"Action": [
"ec2:DescribeInstance*"
],
"Effect": "Allow",
"Resource": "*"
}
]
}