Production Quality Meteor Deployment to Anywhere
MIT License
Bot releases are visible (Hide)
app
instead of the deprecated meteor
object (@maxmatthews)Published by zodern over 2 years ago
mup init
Published by zodern over 2 years ago
mongodb:27017
as the member's hostname instead of 127.0.0.1:27017
Published by zodern over 2 years ago
mup init
now uses zodern/meteor:root
as docker imageapp.docker.prepareBundleLocally
is enabled and logging into private docker registryPublished by zodern over 2 years ago
config.privateDockerRegistry
, the host option is now optional and defaults to the docker hub registryapp.buildOptions.cleanBuildLocation
option to falsemup status
when the config does not have a servers objectconfig.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
mup meteor status
when mup uses a non-root user on the serverPublished by zodern almost 4 years ago
app.docker.prepareBundleLocally
is enabledPublished by zodern almost 4 years ago
mup mongo shell
command to access a Mongo shell on the serverapp.docker.prepareBundleLocally
option to build docker image locally instead of on the servers. It is then pushed to the private docker registrymup ssh
and mup meteor debug
mup validate --scrub
will now scrub proxy
and privateDockerRegistry
MUP_PROFILE_TASKS
env var to show how long each task tookapp.servers[server name].env.PORT
meteor status
's outputmup deploy --cached-build
only requires the .tar.gz
file, and not the extracted bundle
folder. This matches the behavior with mup 1.4.app.buildOptions.executable
option on Windowsproxy.stickySessions
optionPlugin API
verbose
option in runTaskList
defaults to true
when mup is run with the --verbose
optionshowDuration
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
Published by zodern over 4 years ago
Upgrading notes
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)mup setup
and mup reconfig
after upgradingLoad 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:
privateIp
option is configured for each server). In the future mup might setup a firewall to restrict access to the servers with nginx.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.
proxy.servers
option has been added to list which servers to run the reverse proxy on. It is required when using docker swarmmup docker status
shows a warning when the servers do not have the same docker version (@rolljee)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 backPerformance
app.docker.useBuildKit
option. When enabled, it uses the new docker image builder which reduces time spent by Prepare Bundle by 60%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 tasksMUP_SKIP_UPDATE_CHECK=false
opencollective
with opencollective-postinstall
for smaller message and fewer dependencies (@rolljee)Other Features
--overview
option to mup status
. It only shows the top-level status for each plugin and any problemsmongo.dbName
option. Multiple apps can share a database by setting it to the same value in all of their configsmup meteor destroy
command to stop and remove app from the serversproxy.servers
option to specify which servers to run the reverse proxy onmup ssh
now respects the --servers
optionVerifying Deployment
app.deployCheckWaitTime
Reduce common problems
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 userapp.servers
is emptyDocs
Bugs Fixed
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.mup reconfig
not able to remove environment variables that were set during the last deployVIRTUAL_PORT
environment variable is now set to the same value as app.docker.imagePort
$
were removed by bash)remoteCommand
hooksmeteor status
when docker logs warningsPlugin API
tasks
has functions that can add reusable tasks to task lists. The functions are:
addCreateService
addUpdateService
addCreateOrUpdateService
runSSHCommand
can also accept a session instead of a server object. It is recommended to use sessions since mup now reuses themrunSSHCommand
will now also include stderrvalidateConfig
has an additional parameter logProblems
to enable showing validation errorsvalidationErrors
has errors even when getConfig(false)
was usedVALIDATE_OPTIONS
has noDefaults: true
setStatusDisplay
class to help with printing the status and deciding what to show when --overview
is usedPublished by zodern over 6 years ago
app.docker.prepareBundle
to example configdocker stop
and docker daemon is restarted (@pravdomil)Published by zodern over 6 years ago
mup status
will check if the default shell is bashmup restart
docker logs
when they are in the format --option=value
instead of --option value
Published by zodern over 6 years ago
mup validate
shows message when config is validapp
property exists in the config, but app.path
is missing.Prepare Bundle
task is now only shown when Prepare Bundle
is enabledNo such container
errors in the script for Prepare Bundle since they are normal and could cause confusion on what caused the script to failPlugins
_origionalConfig
property, with the config before it was normalized or prepared by pluginsmeteor
addLocation
ending location with a period when a detail's path is emptyPublished by zodern over 6 years ago
Start Meteor
task always succeeding despite errors starting the app when using Prepare Bundle
Verifying Deployment
when app.env.PORT
is setVerifying Deployment
when using the host networkproxy.setup
when running mup setup
for the first timeapp.docker.imagePort
documentationPlugins
pluginApi.commandHistory
to check which commands have runPublished by zodern over 6 years ago
Published by zodern over 6 years ago
Status
The mup status
command gives an overview of what is running on the servers and shows any problems plugins detected.
Reverse Proxy
mup proxy nginx-config
command to view the generated configHTTP_FORWARDED_COUNT
defaults to 1 when using the reverse proxy (@jehartzog)app.env.PORT
is set to a value other than 80Mongo
app.env.MONGO_OPLOG_URL
to mongodb://mongodb/local
(@edemaine)Start Mongo
task now waits until mongo has sucessfully started before finishingStart Mongo
task will now failDepreciations
meteor.ssl
, meteor.nginx
, and meteor.docker.imageFrontendServer
are depreciated. It uses a different implementation for custom certificates and lets encrypt, each with different features and restrictions. Also, the custom certificate implementation has security problems. The reverse proxy should be used instead. It doesn't have the security problems, uses the same implementation for custom certificates and lets encrypt, and has many additional features. Learn how to use the reverse proxy in the docs.
proxy.shared.clientUploadLimit
is depreciated. Use proxy.clientUploadLimit
instead, which allows each app to have a different value.
Other Changes
mup init
will create a .deploy
folder when run in the same folder as a Meteor appmup init
is run, the default config's app.path
will be the path to that appNo such file
, it will tell the user to run mup setup
to fix itreconfig
hooks will now run during mup deploy
--show
is no longer needed to show the config when mup validate --scrub
is runmup ssh
will not require the name of a serverzodern/meteor
to list of images that Prepare Bundle is automatically enabled fordeployCheckWaitTime
mup restart
and mup meteor restart
when config has an app
object instead of meteor
/built_app
foldermup ssh
without specifying a servernpm install
will still succeed even if Open Collectives's post-install hook failsDocs
HTTP_FORWARDED_COUNT
(@jehartzog)app.buildOptions.debug
to false
in example configszodern:meteor
image to list of docker imagesPlugins
post.status
hook, plugins can show their statussolution
property to errors. Mup will show the solution in yellow before exitingutils.addDepreciation
Published by zodern almost 7 years ago
Published by zodern almost 7 years ago
servers
object is missing from the config has been removed since some deployment plugins might not need itmup init
has the correct docker image for Meteor 1.6Plugins
app.type
in the config is set to something besides meteor
Published by zodern about 7 years ago
mup validate
is now 1 when there are validation errorsproxy.shared.clientUploadLimit
--scrub
option to mup validate
, which when used with --show
shows the config with most of the sensitive information removedmup mongo logs
accepts the same options as mup logs
and other log commandsPlugins and Hooks
meteor.build
, which is run by meteor.deploy
and meteor.push
. This allows plugins or hooks to modify the bundle before it is archived and uploaded to the servers.scrubConfig(config, utils)
function, which should return the config with all sensitive information removedapi.scrubConfig()
was added, which returns the config after modified by any scrubConfig
functions from pluginsapi.validateConfig
only shows the errors on the console the first time it is runMODULE_NOT_FOUND
errors are now shown when a plugin fails to load due to being unable to resolve a moduleDocs
mup validate
Published by zodern about 7 years ago
mup validate
command, which validates the config. Has --show
option which shows the config after it has been normalized and modified by plugin's prepareConfig
functionsmup proxy logs-le
to view the Let's Encrypt logsapp.dockerImage
in the config when using Mongo, the reverse proxy, or RedisPublished by zodern about 7 years ago
npm install
during Prepare Bundle"meteor.name" has a period
app.env
is missingapp.name
is missingPublished by zodern about 7 years ago
mup ssh <server>
commandsudo
mup proxy stop
doesn't require the proxy
object to be in the configapp.docker.prepareBundle
to enable or disable prepare bundle