-
Notifications
You must be signed in to change notification settings - Fork 71.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Installation Instructions #8
Comments
Howdy, this is the right place for this, many thanks! Howdy, the http://blog.amitapple.com/post/38418009331/azurewebsitecustomdeploymentpart2/#.U5QLYnWx3UY Specifically, the commits I added to this repo make it so that Azure runs npm install and does correctly install things. If it's not working and you're using this fork, I'd like to fix it. Under deployment details, they do offer a "view log" link to see what happened during the deployment. Here are the details relevant to our Azure deployments:
The theory behind Azure is that they run these commands during deployment. This makes it hands off. I don't have Windows and cannot run their tools; I also could not find any way to obtain a proper shell inside of Azure, so I tried these commands. I can view logs and see that |
If I understand the report correctly:
There should be some interesting logs in the deployment details in this case, I think. I may have gotten the scenario wrong, please feel free to correct me. |
Ben - Just did a pull request on my "cgm-remote-monitor" fork (originally done Thursday, May 22, 2014 11:42 PM) and it auto deployed to the "test site" and the "working site". The "working site" is still working, but the "not working site" is still not working. When I pulled the log file for the deployment (Sunday, June 08, 2014 8:16 AM) they are different. Log for "working site" (http://gcw-nightscout.azurewebsites.net/) Command: bash deploy.sh Handling node.js deployment. Using start-up script server.js from package.json. Generated web.config. The package.json file does not specify node.js engine version constraints. The node.js application will run with the default node.js version 0.10.21. npm WARN package.json [email protected] No repository field.
KuduSync.NET from: 'D:\home\site\repository' to: 'D:\home\site\wwwroot' Copying file: 'package.json' Copying file: 'js\client.js' Copying file: 'lib\pebble.js' Finished successfully. Log for "not working site" (http://testcgminstall.azurewebsites.net/) Command: bash deploy.sh
From: Ben West [mailto:[email protected]] If I understand the report correctly:
There should be some interesting logs in the deployment details in this case, I think. I may have gotten the scenario wrong, please feel free to correct me. — |
Ah, thank you. It kind of looks like |
Hmm, or is this the log just after you merged those fixes? Looks from the log like So you are running two sites under azure deployed this way and one works and one is not? I wish there were a way to get shell in azure so I could sniff around and see what is happening. For now I'm a bit lost; since it looks like last time the azure site was in a state of transition, it might be interesting to delete do one from scratch again, or even use the |
Looks like the "test" site is working now. It wasn't working immediately after the merge and redeploy... but 12 hours later... it's working. I just checked. So the issue must have been the week-old fork. That may be an interesting note for the instructions -- to ensure you have the most recent versions by pulling a merge.
From: Ben West [mailto:[email protected]] Ah, thank you. It kind of looks like socket.io is being downloaded at newer incompatible version; curious if it works now that you have the updates locking down versions. — |
Yeah, there's a sync button at the bottom, I suspect manually syncing things one more time would have worked too, not sure. I'm also going to chalk it up to the older code. I would tell people to pull a merge, but I'm not sure everyone knows how to do that. Fortunately, using github's forks, I can actually issue emails with instructions automatically from the following list: |
Release 14.0.3 Liquorice
Update `dev` from `nightscout` upstream
Filter out mongodb possible parameters.
Nightscout UPDATE 13.0
Hi - I'm about 1 week into this, so I'm coming at this as a newbee to node.js, but with development background.
It may be me, my environment, or something - but e been working how to get cgm-remote-monitor to work. I've finally figured it, and wanted to share my feedback as I'm not sure whether it goes in the metasite (http://nightscout.github.io/posts/01-quickstart/) or here or in the rnpenguin/cgm-remote-monitor (https://github.com/rnpenguin/cgm-remote-monitor). I posted this in the latter, but then wasn't sure if that was the right spot.
I'll try to be as detailed as possible, but also write for the less technical.
My environment:
Windows 8.1 x64
Microsoft Azure hosting
Microsoft WebMatrix 3
Git Bash (http://msysgit.github.io/)
node.js (http://nodejs.org/download/)
Windows Azure Command Line & Powershell
So I started with the "let's do just the basics" to get the cgm-remote-monitor (Nightscout) up and running. I did this a couple of weeks ago using a "REV 0" installation guide. Somehow I got it to work, and since then, I've been piecing together a structured repeatable process so I can have a "staging" site for new code, etc.
Step 1: Using Nightscout Quickstart Guide (http://nightscout.github.io/posts/01-quickstart/)
When I do this, the process fails. I get an Azure "internal server error." To be clear, what I do is the following -- create a new website in Azure, configure the environment variables for mongodb and mongo_collection, setup source control deployment, choose GitHub, choose the cgm-remote-monitor and master fork, and then it does it's thing. Unfortunately, it doesn't work for me. I tried Azure East, Azure West, I tried the deployment multiple times since I figured "it worked for me once" this way, why not now. It must be me. At this point, I figured out how to get the FTP username for each of my Azure websites and downloaded them locally. I compared my working deployment website to my new website and the deployment files were different -- specifically the absence of "node_modules" directory and the absence of "bower_components" from the "new" non-working site. So I tried copying the two directories into the non-working site, uploaded to Azure, and it worked. So that gave me the source problem, but not the solution.
Step 2: Getting into Development mode
I downloaded and installed MS WebMatrix 3 and Git Bash as I read the other instructions which called for "npm" and "command line" interface. Maybe there's a way to get command line in Azure, but I couldn't find it. Somewhere in the process of downloading WebMatrix, node.js was downloaded and installed to my computer. So I figured out WebMatrix3, and got the "open from source control" and pulled the cgm-remote-monitor into a "local" test site. I did the 'run' and got the errors (as there were no "node_modules" nor "bower_components" folders.
Next I tried to figure out how to get the missing folders/files in there. I ran "npm install -g bower" from the WebMatrix3 local test website folder via command line. (\documents\mywebsites<test site). I got a TON of errors.
The top of the output told me that my "node.js" was 0.8.x, and the dependency was 0.10.x. Alright, so I found and downloaded the latest node.js (see environment above).
From there, going back to the documentation, my focus was on "npm install -g bower" in order to do "bower install".
After the upgrade to Node.js 0.10.x, I had to re-do "npm install -g bower" from anywhere on command line (for example, c:\temp). The "-g" installs the files into your 'globally' available node.js. OK. Next.
I still had the problem that the two directories were NOT in my test website. So at this point, I'm back to the installation guides within the "cgm-remote-monitor" GitHub repository (https://github.com/nightscout/cgm-remote-monitor) where I see -- in accordance with RTM -- "npm install". And magical... the two missing folders appear.
And now, things were starting to click. I was also able to quickly and easily modify the database configuration file, which means I no longer have to do it in the "Azure Management Portal."
So ... to wrap up... for most people, the Quick Start guide via the Azure Website deploy from GitHub and using the "Azure Management Portal" configuration for the database environment variables is clearly the most direct path -- but it isn't working for me, and the source goes back to the missing "node_modules" and "bower_components."
Is there a way to do the "npm install" on Azure that I'm missing? When I researched it, the only thing I found was the Azure cross-platform powershell and command line. If there's no way, then it seems like the easiest thing would be to put the two directories into the cgm-remote-monitor GitHub repository as it appears to be just doing an HTTP or FTP push of the files. But that goes against my development background. So that pushes me back to the WebMatrix3 and Git Bash, but that's the opposite of the "Azure Portal" directions.
Sorry for long question - I've been working on this for days, and it finally came together. I didn't update the document directly because I'm still not sure that I'm not missing something obvious.
Thanks!
Greg
The text was updated successfully, but these errors were encountered: