I have a Node JS app that I have running on Google Cloud Platform using the Google Shell, using git clone etc. I can preview the endpoint, but only I can access it. How would I make this public?
I tried "gcloud app deploy" but it seems this needs billing access, even though I'm using the trial. Or is that correct? I'm part of an organisation so not the user that's signed up for the trial, so would that mean getting the person who did to enable my account?
Nick.
There are many options in Google Cloud Platform to deploy your Node.js application and expose the endpoint to the public internet: App Engine, Compute Engine, Kubernetes Engine.
As I can understand you are using Cloud Shell to download the code from a Git repository and to test your application in there. Web Preview will prompt you to the Google log in page, so it is not an option if you want the endpoint be accessible to others publicly.
The command you are using (gcloud app deploy) is for App Engine. I think you are in the right direction here, since App Engine will serve as the container of your application and will let you deploy your service to the public internet without any additional configuration. At this point I would recommend you to follow the step by step guide in [1].
About the role required to enable the App Engine API, you will need a project owner or project editor role.
Cheers.
Related
I am trying to deploy my Quasar app through Azure Portal. I have created a web app service, connected my github repo through the Deployment centre, and ran the build and deploy github workflow successfully (note: my npm run build calls quasar build which the Quasar docs describe). When I use FileZilla to access my server, I see my entire app along with the dist/spa folder under site/wwwroot so I believe the build worked correctly. Unfortunately, when I try to access my app through the browser, I am welcomed with the default Azure webapp page rather than my app.
Default Azure WebApp Page
I am unsure why my files are not being served. I have deployed a very simple Nuxt.js app in the past using the same approach and managed to deploy it relatively quickly. Perhaps nuxt.js does something under the hood that I am not aware about.
Any leads will be greatly appreciated.
We have a Restify API running in Azure App Service on Linux for a while now. Suddenly this app (both test and prod, they run as seperate apps) stopped working. Based on the logs the error is related to a package we are using node-highcharts-exporting which is dependent on PhantomJS. App Service is using Node 8.1.
We tried re-deploying the code, upgrading node version to 8.12 (do not want to use latest version with out testing) but still no luck.
Deployment Logs: (This part is successful. This is just for reference)
Container logs: (Startup fails here)
Tried to replicate the same environment on-prem and everything works fine. Created a new App Service which is also running into same issue. Any help is much appreciated.
Update 1:
I think I figured out what is happening. This is related to font libraries on linux https://github.com/ariya/phantomjs/issues/10904
I need to install libfontconfig but this is not supported on Azure App Service.
Yes, it is due to sandbox restriction on a App Service. Just to highlight, the standard/native Azure Web Apps run in a secure environment called a sandbox. Each app runs inside its own sandbox, isolating its execution from other instances on the same machine as well as providing an additional degree of security and privacy which would otherwise not be available.
Not supported scenarios on standard App Service - PhantomJS (/Selenium): tries to connect to local address, and also uses GDI+.Known issue for all PDF generators based on wkhtmltopdf or phantomjs: custom fonts are not rendered (system-installed font is used instead) because of sandbox GDI API limitations.See App Service GitHub sandbox page.
Based on your requirement, however you could use a custom container in App Service (You can use a custom Docker image) that lets you make OS changes that your app needs.
Checkout these document for more details on this topic:
Run a custom Linux container in Azure App Service (You can use a custom Docker image): https://learn.microsoft.com/azure/app-service/containers/quickstart-docker
Run a custom Windows container in Azure (Preview):
https://learn.microsoft.com/azure/app-service/app-service-web-get-started-windows-container
I am trying to provision a web app through Azure nodejs SDK
Are there any examples or repos that help in doing this?
Create a new web app.
set up the deployment source to bitbucket
sync with deployment source.
setup the environment variables
restart the app.
All of this done through management API...
Any inputs or guidance?
You can check out the official code sample for managing your web apps here.
This code sample includes the following:
create a resource group
create a hosting plan
create a website
list websites in a resource group
get details for a given website
update site config for a website
For other operations please refer to the SDK documentation for WebApps.
I currently have a .net and an angular app, both deployed to azure via appveyor. Now I want to add a node.js app, also in a github repo, also to be deployed via appveyor and into azure.
However I have no idea where to start.
What kind of azure app should I create? Just the standard web app service?
How do I deploy this to azure via appveyor?
What kind of azure app should I create? Just the standard web app
service?
At first, I could share Azure App Service plan and when we selected one of them with you. Please refer to this document(https://azure.microsoft.com/en-us/documentation/articles/azure-web-sites-web-hosting-plans-in-depth-overview/ ). Then, for selecting which one service plan, it depended on the site load and requirements. It is not relation to deployment channel.
How do I deploy this to azure via appveyor?
You can try to follow this guide Deploying using Web Deploy, mark Package Web Applications for Web Deploy check box in the settings=>build tab of your project in appveyor.
Then login Azure Management Portal and download publish profile.Specify the following deployment settings in AppVeyor:
Server: https://<publishUrl>/msdeploy.axd?site=<msdeploySite>
Website name: <msdeploySite>
Username: <userName>
Password: <userPWD>
NTLM: disabled
Replace <publishUrl>, <msdeploySite>, <userName> and <userPWD> with values from downloaded publishing profile XML file, in the deployment tab.
I'm trying to figure out how to continuously deploy a single page application from appveyor to an azure website. I'm in a bit of a bind because I don't have access to the azure directly, so I'm trying to figure out as many details before contacting the admin, but the appveyor/azure documentation is leaving me with some questions.
My Goals:
Deploy a static site after it's built or trigger azure to do a deployment after a successful build. The app is written in typescript with angular and a bunch of other dependencies that get compiled and bundled into a static site.
I do not want the end user to ever know a deployment is taking place, so any incremental copying to a live environment is out.
I do not want to check in derived files or builds into the repo.
I currently have a build system that bundles the static site it in a zip archive. So my questions are:
Will using the WebDeploy provider meet my goals? Will there be any downtime during deployments if I deploy the zip archive as an artifact?
Is there another approach that would work better?
Is there a way to do this with azure automated deployments? For example, trigger azure to deploy after a successful build. If so, can kudu handle cloning a private submodule as part of the deployment process. I saw that they have submodule support, but I couldn't figure out from the docs if there would be any authentication issues with private submodules.
FYI, the build system is 100% NodeJS driven and independent of the windows ecosystem.
AppVeyor will will automatically deploy to an Azure website. Use the website below to setup your deployment.
http://www.appveyor.com/docs/deployment/web-deploy
Users are going to notice the change if the static files are not cached in their browsers or if they do a hard reload. Regardless of the implementation method, It is advisable to use a CDN (content delivery network). Connect the CDN endpoints to your app service and have the DNS point to the CDN instead of app service. The CDN will serve the static files to the end user instead of the app service itself. The CDN caches the last deployed files and continues serving them to end user until you purge them. Hence, you can keep deploying to your app service and the end user doesn't get affected by your deployments at all since they are accessing your site via CDN instead of app service. Once you have a stable deployment, you can purge your CDN and the latest code will be cached to the CDN again from your app service.
To answer your question about deploying the code, Regardless of the CI/CD system you use, FTP deployment from azure CLI can be one of the methods. Click here for details. However, WebDeploy is the most standard methods of all when you deploy to an app service.