I keep reading in App Engine references about configuration directives that go into app.yaml, such as 'DBG_ENABLE'. But I can't find this file in my Android Studio created GAE project. Furthermore, I find that some of the directives in this file (for instance: Scaling) also have equivalent in appengine-web.xml.
So, what's the deal with this yaml file - do I need to create it? Where?
There is no app.yaml file created by Android studio, because usually you use Java Serverlet to implement the App Engine Application under Android Studio, it uses the /WEB-INF/appengine-web.xml file to configure the project.
The app.yaml file is used for the App Engine Project using Python, Go and PHP.
Related
I am trying to deploy app.yaml file to my Google App Engine project which I built using Ktor + gradle and I get this error,
ERROR: (gcloud.app.deploy) Cannot upload file [the file], which has size [43355410] (greater than maximum allowed size of [33554432]). Please delete the file or add to the skip_files entry in your application .yaml file and try again.
I am not using any images or videos in my projects, its pure Kotlin code but the project is 49.2MB. It seems like all the space is being occupied by the libraries I use. All of these libraries are essential to my project, how do I reduce the file size for Google App Engine since I cannot add the app.yaml file now. Strangely the project does upload when I use 'gradle appengineDeploy' command but not when I use 'gcloud app deploy app.yaml'
To resolve this issue you can set runtime in the app.yml file to java11 (I've tested it). The quote from the relevant answer:
I think this problem is related to Google App Engine Standard java 8.
When I used java11, the problem disappeared.
Anytime i try executing "gcloud app deploy", below is what i get. I just don't know why.
C:\Users\charl\Desktop\Apps\webTest\webTest>gcloud app deploy 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
(App Engine Flexible Environment) or
https://cloud.google.com/appengine/docs/standard/python/config/appref
(App Engine Standard Environment) under the tab for your language.
ERROR: (gcloud.app.deploy) [C:\Users\charl] could not be identified as
a valid source directory or file.
App Engine comes in two flavors: the classic "App Engine Standard" and the newer "App Engine Flex(ible)".
Both require some configuration in order for the App Engine service to understand how you wish to run your app. In many instances, this configuration is with a file called app.yaml. For App Engine Standard for Java, the file is called appengine-web.xml. You'll need to create one of these two files for your app before you can deploy it.
The error message you received is helpful. It provides you with links to help you create the file you will need for a successful deployment.
Setting up IntelliJ IDEA to run my PHP Wordpress (for App Engine) projects. Google Cloud Tools installed.
Have imported existing project files and then went to Tools > Google Cloud Tools > Run on a local App Engine Standard dev server.
An error is returned:
Project does not contain App Engine Standard modules: To use the App Engine Standard local development server, the project must contain at least one App Engine Standard module with an appengine-web.xml configuration file.
I read up on appengine-web.xml and apparently its used for Java projects. I'm trying to run PHP at the moment.
I haven't dealt with this file type before, is it similar to app.yaml?
Do I need this fie to set up my local server for PHP?
Actually the file appengine-web.xml corresponds to the App Engine Java runtime, you don't need to use it in your PHP project. It is similar to the app.yaml in the sense that it is where you define your default service.
In order to define the default service in your PHP app, you need the app.yaml. There are also optional configuration files, such as:
dispatch.yaml, queue.yaml, index.yaml, cron.yaml, dos.yaml
On a side note, maybe PHP Storm or Eclipse with the PHP Development tools are more suitable for your use case.
Although I started development for Google App Engine using Endpoints a while ago, I hadn't noticed this - Google's ref. page for Project structure says this:
Your development file hierarchy should look like this:
MyDir/
[pom.xml]
[build.gradle]
[index.yaml]
[cron.yaml]
[dispatch.yaml]
src/main/
appengine/
app.yaml
docker/
[Dockerfile]
java/
com.example.mycode/
MyCode.java
webapp/
[index.html]
[jsp.jsp]
WEB-INF/
[web.xml]
You'll need to define an app.yaml file that looks like this:
...
Note that the app.yaml is deemed compulsory as per the docs. In my case, I spawned a backend module(through the Wizard) in Android Studio that builds on Gradle. I have been able to build and deploy this module on GAE successfully but now I needed to switch from automatic scaling to basic/manual scaling, I found this to be done through app.yaml file.
Here is the thing: I don't have an app.yaml in place and it works fine. Where is then the config info. that GAE requires to deploy the App.
Specifically,
app.yaml specifies the environment - Java. But, I found the java plugin in build.gradle for that. Aren't 2 config places for the same thing confusing?
Is it possible to ditch app.yaml entirely for equivalent config. in build.gradle?
Why is Google claiming app.yaml to be compulsory when I am able to do without it?
The App Engine Java runtime uses its own configuration schema in XML, while others are YAML.
To set the scaling elements, follow the official reference.
I want to host a Java/AngularJS app on Google App Engine, and leverage the Eclipse plugin. I figure the most straightforward way to do this is:
From within Eclipse, start a new Google Web Project.
Go to project properties and uncheck GWT and DataNucleus.
Delete the generated java classes and GWT related stuff so you have an appengine.web.xml, web.xml, WEB-INF/lib, log4j properties, and a few other files left.
Put index.html under the war folder, sister to favicon.ico.
Change web.xml welcome file to index.html
Deploy and test that index.html is visible.
Deployment via Eclipse works fine, but myapp.appspot.com/ and myapp.appspot.com/index.html both return 404.
Simply put my use case is "how do I deploy an index.html to GAE (using Eclipse plugin) without the 800 pound guerilla that is GWT?"
I was unable to find good documentation on this.
Unchecking 'Use Google Web Toolkit' should be all you need to do to create a basic App Engine application without GWT, however, it will not create a sample index.html file. For that, you need to keep 'Generate project sample code' checked. This will create some extra Java files for you that you'll need to delete, but it's the closest you can get to what you described in your question.