A Google Cloud project contains your App Engine application as well as other Google Cloud resources.From the Google Cloud Console, Cloud SDK, and App Engine Admin API, you can perform all of your administrative tasks, including the common tasks covered in this topic.
Before you can deploy your apps to the App Engine standard environment, you typically need to create or set up the following:
Creating a project and application
You can select or create a new Google Cloud project and App Engine application to create and manage a collection of settings, credentials, and your app's metadata. App Engine requires all projects to enable billing, but you will only be charged if a project exceeds its free quota.
Only the Owner role has privileges to create an App Engine application in a Cloud project and that application must exist before any other account can perform tasks on that application. For example, the App Engine application must be created before an account with the App Engine Deployer role can deploy an app using a service account.
an account with the Cloud project Owner role can run the following
gcloud commands to create a Cloud project and App Engine
To programmatically create a Cloud project and App Engine application, you use both the Resource Manager API and App Engine Admin API:
To create a Cloud project and App Engine application with billing enabled:
Go to the App Engine page:
Select or create a Cloud project.
In the Your first app with PHP 5 page, select a region and enable billing:
Select a region to specify where you want to your App Engine application located. More information about App Engine locationshelp_outline
Select or create a billing account to enable billing in your project.
After the App Engine application is created in your project, the Dashboard page opens.
App Engine Locations
App Engine is regional, which means the infrastructure that runs your apps is located in a specific region, and Google manages it so that it is available redundantly across all of the zones within that region.
Meeting your latency, availability, or durability requirements are primary factors for selecting the region where your apps are run. You can generally select the region nearest to your app's users, but you should consider the locations where App Engine is available as well as the locations of the other Google Cloud products and services that your app uses. Using services across multiple locations can affect your app's latency as well as its pricing.
You cannot change an app's region after you set it.
If you already created an App Engine application, you can view its region by doing one of the following:
gcloud app describecommand.
Open the App Engine Dashboard in the Cloud Console. The region appears near the top of the page.
To deploy your apps, you must enable billing. Your account will not be charged if you stay within your free quota. If your application needs resources that exceed the free quota, you will be charged for the additional usage.
If you have a billing account when you create a Cloud project, then billing is automatically enabled on that project.
To enable billing on a Cloud project:
In the Cloud Console, go to the Billing page:
Select or create a Cloud project.
Depending on if a billing account exists or if the selected Cloud project is associated with an account, the Billing page displays one of the following:
If billing is already enabled for the selected Cloud project, then the details about the billing account are listed.
If no billing account exists, you are prompted to create a billing account and associate it with the selected Cloud project.
If a billing account exists, you are prompted to enable billing if the selected Cloud project is not already associated with a billing account. You can also click Cancel and then click Create account to create and associate a new billing account.
After you enable billing, there is no limit to the amount that you might be charged. To gain more control over your application's costs, you can create a budget and set alerts.
Changing or removing a spending limit
Spending limits enable you to specify an approximate maximum amount you could be charged for using App Engine resources in the standard environment per day.
Changing a spending limit
To change an existing spending limit:
In the Cloud Console, go to the Application settings page:
Click Edit and specify a new spending limit. When you increase the daily spending limit, the new limit takes effect immediately.
Click Save to set the spending limit for this Cloud project. If you have more than one Cloud project, you must individually set spending limits in each project.
The spending limit only applies to consumption of App Engine resources. It does not apply to other Google Cloud resources and you will be charged for their usage. Also, spending limits might be exceeded slightly while your application is disabled.
Removing a spending limit
Once the spending limit is removed from a project, you can no longer create spending limits in that project.
To remove a spending limit, contact Google Cloud support. A user with the App Engine administrator role can contact support from the Support page in Google Cloud Console:
Use the Billing page to manage your billing accounts:
Go to the Billing page in the Cloud Console:
Select the account that you want to manage and then navigate to the corresponding page to perform the following management tasks:
- See an overview of your billing account, make payments, and add billing account administrators from the Overview page.
- Create budgets and alerts on the Budgets & alerts page.
- View your transaction history and download invoices from the Transactions page.
- Export your billing data to a BigQuery Dataset from the Billing export page.
- Configure your payment account and contacts on the Payment settings page.
- Set the method of payment on the Payment method page.
For more information about billing, see the Pricing page.
Creating budgets and setting alerts
You can create a budget for a Cloud project to avoid surprises on your bill and monitor all of your Google Cloud charges from one place. With a budget, you can create alerts that send emails to your billing administrators when charges exceed a certain amount.
To create a budget and set alerts in a Cloud project:
In the Cloud Console, go to the Billing page:
Click the billing account for which you want to create a budget.
Click Budgets & alerts and then Create budget to begin creating a budget for your Cloud project.
Define your budget in the Set budget section and then specify the percentages for which you want to receive email alerts in the following Set budget alerts section.
Click Save to set the budget and enable alerts for your Cloud project. If you have multiple Cloud projects, you must individually set budgets and alerts in each project.
Disabling an application
Disable an App Engine application to stop your app from running instances and serving requests. No data loss will occur when you disable your app, nor will any configuration settings change. Simply re-enable your App Engine application to startup instances and continue serving the traffic to your app.
Your app's resources in both the standard and flexible environment are disabled and therefore, won't incur charges. However, billing charges can still occur for the other services in your Cloud project, for example you can still incur storage charges for your stored data.
If your app is actively processing a request, it will continue to complete that task and can take up to an hour before your app is completely disabled.
To disable an App Engine application:
Go to the Application settings page:
Click Disable application and then follow the prompts.
When you want your app to continue serving requests, enable the App Engine application by returning to the same Application settings page and then clicking Enable application.
Disabling your application stops all serving requests, but your data and state are retained. You will still be billed for applicable charges already incurred or charges for other services running in your project, such as Cloud SQL. To release all the resources used within the project, shut down your project.
Shutting down a project
You can disable billing and release all the Google Cloud resources that are being used in your Cloud project by shutting down that project.
After installing the Google Cloud SDK, you run the following
gcloud command to shut down a Cloud project:
To programmatically shut down your Cloud project, see Shutting Down a Project in the Resource Manager API.
To shut down a Cloud project using the Cloud Console:
Go to the Projects page:
Select the Cloud project that you want to shut down, then click delete.
For more information about managing your Cloud projects, see Cloud Resource Manager: creating, shutting down, and restoring projects.