How to Commit Changes to code on Google Compute Engine? - node.js

I am new to Google cloud and I have an application running on nodejs server deployed using Google Compute Engine. It is Javascript based application. But now, when I need to change some frontend code for my app, I am unbale to push the changes to the code.
I tried to connect it with BitBucket, succeeded but google didn't changed the deployed code base according to change in bitbucket. Then I created a google cloud repository and did same thing. I can see my changed code in google cloud repository but still the code deployed for my app is not showing any reflections of the change? I tried restarting Instance but in vain.
How to change my runnable codebase for app hosted on Google Compute Engine?

As #Adam says "Push-to-deploy" is supported only on App Engine.
If you want to setup your "Push-to-deploy" solution on compute engine you need to install Jenkins and configure it to "polling" your Git repo, then Jenkins can run "tasks" after a new commit arrive and deploy what you want!
have fun with continuos integration!

Related

how to pull new changes to google app engine using command shell

I have a node React project in Bitbucket which is already deployed in Google App Engine. I have made some changes to the my application and I would like to know how to deploy the new changes to the Google App Engine using command shell.
I have tried git pull command it says that there is no repository, even if I can see the project files.
Google Cloud Support here!
With the amount of details given and seeing what you are trying to do, I think that the best solution for you would be using Cloud Source Repositories.
If you end up using Cloud Source Repositories, here you'll find a guide explaining how to mirror a Bitbucket repository. After mirroring the desired repository, as you are using Google App Engine, you should read this documentation in which it is described how to integrate Cloud Source Repositories with Google App Engine.
Please bear in mind that using Cloud Source Repositories might involve additional charges if you exceed the free tier, this is explained in the pricing section for Cloud Source Repositories.
If you don't want to use Cloud Source Repositories, here you'll find how to clone a Bitbucket repository.

How to make Google App Service publicly visible

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.

Azure Function changes not deployed

I have a simple Function App that I implemented in the Azure Portal.It's up and running fine.
Since I would like to further develop using VS I downloaded the sources, and have setup CI/CD using VSTS. Now when I make changes in VS and commit this, it successfully triggers a build and deploys.
When I check the Azure portal I do see the deployments. No errors anywhere.
Only problem is the changes don't seem to be deployed because whenever I run the function I get same old output. I also downloaded the app content from the portal and checked the sources - still old ones.
So I'm really confused as to what got deployed and where and why is it not showing up. I did restart the app several times to no avail.
Any suggestions?

How do you deploy a Node.js app from GitHub to Google App Engine?

I'm trying to switch over from the free tier of Heroku to the free tier of Google App Engine. With Heroku, I had it set up so that when I pushed to master on GitHub, it would automatically deploy to Heroku. I am trying to set up this behavior on Google App Engine.
I was able to get my GitHub repo synced up with the Google Cloud Platform Development tool, but I am unable to figure out how to deploy it from there. I have been Googling for a few hours, but I can't seem to figure it out.
You can configure your project for automated deploying using CircleCI tool (it's free for open source projects). Follow these instructions: https://circleci.com/docs/google-cloud-platform/

Deploying Single Page app from appveyor to azure

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.

Resources