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

meteor-deployment-manager

v0.1.3

Published

A simple command line utility that aims to make deploying Meteor applications to self-hosted infrastructure as easy as possible.

Downloads

10

Readme

#meteor-deployment-manager Meteor Deployment Manager (or MDM for short) is a command line tool intended to automate the process of deploying your Meteor applications to self-hosted infrastructure like Amazon EC2.

NB: You have found this project in its infancy. The best documentation at the moment is the source code, so check it out!

##Features

  • Written in pure JavaScript.
  • Installs as a global NPM package, accessible from any directory.
  • Supports multiple deployment environments and configurations.
  • Supports the use of Meteor's Meteorite package manager.
  • Supports predefined password, private key and keyboard-interactive authentication.
  • Keeps a specifiable number of builds.
  • Uses symbolic links to retain build history and allow for instant build rollbacks.
  • Uses Upstart to monitor Node.js.

##How it works

MDM makes itself available with the mdm command line program. By default, it looks for a deployment configuration file named deploy.json in the current working directory. You can change this behaviour with the --project-path and --config-file command line options.

Usage:

$ mdm [command] [options]

For a full list of available command line options, please execute mdm --help.

###1. mdm deploy

The deploy command is used to deploy changes you have made to a remote server.

It performs the following operations:

  1. Opens an SSH connection to the remote server.
  2. Updates the project source via Git.
  3. Cleans old builds (specify how many to keep using the buildsToKeep configuration option).
  4. Creates a new build directory.
  5. Uses meteor or mrt (if you're using Meteorite) to bundle the latest source into a tarball.
  6. Extracts the tarball into the latest build directory.
  7. Resets current symbolic link to latest build directory.
  8. Restarts the Node.js process associated with the project.

###2. mdm rollback

The rollback command is used to roll back an erroneous deployment.

It performs the following operations:

  1. Opens an SSH connection to the remote server.
  2. Resets the current symbolic link to the second most recent build directory
  3. Restarts the Node.js process associated with the project.

###3. mdm generate

The generate command is used to create a sample deploy.json file in the current working directory. You should customise this file to suit your requirements.

####Sample Deployment Configuration

You can find a sample deploy.json file on GitHub: https://github.com/chriswessels/meteor-deployment-manager/blob/master/lib/sample_deploy.json

###4. mdm start

The start command is used to start the instance of Node.js associated with your application (via the Upstart script).

###5. mdm stop

The stop command is used to stop the instance of Node.js associated with your application (via the Upstart script).

###6. mdm restart

The restart command is used to restart the instance of Node.js associated with your application (via the Upstart script).

##Installation

MDM is installed using the Node Package Manager command line tool. MDM should be installed with the global flag (-g) to ensure that it is available within any Meteor application directory you might want to deploy.

Install MDM with the following command:

$ npm install -g meteor-deployment-manager

##Project and server requirements

MDM assumes that your project and server set up conforms to a set of requirements:

  1. You are using Git as a version control system.
  2. You use Upstart to manage system services on your server.
  3. You have Node.js, Meteor and Meteorite installed on your server.
  4. Your project source directory (see below) should be a Git repository with an origin remote.

###Server directory structure

app_root # This is specified in deploy.json as deploymentDirectory.
app_root/source # This directory contains the source code for your project.
app_root/working # This directory is used as a bundling directory.
app_root/builds # This directory contains the project builds made by MDM.
app_root/builds/timestamp # These directories contain the extracted bundle tarball.
app_root/builds/current # This is a symbolic link to the current build directory.

Looking for a guide to set up your server for use with MDM? Look here: https://gist.github.com/chriswessels/6540167.

##Contributions

  1. Fork this repository.
  2. Make your changes, ideally documenting your new code with in-context comments.
  3. Submit a pull request with a sane commit message.

##License

The code for this project is released under the MIT License. Please see the LICENSE file.