felixrieseberg / ember-cli-azure-deploy

:wrench: Build Ember Cli Apps on Azure Websites
MIT License
19 stars 2 forks source link

Deployment fails at install ember cli stage #10

Closed adam-knights closed 8 years ago

adam-knights commented 8 years ago

I have an app using ember cli 1.13.8. Azure seems to pull down the assets fine but then the deployment fails with An unknown error has occurred. Check the diagnostic log for details. at the installing ember cli stage:

Switch to the temp directory

Installing ember-cli

I tried turning on deployment logs (I think I did) and going onto the ftp but I can't see anything obvious, this is a snippet from the post deploy pending xml file in kudu/trace on the ftp, just before the deployment fails:

    <step title="Copying SSH keys" date="2015-08-26T09:15:29.311" /><!-- duration: 16ms -->
    <step title="Building" date="2015-08-26T09:15:29.342" >
      <step title="Executing external process" date="2015-08-26T09:15:29.508" type="process" path="starter.cmd" arguments="bash deploy.sh" >
        <step title="Cpu: node(3148,58.719s)+bash(6184,0.031s)+bash(5516,0.063s)+cmd(11300,0.031s)=total(58.797s)" date="2015-08-26T09:16:36.109" /><!-- duration: 16ms -->
        <step title="starter.cmd: no io activity for 61s, prev-cpu=-1.000s, current-cpu=58.797s" date="2015-08-26T09:16:36.124" /><!-- duration: 0ms -->
        <step title="Cpu: node(3148,107.703s)+bash(6184,0.031s)+bash(5516,0.063s)+cmd(11300,0.031s)=total(107.828s)" date="2015-08-26T09:17:36.591" /><!-- duration: 0ms -->
        <step title="starter.cmd: no io activity for 121s, prev-cpu=58.797s, current-cpu=107.828s" date="2015-08-26T09:17:36.591" /><!-- duration: 0ms -->
        <step title="Cpu: node(3148,162.328s)+bash(6184,0.031s)+bash(5516,0.063s)+cmd(11300,0.031s)=total(162.453s)" date="2015-08-26T09:18:37.420" /><!-- duration: 16ms -->
        <step title="starter.cmd: no io activity for 182s, prev-cpu=107.828s, current-cpu=162.453s" date="2015-08-26T09:18:37.435" /><!-- duration: 0ms -->

I also accessed mysite.scm.azurewebsites.net successfully and the diagnostic dump matched what I could get from the ftp.

Let me know if I can provide anymore information that may help see what the issue is here.

felixrieseberg commented 8 years ago

Hey @adam-knights, thanks for reporting! It would be interesting to see what actually fails - can you give me your package.json? I'd like to setup a similar app and play with it a bit.

adam-knights commented 8 years ago

Thanks @felixrieseberg. I'll include package and bower at the bottom. A few other pieces of info - this is on a portal.azure.com web app. We are in a trial of azure so I spun up a F1 web app. Is there a chance the web app runs out of memory? (I've seen nothing to suggest this). If I turn off continuous deployment and upload a built version of the site by ftp then everything works fine.

Package.json:

{
  "name": "orders-app",
  "version": "0.0.0",
  "description": "Small description for orders-app goes here",
  "private": true,
  "directories": {
    "doc": "doc",
    "test": "tests"
  },
  "scripts": {
    "build": "ember build",
    "start": "ember server",
    "test": "ember test"
  },
  "repository": "",
  "engines": {
    "node": ">= 0.10.0"
  },
  "author": "",
  "license": "MIT",
  "devDependencies": {
    "body-parser": "^1.13.3",
    "broccoli-asset-rev": "^2.1.2",
    "broccoli-jscs": "^1.0.0",
    "ember-cli": "1.13.8",
    "ember-cli-app-version": "0.5.0",
    "ember-cli-babel": "^5.1.3",
    "ember-cli-bootstrap-datepicker": "0.5.3",
    "ember-cli-content-security-policy": "0.4.0",
    "ember-cli-dependency-checker": "^1.0.1",
    "ember-cli-htmlbars": "0.7.9",
    "ember-cli-htmlbars-inline-precompile": "^0.2.0",
    "ember-cli-ic-ajax": "0.2.1",
    "ember-cli-inject-live-reload": "^1.3.1",
    "ember-cli-materialize": "0.18.1",
    "ember-cli-qunit": "^1.0.0",
    "ember-cli-release": "0.2.3",
    "ember-cli-sass": "3.3.1",
    "ember-cli-simple-auth": "0.8.0",
    "ember-cli-simple-auth-oauth2": "0.8.0",
    "ember-cli-sri": "^1.0.3",
    "ember-cli-uglify": "^1.2.0",
    "ember-cli-windows-addon": "^1.2.2",
    "ember-composability": "0.2.0",
    "ember-data": "1.13.11",
    "ember-disable-proxy-controllers": "^1.0.0",
    "ember-export-application-global": "^1.0.3",
    "ember-key-responder": "0.2.1",
    "ember-modal-dialog": "0.7.7",
    "ember-new-computed": "1.0.2",
    "ember-radio-button": "1.0.7",
    "express": "^4.13.3",
    "glob": "^4.5.3",
    "morgan": "^1.6.1"
  }
}

Bower.json:

{
  "name": "orders-app",
  "ignore": [],
  "dependencies": {
    "ember": "1.13.9",
    "ember-cli-shims": "ember-cli/ember-cli-shims#0.0.3",
    "ember-cli-test-loader": "ember-cli-test-loader#0.1.3",
    "ember-data": "1.13.11",
    "ember-load-initializers": "ember-cli/ember-load-initializers#0.1.5",
    "ember-qunit": "0.4.9",
    "ember-qunit-notifications": "0.0.7",
    "ember-resolver": "~0.1.18",
    "jquery": "2.1.4",
    "loader.js": "ember-cli/loader.js#3.2.1",
    "qunit": "~1.18.0",
    "bootstrap": "~3.3.5",
    "ember-simple-auth": "0.8.0",
    "jquery-ui": "~1.11.4",
    "momentjs": "~2.10.6",
    "bootstrap-datepicker": "~1.4.0",
    "materialize": "~0.97.0"
  }
}
felixrieseberg commented 8 years ago

Oh, the memory thing is actually pretty likely. Over at Ember Cli, we saw similar issues with Amazon's smaller instances and on online editors like Node9. Let me run some tests - but in the meantime, I recommend building locally and pushing the dist folder directly, because the small instances aren't ready for monsters like Ember Cli ;-)

https://github.com/ember-cli/ember-cli/issues/3773

felixrieseberg commented 8 years ago

Quick update: Worked for me with a bigger instance, so I'm willing to blame a memory / vm size mismatch. I'll close this, since I do believe that we're dealing with memory here - let me know if you can't get it to work with a bigger machine!

adam-knights commented 8 years ago

@felixrieseberg Out of interest do you have a minimum recommendation? I moved upto B1 (as this is dev environment) but the build took 2 hours, or are you really recommending B2 and above?

felixrieseberg commented 8 years ago

Sorry to say that I don't have any precise science - when the build takes too long, I usually just increase the size. However, two hours seems extreme - you might want to just switch over to a VM - that way, you'll have an easier time configuring exactly how and what should happen when a new Git push happens (allowing you to also cache modules and be I general smarter about how Ember Cli should build).