![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@empirica/meteor-deploy
Advanced tools
A simple tool to facilitate deploying meteor projects to the cloud for production.
A simple tool to facilitate deploying meteor projects to the cloud for production.
@empirica/meteor-deploy
is yet another production deployment tool for meteor projects.
It has been specifically tailored to deploy empirica.ly experiments, however it can also be used for other projects.
@empirica/meteor-deploy
uses docker containers and pulumi templates facilitate deployments to your own cloud account (currently only AWS is supported).
There are plenty of alternative ways to deploy meteor projects for production:
For Meteor projects such as Empirica, Meteor's Galaxy hosting does not offer compute instances with sufficient CPU and Memory to allow for optimal performance. For most meteor projects that is not problem as Galaxy is excellent at facilitating horizontal scalability, however Empirica projects do not support that.
@empirica/meteor-deploy
, just like Meteor Up allows you to deploy your own MongoDB instance, so that you don't have to run use a professional MongoDB hosting service.
@empirica/meteor-deploy
creates all the infrastructure resources that you need on the cloud, so you don't have to spend time configuring infrastructure and deploying updates to it. When using Meteor Up you would still need to go through some cumbersome steps to deploy your docker-containers to the cloud.
However if you do need production grade database-hosting (with full back-up solutions and scalability) and if you need your application deployment to scale horizontally, @empirica/meteor-deploy
may not be the right tool for you.
Before we begin you need to do the following:
You will also need an up-to-date version of meteor installed.
Install @empirica/meteor-deploy
through npm, by running the following command in your meteor projects' directory.
meteor npm install --save-dev @empirica/meteor-deploy -y
Enable your project for deployments with default configuration:
npx meteor-deploy init my-deployment-project
Execute the deployment to your cloud:
npx meteor-deploy pulumi up
After making changes to your meteor project, you can update your deployment simply through pulumi:
npx meteor-deploy pulumi up
@empirica/meteor-deploy
Occasionally @empirica/meteor-deploy
will issue new releases of the tool that might improve upon your infrastructure.
When a new release is available, run the following commands to update your deployment accordingly:
meteor npm update @empirica/meteor-deploy
npx meteor-deploy init
meteor npm install
npx meteor-deploy pulumi up
Most configuration options can be directly configured (and automatically validated by through meteor-deploy).
See:
npx meteor-deploy stack configure aws-ecs-ec2 --help
By default, meteor-deploy will use t2.micro instances. These are not very powerful. To upgrade the instance type run:
npx meteor-deploy stack configure aws-ecs-ec2 --instanceType t2.medium --app:memory: 1024 --db:memory: 1024
npx meteor-deploy pulumi up
Enabling transport encryption through HTTPS is highly recommended. You first need to create a certificate on the AWS Certificate manager (ACM).
For this you have three possible options:
Once your certificate is ready on ACM, copy its ARN and add it to the configuration:
npx meteor-deploy pulumi config set --path https.certificateArn <paste your certificate arn>
npx meteor-deploy pulumi config set --path domain.name mydomain.example.com
npx meteor-deploy pulumi up
You will need to manually create CNAME Record for your domain mydomain.example.com your DNS.
If your domain is hosted on AWS Route53, then meteor-deploy can add the CNAME entry for you. Simply copy and paste your Route53 ZoneID like this:
npx meteor-deploy pulumi config set --path domain.name mydomain
npx meteor-deploy pulumi config set --path domain.zoneId <paste your zone id here>
npx meteor-deploy pulumi up
Note that when setting domain.zoneId
, domain.name
needs to be the name of the subdomain of the domain that the zone id refers to.
If no zone-id is set then domain.name
needs to be a fully qualified domain name.
You can access EC2 instances that host the service through SSH. To enable SSH access you need a setup a ssh key.
Given a public ssh key at ~/.ssh/id_rsa.pub
, add it to your stack:
npx meteor-deploy pulumi config set publicKey "$(cat ~/.ssh/id_rsa.pub)"
npx meteor-deploy pulumi up
Find your deployed cluster at https://console.aws.amazon.com/ecs/home and then open "ECS Instances". Click on the EC2 instance link in the table of running instances and look for it's ip domain alias to ssh into.
ssh ec2-user@<ec2 instance>
If you wish to tear down all resources that pulumi has created on your cloud account, you can run:
npx meteor-deploy pulumi destroy
If you are using persistent storage, pulumi will warn you that you may want to reconsider destroying that volume, because it will permanently destroy any non-backed up data that it contains.
This will be displayed in a message like this:
Diagnostics:
aws:ebs:Volume (leaderboard-dev):
error: Preview failed: refusing to delete protected resource 'urn:pulumi:dev::leaderboard::aws:ebs/volume:Volume::leaderboard-dev'
Create a snapshot of that volume here to not lose its data.
Now go ahead un-protecting the volume and then destroying your deployment.
This will destroy the volume along with all the data stored on it
npx meteor-deploy pulumi state unprotect <urn>
npx meteor-deploy pulumi destroy
If you have an EBS volume snapshot, and you want to restore its data to your deployment do:
npx meteor-deploy pulumi config set --path database.storage.snapshotId <snapshot id>
npx meteor-deploy pulumi up
When deployed remove the snapshot so that it does not overwrite any newer persisted data.
npx meteor-deploy pulumi config rm --path database.storage.snapshotId
FAQs
A simple tool to facilitate deploying meteor projects to the cloud for production.
We found that @empirica/meteor-deploy demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.