tjanczuk / git-azure Goto Github PK
View Code? Open in Web Editor NEWDeploy multiple node.js applications to Windows Azure from MacOS using Git
License: Other
Deploy multiple node.js applications to Windows Azure from MacOS using Git
License: Other
git-azure: An uncaught exception was generated by git-azure runtime. Please report it at https://github.com/tjanczuk/git-azure/issues
Thu Jun 14 2012 18:58:23 GMT+0000 (GMT Standard Time)TypeError: Cannot call method 'toLowerCase' of undefined
at loadApp (E:\approot\repo.git-azure\src\runtime\arr.js:792:45)
at Array.onRouteRequest as 0
at Server. (E:\approot\repo.git-azure\src\runtime\node_modules\http-proxy\lib\node-http-proxy.js:174:40)
at Server.emit (events.js:90:17)
at HTTPParser.onIncoming (http.js:1684:12)
at HTTPParser.onHeadersComplete (http.js:115:25)
at Socket.ondata (http.js:1581:22)
at TCP.onread (net.js:388:27)
git-azure: 2012-06-14T18:58:23.083Z Killing existing child processes...
git-azure: Connection to the git-azure management service was unexpectedly terminated. Try refreshing your browser window.
When running this:
git azure init --publishSettings ... --servieName .. --username .. --password ..
I get
undefined
error: unknown option `%s'
undefined
consider a custom "site not available" HTML page
this prevents worker role from recycling
I would like to have a config.yml scaffolded when creating an app (it should also be added to .gitignore so it does't get added to the repo so we don't disclose keys when using public repos).
The scaffolded .yml file might look like:
# add your own config items that will be accesible using process.env._configkey_
node_env: production
Then we might have a
git azure app --config myapp
That would apply the current config.yml and spawn the env vars for that app on the server.
I tried deploying a package with a dependency on libxmljs.
If I add the dependency to my package.json and run npm install
locally, the app deploys fine, but then when I run it, I get the below error on this line:
require("libxmljs");
//[Error: Cannot find module '../build/default/libxmljs']
If I delete libxmljs from node_modules directory and push, this the output from git push that I get the following npm output:
remote: Running NPM.
remote: npm http GET http://registry.npmjs.org/libxmljs
remote: npm http 200 http://registry.npmjs.org/libxmljs
remote: npm http GET http://registry.npmjs.org/libxmljs/-/libxmljs-0.5.4.tgz
remote: npm http 200 http://registry.npmjs.org/libxmljs/-/libxmljs-0.5.4.tgz
remote:
remote: > [email protected] install C:\DWASFiles\Sites\runheat2\VirtualDirectory0\site\wwwroot\node_modules\libxmljs
remote: > node-waf configure build
remote:
remote: 'node-waf' is not recognized as an internal or external command,
remote: operable program or batch file.
remote:
remote: > [email protected] preuninstall C:\DWASFiles\Sites\runheat2\VirtualDirectory0\site\wwwroot\node_modules\libxmljs
remote: > node-waf clean
remote:
remote: 'node-waf' is not recognized as an internal or external command,
remote: operable program or batch file.
remote: npm WARN continuing anyway [email protected] preuninstall: `node-waf clean`
remote: npm WARN continuing anyway `cmd "/c" "node-waf clean"` failed with 1
remote:
remote: npm ERR! [email protected] install: `node-waf configure build`
remote: npm ERR! `cmd "/c" "node-waf configure build"` failed with 1
remote: npm ERR!
remote: npm ERR! Failed at the [email protected] install script.
remote: npm ERR! This is most likely a problem with the libxmljs package,
remote: npm ERR! not with npm itself.
remote: npm ERR! Tell the author that this fails on your system:
remote: npm ERR! node-waf configure build
remote: npm ERR! You can get their info via:
remote: npm ERR! npm owner ls libxmljs
remote: npm ERR! There is likely additional logging output above.
remote: npm ERR!
remote: npm ERR! System Windows_NT 6.1.7601
remote: npm ERR! command "D:\\Program Files (x86)\\nodejs\\\\node.exe" "D:\\Program Files (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
remote: npm ERR! cwd C:\DWASFiles\Sites\runheat2\VirtualDirectory0\site\wwwroot
remote: npm ERR! node -v v0.6.17
remote: npm ERR! npm -v 1.1.21
remote: npm ERR! code ELIFECYCLE
remote: npm ERR! message [email protected] install: `node-waf configure build`
remote: npm ERR! message `cmd "/c" "node-waf configure build"` failed with 1
remote: npm ERR! errno {}
remote: npm ERR!
remote: npm ERR! Additional logging details can be found in:
remote: npm ERR! C:\DWASFiles\Sites\runheat2\VirtualDirectory0\site\wwwroot\npm-debug.log
remote: SetConsoleTitleW: The operation completed successfully.
remote:
remote:
remote: Error - Changes committed to remote repository but your website not updated.
We should add a wiki page explaining how to fork the project and run your own instance of git-azure.
In essence:
git submodule add git@youruser:git-azure .git-azure
The way this works is because git azure init
won't bring the original git-azure from https://github.com/tjanczuk/git-azure since there is already a .git-azure folder in your repo, so it will skip that and you will be running with your own
When the app crashes, it stucks there. We need to restart the app somehow, like forever
does.
@woloski, @johnnyhalife, would you mind taking a stab at adding a section about private repos to readme.md since you did the feature?
Currently when a node.js application requires a node.js engine version that is not satisfied by any version installed, arr.js will throw and bring the system down. Diagnostics is not easy (access logs.txt, or you can notice the condition using real time logs if you have them attach at the time of the post receive hook).
This is to disable this application and return a friendly 500 with description for requests targeting this application.
This is to ensure the version git-azure runtime included in user's repo matches the version of the CLI used.
This happens during activation of a node process. Node v0.7.0 does not exhibit the issue.
When I deploy a package, devDependencies get installed as well. Below is my package.json file:
{
"author": "Igor Zevaka [email protected]",
"name": "runheat",
"description": "Runkeeper heat map",
"version": "0.0.0-8",
"repository": {
"url": ""
},
"main": "app.js",
"dependencies": {
"express": "2.5.9",
"xml2js": "",
"libxmljs" : "",
"jade": "0.26.1",
"sqlite3": "2.1.1",
"oauth": "0.9.7"
},
"devDependencies": {
"jasmine-node": "1.0.26",
"supervisor": "0.3.3",
"jslint": "0.1.8"
},
"optionalDependencies": {},
"engines": {
"node": "0.6.x"
},
"scripts": {
"pretest": "node_modules/.bin/jslint *.js static/js/script.js --color",
"test": "node_modules/.bin/jasmine-node spec || cat /dev/null",
"start": "node app.js"
},
"subdomain": "runheat"
}
Here is NPM log. Note that dependencies specified in devDependencies get installed as well (Failing in jasmine-node is another issue all together - but it shouldn't be installed in the first place).
remote: New deployment received.
remote: Updating branch 'master'.
remote: ...
remote: Preparing deployment for commit id '343ac20c1d'.
remote: Preparing files for deployment.
remote: Running NPM.
remote: npm http GET http://registry.npmjs.org/xml2js
remote: npm http GET http://registry.npmjs.org/libxmljs
remote: npm http GET http://registry.npmjs.org/jade/0.26.1
remote: npm http GET http://registry.npmjs.org/sqlite3/2.1.1
remote: npm http GET http://registry.npmjs.org/oauth/0.9.7
remote: npm http GET http://registry.npmjs.org/jasmine-node/1.0.26
remote: npm http GET http://registry.npmjs.org/supervisor/0.3.3
remote: npm http GET http://registry.npmjs.org/jslint/0.1.8
remote: npm http GET http://registry.npmjs.org/express/2.5.9
remote: npm http 200 http://registry.npmjs.org/sqlite3/2.1.1
remote: npm http 200 http://registry.npmjs.org/oauth/0.9.7
remote: npm http GET http://registry.npmjs.org/sqlite3/-/sqlite3-2.1.1.tgz
remote: npm http GET http://registry.npmjs.org/oauth/-/oauth-0.9.7.tgz
remote: npm http 200 http://registry.npmjs.org/xml2js
remote: npm http 200 http://registry.npmjs.org/jasmine-node/1.0.26
remote: npm http GET http://registry.npmjs.org/xml2js/-/xml2js-0.1.14.tgz
remote: npm http GET http://registry.npmjs.org/jasmine-node/-/jasmine-node-1.0.26.tgz
remote: npm http 200 http://registry.npmjs.org/jslint/0.1.8
remote: npm http 200 http://registry.npmjs.org/supervisor/0.3.3
remote: npm http GET http://registry.npmjs.org/jslint/-/jslint-0.1.8.tgz
remote: npm http 200 http://registry.npmjs.org/sqlite3/-/sqlite3-2.1.1.tgz
remote: npm http GET http://registry.npmjs.org/supervisor/-/supervisor-0.3.3.tgz
remote: npm http 200 http://registry.npmjs.org/oauth/-/oauth-0.9.7.tgz
remote: npm http 200 http://registry.npmjs.org/express/2.5.9
remote: npm http 200 http://registry.npmjs.org/xml2js/-/xml2js-0.1.14.tgz
remote: npm http GET http://registry.npmjs.org/express/-/express-2.5.9.tgz
remote: npm http 200 http://registry.npmjs.org/jasmine-node/-/jasmine-node-1.0.26.tgz
remote: npm http 200 http://registry.npmjs.org/jslint/-/jslint-0.1.8.tgz
remote: npm http 200 http://registry.npmjs.org/supervisor/-/supervisor-0.3.3.tgz
remote: npm http 200 http://registry.npmjs.org/libxmljs
remote: npm http 200 http://registry.npmjs.org/jade/0.26.1
remote: npm http 200 http://registry.npmjs.org/express/-/express-2.5.9.tgz
remote: npm http GET http://registry.npmjs.org/libxmljs/-/libxmljs-0.5.4.tgz
remote: npm http GET http://registry.npmjs.org/jade/-/jade-0.26.1.tgz
remote: npm http 200 http://registry.npmjs.org/libxmljs/-/libxmljs-0.5.4.tgz
remote: npm http 200 http://registry.npmjs.org/jade/-/jade-0.26.1.tgz
remote: npm WARN excluding symbolic link lib\index.js -> jade.js
remote: npm ERR! error rolling back [email protected] Error: EPERM, stat 'C:\DWASFiles\Sites\runheat2\VirtualDirectory0\site\wwwroot\node_modules\jasmine-node'
remote:
remote: npm ERR! Error: EPERM, stat 'C:\DWASFiles\Sites\runheat2\VirtualDirectory0\site\wwwroot\node_modules\jasmine-node'
remote: npm ERR!
remote: npm ERR! Please try running this command again as root/Administrator.
remote: npm ERR!
remote: npm ERR! System Windows_NT 6.1.7601
remote: npm ERR! command "D:\Program Files (x86)\nodejs\node.exe" "D:\Program Files (x86)\nodejs\node_modules\npm\bin\npm-cli.js" "install"
remote: npm ERR! cwd C:\DWASFiles\Sites\runheat2\VirtualDirectory0\site\wwwroot
remote: npm ERR! node -v v0.6.17
remote: npm ERR! npm -v 1.1.21
remote: npm ERR! path C:\DWASFiles\Sites\runheat2\VirtualDirectory0\site\wwwroot\node_modules\jasmine-node
remote: npm ERR! code EPERM
remote: npm ERR! message EPERM, stat 'C:\DWASFiles\Sites\runheat2\VirtualDirectory0\site\wwwroot\node_modules\jasmine-node'
remote: npm ERR! errno {}
remote: npm ERR! error rolling back [email protected] Error: EPERM, stat 'C:\DWASFiles\Sites\runheat2\VirtualDirectory0\site\wwwroot\node_modules\supervisor'
remote: npm ERR! error rolling back [email protected] Error: EPERM, stat 'C:\DWASFiles\Sites\runheat2\VirtualDirectory0\site\wwwroot\node_modules\oauth'
remote: npm ERR! error rolling back [email protected] Error: EPERM, stat 'C:\DWASFiles\Sites\runheat2\VirtualDirectory0\site\wwwroot\node_modules\express'
remote: npm ERR! error rolling back [email protected] Error: EPERM, stat 'C:\DWASFiles\Sites\runheat2\VirtualDirectory0\site\wwwroot\node_modules\libxmljs'
remote: npm ERR! error rolling back [email protected] Error: EPERM, stat 'C:\DWASFiles\Sites\runheat2\VirtualDirectory0\site\wwwroot\node_modules\xml2js'
remote: npm ERR! error rolling back [email protected] Error: EPERM, stat 'C:\DWASFiles\Sites\runheat2\VirtualDirectory0\site\wwwroot\node_modules\jade'
remote: npm ERR! error rolling back [email protected] Error: EPERM, stat 'C:\DWASFiles\Sites\runheat2\VirtualDirectory0\site\wwwroot\node_modules\sqlite3'
remote: npm ERR! error rolling back [email protected] Error: EPERM, stat 'C:\DWASFiles\Sites\runheat2\VirtualDirectory0\site\wwwroot\node_modules\jslint'
remote: npm ERR!
remote: npm ERR! Additional logging details can be found in:
remote: npm ERR! C:\DWASFiles\Sites\runheat2\VirtualDirectory0\site\wwwroot\npm-debug.log
remote: SetConsoleTitleW: The operation completed successfully.
remote:
remote:
remote: Error - Changes committed to remote repository but your website not updated.
This was traced down to http-party/node-http-proxy#248
default the blob container name to something derived from service name
This way we don't need Windows for repackaging the whole thing (if needed). The idea is to provide an alternative for build.cmd
to create the package on non Windows environments
stop deployment before deleting
Find a replacement on Windows or disable up front.
Things to take into account
Issue is that 'require' caches the JSON of package.json. Use JSON.parse(fs.readFileSync(...)) instead.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.