{"id":3062,"date":"2022-09-21T06:46:33","date_gmt":"2022-09-21T06:46:33","guid":{"rendered":"https:\/\/www.checkmateq.com\/blog\/?p=3062"},"modified":"2023-08-03T06:01:48","modified_gmt":"2023-08-03T06:01:48","slug":"google-app-engine","status":"publish","type":"post","link":"https:\/\/www.checkmateq.com\/blog\/google-app-engine","title":{"rendered":"How to Deploy an Application on Google App Engine?"},"content":{"rendered":"<h3>Google App Engine<\/h3>\n<p>App Engine is a managed service provided by google cloud platform, it provides you the simplest way to deploy and scale your applications in <a href=\"https:\/\/www.checkmateq.com\/google-cloud\">GCP<\/a> and end-to-end application management, it supports Go, <a href=\"https:\/\/www.checkmateq.com\/java-development\">Java<\/a>, <a href=\"https:\/\/www.checkmateq.com\/net-development\">.Net<\/a>, <a href=\"https:\/\/www.checkmateq.com\/node-js-development\">Node.js<\/a>, <a href=\"https:\/\/www.checkmateq.com\/php-development\">PHP<\/a>,<a href=\"https:\/\/www.checkmateq.com\/python-development\"> python<\/a>, Ruby, using pre-configured run times, you can also use a custom run-time and write code in any language, App engine also supports running containers, Some of the important features of app engine are Automatic load balancing &amp; Auto scaling, Application health monitoring, Application versioning, Traffic splitting .<\/p>\n<p><strong>Compute engine vs App engine\u00a0<\/strong><\/p>\n<p>Compute engine is a <a href=\"https:\/\/www.checkmateq.com\/infrastructure-services\">IAAS<\/a> (infrastructure as a service), it provides more flexibility compared to app engine, here you will be responsible for installing software&#8217;s, Choosing Hardware and maintaining availability and many more.<\/p>\n<p>where App Engine is a PAAS (Platform as a service) serverless\/ fully managed service provided by gcp, you will have less responsibilities and lower flexibility compared to app engine<\/p>\n<h3>App Engine Environments &#8211; Comparison<\/h3>\n<p>App engine provides two different kinds of environments <strong>Standard<\/strong> and <strong>Flexible<\/strong>, use S<strong>tandard<\/strong> when you want to run\u00a0 application\u00a0 in pre-configured\u00a0 language specific sandboxes where you will only take of your application, it\u00a0 provides\u00a0 services\u00a0 only for applications\u00a0 using\u00a0 \u00a0Java, Python, PHP, <a href=\"https:\/\/www.checkmateq.com\/node-js-development\">Node.js,<\/a> Ruby , Go .\u00a0 \u00a0If you want to deploy containers use <strong>Flexible<\/strong> environment , it makes use of compute engine virtual machines , you can use any runtime\u00a0 as long as you can build a docker image for it, it also provides access to background processes in virtual machines, below given comparison will give a clear understanding of differentiation between both the environments.<\/p>\n<p><img loading=\"lazy\" class=\" wp-image-3096 aligncenter\" src=\"https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-server-support-2-300x132.jpeg\" alt=\"\" width=\"725\" height=\"319\" srcset=\"https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-server-support-2-300x132.jpeg 300w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-server-support-2-1024x451.jpeg 1024w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-server-support-2-768x338.jpeg 768w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-server-support-2-1200x528.jpeg 1200w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-server-support-2.jpeg 1342w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 61vw, (max-width: 1362px) 45vw, 600px\" \/><\/p>\n<p>In this blog you can learn to create and\u00a0 deploy a Python3 application on App Engine Standard Environment, before that Install and configure gcloud cli or you can also use cloud shell , if you are using cloud shell please skip installation and continue with initializing part.<\/p>\n<p>you can launch cloud shell from web console as shown below .<\/p>\n<p><img loading=\"lazy\" class=\" wp-image-3097 aligncenter\" src=\"https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-cloud-solutions-300x154.jpg\" alt=\"\" width=\"846\" height=\"434\" srcset=\"https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-cloud-solutions-300x154.jpg 300w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-cloud-solutions-1024x527.jpg 1024w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-cloud-solutions-768x395.jpg 768w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-cloud-solutions-1536x790.jpg 1536w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-cloud-solutions.jpg 1920w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/p>\n<h3><strong>Installing gcloud CLI<\/strong><\/h3>\n<p>following steps will only help you to install CLI on Linux 64-bit (x86_64) platform, run below given commands on your command line to download \u00a0Linux 64-bit archive file and extract it .<\/p>\n<pre class=\"clear-for-copy\">curl -O https:\/\/dl.google.com\/dl\/cloudsdk\/channels\/rapid\/downloads\/google-cloud-cli-403.0.0-linux-x86_64.tar.gz\r\ntar -xf google-cloud-cli-403.0.0-linux-x86_64.tar.gz\r\n<\/pre>\n<p>Now run below given command to install\u00a0 gcloud CLI , and enter yes and give the path when it prompts for<\/p>\n<pre>.\/google-cloud-sdk\/install.sh<\/pre>\n<h3>Initializing gcloud CLI<\/h3>\n<p>then to initialize gcloud CLI run <strong>gcloud init<\/strong> command on your terminal , Select option <strong>Log in with a new account<\/strong> when it prompts\u00a0 &#8220;choose an account that you would like to initialize with , same is shown in the below given snapshot&#8221;<\/p>\n<p><img loading=\"lazy\" class=\" wp-image-3068 aligncenter\" src=\"https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-cloud-solutions-1-2-300x123.jpeg\" alt=\"\" width=\"828\" height=\"340\" srcset=\"https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-cloud-solutions-1-2-300x123.jpeg 300w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-cloud-solutions-1-2-1024x419.jpeg 1024w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-cloud-solutions-1-2-768x315.jpeg 768w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-cloud-solutions-1-2-1536x629.jpeg 1536w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-cloud-solutions-1-2-1200x492.jpeg 1200w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-cloud-solutions-1-2.jpeg 1677w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 61vw, (max-width: 1362px) 45vw, 600px\" \/><\/p>\n<p>then a link will be provided which you should copy and open it in your browser\u00a0 and login to your gcp account in order to get authorization code .<\/p>\n<p><img loading=\"lazy\" class=\" wp-image-3069 aligncenter\" src=\"https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-software-solution--300x143.jpeg\" alt=\"\" width=\"851\" height=\"406\" srcset=\"https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-software-solution--300x143.jpeg 300w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-software-solution--1024x489.jpeg 1024w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-software-solution--768x366.jpeg 768w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-software-solution--1536x733.jpeg 1536w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-software-solution--1200x573.jpeg 1200w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-software-solution-.jpeg 1920w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/p>\n<p>After opening the link in your browser , select the account that you want to authorize with and click on allow ,<img loading=\"lazy\" class=\" wp-image-3070 aligncenter\" src=\"https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Screenshot-861-300x169.png\" alt=\"\" width=\"831\" height=\"468\" srcset=\"https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Screenshot-861-300x169.png 300w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Screenshot-861-1024x576.png 1024w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Screenshot-861-768x432.png 768w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Screenshot-861-1536x864.png 1536w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Screenshot-861-1200x675.png 1200w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Screenshot-861.png 1920w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 61vw, (max-width: 1362px) 45vw, 600px\" \/><\/p>\n<p>then copy the authorization code and give it in your terminal<\/p>\n<p><img loading=\"lazy\" class=\"wp-image-3071 alignright\" src=\"https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Hire-Checkmate-cloud-engineer-1-188x300.jpeg\" alt=\"\" width=\"360\" height=\"574\" srcset=\"https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Hire-Checkmate-cloud-engineer-1-188x300.jpeg 188w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Hire-Checkmate-cloud-engineer-1.jpeg 579w\" sizes=\"(max-width: 360px) 85vw, 360px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" class=\" wp-image-3072 aligncenter\" src=\"https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Hire-Checkmate-application-support-300x129.jpeg\" alt=\"\" width=\"844\" height=\"363\" srcset=\"https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Hire-Checkmate-application-support-300x129.jpeg 300w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Hire-Checkmate-application-support-1024x442.jpeg 1024w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Hire-Checkmate-application-support-768x331.jpeg 768w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Hire-Checkmate-application-support-1536x662.jpeg 1536w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Hire-Checkmate-application-support-1200x518.jpeg 1200w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Hire-Checkmate-application-support.jpeg 1920w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>Check the initialization by using any gcloud command<\/p>\n<p><img loading=\"lazy\" class=\" wp-image-3077 aligncenter\" src=\"https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-server-support-1-300x34.jpeg\" alt=\"\" width=\"882\" height=\"100\" srcset=\"https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-server-support-1-300x34.jpeg 300w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-server-support-1-1024x115.jpeg 1024w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-server-support-1-768x87.jpeg 768w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-server-support-1-1536x173.jpeg 1536w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-server-support-1-1200x135.jpeg 1200w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-server-support-1.jpeg 1650w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/p>\n<p>&nbsp;<\/p>\n<h3>Writing the Web App<\/h3>\n<p>create a folder with any name(helloworld is the name used in this blog) , and create files named app.yaml, main.py, requirements.txt\u00a0 ,<\/p>\n<p>To deploy your web app to App Engine, you need an\u00a0 configuration file named\u00a0 <strong>app.yaml<\/strong> , it defines your web application&#8217;s\u00a0 settings for App Engine , <strong>main.py\u00a0\u00a0<\/strong> is where the python code for this specific application is present , <strong>requirements.txt<\/strong> is where the dependencies of this application are mentioned .<\/p>\n<p>copy the content into the files as given below<br \/>\n<strong>main.py<\/strong><\/p>\n<pre>import flask\r\n\r\n# If `entrypoint` is not defined in app.yaml, App Engine will look for an app called `app` in `main.py`.\r\napp = flask.Flask(__name__)\r\n\r\n\r\n@app.get(\"\/\")\r\ndef hello():\r\n    \"\"\"Return a friendly HTTP greeting.\"\"\"\r\n    return \"Hello World!\\n\"\r\n\r\n\r\nif __name__ == \"__main__\":\r\n    app.run(host=\"localhost\", port=8080, debug=True)\r\n<\/pre>\n<p>above given code is written using flask frame work , this just gives\u00a0 <strong>Hello World! <\/strong> on the website.<\/p>\n<p><strong>requirements.txt<\/strong><\/p>\n<pre>Flask==2.0.3<\/pre>\n<p><strong>app.yaml<\/strong><\/p>\n<pre>runtime: python39<\/pre>\n<p>Now lets deploy this application on google App Engine, go on to your terminal and set the project that you want to deploy on, use below given command.<\/p>\n<p>gcloud config set project &lt;project-ID&gt;<\/p>\n<p><img loading=\"lazy\" class=\" wp-image-3100 aligncenter\" src=\"https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Screenshot-876-300x25.png\" alt=\"\" width=\"852\" height=\"71\" srcset=\"https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Screenshot-876-300x25.png 300w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Screenshot-876-1024x84.png 1024w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Screenshot-876-768x63.png 768w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Screenshot-876-1536x126.png 1536w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Screenshot-876-1200x99.png 1200w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Screenshot-876.png 1775w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/p>\n<p>you can get project-ID by using command <strong>gcloud projects list<\/strong><\/p>\n<p><img loading=\"lazy\" class=\" wp-image-3101 aligncenter\" src=\"https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-product-lifecycle-management-300x72.jpeg\" alt=\"\" width=\"763\" height=\"183\" srcset=\"https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-product-lifecycle-management-300x72.jpeg 300w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-product-lifecycle-management-1024x247.jpeg 1024w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-product-lifecycle-management-1536x371.jpeg 1536w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-product-lifecycle-management-1200x290.jpeg 1200w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-product-lifecycle-management.jpeg 1602w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 61vw, (max-width: 1362px) 45vw, 600px\" \/><\/p>\n<p>Now\u00a0 change to the directory where your application files are stored<\/p>\n<pre>cd helloworld<\/pre>\n<p>Create app using command <strong><a href=\"https:\/\/www.checkmateq.com\/google-cloud\">gcloud<\/a> app create\u00a0 <\/strong> and\u00a0 select the region that you want to deploy your app on, all the app engine commands starts with\u00a0 gcloud &lt;app&gt; , and it starts with gcloud &lt;compute&gt; for compute engine commands.<\/p>\n<p><img loading=\"lazy\" class=\" wp-image-3102 aligncenter\" src=\"https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-product-engineering-300x201.jpeg\" alt=\"\" width=\"989\" height=\"663\" srcset=\"https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-product-engineering-300x201.jpeg 300w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-product-engineering-1024x686.jpeg 1024w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-product-engineering-768x514.jpeg 768w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-product-engineering-1200x803.jpeg 1200w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-product-engineering.jpeg 1504w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>Now run the following command to deploy the application.<\/p>\n<pre>gcloud app deploy<\/pre>\n<p><img loading=\"lazy\" class=\" wp-image-3104 aligncenter\" src=\"https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-product-engineering-1-300x221.jpeg\" alt=\"\" width=\"776\" height=\"572\" srcset=\"https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-product-engineering-1-300x221.jpeg 300w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-product-engineering-1-1024x754.jpeg 1024w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-product-engineering-1-768x566.jpeg 768w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-product-engineering-1.jpeg 1162w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 61vw, (max-width: 1362px) 45vw, 600px\" \/><\/p>\n<p>Then use command <strong>gcloud app browse\u00a0\u00a0<\/strong>, it will give you a link to the application or it will directly open your application on the browser.<\/p>\n<p><img loading=\"lazy\" class=\" wp-image-3107 aligncenter\" src=\"https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-offshore-software-development-300x35.jpeg\" alt=\"\" width=\"823\" height=\"96\" srcset=\"https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-offshore-software-development-300x35.jpeg 300w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-offshore-software-development-1024x121.jpeg 1024w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-offshore-software-development-768x90.jpeg 768w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-offshore-software-development.jpeg 1121w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 61vw, (max-width: 1362px) 45vw, 600px\" \/><\/p>\n<p><img loading=\"lazy\" class=\" wp-image-3108 aligncenter\" src=\"https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-CMS-development-300x161.jpeg\" alt=\"\" width=\"656\" height=\"352\" srcset=\"https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-CMS-development-300x161.jpeg 300w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-CMS-development-1024x551.jpeg 1024w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-CMS-development-768x413.jpeg 768w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-CMS-development-1536x826.jpeg 1536w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-CMS-development-1200x646.jpeg 1200w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-CMS-development.jpeg 1920w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 61vw, (max-width: 1362px) 45vw, 600px\" \/><\/p>\n<p>As we successfully deployed the application , lets see how versioning and traffic splitting works in\u00a0 app engine, you can list versions by using<strong> gcloud app versions list<\/strong><\/p>\n<p><img loading=\"lazy\" class=\" wp-image-3115 aligncenter\" src=\"https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-web-designing-300x33.jpeg\" alt=\"\" width=\"827\" height=\"91\" srcset=\"https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-web-designing-300x33.jpeg 300w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-web-designing-1024x111.jpeg 1024w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-web-designing-1536x167.jpeg 1536w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-web-designing-1200x130.jpeg 1200w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-web-designing.jpeg 1844w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 61vw, (max-width: 1362px) 45vw, 600px\" \/><\/p>\n<p>Now deploy the application again but with a version tag this time, In production you may have many changes in each version of the application to be deployed , but\u00a0 here I am deploying same\u00a0 deploying same application with a different version tag.<\/p>\n<pre>gcloud app deploy --version=v2<\/pre>\n<p>here v2 is the version name iam using.<\/p>\n<p><img loading=\"lazy\" class=\" wp-image-3116 aligncenter\" src=\"https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Screenshot-892-300x224.png\" alt=\"\" width=\"742\" height=\"554\" srcset=\"https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Screenshot-892-300x224.png 300w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Screenshot-892-1024x764.png 1024w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Screenshot-892-768x573.png 768w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Screenshot-892-1200x895.png 1200w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Screenshot-892.png 1261w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 61vw, (max-width: 1362px) 45vw, 600px\" \/><\/p>\n<p>Once again check for the available versions , observe the highlighted in the following snapshot, traffic is completely diverted to newly deployed version even though both the versions are in SERVING status as we did not split traffic between any versions.<\/p>\n<p><img loading=\"lazy\" class=\" wp-image-3117 aligncenter\" src=\"https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-free-DevOps-support-300x42.jpg\" alt=\"\" width=\"850\" height=\"119\" srcset=\"https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-free-DevOps-support-300x42.jpg 300w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-free-DevOps-support-1024x142.jpg 1024w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-free-DevOps-support-768x107.jpg 768w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-free-DevOps-support-1536x213.jpg 1536w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-free-DevOps-support-1200x167.jpg 1200w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-free-DevOps-support.jpg 1628w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/p>\n<p>On your gcp web console go to <strong>versions<\/strong>\u00a0in <strong>App Engine\u00a0<\/strong>and click on split traffic,<\/p>\n<p><img loading=\"lazy\" class=\" wp-image-3118 aligncenter\" src=\"https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-web-devlopment-300x152.jpg\" alt=\"\" width=\"907\" height=\"460\" srcset=\"https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-web-devlopment-300x152.jpg 300w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-web-devlopment-1024x520.jpg 1024w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-web-devlopment-768x390.jpg 768w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-web-devlopment-1536x780.jpg 1536w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-web-devlopment-1200x609.jpg 1200w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-web-devlopment.jpg 1920w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/p>\n<p>Click on Add version and select version and traffic weight that you want to divert and save it.<\/p>\n<p><img loading=\"lazy\" class=\" wp-image-3119 aligncenter\" src=\"https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-GCP-cloud-services-300x153.jpg\" alt=\"\" width=\"808\" height=\"412\" srcset=\"https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-GCP-cloud-services-300x153.jpg 300w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-GCP-cloud-services-1024x522.jpg 1024w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-GCP-cloud-services-768x391.jpg 768w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-GCP-cloud-services-1536x782.jpg 1536w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-GCP-cloud-services-1200x611.jpg 1200w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-GCP-cloud-services.jpg 1920w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 61vw, (max-width: 1362px) 45vw, 600px\" \/><\/p>\n<p>On your terminal or web console check for the traffic splitting now,<\/p>\n<p><img loading=\"lazy\" class=\" wp-image-3122 aligncenter\" src=\"https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-platform-management-300x38.jpg\" alt=\"\" width=\"1042\" height=\"132\" srcset=\"https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-platform-management-300x38.jpg 300w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-platform-management-1024x129.jpg 1024w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-platform-management-768x97.jpg 768w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-platform-management-1536x194.jpg 1536w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-platform-management-1200x152.jpg 1200w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-platform-management.jpg 1544w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Google App Engine App Engine is a managed service provided by google cloud platform, it provides you the simplest way to deploy and scale your applications in GCP and end-to-end application management, it supports Go, Java, .Net, Node.js, PHP, python, Ruby, using pre-configured run times, you can also use a custom run-time and write code &hellip; <a href=\"https:\/\/www.checkmateq.com\/blog\/google-app-engine\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;How to Deploy an Application on Google App Engine?&#8221;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":3124,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[3,79,2,71,70,69,68,59,11,78,63,23,16,24,80,8],"_links":{"self":[{"href":"https:\/\/www.checkmateq.com\/blog\/wp-json\/wp\/v2\/posts\/3062"}],"collection":[{"href":"https:\/\/www.checkmateq.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.checkmateq.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.checkmateq.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.checkmateq.com\/blog\/wp-json\/wp\/v2\/comments?post=3062"}],"version-history":[{"count":20,"href":"https:\/\/www.checkmateq.com\/blog\/wp-json\/wp\/v2\/posts\/3062\/revisions"}],"predecessor-version":[{"id":4172,"href":"https:\/\/www.checkmateq.com\/blog\/wp-json\/wp\/v2\/posts\/3062\/revisions\/4172"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.checkmateq.com\/blog\/wp-json\/wp\/v2\/media\/3124"}],"wp:attachment":[{"href":"https:\/\/www.checkmateq.com\/blog\/wp-json\/wp\/v2\/media?parent=3062"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.checkmateq.com\/blog\/wp-json\/wp\/v2\/categories?post=3062"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.checkmateq.com\/blog\/wp-json\/wp\/v2\/tags?post=3062"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}