Closed ManuelDeLeon closed 7 years ago
We're currently in the final stages of testing v2 of the project, which takes a completely different approach that addresses these sorts of issues people have faced with server-side bundling (as well as other significant improvements to UX and build speeds).
Progress is being made on the v2 branch, we're mainly working on documentation at the moment - in line with a proper release around late next week.
Great, thanks!
On May 30, 2017 5:48 PM, "Rami Jarrar" notifications@github.com wrote:
We're currently in the final stages of testing v2 of the project, which takes a completely different approach that addresses these sorts of issues people have faced with server-side bundling (as well as other significant improvements to UX and build speeds).
Progress is being made on the v2 branch https://github.com/fractal-code/meteor-azure/tree/v2. We're mainly working on documentation at the moment, in line with a proper release around late next week.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/fractal-code/meteor-azure/issues/28#issuecomment-305040655, or mute the thread https://github.com/notifications/unsubscribe-auth/AED31u7VN4dZvpIPW-30-UnViZvpz30Yks5r_Kq5gaJpZM4NqpNp .
Any chance you can give me the tldr of using v2? I can't get my site back up.
On May 30, 2017 5:48 PM, "Rami Jarrar" notifications@github.com wrote:
We're currently in the final stages of testing v2 of the project, which takes a completely different approach that addresses these sorts of issues people have faced with server-side bundling (as well as other significant improvements to UX and build speeds).
Progress is being made on the v2 branch https://github.com/fractal-code/meteor-azure/tree/v2. We're mainly working on documentation at the moment, in line with a proper release around late next week.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/fractal-code/meteor-azure/issues/28#issuecomment-305040655, or mute the thread https://github.com/notifications/unsubscribe-auth/AED31u7VN4dZvpIPW-30-UnViZvpz30Yks5r_Kq5gaJpZM4NqpNp .
Let me know if you run into any issues with this/if anything is unclear:
1) In the Azure portal, open the "Deployment credentials" tab for your app and set a username/password (these will be required later)
2) Install the "meteor-azure" NPM package locally (should be at v2.0.0-rc.3),
3) In your Meteor settings.json, add a key named "meteor-azure" with the following format (similar to the way galaxy does it):
"meteor-azure": {
"siteName": "e.g foo in foo.azurewebsites.net",
"subscriptionId": "",
"resourceGroup": "",
"tenantId": "foo.onmicrosoft.com (displayed under the user dropdown in the portal",
"deploymentCreds": { "username": "", "password": "" },
"envVariables": {
"ROOT_URL": "",
"MONGO_OPLOG_URL": "",
"MONGO_URL": "",
"ANY_OTHER_ENV_VAR": "e.g for mail settings, etc."
}
}
(Note that the env variables for Node/NPM versions, Meteor settings, idle timeout, etc. are no longer necessary as these will be set automatically)
4) In the Azure portal, open the "Deployment options" tab for your app and disconnect source control then open the "Application settings" tab and clear your current settings
5) In your project directory, run meteor-azure --settings <path to settings json file> --web-config <path to web config file>
=(
> meteor-azure --settings package.json --web-config "C:\MyFiles\Meteor\viewmodel.org\.config\azure\web.config"
error: Cannot read property 'slotName' of undefined
npm ERR! Windows_NT 10.0.10586
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\manuel.de.leon\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "run" "deploy"
npm ERR! node v7.10.0
npm ERR! npm v4.0.2
npm ERR! code ELIFECYCLE
npm ERR! ViewModel.org@ deploy: `meteor-azure --settings package.json --web-config "C:\MyFiles\Meteor\viewmodel.org\.config\azure\web.config"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ViewModel.org@ deploy script 'meteor-azure --settings package.json --web-config "C:\MyFiles\Meteor\viewmodel.org\.config\azure\web.config"'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the ViewModel.org package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! meteor-azure --settings package.json --web-config "C:\MyFiles\Meteor\viewmodel.org\.config\azure\web.config"
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs ViewModel.org
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls ViewModel.org
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\MyFiles\Meteor\viewmodel.org\npm-debug.log
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli 'C:\\Users\\manuel.de.leon\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'deploy' ]
2 info using npm@4.0.2
3 info using node@v7.10.0
4 verbose run-script [ 'predeploy', 'deploy', 'postdeploy' ]
5 info lifecycle ViewModel.org@~predeploy: ViewModel.org@
6 silly lifecycle ViewModel.org@~predeploy: no script for predeploy, continuing
7 info lifecycle ViewModel.org@~deploy: ViewModel.org@
8 verbose lifecycle ViewModel.org@~deploy: unsafe-perm in lifecycle true
9 verbose lifecycle ViewModel.org@~deploy: PATH: C:\Users\manuel.de.leon\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;C:\MyFiles\Meteor\viewmodel.org\node_modules\.bin;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\ProgramData\Oracle\Java\javapath;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Microsoft DNX\Dnvm\;C:\Program Files\Microsoft\Web Platform Installer\;C:\Program Files (x86)\Microsoft SDKs\Azure\CLI\wbin;C:\ProgramData\chocolatey\bin;C:\Python27;C:\Program Files (x86)\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\130\DTS\Binn\;C:\Program Files\Microsoft SQL Server\130\DTS\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\130\Tools\Binn\ManagementStudio\;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files\Git\cmd;C:\MyFiles\Software\el;C:\Program Files (x86)\Microsoft Team Foundation Server 2015 Power Tools\;C:\Program Files (x86)\Symantec\VIP Access Client\;C:\Program Files\dotnet\;C:\Program Files\nodejs\;C:\Program Files (x86)\Git Cola\bin;C:\Users\manuel.de.leon\.dnx\runtimes\dnx-clr-win-x86.1.0.0-rc1-update2\bin;C:\Program Files (x86)\Microsoft VS Code\bin;C:\Users\manuel.de.leon\AppData\Local\.meteor;C:\Users\manuel.de.leon\AppData\Local\.meteor\;C:\Program Files (x86)\JetBrains\WebStorm 2016.2\bin;C:\Users\manuel.de.leon\AppData\Roaming\npm
10 verbose lifecycle ViewModel.org@~deploy: CWD: C:\MyFiles\Meteor\viewmodel.org
11 silly lifecycle ViewModel.org@~deploy: Args: [ '/d /s /c',
11 silly lifecycle 'meteor-azure --settings package.json --web-config "C:\\MyFiles\\Meteor\\viewmodel.org\\.config\\azure\\web.config"' ]
12 silly lifecycle ViewModel.org@~deploy: Returned: code: 1 signal: null
13 info lifecycle ViewModel.org@~deploy: Failed to exec deploy script
14 verbose stack Error: ViewModel.org@ deploy: `meteor-azure --settings package.json --web-config "C:\MyFiles\Meteor\viewmodel.org\.config\azure\web.config"`
14 verbose stack Exit status 1
14 verbose stack at EventEmitter.<anonymous> (C:\Users\manuel.de.leon\AppData\Roaming\npm\node_modules\npm\lib\utils\lifecycle.js:279:16)
14 verbose stack at emitTwo (events.js:106:13)
14 verbose stack at EventEmitter.emit (events.js:194:7)
14 verbose stack at ChildProcess.<anonymous> (C:\Users\manuel.de.leon\AppData\Roaming\npm\node_modules\npm\lib\utils\spawn.js:40:14)
14 verbose stack at emitTwo (events.js:106:13)
14 verbose stack at ChildProcess.emit (events.js:194:7)
14 verbose stack at maybeClose (internal/child_process.js:899:16)
14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
15 verbose pkgid ViewModel.org@
16 verbose cwd C:\MyFiles\Meteor\viewmodel.org
17 error Windows_NT 10.0.10586
18 error argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\manuel.de.leon\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "run" "deploy"
19 error node v7.10.0
20 error npm v4.0.2
21 error code ELIFECYCLE
22 error ViewModel.org@ deploy: `meteor-azure --settings package.json --web-config "C:\MyFiles\Meteor\viewmodel.org\.config\azure\web.config"`
22 error Exit status 1
23 error Failed at the ViewModel.org@ deploy script 'meteor-azure --settings package.json --web-config "C:\MyFiles\Meteor\viewmodel.org\.config\azure\web.config"'.
23 error Make sure you have the latest version of node.js and npm installed.
23 error If you do, this is most likely a problem with the ViewModel.org package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error meteor-azure --settings package.json --web-config "C:\MyFiles\Meteor\viewmodel.org\.config\azure\web.config"
23 error You can get information on how to open an issue for this project with:
23 error npm bugs ViewModel.org
23 error Or if that isn't available, you can get their info via:
23 error npm owner ls ViewModel.org
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]
A couple things:
Your settings file isn't your package.json, it should be your settings.json (where your Meteor settings are)
You should be running in the project directory, so you can use relative paths for the web config
Sorry about the unhelpful error messages, we are in the process of adding prechecks/validation at the moment.
doh! I was using package.json instead of settings.json
Now it runs without errors but the site is still down =/
> meteor-azure --settings settings.json --web-config .\.config\azure\web.config
info: Authenticating with interactive login...
To sign in, use a web browser to open the page https://aka.ms/devicelogin and enter the code -code- to authenticate.
info: Updating Azure application settings
info: Compiling application bundle
info: Deploying bundle tarball
info: Running server initialisation, polling for status...
info: Finished successfully
One thing to note is that I used the app service name for: "siteName": "e.g foo in foo.azurewebsites.net"
because I have a custom domain.
Side Q: Is there a way to skip (make it remember) the https://aka.ms/devicelogin
step? It's annoying to have to go to that address and copy paste the code.
Never mind about the site being down. It took a while to restart and it's back up again.
Glad to hear that it's working for you.
If you want to skip the login step, you'll need to setup a service principal in the portal (instructions for that are here. The process is a little tedious but should be straightforward to follow.
After you have your credentials, add them to your settings file in the "meteor-azure" key:
"meteor-azure": {
"servicePrincipal": {
"appId": "",
"secret": ""
}
}
Thanks for everything.
'meteor-azure' is not recognized as an internal or external command, operable program or batch file.
how should i fix it
i have installed meteor-azure using npm install meteor-azure
@varunkumar17
You will need to either install globally (to use from anywhere):
npm install -g meteor-azure
Or as a dev dependency for a particular project:
npm install --save-dev meteor-azure
@ramijarrar Thanks for the help!!!!!
@ramijarrar getting below error after deploying to azure
Error: Username containing an unescaped at-sign
at module.exports (D:\home\site\wwwroot\programs\server\npm\node_modules\meteor\npm-mongo\node_modules\mongodb\lib\url_parser.js:59:13)
at connect (D:\home\site\wwwroot\programs\server\npm\node_modules\meteor\npm-mongo\node_modules\mongodb\lib\mongo_client.js:401:16)
at Function.MongoClient.connect (D:\home\site\wwwroot\programs\server\npm\node_modules\meteor\npm-mongo\node_modules\mongodb\lib\mongo_client.js:225:3)
at new MongoConnection (packages/mongo/mongo_driver.js:169:11)
at new MongoInternals.RemoteCollectionDriver (packages/mongo/remote_collection_driver.js:4:16)
at Object.
@varunkumar17 Do you have an "@" in your mongo username/pass?
@ramijarrar Can't i deploy my meteor app without MONGO_URL param.
In my application i am not using any of the mongo collections my app just uses http module to connect to rest api. so i have just used a dummy connection string
"MONGO_URL": "mongodb://contoso123:0Fc3IolnL12312asdfawejunASDF@asdfYXX2t8a97kghVcUzcDv98hawelufhawefafnoQRGwNj2nMPL1Y9qsIr9Srdw==@anhohmongo.documents.azure.com:10250/mydatabase?ssl=true&replicaSet=globaldb",
If this is causing any issue can you please provide me with the sample dummy mongo connection string
Unfortunately the MONGO_URL param is still required by Meteor (see https://github.com/meteor/meteor-feature-requests/issues/31), but this should work:
"MONGO_URL": "none"
@ramijarrar Now getting this error when i use "MONGO_URL": "none"
Application has thrown an uncaught exception and is terminated:
Error: invalid schema, expected mongodb
at module.exports (D:\home\site\wwwroot\programs\server\npm\node_modules\meteor\npm-mongo\node_modules\mongodb\lib\url_parser.js:18:11)
at connect (D:\home\site\wwwroot\programs\server\npm\node_modules\meteor\npm-mongo\node_modules\mongodb\lib\mongo_client.js:401:16)
at Function.MongoClient.connect (D:\home\site\wwwroot\programs\server\npm\node_modules\meteor\npm-mongo\node_modules\mongodb\lib\mongo_client.js:225:3)
at new MongoConnection (packages/mongo/mongo_driver.js:169:11)
at new MongoInternals.RemoteCollectionDriver (packages/mongo/remote_collection_driver.js:4:16)
at Object.
Have you removed the mongo
package (it shouldn't be in your .versions)?
Also, you should be to test this locally by passing in MONGO_URL:
MONGO_URL=none meteor run
Used meteor remove mongo to remove mongo
after doing this app runs on my local but still getting the same issue on azure
Can you double-check the mongo
package is no longer present in your .versions file?
Also, try running with --production
on your local machine and make sure that is still working.
Script version (listed in .config/azure/deploy.sh) 1.4.5
Deployment log