I have an older Google project account that all of my services live on which has a project id with the format domain.com:api-project-123456789123. I am in my project's working directory trying to execute appcfg.py -A domain.com:api-project-123456789123 -V v1 update . but all it tells me is This application does not exist (app_id=u'domain.com:api-project-123456789123').
If I create a new project in the Google Cloud Console and use the new ID, all works just fine.
I am aware that with certain Google services such as the Container Engine Registry, they have added support for these old ID's by allowing substitution of the : with a / but that does not work here.
How do I get this ID to work with App Engine?
Edit
It may be worth noting that in the console, going to the App Engine section shows the following error instead of the normal getting started text:
Try the domain with the numbers in the project id. Example:
domain-123456789123
Your command would be:
appcfg.py -A domain-123456789123 -V v1 update .
Related
Trying to deploy my first Google Cloud Java app using Intellij. I've followed and read so many threads and have gotten absolutely nowhere on what is seemingly one of the simplest steps of getting this set up. I have installed gcloud CLI and followed the instructions here. After installing, I run the commands 'gcloud components update' and 'gcloud components install app-engine-java'. I see the folder located in both 'C:\Users<username>\AppData\Local\Google\Cloud SDK\google-cloud-sdk\platform\google_appengine' and 'C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\platform\google_appengine'. I installed as multi user after hours of trying to get the single user install working, so now I have both. When in Intellij I am creating a new Google App Engine project under Java EE, it asks to specify a Google app engine SDK. There are no options so I choose to select the path. I have tried both above paths and it only tells me 'App Engine SDK path is not correct'. What am I doing wrong?? The steps seem ridiculously simple and it just doesn't work.
You stopped at the general google app engine folder
You need to specify the full path to the java-sdk folder, see the image in this question.
I am stuck on the first page of instructions for Google App Engine
https://console.cloud.google.com/appengine/start/reception
I downloaded and installed the cloud SDK.
"gcloud init" worked.
I am stuck at "Deploy to App Engine".
When I type "gcloud app deploy" in Terminal, I get two errors.
"ERROR: An app.yaml (or appengine-web.xml) file is required to deploy this directory as an App Engine application. Create an app.yaml file using the directions at https://cloud.google.com/appengine/docs/flexible/python/configuring-your-app-with-app-yaml"
The page it says to go to does not give directions for creating the file. What is the command? Also, why is this error happening at all? If I follow the instructions on the Get Started page, I should not get an error. Some instructions must be missing or something not working when I install the SDK.
The second error I get is "ERROR: (gcloud.app.deploy) [/Users/chucky] could not be identified as a valid source directory or file."
Again, there must be instructions missing because I am following them.
Screen Shot
gcloud app deploy is for deploying a project. This means you need to have a folder with a sample project. The project will need to have an app.yaml file. Essentially, the steps are
Download and install the Google Cloud SDK
Run gcloud init to initialize the SDK (this makes you to login to Google and grant access to gcloud to your account; also sets up your default project)
Create your project (or copy an existing one) where project is your App i.e. the application you are working on. This project should have an app.yaml file.
Then deploy your project to production by running gcloud app deploy. You first have to change directory to your project folder. If you don't want to do this, you have to specify the full path to your app.yaml file.
An alternative for steps 3 - 4 is to use a Graphical User Interface (GUI) like one from us - https://nocommandline.com . You just click a button to create a new project and it will create a shell project ('hello world') with all the necessary files. To deploy your project, you also click another button 'Deploy' and it will take care of deploying your project.
From the link:
https://console.cloud.google.com/appengine/start/reception
First, you need to download the resources. You can use the Cloud SDK, Cloud Shell, directly download from github or other terminal to download the resources files. For example, you want to deploy a Python app using Cloud SDK in Windows OS:
Install and open Cloud SDK.
Copy the resources file from github:
From Cloud SDK run:
git clone https://github.com/GoogleCloudPlatform/python-docs-samples
Go to directory of your application files:
cd python-docs-samples/appengine/standard_python3/hello_world
Deploy and browse your application
Deploy using the command:
gcloud app deploy --project PROJECTID
Browse using the command:
gcloud app browse --project PROJECTID
If you see the Hello World! you've successfully deployed your application.
Where is the google app engine home root? I can't seem to find it, I want to edit the source code in there but I just can't. I want to use the default editor but I just can't seem to find the root project or wherever it is that's located at. Do you know where it is?
What you want to do is only possible if you are using App Engine Flex.
For App Engine Flex the deployment gets your files, build a Docker container with them, and then deploys this container inside a VM. As you can see on the documentation, you can connect directly to your container by running:
gcloud app instances ssh [INSTANCE-NAME] --service [SERVICE] --version [VERSION]
docker exec -it gaeapp /bin/bash
Once you run these commands you will be on the root folder of your container and changes you make on files will be reflected on the current running version of your app.
If you are using App Engine Standard, you cannot access the instances since it is a fully managed environment. Therefore you won't be able to find the root of the running app version.
NOTE: For App Engine Standard, since it uses a staging bucket to gather the code before compiling, you are able to get the files themselves but on a pre deployment state, meaning that if you change them it will not reflect on the current running version of your app. You can find your staging bucket through the App Engine Admin API. This bucket is usually staging.<PROJECT_ID>.appspot.com, although you can change this configuration.
I wanted to create an App Engine app using the following command
gcloud app create --project=recommendations-1 --region=asia-east1-b
but system told me:
ERROR: (gcloud.app.create) PERMISSION_DENIED: Operation not allowed
'#type': type.googleapis.com/google.rpc.ResourceInfo
description: The "appengine.applications.create" permission is
required.
resourceType: gae.api
Other information:
I use google cloud shell
before create app, I connect instance with [gcloud compute ssh recommendations-1 ]
I wanted to make recommendation system with (https://cloud.google.com/solutions/machine-learning/recommendation-system-tensorflow-deploy)
I have enabled [ App Engine Flexible Environment] and [App Engine Admin API] manually
I have gcloud auth login
I have gcloud config list project
I believe you have already created the project “recommendations-1”. If not, use this command first:
gcloud projects create sample-project-name
If yes, you can start by running the following commands:
gcloud config set project sample-project-name
gcloud app create --project=sample-project-name --region=valid-region
Note that your command contains an invalid region. Check the valid regions here and here or use this command to see the list and choose interactively on the console.
gcloud app create
The issue you are having is most probably because you are trying to create an application in a project (recommendations-1) from within another project causing the permission errors.
You can have two machines running at the same time. As shown here the VM that you access when using Cloud Shell is the active VM of the current project in the Cloud Console, so in case you access another VM with “gcloud compute ssh” in a terminal, you may be accessing different VMs. It will depend on which VM is set up on each tool.
So in case you are trying to create an app in the project “recommendations-1” using Cloud Shell, Cloud SDK or another tool, you will need to set "recommendations-1" as the current project in that tool by using the “gcloud config set project recommendations-1” command. If the Cloud Console current project is already set to "recommendations-1", Cloud Shell will automatically be set with this project. Otherwise, you do not have access to create an app in a project from within the instance of another project.
How to deploy a local wordpress instance to google compute engine and download the same. I manage to deploy to google app engine, looking around for the document to deploy to google compute engine and download the same. With the existing post I can see its defn possible, but not able to locate the right document.
Also is it possible to deploy using gcloud commands ?, what is the command to use ?
I tried this command gcloud preview app deploy app.yaml but it keep complaining [application] is not used by gcloud. When I remove this tag, it keeps complaning endlessly. Is there a different app.yaml structure for compute engine and app engine.
How can I generate app.yaml file that is compatible with compute engine ?. Can it be downloaded some where or using a gcloud command ?, gcloud config doesnt seem to generate one.
We just finished working on a tool and guide to help do exactly what you're asking:
https://github.com/GoogleCloudPlatform/php-docs-samples/tree/master/appengine/flexible/wordpress
Let us know if you run into any issues!