Skip to content

Releases: zodern/meteor-up

1.5.8

20 Apr 19:29
Compare
Choose a tag to compare
  • Update nginx
  • Improve output from prepare bundle when it fails
  • Update docs to refer to app instead of the deprecated meteor object (@maxmatthews)
  • Fix description of mup-cloud-front plugin (@cunneen)
  • Update default mongo version to 3.4.24 from 3.4.1
  • Update deps

1.5.7

20 Apr 19:28
Compare
Choose a tag to compare
  • Update mongo version in config created by mup init
  • Fix initializing Mongo replica set

1.5.6

20 Apr 19:28
Compare
Choose a tag to compare
  • Fix connecting to built-in MongoDB with Meteor 1.6. The replica set now uses mongodb:27017 as the member's hostname instead of 127.0.0.1:27017

1.5.5

20 Apr 19:27
Compare
Choose a tag to compare
  • Config created by mup init now uses zodern/meteor:root as docker image
  • Update docs for Meteor support
  • Fix default docker registry host when using private docker registery
  • Avoid race condition when app.docker.prepareBundleLocally is enabled and logging into private docker registry

1.5.4

20 Apr 19:27
Compare
Choose a tag to compare
  • Increase worker_connections in nginx (@markdowney)
  • When setting config.privateDockerRegistry, the host option is now optional and defaults to the docker hub registry
  • Moved Prepare Bundle and Push Bundle to separate tasks. This will allow creating hooks that run between those two steps
  • Before building the app, it now deletes the previous build. This should fix the very rare situations where mup deployed the previous build. This can be disabled by setting the app.buildOptions.cleanBuildLocation option to false
  • Fix mup status when the config does not have a servers object
  • Reduced unnecessary output in the deploy check script
  • Mup now sets config.app.buildOptions.buildLocation to the default value while preparing the mup config, making the build location available to other plugins and hooks. You can also see the build location by running mup validate --show
  • Fix mup meteor status when mup uses a non-root user on the server

1.5.3

09 Dec 02:23
Compare
Choose a tag to compare
  • Fix getting node version when app.docker.prepareBundleLocally is enabled
  • Fix issue with let's encrypt regenerating SSL certificate too often

1.5.2

02 Dec 19:46
Compare
Choose a tag to compare
  • Add mup mongo shell command to access a Mongo shell on the server
  • Add app.docker.prepareBundleLocally option to build docker image locally instead of on the servers. It is then pushed to the private docker registry
  • Add warning when using Node 14.0 - 14.15 that the Node version is not supported
  • Fix selecting server for mup ssh and mup meteor debug
  • mup validate --scrub will now scrub proxy and privateDockerRegistry
  • Shows a message when exiting if plugins have updates
  • Add MUP_PROFILE_TASKS env var to show how long each task took
  • Fix running Prepare Bundle when env vars have spaces
  • Fix error shown when unable to find config file on newer Node versions
  • Fix overriding app's port using app.servers[server name].env.PORT
  • Add explanation to Published Ports section of meteor status's output
  • Reduced size of npm package
  • Fix spelling in log in deploy check script
  • Fix mup deploy --cached-build only requires the .tar.gz file, and not the extracted bundle folder. This matches the behavior with mup 1.4.
  • Fix using app.buildOptions.executable option on Windows
  • Document proxy.stickySessions option

Plugin API

  • The verbose option in runTaskList defaults to true when mup is run with the --verbose option
  • Add showDuration option to runTaskList. When true, nodemiral will log how long each task took. Defaults to true when the MUP_PROFILE_TASKS env var is set to true

1.5.0

01 Jun 17:50
Compare
Choose a tag to compare

Upgrading notes

  • Node 8 is now required to run mup. If you are using an older version, it will tell you and exit. This does not affect what versions of Meteor mup supports (Meteor 1.2 and newer)
  • As always, you should run mup setup and mup reconfig after upgrading

Load Balancing and Zero Downtime Deploys

There are two different implementations for load balancing. This is the simpler one. The other one is mentioned under the Swarm section.

Mup is now able to use Nginx to load balance across multiple servers with sticky sessions. When this is used with at least two servers, there will be zero downtime during deploys.

How it works:

  1. So the app is available to nginx instances on other servers, it will be exposed to the internet (or to the private network if the new privateIp option is configured for each server). In the future mup might setup a firewall to restrict access to the servers with nginx.
  2. To avoid conflicts with other apps, it uses a random port between 10,000 and 20,000. The random number generator uses the app's name as a string.
  3. When mup setup or mup proxy setup is run, a Nginx config is generated with a list of the server's private IP's, or, if that isn't available, their host.

Sticky sessions can be disabled for apps that do not need it.

Private Docker Registry

Mup can be configured to use a private docker registry, which allows it to deploy to multiple servers much faster. Instead of uploading the bundle and running Prepare Bundle task on every server, it can do that one a single server, store the image in the registry, and use that image on all of the other servers.

Production Debugging of Meteor Server

Run mup meteor debug to debug your Meteor app in production. It will enable debugging in your app and forward the port to your computer so you can use Chrome's DevTools for Node, Visual Studio Code, or another debugger for node. Requires Meteor 1.6 or newer.

Swarm

Meteor Up can now manage a docker swarm cluster. When swarm is enabled in the config, Meteor up sets up a swarm cluster on all of the servers listed in the config. During mup setup, it diffs the config given to it by plugins and the mup config with the current cluster state and carefully makes any needed adjustments to avoid unnecessarily disrupting running swarm services. Mup uses Docker Swarm instead of Kubernetes since it is simpler and uses fewer resources.

When using swarm, rolling deploys and load balancing are always enabled. This uses a different implementation than when load balancing without Docker Swarm without the downsides it has.

We have tried to make using swarm with Meteor Up as simple and reliable as possible. In the rare situation there is an error and you have to take manual action to resolve, in many cases mup gives a solution with the error.

  • The app is deployed as a swarm service when swarm is enabled
  • Reverse Proxy uses an overlay network when swarm is enabled for communication with the app instances
  • The proxy.servers option has been added to list which servers to run the reverse proxy on. It is required when using docker swarm
  • mup docker status shows a warning when the servers do not have the same docker version (@rolljee)
  • When using swarm, the docker images created for the app use numerical tags (1, 2, 3) instead of previous and current. This is needed for swarm to correctly roll back failed deploys, but it will also give us more control over how many old versions to keep and allow manually rolling back

Performance

  • Add app.docker.useBuildKit option. When enabled, it uses the new docker image builder which reduces time spent by Prepare Bundle by 60%
  • When prepare bundle is enabled, mup waits 12 fewer seconds after starting the app and before verifying the deployment
  • Tasks to configure the proxy are no longer run in serial, improving completion speed when there are many servers
  • SSH sessions are reused between task lists to improve performance
  • mup mongo start only starts/restarts the container if it isn't running or the start script has changed. This can greatly speed up mup setup since starting MongoDB was one of the slower tasks
  • The update check no longer delays starting the cli and can be disabled by setting the environment variale MUP_SKIP_UPDATE_CHECK=false
  • Replace opencollective with opencollective-postinstall for smaller message and fewer dependencies (@rolljee)

Other Features

  • Add --overview option to mup status. It only shows the top-level status for each plugin and any problems
  • Add an optional mongo.dbName option. Multiple apps can share a database by setting it to the same value in all of their configs
  • Add mup meteor destroy command to stop and remove app from the servers
  • Add optional proxy.servers option to specify which servers to run the reverse proxy on
  • mup ssh now respects the --servers option

Verifying Deployment

  • Fix Verifying Deployment taking longer than the value in app.deployCheckWaitTime
  • Verifying Deployment now waits up to 25 seconds for each request to succeed, instead of 10
  • Fix verifying deployment with non-root user

Reduce common problems

  • Change http to https in the ROOT_URL environment variable when using the reverse proxy and SSL (@rolljee)
  • app.docker.imagePort defaults to 3000 instead of 80. This change is backwards compatible with the common docker images, and simplifies using images that run the app with a non-root user
  • Validation error shown when app.servers is empty

Docs

  • Update docs and default config for Meteor 1.8 (@ninjaPixel)
  • Add instructions for using Cloudflare with Let's Encrypt

Bugs Fixed

  • The NODE_VERSION build arg is set when building the image during Prepare Bundle with the correct node version for the Meteor version the app is using. This fixes using the zodern/meteor image with newer versions of Meteor.
  • Fix mup reconfig not able to remove environment variables that were set during the last deploy
  • Fix using images that run the app on a port other than 80 with the reverse proxy
  • When using the reverse proxy, the VIRTUAL_PORT environment variable is now set to the same value as app.docker.imagePort
  • Prevent bash from modifying custom nginx configs (For example, strings prefixed with $ were removed by bash)
  • Show stderr from remoteCommand hooks
  • Update Stop Mongo task name to use title case
  • Fix some problems with stopping the proxy
  • Fix meteor status when docker logs warnings
  • Fix uploading custom certificates before app was set up

Plugin API

  • tasks has functions that can add reusable tasks to task lists. The functions are:
    • addCreateService
    • addUpdateService
    • addCreateOrUpdateService
  • Yargs has been updated to 12.0.5. For backwards compatibility, commands with an empty description continue to be hidden. (rolljee)
  • runSSHCommand can also accept a session instead of a server object. It is recommended to use sessions since mup now reuses them
  • output from runSSHCommand will now also include stderr
  • validateConfig has an additional parameter logProblems to enable showing validation errors
  • validationErrors has errors even when getConfig(false) was used
  • VALIDATE_OPTIONS has noDefaults: true set
  • Add StatusDisplay class to help with printing the status and deciding what to show when --overview is used

1.4.5

10 Jun 02:31
Compare
Choose a tag to compare
  • Add option to keep the app running during Prepare Bundle
  • Add app.docker.prepareBundle to example config
  • Update node-tar to fix deploying from Windows
  • Fix mongo container starting when stopped with docker stop and docker daemon is restarted (@pravdomil)
  • Fix verifying deployment when using user defined network
  • Fix proxy.clientUploadLimit being ignored when not using proxy.nginxServerConfig
  • Improve messages shown when container has no ip address

1.4.4

02 Apr 21:07
Compare
Choose a tag to compare
  • Allow customizing the docker image created during Prepare Bundle. For example, this can be used to install packages using apt-get.
  • mup status will check if the default shell is bash
  • Mup will exit when a hook script fails
  • Fix running mup restart
  • Fix passing arguments to docker logs when they are in the format --option=value instead of --option value
  • Fix the validation error that the port is ignored showing when it shouldn't
  • Fix loading plugins when given the path to the plugin instead of the plugin's name