Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
b5ae3f0
Update README.md
manuel-schoebel Feb 23, 2015
b2cd231
Update README.md
rootedsoftware Feb 26, 2015
97c05a6
Improve binary module building logic
arunoda Mar 7, 2015
0a867d0
0.9.2
arunoda Mar 9, 2015
b21d8a4
Verify SSL config
arunoda Mar 11, 2015
9314502
0.9.3
arunoda Mar 11, 2015
4ee3baa
Add missing sudo
arunoda Mar 12, 2015
6d03d94
0.9.4
arunoda Mar 12, 2015
e78f61a
Install npm modules before doing binary rebuild
arunoda Mar 15, 2015
087b2e8
0.9.5
arunoda Mar 15, 2015
fcd3ae5
Bumped node version according to changes to Meteor 1.0.4
Mar 18, 2015
ed09151
Change Readme
arunoda Mar 18, 2015
bb1ec80
0.9.6
arunoda Mar 18, 2015
76ffbd1
Update README.md
arunoda Mar 20, 2015
58a35a9
Update README.md
arunoda Mar 20, 2015
fda1661
Exit with code 1 when deploy failed (fixes #324)
SanjoSolutions Mar 23, 2015
de5a1ff
Remove bundle at the end
arunoda Mar 23, 2015
7d2a937
0.9.7
arunoda Mar 23, 2015
e5e8050
Build meteor app with JS
arunoda Apr 23, 2015
62b1af6
Use ssh2 branch of nodemiral
arunoda Apr 23, 2015
4dfca58
Support building on Windows
arunoda Apr 23, 2015
1e196bc
Use apppath to build the app
arunoda Apr 24, 2015
0cf7e25
Use nodemiral keepAlive for ssh session caching
arunoda Apr 24, 2015
2cae3df
Add progress bar
arunoda Apr 24, 2015
d24309e
use nodemiral 1.x
arunoda Apr 25, 2015
f91b67d
0.10.0
arunoda Apr 25, 2015
238012b
Update README
arunoda Apr 25, 2015
fc1d24b
Remove platform change logic.
arunoda Apr 25, 2015
2cfef59
0.10.1
arunoda Apr 25, 2015
f33f877
Remove ssh-pass lookup
arunoda Apr 26, 2015
06b0eeb
0.10.2
arunoda Apr 26, 2015
3f8b07c
Use full path of cmd.exe if available
arunoda Apr 26, 2015
58318e9
0.10.3
arunoda Apr 26, 2015
f31f4ca
Fix typo errors and support HOME rewrite in windows
arunoda Apr 27, 2015
cf378cd
0.10.4
arunoda Apr 27, 2015
25fde94
fix a rewriteHome bug where it does not idenitfy dawin and windows
arunoda Apr 27, 2015
d80d0f9
0.10.5
arunoda Apr 27, 2015
762a64f
Use nodemiral version 1.0.1 and up
arunoda Apr 29, 2015
b9021a1
0.10.6
arunoda Apr 29, 2015
64542f0
Change sshOption port field name
arunoda May 1, 2015
37e75c1
Changed progressbars to false
May 4, 2015
702ccfd
Added uploadProgressBar option
May 4, 2015
5f8f0d6
Changed uploadProgressBar to enableUploadProgressBar and add document…
May 5, 2015
59f3fba
0.10.7
arunoda May 5, 2015
035e3cb
Add a notice about Mupx
arunoda May 6, 2015
8f6f5c5
Fixed Typo
May 14, 2015
73ec829
Create LICENSE
arunoda May 15, 2015
801bb52
Update README.md
SachaG May 21, 2015
9013866
Fixed bug where meteorBinary setting was ignored
ffxsam Jun 16, 2015
f794901
0.10.8
arunoda Jun 19, 2015
38091bd
Add ssh-agent support
arunoda Jun 22, 2015
fcd25f8
0.11.0
arunoda Jun 22, 2015
e04142b
Update README.md
arunoda Jun 22, 2015
29d4288
README: fix typo: SSH key "passphrase"
meonkeys Jun 30, 2015
a6099ed
use single equals sign for POSIX-compatible string comparison in gyp_…
Jul 8, 2015
b984a89
0.11.1
arunoda Jul 9, 2015
ce027ff
Added missing commas from config sample
fvilers Jul 20, 2015
bbe8b04
Added a sub-link under 'Server Configuration' in the Table of Content…
Aug 10, 2015
04159df
Removed the warning about passphrase-protected SSH keys being unsuppo…
Aug 10, 2015
51b7f8a
Fixed Broken link to ssl combine guide!
x5engine Aug 18, 2015
756f2b4
Updated build location path to use OS tmp directory
fvilers Sep 1, 2015
73bc8d0
0.11.2
arunoda Sep 1, 2015
c4d78b3
Update nodemiral
arunoda Sep 25, 2015
c3b1aee
0.11.3
arunoda Sep 25, 2015
e987721
add nginx multiple app support
Feb 23, 2015
b40450d
Fixed duplicate.
timbrandin Oct 14, 2015
90b5de6
Removed conflict issues and duplicate code.
timbrandin Oct 14, 2015
e27a19e
Removed sample files.
timbrandin Oct 14, 2015
39f9986
Update package.json
timbrandin Oct 27, 2015
2a908a1
Added rights to index.html to be able to deploy from other user than …
timbrandin Nov 3, 2015
83e021d
Fixed issues with permissions when deploying as a non-root user.
timbrandin Nov 3, 2015
cfa6c55
Added redirect to with or without www.
timbrandin Nov 6, 2015
7e25b97
Version bump.
timbrandin Nov 7, 2015
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2015 MeteorHacks Pvt Ltd (Sri Lanka). <hello@meteorhacks.com>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
81 changes: 58 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,30 @@
# Meteor Up

> We are working on the next version of Meteor Up with more stability and fast deployments.
> For that we use Docker behind the scene.
> Check it out: https://github.com/arunoda/meteor-up/tree/mupx#

#### Production Quality Meteor Deployments

Meteor Up (mup for short) is a command line tool that allows you to deploy any [Meteor](http://meteor.com) app to your own server. It supports only Debian/Ubuntu flavours and Open Solaris at the moments. (PRs are welcome)

> Screencast: [How to deploy a Meteor app with Meteor Up (by Sacha Grief)](https://www.youtube.com/watch?v=WLGdXtZMmiI)
You can use install and use Meteor Up from Linux, Mac and Windows.

> Screencast: [How to deploy a Meteor app with Meteor Up (by Sacha Greif)](https://www.youtube.com/watch?v=WLGdXtZMmiI)

**Table of Contents**

- [Features](#features)
- [Server Configuration](#server-configuration)
- [SSH-key-based authentication (with passphrase)](#ssh-keys-with-passphrase-or-ssh-agent-support)
- [Nginx Multiple App Hosting](#server-nginx)
- [Installation](#installation)
- [Creating a Meteor Up Project](#creating-a-meteor-up-project)
- [Example File](#example-file)
- [Setting Up a Server](#setting-up-a-server)
- [Server Setup Details](#server-setup-details)
- [Deploying an App](#deploying-an-app)
- [Additional Setup/Deploy Information](#additional-setupdeploy-information)
- [Server Setup Details](#server-setup-details)
- [Deploy Wait Time](#deploy-wait-time)
- [Multiple Deployment Targets](#multiple-deployment-targets)
- [Access Logs](#access-logs)
Expand Down Expand Up @@ -63,8 +71,6 @@ Meteor Up (mup for short) is a command line tool that allows you to deploy any [

npm install -g mup

If you are looking for password-based authentication, you need to [install sshpass](https://gist.github.com/arunoda/7790979) on your local development machine.

### Creating a Meteor Up Project

mkdir ~/my-meteor-deployment
Expand All @@ -87,12 +93,11 @@ This will create two files in your Meteor Up project directory:
{
"host": "hostname",
"username": "root",
"password": "password"
"password": "password",
// or pem file (ssh based authentication)
// WARNING: Keys protected by a passphrase are not supported
//"pem": "~/.ssh/id_rsa"
//"pem": "~/.ssh/id_rsa",
// Also, for non-standard ssh port use this
//"sshOptions": { "Port" : 49154 },
//"sshOptions": { "port" : 49154 },
// server specific environment variables
"env": {}
}
Expand All @@ -104,12 +109,16 @@ This will create two files in your Meteor Up project directory:
// WARNING: Node.js is required! Only skip if you already have Node.js installed on server.
"setupNode": true,

// WARNING: nodeVersion defaults to 0.10.33 if omitted. Do not use v, just the version number.
"nodeVersion": "0.10.33",
// WARNING: nodeVersion defaults to 0.10.36 if omitted. Do not use v, just the version number.
"nodeVersion": "0.10.36",

// Install PhantomJS on the server
"setupPhantom": true,

// Show a progress bar during the upload of the bundle to the server.
// Might cause an error in some rare cases if set to true, for instance in Shippable CI
"enableUploadProgressBar": true,

// Install Nginx on the server (Requires a unique PORT and ROOT_URL in the environment settings
// Note: Port must not be 80 as Nginx will proxy_forward to port 80 per ROOT_URL (e.g. 3000, 3001, 3002, etc)
"setupNginx": true,
Expand Down Expand Up @@ -144,10 +153,42 @@ This will create two files in your Meteor Up project directory:

This will setup the server for the `mup` deployments. It will take around 2-5 minutes depending on the server's performance and network availability.

#### Ssh based authentication
### Deploying an App

mup deploy

This will bundle the Meteor project and deploy it to the server.

### Additional Setup/Deploy Information

#### Deploy Wait Time

Meteor Up checks if the deployment is successful or not just after the deployment. By default, it will wait 10 seconds before the check. You can configure the wait time with the `deployCheckWaitTime` option in the `mup.json`

#### SSH keys with passphrase (or ssh-agent support)

> This only tested with Mac/Linux

With the help of `ssh-agent`, `mup` can use SSH keys encrypted with a
passphrase.

Here's the process:

* First remove your `pem` field from the `mup.json`. So, your `mup.json` only has the username and host only.
* Then start a ssh agent with `eval $(ssh-agent)`
* Then add your ssh key with `ssh-add <path-to-key>`
* Then you'll asked to enter the passphrase to the key
* After that simply invoke `mup` commands and they'll just work
* Once you've deployed your app kill the ssh agent with `ssh-agent -k`

#### Ssh based authentication with `sudo`

**If your username is `root`, you don't need to follow these steps**

Please ensure your key file (pem) is not protected by a passphrase. Also the setup process will require NOPASSWD access to sudo. (Since Meteor needs port 80, sudo access is required.)

Make sure you also add your ssh key to the ```/YOUR_USERNAME/.ssh/authorized_keys``` list

You can add your user to the sudo group:

sudo adduser *username* sudo
Expand Down Expand Up @@ -179,16 +220,6 @@ This is how Meteor Up will configure the server for you based on the given `appN

For more information see [`lib/taskLists.js`](https://github.com/arunoda/meteor-up/blob/master/lib/taskLists.js).

### Deploying an App

mup deploy

This will bundle the Meteor project and deploy it to the server.

#### Deploy Wait Time

Meteor Up checks if the deployment is successful or not just after the deployment. By default, it will wait 10 seconds before the check. You can configure the wait time with the `deployCheckWaitTime` option in the `mup.json`.

#### Multiple Deployment Targets

You can use an array to deploy to multiple servers at once.
Expand Down Expand Up @@ -241,7 +272,7 @@ It is possible to provide server specific environment variables. Add the `env` o
{
"host": "hostname",
"username": "root",
"password": "password"
"password": "password",
"env": {
"SOME_ENV": "the-value"
}
Expand Down Expand Up @@ -303,7 +334,7 @@ Meteor Up has the built in SSL support. It uses [stud](https://github.com/bumpte
* When asked to select your SSL server type, select it as nginx.
* Then you'll get a set of files (your domain certificate and CA files).

Now you need combine SSL certificate(s) with the private key and save it in the mup config directory as `ssl.pem`. Check this [guide](http://alexnj.com/blog/configuring-a-positivessl-certificate-with-stud.html) to do that.
Now you need combine SSL certificate(s) with the private key and save it in the mup config directory as `ssl.pem`. Check this [guide](http://alexnj.com/blog/configuring-a-positivessl-certificate-with-stud) to do that.

Then add following configuration to your `mup.json` file.

Expand Down Expand Up @@ -337,6 +368,10 @@ You should try and keep `mup` up to date in order to keep up with the latest Met

### Troubleshooting

#### Check Access

Your issue might not always be related to Meteor Up. So make sure you can connect to your instance first, and that your credentials are working properly.

#### Check Logs
If you suddenly can't deploy your app anymore, first use the `mup logs -f` command to check the logs for error messages.

Expand Down
16 changes: 1 addition & 15 deletions bin/mup
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,7 @@ if(action == 'init') {
var cwd = path.resolve('.');
//read config and validate it
var config = Config.read();

if(config._passwordExists) {
//check for sshpass
helpers.checkSshPassExists(function(exists) {
if(exists) {
runActions(config, cwd);
} else {
var errorMessage = "sshpass required for password based authentication: refer http://git.io/_vHbvQ";
console.error(errorMessage.bold.red);
process.exit(1);
}
});
} else {
runActions(config, cwd);
}
runActions(config, cwd);
}


Expand Down
8 changes: 6 additions & 2 deletions example/mup.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
// WARNING: Node.js is required! Only skip if you already have Node.js installed on server.
"setupNode": true,

// WARNING: If nodeVersion omitted will setup 0.10.33 by default. Do not use v, only version number.
"nodeVersion": "0.10.33",
// WARNING: If nodeVersion omitted will setup 0.10.36 by default. Do not use v, only version number.
"nodeVersion": "0.10.36",

// Install PhantomJS in the server
"setupPhantom": true,
Expand All @@ -26,6 +26,10 @@
// Note: Port must not be 80 as Nginx will proxy_forward to port 80 per ROOT_URL (e.g. 3000, 3001, 3002, etc)
"setupNginx": false,

// Show a progress bar during the upload of the bundle to the server.
// Might cause an error in some rare cases if set to true, for instance in Shippable CI
"enableUploadProgressBar": true,

// Application name (No spaces)
"appName": "meteor",

Expand Down
Loading