christopheranderson / azure-demeteorizer

CLI tool for deploying demeteorized meteor apps on Azure App Service.
MIT License
26 stars 8 forks source link

Not support Meteor 1.3.x #23

Open kgao opened 8 years ago

kgao commented 8 years ago

Hey @christopheranderson,

I just found the tool didn't work well with Meteor 1.3.x, it was stuck at azure-demeteorizer install step. Could be node-nyp.

Current work around is converting the app from 1.3 to 1.2 to make it work.

christopheranderson commented 8 years ago

Yep. My current plan is to wait until Meteor 1.4 comes out and supports Node LTS v4. That will provide a much smoother experience for deploying to Azure Web Apps. Until then, most of these issues aren't simple to resolve. Once 1.4 is out, we should also be able to support CI/CD.

ramijarrar commented 8 years ago

@christopheranderson When you resume work on this, do you think it will be possible to support the 1.3.x line as well? As of v1.3.4 Meteor uses npm 3 which should resolve the long filename issues and VS2015 compatibility appears to have been fixed in Node v0.10.41 (we are now on 0.10.45)

ramijarrar commented 8 years ago

In all cases, probably not worth experimenting until we have a 1.4 release (so as to avoid wasting any time) but just something to keep in mind when you do. Also, to prevent more issues like these popping up I think it makes sense to continue discussion in this thread. I will close #9 as it has already been addressed for 1.2.x apps and the comments can be hard to follow.

christopheranderson commented 8 years ago

Big blocker is Node v4 support (or rather > 0.10 support). Node 0.10.x doesn't support VC++15 redistributable for node-gyp. This means that I can't install packages auto-magically on App Service, since VC++15 is the only VC++ supported on App Service. If that becomes retroactively possible for 1.3/1.2, I can make it work.

ramijarrar commented 8 years ago

Have you had a look at the change-log for 0.10.41 here? It looks like they updated Gyp for VS2015 support (from https://github.com/nodejs/node-v0.x-archive/pull/25857).

christopheranderson commented 8 years ago

Oh nice. Maybe I just need to roll the Node version then. I don't have a lot of time lately to look into this, unfortunately. If you or someone else wanted to try to get VC++15 working with the tool as it exists right now and confirm that that works, I could probably get a faster start when I find time.

ramijarrar commented 8 years ago

We have a beta release for 1.4 now, so I think that is the first priority. Once we can have Meteor installed on App service, it will be much easier to experiment with different versions.

christopheranderson commented 8 years ago

It's happening: https://twitter.com/benjamn/status/746395909286666240

I'll probably look at this end of month unless some things free up before then.

kgao commented 8 years ago

Thanks guys!

kdenz commented 8 years ago

@christopheranderson Any updates? : ) I'll deploy my upcoming app to azure if it'll support 1.4 in time, thanks!

ramijarrar commented 8 years ago

Meteor 1.4 has now been officially released.

@christopheranderson can you post any ETA for this?

christopheranderson commented 8 years ago

Sweet. I hope to have some time to look at this in the near future. I'm hoping to approach the problem fresh and minimize the need for a local CLI command - relying instead on a command that runs on Azure Web Apps. My main priority is Azure Functions right now, since I'm the PM who owns runtime/devexp.

kdenz commented 8 years ago

@christopheranderson wow, any revealing of approximately when functions will reach GA? I'm seeking to achieve serverless with my next project, looking at lambda and functions now. Sadly only lambda is at GA.

christopheranderson commented 8 years ago

We're pretty open (all our feature planning is still open), but unfortunately I've relented and we're keeping GA a surprise for now. :) If you've got a scenario you need support for, just email me at the email I have on GitHub. We're already supporting some folks in production - just no business availability SLA yet.

ramijarrar commented 8 years ago

Okay - I think now that Meteor uses npm 3 I should be able to get this working myself with a custom deployment script (was mostly there in the past, but path length issues have been a major blocker). I'll post back here if I am successful.

christopheranderson commented 8 years ago

If you or anyone can get something working, I can work to get it added as a first class experience in Azure. Looking forward to your findings.

ramijarrar commented 8 years ago

From past experience the main difficulty was getting the Meteor tool installed, the regular installer won't work (since it is GUI based) so we need to use the alternate installation steps which will exceed quotas for Free/Shared users. I'll probably publish the full scripts with some instructions late this week/early next week for those interested & that should also allow us to see more clearly where first-class support can fill pain points in the experience.

DanceParty commented 8 years ago

@ramijarrar did you get 1.4 on Azure working?

ramijarrar commented 8 years ago

@jkd65 Just finished a sprint and definitely looking to spend some time on this over the next few days (as we deploy new code)

ramijarrar commented 8 years ago

Success! Git-based deployments working with Meteor 1.4 using a custom deployment script.

I made a repo here with some basic instructions. Should be easy enough to set up - though I have only tested with Standard/Basic tier apps and aware of potential quota limitations on Free/Shared.

Also, first build will be quite slow while it installs Meteor but should be much faster after that (around 5-10 minutes with a fairly large app).

christopheranderson commented 8 years ago

SWEEET! That looks like exactly what I was hoping it'd be. No demeteorize at all, which was a hacky solution. Let me send this to our deployment gurus. The simple answer is to just point to that script for all Meteor stuff, but I think I'd prefer us to detect Meteor and run it automatically.

ramijarrar commented 8 years ago

BTW I noticed a couple issues relating to entry points (should not affect actual deployment but produce errors), going to push out a fix today. And see if I can do some testing on a free tier app.

christopheranderson commented 8 years ago

I'm getting this error pretty consistently:

Command: bash .config/azure/deploy.sh
npm WARN eslint-config-airbnb-base@3.0.1 requires a peer of eslint@^2.9.0 but none was installed.
npm WARN eslint-config-airbnb-base@3.0.1 requires a peer of eslint-plugin-import@^1.7.0 but none was installed.
npm WARN eslint-import-resolver-node@0.2.1 requires a peer of eslint-plugin-import@>=1.4.0 but none was installed.
npm WARN repository No repository field.
npm WARN repository No license field.

D:\local\LocalAppData\.meteor\packages\meteor-tool\1.3.4_4\mt-os.windows.x86_32\dev_bundle\lib\node_modules\meteor-promise\promise_server.js:165
      throw error;
            ^
Error: EINVAL, link 'D:\local\Temp\.tmpnz4vnu\juliancwirko_postcss-1.1.1\plugin.minifier-postcss.os\npm\node_modules\meteor\babel-compiler\node_modules\babel-plugin-transform-es2015-modules-commonjs\node_modules\babel-template\node_modules\babel-traverse\node_modules\invariant\node_modules\loose-envify\cli.js'
Handling node.js deployment.
KuduSync.NET from: 'D:\local\Temp\8d3cbc9938fbc92\bundle' to: 'D:\home\site\wwwroot'
Error: The directory name is invalid.
An error has occurred during web site deployment.

Kudu Sync failed
npm WARN eslint-config-airbnb-base@3.0.1 requires a peer of eslint@^2.9.0 but none was installed.\r\nnpm WARN eslint-config-airbnb-base@3.0.1 requires a peer of eslint-plugin-import@^1.7.0 but none was installed.\r\nnpm WARN eslint-import-resolver-node@0.2.1 requires a peer of eslint-plugin-import@>=1.4.0 but none was installed.\r\nnpm WARN repository No repository field.\r\nnpm WARN repository No license field.\r\n\r\nD:\local\LocalAppData\.meteor\packages\meteor-tool\1.3.4_4\mt-os.windows.x86_32\dev_bundle\lib\node_modules\meteor-promise\promise_server.js:165\r\n      throw error;\r\n            ^\r\nError: EINVAL, link 'D:\local\Temp\.tmpnz4vnu\juliancwirko_postcss-1.1.1\plugin.minifier-postcss.os\npm\node_modules\meteor\babel-compiler\node_modules\babel-plugin-transform-es2015-modules-commonjs\node_modules\babel-template\node_modules\babel-traverse\node_modules\invariant\node_modules\loose-envify\cli.js'\r\nError: The directory name is invalid.\r\nD:\Program Files (x86)\SiteExtensions\Kudu\57.50815.2378\bin\Scripts\starter.cmd bash .config/azure/deploy.sh
ramijarrar commented 8 years ago

I just updated the repo with a few fixes, can you try that now? (just paste in the new deploy.sh and commit)

christopheranderson commented 8 years ago

I should probably file my issues on your rep, huh? :P trying now

ramijarrar commented 8 years ago

Just pushed some changes to our app through Git and can confirm code updates are working reliably with Kudu Sync 😄

ramijarrar commented 8 years ago

@christopheranderson Did you get a chance to file an issue? We've been monitoring reliability over the last few weeks & the script is now in-use for production builds.