Skip to content

Commit 48c5796

Browse files
authored
Merge pull request #976 from zodern/dev
Mup 1.5
2 parents d287ebf + 135baab commit 48c5796

File tree

136 files changed

+14310
-10601
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

136 files changed

+14310
-10601
lines changed

.eslintrc.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,11 @@ rules:
4545
array-bracket-spacing:
4646
- 2
4747
- never
48-
arrow-spacing: 2
4948
block-scoped-var: 2
5049
brace-style:
5150
- 2
5251
- 1tbs
5352
- allowSingleLine: true
54-
callback-return: 2
5553
camelcase:
5654
- 2
5755
- properties: always
@@ -259,6 +257,7 @@ rules:
259257
keyword-spacing:
260258
- 2
261259
- before: true
260+
after: true
262261
space-before-blocks:
263262
- 2
264263
- always
@@ -291,4 +290,4 @@ rules:
291290
newline-per-chained-call: 0
292291
class-methods-use-this: 0
293292
no-empty-function: 0
294-
sort-imports: [2, { memberSyntaxSortOrder: ['none', 'all', 'multiple', 'single'], ignoreCase: true }]
293+
sort-imports: [2, { memberSyntaxSortOrder: ['none', 'all', 'multiple', 'single'], ignoreCase: true }]

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ node_modules
33
.vscode
44
.idea
55
*.log
6-
package-lock.json
76
docs/_site
87
coverage
8+
tests/**/package-lock.json
99

1010
tests/ssh/
1111
.nyc_output/

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ sudo: required
22

33
language: node_js
44
node_js:
5-
- "4"
65
- "8"
6+
- "14"
77

88
env:
99
- TEST_PLUGIN='default'

CHANGELOG.md

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,101 @@
1+
## Next
2+
3+
**Upgrading notes**
4+
5+
- 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)
6+
- As always, you should run `mup setup` and `mup reconfig` after upgrading
7+
8+
**Load Balancing and Zero Downtime Deploys**
9+
10+
There are two different implementations for load balancing. This is the simpler one. The other one is mentioned under the `Swarm` section.
11+
12+
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.
13+
14+
How it works:
15+
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.
16+
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.
17+
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`.
18+
19+
Sticky sessions can be disabled for apps that do not need it.
20+
21+
**Private Docker Registry**
22+
23+
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.
24+
25+
**Production Debugging of Meteor Server**
26+
27+
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.
28+
29+
**Swarm**
30+
31+
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.
32+
33+
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.
34+
35+
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.
36+
37+
- The app is deployed as a swarm service when swarm is enabled
38+
- Reverse Proxy uses an overlay network when swarm is enabled for communication with the app instances
39+
- The `proxy.servers` option has been added to list which servers to run the reverse proxy on. It is required when using docker swarm
40+
- `mup docker status` shows a warning when the servers do not have the same docker version (@rolljee)
41+
- 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
42+
43+
**Performance**
44+
- Add `app.docker.useBuildKit` option. When enabled, it uses the new docker image builder which reduces time spent by Prepare Bundle by 60%
45+
- When prepare bundle is enabled, mup waits 12 fewer seconds after starting the app and before verifying the deployment
46+
- Tasks to configure the proxy are no longer run in serial, improving completion speed when there are many servers
47+
- SSH sessions are reused between task lists to improve performance
48+
- `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
49+
- The update check no longer delays starting the cli and can be disabled by setting the environment variale `MUP_SKIP_UPDATE_CHECK=false`
50+
- Replace `opencollective` with `opencollective-postinstall` for smaller message and fewer dependencies (@rolljee)
51+
52+
**Other Features**
53+
- Add `--overview` option to `mup status`. It only shows the top-level status for each plugin and any problems
54+
- Add an optional `mongo.dbName` option. Multiple apps can share a database by setting it to the same value in all of their configs
55+
- Add `mup meteor destroy` command to stop and remove app from the servers
56+
- Add optional `proxy.servers` option to specify which servers to run the reverse proxy on
57+
- `mup ssh` now respects the `--servers` option
58+
59+
**Verifying Deployment**
60+
- Fix Verifying Deployment taking longer than the value in `app.deployCheckWaitTime`
61+
- Verifying Deployment now waits up to 25 seconds for each request to succeed, instead of 10
62+
- Fix verifying deployment with non-root user
63+
64+
**Reduce common problems**
65+
66+
- Change `http` to `https` in the `ROOT_URL` environment variable when using the reverse proxy and SSL (@rolljee)
67+
- `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
68+
- Validation error shown when `app.servers` is empty
69+
70+
**Docs**
71+
- Update docs and default config for Meteor 1.8 (@ninjaPixel)
72+
- Add instructions for using Cloudflare with Let's Encrypt
73+
74+
**Bugs Fixed**
75+
- 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.
76+
- Fix `mup reconfig` not able to remove environment variables that were set during the last deploy
77+
- Fix using images that run the app on a port other than 80 with the reverse proxy
78+
- When using the reverse proxy, the `VIRTUAL_PORT` environment variable is now set to the same value as `app.docker.imagePort`
79+
- Prevent bash from modifying custom nginx configs (For example, strings prefixed with `$` were removed by bash)
80+
- Show stderr from `remoteCommand` hooks
81+
- Update Stop Mongo task name to use title case
82+
- Fix some problems with stopping the proxy
83+
- Fix `meteor status` when docker logs warnings
84+
- Fix uploading custom certificates before app was set up
85+
86+
**Plugin API**
87+
- `tasks` has functions that can add reusable tasks to task lists. The functions are:
88+
- `addCreateService`
89+
- `addUpdateService`
90+
- `addCreateOrUpdateService`
91+
- Yargs has been updated to 12.0.5. For backwards compatibility, commands with an empty description continue to be hidden. (rolljee)
92+
- `runSSHCommand` can also accept a session instead of a server object. It is recommended to use sessions since mup now reuses them
93+
- output from `runSSHCommand` will now also include stderr
94+
- `validateConfig` has an additional parameter `logProblems` to enable showing validation errors
95+
- `validationErrors` has errors even when `getConfig(false)` was used
96+
- `VALIDATE_OPTIONS` has `noDefaults: true` set
97+
- Add `StatusDisplay` class to help with printing the status and deciding what to show when `--overview` is used
98+
199
## 1.4.6 - April 27, 2019
2100
- Mongo and nginx logs are now rotated and limited to 700mb
3101
- Fix error when running `mup setup` without a `servers` object in the config.

CONTRIBUTING.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,33 @@ For example:
5151
npm test -- --watch
5252
```
5353

54+
## Updating the Docs
55+
56+
The `/docs` directory contains the docs hosted at [meteor-up.com](http://meteor-up.com). To run the docs website locally:
57+
58+
##### 1 - Install NPM dependencies
59+
60+
```
61+
npm install
62+
```
63+
64+
##### 2 - Set-up Jekyll
65+
Follow the [official docs](https://jekyllrb.com/docs/installation/) for instruction on how to set-up Jekyll on your system.
66+
67+
68+
##### 3 - Install Gems
69+
```
70+
cd docs
71+
bundle install
72+
```
73+
74+
##### 4 - Build and serve the website
75+
```
76+
cd ..
77+
npm run docs
78+
```
79+
80+
The webiste will now be running at [http://localhost:8080/](http://localhost:8080/).
5481

5582
## Financial contributions
5683

docs/.stylelintrc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
{
22
"extends": "stylelint-config-standard",
33
"ignoreFiles": [
4-
"css/bootstrap.min.css",
54
"css/tocbot.css",
65
"css/highlight.css"
76
]
8-
}
7+
}

docs/Gemfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,3 @@ end
2525

2626
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
2727
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
28-

0 commit comments

Comments
 (0)