Host on Azure App Service (Autoscale, Zero-downtime deploy, Multi-region)

Do you mean for the database layer?

1 Like

yes I meant MongoDB
on bitnami on Azure
ReplicaSet vs Single instance

thanks :slight_smile:

You’ll need a replica set for redundancy/high-availability, though we generally would not recommend managing the deployment yourself - Mongo is very easy to misconfigure and very difficult to fix later without downtime.

Have you considered DaaS? (we are personally using mLab which supports Azure)

1 Like

I have used Compose.io while they fix DocumentDB which is THE best solution for MongoDB and trust me I loved it!!!

Thanks for the work on this @ramijarrar I’m currently testing this out now and am impressed but haven’t got my site going yet as deploy is throwing an error:

Command: bash .config/azure/deploy.sh
meteor-azure: WARNING! iisnode.yml will not be respected, please move configuration to web.config
meteor-azure: Setting Node version
Version 4.4.7 is already installed.
meteor-azure: Now using Node v4.4.7 (32-bit)
meteor-azure: Setting NPM version
meteor-azure: Now using NPM v3.10.9
meteor-azure: Building app
'"D:\home\meteor-azure\.meteor\\packages\meteor-tool\1.4.2_3\mt-os.windows.x86_32\meteor.bat"' is not recognized as an internal or external command,
operable program or batch file.
cp: cannot create regular file 'D:\local\LocalAppData\meteor-azure\bundle': No such file or directory
meteor-azure: Setting Node runtime
.config/azure/deploy.sh: line 134: cd: D:\local\LocalAppData\meteor-azure\bundle: No such file or directory
meteor-azure: Deploying bundle
.config/azure/deploy.sh: line 139: cd: D:\local\LocalAppData\meteor-azure: No such file or directory
meteor-azure: Finished successfully

I’m digging though meteor.bat now to try and work it out, but if anyone knows quickly I’d appreciate it.

AI agree with the others who’ve mentioned the need for improved docs. I’m happy to help with that based on my experiences working through this. I think a lot of people will come to this from the linux VM route and theres some subtle basic differences that could be explained and would really assist.

1 Like

Trying it out, but getting this error (below). I assume it is a wrong character error for alanning:roles in the folder name? How do I get around this?

@tgoldenberg @oakmad Taking a look at the moment, in the meantime: can you please open an issue on the Github repo.

1 Like

Just released v1.4.0 with support for the setting “METEOR_AZURE_NOCACHE” which will clear the cache pre-build when set to any value. I think that should solve your problem, but otherwise please go ahead and open an issue.

Thanks, it looks like something failed on the meteor initially, setting this flag cleared it up

1 Like

Sometimes if the build is interrupted you can end up with a corrupted installation (not really any different from local Meteor though :smile:)

Glad to hear that’s sorted.

Oh and make sure to turn it off for future builds (to avoid excessively long build times)

@ramijarrar Just curious, have you tried the Web App service for Linux? It looks like it offers the same benefits as the regular Web App, but without the awkwardness of Windows for us Linux people… Might be nice to add to the repo a deploy.sh that supports the Linux environment as well

So this works great, we got it up and running. The one thing I notice is that if I’ve already deployed and I’m using the site, and then I schedule another deployment with git push azure master or whatever, right around the “meteor-azure: Deploying bundle” phase, the site becomes inaccessible (or just shuts off). How do get around that?

@ramijarrar
Here are some other questions (not all related to the repository, but mainly around using Azure Web App with Meteor:

  1. Does the deployment script take a long time for you? I’m getting times over 30 minutes for a single deploy.

  2. What process do you use for testing? I am using the local Git process since I was getting errors linking with Github. What I have worked out now is to create a Deployment Slot, deploy to it, then view it, and then deploy to the production slot.

  3. How do you access your logs? Previously, I could access these easily on a VM by less or tail ing them. Have you found a setup that works for you with the Azure Web App?

Thank you so much!

Just responded to your GitHub issue regarding Linux App Service.

1 Like

If you can replicate this behavior with the latest release, please go ahead and open an issue.

New builds should definitely be queued without affecting the active deployment.

1 Like

Regarding your questions about Azure Web App with Meteor:

  1. The latest release (v1.4.4) should cut down build times by up to a factor of 3 (we have considerably large apps now deploying in ~8-10m down from at least 30-40)

  2. If you’re referring to basic exploratory testing before pushing to production: you should consider setting up blue-green deployments by using the swap feature to automate switching a staging slot into production without downtime.

  3. You can stream logs under “Monitoring > Log stream” in the portal or by accessing the Kudu service (use an external tool if you want to store and search e.g Logentries)

For future reference: Microsoft has pretty extensive documentation for App Service (as well as Kudu, if you want to learn more about the platform’s internals)

Does it mean, we don’t need to demeteorize, or use MUP etc ? Can we use the project src code directly in Git repository with just the config scripts folder ?

@satyakvv Yes you are right :slight_smile:

Update: We’ve just released version 2, which has been rewritten as an npm CLI to eliminate many UX pain-points and address some of the issues people faced with server-side bundling (see full announcement here).