Рет қаралды 10,502
This is part 2 of GCP App Engine video. By end of this video you will know how to deploy a sample application. Split the traffic between multiple versions of the application. Different scaling options and migration of traffic from one version to another. Google Cloud App Engine is very important from exam's perspective. I will help you to answer any question in exam on app engine.
Important commands:
Install python libraries
gcloud components install app-engine-python
GIT URL to download sample app
git clone github.com/GoogleCloudPlatfor...
Deploy Application
gcloud app deploy app.yml --version v1
To stop serving versions named v1 and v2, use the
following:
gcloud app versions stop v1 v2
To specify automatic scaling, add a section to app.yaml that includes the term
automatic_scaling followed by key-value pairs of configuration options. These include
the following:
■■ target_cpu_utilization
■■ target_throughput_utilization
■■ max_concurrent_requests
■■ max_instances
■■ min_instances
■■ max_pending_latency
■■ min_pending_latency
Target CPU Utilization Specifies the maximum CPU utilization that occurs before additional
instances are started.
Target Throughput Utilization Specifies the maximum number of concurrent requests
before additional instances are started. This is specified as a number between 0.5 and 0.95.
Maximum Concurrent Requests Specifies the max concurrent requests an instance can
accept before starting a new instance. The default is 10; the max is 80.
Maximum and Minimum Instances Indicates the range of number of instances that can
run for this application.
Maximum and Minimum Latency Indicates the maximum and minimum time a request
will wait in the queue to be processed.
-----------------
To split the traffic:
#gcloud app services set-traffic default --splits v1=.4,v2=.6
QUESTION;
You have deployed a Django 1.5 Python application to App Engine. This version of Django
requires Python 3. For some reason, App Engine is trying to run the application using
Python 2. What file would you check and possibly modify to ensure that Python 3 is used
with this application?
A. app.config
B. app.yaml
C. services.yaml
D. deploy.yaml