I have set up a Node.js server in Google Cloud Platform App Engine, and have also configured a custom domain, which is correctly configured and has a SSL cert.
However, I can't figure out how to actually serve through the domain.
In the GCP terminal, run this command:
gcloud app deploy
Since the server is already set up and working and the domain is already configured, that command is all that's needed to deploy.
Related
I am running Jenkins locally on Windows 10 and am having a tough time getting it to deploy to Google App Engine (Standard) with a service account. Here is what I've done so far:
Created a new service account called jenkins#PROJECT-ID.iam.gserviceaccount.com
Given that service account these permissions:
App Engine Deployer
App Engine Service Admin
Cloud Build Service Account
Cloud Build Service Agent (not sure if necessary)
Storage Admin
Downloaded the service account json key, placed it in my Documents folder
Then I used the following commands after my project builds using Node.js:
gcloud auth activate-service-account --key-file %USERPROFILE%\Documents\PROJECT\jenkins-local-sa.json
gcloud config set project PROJECT-ID
gcloud app deploy app.yaml
Then I'm hit with this error:
(gcloud.app.deploy) Error Response: [13] Failed to create cloud build: cloudbuild service account doesn't have access to projectID "PROJECT-ID".
I've seen plenty of other errors in my Google search but not this one specifically. Has anyone run across this error?
You need to enable service account user permission in cloud build settings !
I have 2 json files, I want to deploy on GCloud
With this command:
gcloud endpoints services deploy first_file.json
gcloud endpoints services deploy second_file.json
But after second file deploys the first one is removed.
Why?
If both files are for the same service you should check this documentation on how to deploy configuration files. You might be also having some issues with naming, as described in the description of the gcloud endpoints services deploy page.
Besides that, here you'll find tutorials on how to configure Endpoints on App Engine Standard.
If this is not the case, please add more information to the question, such as what is your use case and some code if possible.
I am trying to set up a development server on a Google Compute Engine VM that is as close as possible to the App Engine Flexible environment deployment of the Wordpress installation built through this tutorial.
This guides you through on how to:
Get the source
1. https://github.com/GoogleCloudPlatform/php-docs-samples.git
2. /php-docs-samples/wordpress
Install the dependencies
3. composer install
Setup the App
4. php wordpress-helper.php setup
Deploy the App
5. gcloud app deploy
Is it possible to find the Dockerfile equivalent of the App Engine deployment,
or generate an image of the app's instance that can be deployed to a VM instance?
You can pull the docker image for the deployed app with the following command (replace VERSION and SERVICE).
gcloud docker -- pull $(gcloud --format='value(deployment.container.image)' app versions describe VERSION --service SERVICE)
It's a little dusty, but you can try the App Engine Flex emulator I put together :)
https://github.com/JustinBeckwith/flem
When I create a new Google App Engine project with PyCharm, the App Engine SDK Directory field is automatically filled with the correct value.
The path name is the same used to run the app and the app runs without problems, but the Create button is grayed out and the message Please select App Engine SDK directory does not go away.
The folder is C:\Users\user\AppData\Local\Google\Cloud SDK\google-cloud-sdk\bin.
How do I fix it?
In case you haven't already used the Cloud SDK to deploy or run the local development server, install the App Engine Python component of the SDK manually:
gcloud components install app-engine-python
Change your App Engine SDK path in PyCharm to:
C:\Users\<user-name>\AppData\Local\Google\Cloud SDK\google-cloud-sdk\platform\app_engine\
When installing google Cloud SDK, the appengine is not being installed automatically. So you have to install it before first use of google Cloud SDK.
If you install google cloud SDK for current user google_appengine path is
C:\Users\<username>\AppData\Local\Google\Cloud SDK\google-cloud-sdk\platform\google_appengine\
If you install google cloud SDK for all users the google_appengine path is
C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\platform
I've configured and deployed on the command line a managed vm using google cloud sdk.
How can managed VMs be deployed using jenkins and maven?