You can install mup
and mup-aws-beanstalk
by running
npm i -g mup mup-aws-beanstalk
The AWS Beanstalk plugin requires Node 4 or newer and Meteor Up 1.3.5 or newer.
In the terminal, run
cd path/to/app
mup init
mup init
will create a .deploy
folder and put a Meteor settings file and mup config in it.
You can replace the mup config in .deploy/mup.js
with this:
module.exports = {
app: {
// Tells mup that the AWS Beanstalk plugin will manage the app
type: 'aws-beanstalk',
name: 'myApp',
path: '../',
env: {
ROOT_URL: 'http://app.com',
MONGO_URL: 'mongodb://user:pass@domain.com'
},
auth: {
id: '12345',
secret: '6789'
},
minInstances: 1
},
plugins: ['mup-aws-beanstalk']
};
You will want to modify:
- The app name. It must be at least 4 characters
app.env.ROOT_URL
app.env.MONGO_URL
You will need to get a database from MongoDB Atlas, ScaleGrid, or another DBaaS provider
The next step will provide the values for the app.auth
object.
You will need to create an Amazon account if you do not have one.
Next, create an IAM user at https://console.aws.amazon.com/iam/home#/users
The access type should be Programmatic access
.
You can select Add user to group
and create a new group. The group should have the following permissions:
AdministratorAccess-AWSElasticBeanstalk
IAMFullAccess
This is used to create the roles and Instance Profiles needed by Elastic Beanstalk. After the first deploy, you can replace it withIAMReadOnlyAccess
AWSCertificateManagerFullAccess
Used to create and manage SSL certificates for the appEC2InstanceConnect
is optional. Used when accessing a production Meteor shell or to connect your node developer tools to the app running in Elastic BeanstalkAmazonEC2FullAccess
AmazonS3FullAccess
In your mup config, set app.auth.id
to the Access Key ID, and app.auth.secret
to the Secret access key AWS gives you after creating the user.
Simply run:
mup deploy
It will setup and deploy your app.