{"id":1270,"date":"2021-07-13T10:01:33","date_gmt":"2021-07-13T09:01:33","guid":{"rendered":"https:\/\/www.easydeploy.io\/blog\/?p=1270"},"modified":"2021-07-16T10:39:32","modified_gmt":"2021-07-16T09:39:32","slug":"how-to-use-the-startup-script-in-google-compute-engine","status":"publish","type":"post","link":"https:\/\/www.easydeploy.io\/blog\/how-to-use-the-startup-script-in-google-compute-engine\/","title":{"rendered":"How to use the Startup Script in Google Compute Engine?"},"content":{"rendered":"<p>In this article we are going to learn about how to use the startup script in Google Compute Engine to automatically install the Apache web server and run the HTTP web site in the browser.<\/p>\n<p>However, there are lots of steps in creating a VM and setting up the Apache HTTP web server in an instance. To avoid these kinds of steps we need to write a startup script to automate the things.<\/p>\n<p>It will be a step by step process for running a startup script in Google Compute Engine on Google Cloud Platform. Let&#8217;s get into this article and learn about how to use startup script. Stay tuned here, we will keep publishing a lot more articles on Google Cloud.<\/p>\n<h2>What is Bootstrapping?<\/h2>\n<p>The process of installing any software or installing OS patches when a VM instance is launched is called bootstrapping. Before launching a virtual machine, you want to be sure that it is secure. For that you have to ensure that all the latest OS patches are up to date and one of the options to do that is to use a startup script in the virtual machine.<\/p>\n<p>In the virtual machine you can configure a startup script to bootstrap the application.<\/p>\n<h2>What is a Startup Script?<\/h2>\n<p>Google Compute Engine has this pretty interesting thing known as startup script. Startup scripts are bash scripts, you can apply this to your virtual machine to occur every single time when your virtual machine begins and they could be used for things like configuring the environment, downloading dependencies, initializing services and downloading updates.<\/p>\n<p>Startup scripts are applied to a running virtual machine as well as a new VM that you create from scratch or you can link a startup script that exists in Google Cloud Storage.<\/p>\n<h2>Steps for using the startup script<\/h2>\n<p>The first thing you have to do is to login to the Google Cloud Console and create a new project for your testing purpose. In the below screen you need to click on the new project icon at the right.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1228\" title=\"Selecting a project\" src=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2021\/05\/Screenshot-2021-05-28-09.07.15.png\" alt=\"Selecting a project\" width=\"654\" height=\"394\" srcset=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2021\/05\/Screenshot-2021-05-28-09.07.15.png 1020w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2021\/05\/Screenshot-2021-05-28-09.07.15-300x181.png 300w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2021\/05\/Screenshot-2021-05-28-09.07.15-768x462.png 768w\" sizes=\"(max-width: 654px) 100vw, 654px\" \/><\/p>\n<p>After clicking on the new project icon you will get the screen below. Here, you need to enter your project name and click on the create icon to create a new project.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1229\" title=\"Creating a New Project\" src=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2021\/05\/Screenshot-2021-05-28-09.09.41.png\" alt=\"Creating a New Project\" width=\"671\" height=\"509\" srcset=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2021\/05\/Screenshot-2021-05-28-09.09.41.png 714w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2021\/05\/Screenshot-2021-05-28-09.09.41-300x228.png 300w\" sizes=\"(max-width: 671px) 100vw, 671px\" \/><\/p>\n<h3><strong>Selecting the VM instances<\/strong><\/h3>\n<p>After the successful creation of the project you need to click on the navigation menu and select the VM instances from Compute Engine service. In the below screen you can see how to select the VM instances.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1274\" title=\"Selecting the VM instances\" src=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2021\/06\/Screenshot-2021-06-03-17.04.26.png\" alt=\"Selecting the VM instances\" width=\"628\" height=\"365\" srcset=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2021\/06\/Screenshot-2021-06-03-17.04.26.png 735w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2021\/06\/Screenshot-2021-06-03-17.04.26-300x174.png 300w\" sizes=\"(max-width: 628px) 100vw, 628px\" \/><\/p>\n<p>After selecting the VM instances you will get the screen below. Here, you need to click on the Create instance tab at the center of the console.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1275\" title=\"UI of VM instances\" src=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2021\/06\/Screenshot-2021-06-03-17.17.39.png\" alt=\"UI of VM instances\" width=\"598\" height=\"396\" srcset=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2021\/06\/Screenshot-2021-06-03-17.17.39.png 844w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2021\/06\/Screenshot-2021-06-03-17.17.39-300x199.png 300w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2021\/06\/Screenshot-2021-06-03-17.17.39-768x509.png 768w\" sizes=\"(max-width: 598px) 100vw, 598px\" \/><\/p>\n<h3>Creating startup script from instance template<\/h3>\n<p>Now, we are going to use a startup script from the instance template which we have already created in the project.<\/p>\n<p>If you want to know about how to create a instance template. Please have a look at our previous blog on &#8220;<a href=\"https:\/\/www.easydeploy.io\/blog\/\" target=\"_blank\" rel=\"noopener\">How to create an instance using instance template\u00a0<\/a>&#8221; to have a better understanding of Instance templates.<\/p>\n<p>After clicking on the Create instance icon you will get the screen below. Here, you need to click on the <strong>New VM instance from the template<\/strong> tab at the left and select the instance template which is already created, and click on the continue icon.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1277\" title=\"Selecting instance from template\" src=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2021\/06\/Screenshot-2021-06-03-17.25.22.png\" alt=\"Selecting instance from template\" width=\"622\" height=\"341\" srcset=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2021\/06\/Screenshot-2021-06-03-17.25.22.png 999w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2021\/06\/Screenshot-2021-06-03-17.25.22-300x165.png 300w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2021\/06\/Screenshot-2021-06-03-17.25.22-768x421.png 768w\" sizes=\"(max-width: 622px) 100vw, 622px\" \/><\/p>\n<h3>Configuring a Startup script<\/h3>\n<p>After clicking on the continue icon you will get the screen below. Here, you need to enter your instance name and by providing the label for your instances select the Region and Zone as well.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1278\" title=\"Instance details\" src=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2021\/06\/Screenshot-2021-06-03-17.27.56.png\" alt=\"Instance details\" width=\"737\" height=\"482\" srcset=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2021\/06\/Screenshot-2021-06-03-17.27.56.png 904w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2021\/06\/Screenshot-2021-06-03-17.27.56-300x196.png 300w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2021\/06\/Screenshot-2021-06-03-17.27.56-768x503.png 768w\" sizes=\"(max-width: 737px) 100vw, 737px\" \/><\/p>\n<p>Then the remaining things include Machine Configuration, Boot disk and Enabling the firewall has already been configured in the instance template. Now, to configure the Startup script you need to click on and expand the Management, security, disks tab in the below screen.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1288\" title=\"Instance details\" src=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2021\/06\/Screenshot-2021-06-04-00.50.38.png\" alt=\"Instance details\" width=\"666\" height=\"470\" srcset=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2021\/06\/Screenshot-2021-06-04-00.50.38.png 824w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2021\/06\/Screenshot-2021-06-04-00.50.38-300x212.png 300w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2021\/06\/Screenshot-2021-06-04-00.50.38-768x542.png 768w\" sizes=\"(max-width: 666px) 100vw, 666px\" \/><\/p>\n<p>&nbsp;<\/p>\n<h3>Preparing the Startup script in the Notepad<\/h3>\n<p>Before expanding the Management tab you need to open the Notepad in your system and save the Startup script which is provided in the below screen.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1283\" title=\"Startup Script\" src=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2021\/06\/Screenshot-2021-06-03-22.18.16.png\" alt=\"Startup Script\" width=\"658\" height=\"485\" srcset=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2021\/06\/Screenshot-2021-06-03-22.18.16.png 801w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2021\/06\/Screenshot-2021-06-03-22.18.16-300x221.png 300w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2021\/06\/Screenshot-2021-06-03-22.18.16-768x566.png 768w\" sizes=\"(max-width: 658px) 100vw, 658px\" \/><\/p>\n<p>In the below screen you can see the expansion of the Management tab. Now, you need to copy the script from the notepad and paste that in the startup script box under the Automation tab<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1284\" title=\"Entering the startup script in Automation\" src=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2021\/06\/Screenshot-2021-06-03-22.17.34.png\" alt=\"Entering the startup script in Automation\" width=\"705\" height=\"485\" srcset=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2021\/06\/Screenshot-2021-06-03-22.17.34.png 801w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2021\/06\/Screenshot-2021-06-03-22.17.34-300x206.png 300w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2021\/06\/Screenshot-2021-06-03-22.17.34-768x528.png 768w\" sizes=\"(max-width: 705px) 100vw, 705px\" \/><\/p>\n<p>Finally, click on the create icon at the last in the below screen to create an instance in the Google Compute Engine.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1285\" title=\"Creating an Instance\" src=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2021\/06\/Screenshot-2021-06-03-22.30.42.png\" alt=\"Creating an Instance\" width=\"682\" height=\"467\" srcset=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2021\/06\/Screenshot-2021-06-03-22.30.42.png 778w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2021\/06\/Screenshot-2021-06-03-22.30.42-300x206.png 300w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2021\/06\/Screenshot-2021-06-03-22.30.42-768x526.png 768w\" sizes=\"(max-width: 682px) 100vw, 682px\" \/><\/p>\n<h3>Instance created using startup script<\/h3>\n<p>In the below screen you can see that instance has been created successfully by using the startup script. In this you don&#8217;t need to install a separate Apache web server. Everything is automated in the startup script itself.<\/p>\n<p>After the instance is ready, it would take a couple of minutes to install all the software because we are installing a few things on the launch of the Virtual machine.<\/p>\n<p>Therefore, you have to click on the external IP address to see the website of your instances.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1286\" title=\"Instance created\" src=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2021\/06\/Screenshot-2021-06-03-22.54.43.png\" alt=\"Instance created\" width=\"810\" height=\"254\" srcset=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2021\/06\/Screenshot-2021-06-03-22.54.43.png 1251w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2021\/06\/Screenshot-2021-06-03-22.54.43-300x94.png 300w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2021\/06\/Screenshot-2021-06-03-22.54.43-1024x321.png 1024w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2021\/06\/Screenshot-2021-06-03-22.54.43-768x241.png 768w\" sizes=\"(max-width: 810px) 100vw, 810px\" \/><\/p>\n<h3>Launched the Startup script<\/h3>\n<p>Then finally after clicking on the external IP addresses, you can see the working of the website.<\/p>\n<h2><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1287 size-full\" title=\"Webserver deployed\" src=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2021\/06\/Screenshot-2021-06-03-23.36.45.png\" alt=\"Webserver deployed\" width=\"1317\" height=\"509\" srcset=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2021\/06\/Screenshot-2021-06-03-23.36.45.png 1317w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2021\/06\/Screenshot-2021-06-03-23.36.45-300x116.png 300w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2021\/06\/Screenshot-2021-06-03-23.36.45-1024x396.png 1024w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2021\/06\/Screenshot-2021-06-03-23.36.45-768x297.png 768w\" sizes=\"(max-width: 1317px) 100vw, 1317px\" \/><\/h2>\n<h4>Conclusion<\/h4>\n<p>Therefore, In this blog we have seen how to use a startup script from an instance template that is already created. And also we have done the Automation of installing a web server in that specific instance by running the simple startup script.<\/p>\n<p>I hope this article will help you in getting started with Startup script. In the next blog, We will publish a lot more articles on Google Cloud. Till that Please Stay tuned with us!!<\/p>\n<p>Happy Learning!!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this article we are going to learn about how to use the startup script in Google Compute Engine to automatically install the Apache web server and run the HTTP web site in the browser. However, there are lots of steps in creating a VM and setting up the Apache HTTP web server in an [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":1420,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[25],"tags":[284,288,294,340,339,291,292,301],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.7 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to use the Startup Script in Google Compute Engine?<\/title>\n<meta name=\"description\" content=\"In this article we are going to learn about how to use the startup script in Google Compute Engine to automatically install the Apache web server and run the HTTP web site in the browser.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.easydeploy.io\/blog\/how-to-use-the-startup-script-in-google-compute-engine\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to use the Startup Script in Google Compute Engine?\" \/>\n<meta property=\"og:description\" content=\"In this article we are going to learn about how to use the startup script in Google Compute Engine to automatically install the Apache web server and run the HTTP web site in the browser.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.easydeploy.io\/blog\/how-to-use-the-startup-script-in-google-compute-engine\/\" \/>\n<meta property=\"og:site_name\" content=\"easydeploy.io\" \/>\n<meta property=\"article:published_time\" content=\"2021-07-13T09:01:33+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-07-16T09:39:32+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2021\/06\/Untitled-2.png\" \/>\n\t<meta property=\"og:image:width\" content=\"948\" \/>\n\t<meta property=\"og:image:height\" content=\"647\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Siranjeevi R\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Siranjeevi R\" \/>\n\t<meta name=\"twitter:label2\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.easydeploy.io\/blog\/how-to-use-the-startup-script-in-google-compute-engine\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.easydeploy.io\/blog\/how-to-use-the-startup-script-in-google-compute-engine\/\"},\"author\":{\"name\":\"Siranjeevi R\",\"@id\":\"https:\/\/www.easydeploy.io\/blog\/#\/schema\/person\/0e7f79e0cd26f6446f7a76d9d2d3b20c\"},\"headline\":\"How to use the Startup Script in Google Compute Engine?\",\"datePublished\":\"2021-07-13T09:01:33+00:00\",\"dateModified\":\"2021-07-16T09:39:32+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.easydeploy.io\/blog\/how-to-use-the-startup-script-in-google-compute-engine\/\"},\"wordCount\":926,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\/\/www.easydeploy.io\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.easydeploy.io\/blog\/how-to-use-the-startup-script-in-google-compute-engine\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2021\/06\/Untitled-2.png\",\"keywords\":[\"Cloud Computing\",\"Google cloud platform\",\"google compute engine\",\"google compute engine startup script\",\"google compute engine startup script log\",\"Instance template\",\"Startup script\",\"Startup Script in Google Compute Engine\"],\"articleSection\":[\"Google Cloud Platform\"],\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.easydeploy.io\/blog\/how-to-use-the-startup-script-in-google-compute-engine\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.easydeploy.io\/blog\/how-to-use-the-startup-script-in-google-compute-engine\/\",\"url\":\"https:\/\/www.easydeploy.io\/blog\/how-to-use-the-startup-script-in-google-compute-engine\/\",\"name\":\"How to use the Startup Script in Google Compute Engine?\",\"isPartOf\":{\"@id\":\"https:\/\/www.easydeploy.io\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.easydeploy.io\/blog\/how-to-use-the-startup-script-in-google-compute-engine\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.easydeploy.io\/blog\/how-to-use-the-startup-script-in-google-compute-engine\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2021\/06\/Untitled-2.png\",\"datePublished\":\"2021-07-13T09:01:33+00:00\",\"dateModified\":\"2021-07-16T09:39:32+00:00\",\"description\":\"In this article we are going to learn about how to use the startup script in Google Compute Engine to automatically install the Apache web server and run the HTTP web site in the browser.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.easydeploy.io\/blog\/how-to-use-the-startup-script-in-google-compute-engine\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.easydeploy.io\/blog\/how-to-use-the-startup-script-in-google-compute-engine\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/www.easydeploy.io\/blog\/how-to-use-the-startup-script-in-google-compute-engine\/#primaryimage\",\"url\":\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2021\/06\/Untitled-2.png\",\"contentUrl\":\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2021\/06\/Untitled-2.png\",\"width\":948,\"height\":647,\"caption\":\"Startup Script in Google Compute Engine?\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.easydeploy.io\/blog\/how-to-use-the-startup-script-in-google-compute-engine\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.easydeploy.io\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to use the Startup Script in Google Compute Engine?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.easydeploy.io\/blog\/#website\",\"url\":\"https:\/\/www.easydeploy.io\/blog\/\",\"name\":\"easydeploy.io\",\"description\":\"A Cloud Architect Company\",\"publisher\":{\"@id\":\"https:\/\/www.easydeploy.io\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.easydeploy.io\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-GB\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.easydeploy.io\/blog\/#organization\",\"name\":\"EasyDeploy Technologies Pvt Ltd\",\"url\":\"https:\/\/www.easydeploy.io\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/www.easydeploy.io\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2019\/02\/easydeploy.png\",\"contentUrl\":\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2019\/02\/easydeploy.png\",\"width\":536,\"height\":100,\"caption\":\"EasyDeploy Technologies Pvt Ltd\"},\"image\":{\"@id\":\"https:\/\/www.easydeploy.io\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.easydeploy.io\/blog\/#\/schema\/person\/0e7f79e0cd26f6446f7a76d9d2d3b20c\",\"name\":\"Siranjeevi R\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/www.easydeploy.io\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/353661218917699fcc292e9bc0da9081?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/353661218917699fcc292e9bc0da9081?s=96&d=mm&r=g\",\"caption\":\"Siranjeevi R\"},\"url\":\"https:\/\/www.easydeploy.io\/blog\/author\/siru\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to use the Startup Script in Google Compute Engine?","description":"In this article we are going to learn about how to use the startup script in Google Compute Engine to automatically install the Apache web server and run the HTTP web site in the browser.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.easydeploy.io\/blog\/how-to-use-the-startup-script-in-google-compute-engine\/","og_locale":"en_GB","og_type":"article","og_title":"How to use the Startup Script in Google Compute Engine?","og_description":"In this article we are going to learn about how to use the startup script in Google Compute Engine to automatically install the Apache web server and run the HTTP web site in the browser.","og_url":"https:\/\/www.easydeploy.io\/blog\/how-to-use-the-startup-script-in-google-compute-engine\/","og_site_name":"easydeploy.io","article_published_time":"2021-07-13T09:01:33+00:00","article_modified_time":"2021-07-16T09:39:32+00:00","og_image":[{"width":948,"height":647,"url":"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2021\/06\/Untitled-2.png","type":"image\/png"}],"author":"Siranjeevi R","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Siranjeevi R","Estimated reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.easydeploy.io\/blog\/how-to-use-the-startup-script-in-google-compute-engine\/#article","isPartOf":{"@id":"https:\/\/www.easydeploy.io\/blog\/how-to-use-the-startup-script-in-google-compute-engine\/"},"author":{"name":"Siranjeevi R","@id":"https:\/\/www.easydeploy.io\/blog\/#\/schema\/person\/0e7f79e0cd26f6446f7a76d9d2d3b20c"},"headline":"How to use the Startup Script in Google Compute Engine?","datePublished":"2021-07-13T09:01:33+00:00","dateModified":"2021-07-16T09:39:32+00:00","mainEntityOfPage":{"@id":"https:\/\/www.easydeploy.io\/blog\/how-to-use-the-startup-script-in-google-compute-engine\/"},"wordCount":926,"commentCount":1,"publisher":{"@id":"https:\/\/www.easydeploy.io\/blog\/#organization"},"image":{"@id":"https:\/\/www.easydeploy.io\/blog\/how-to-use-the-startup-script-in-google-compute-engine\/#primaryimage"},"thumbnailUrl":"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2021\/06\/Untitled-2.png","keywords":["Cloud Computing","Google cloud platform","google compute engine","google compute engine startup script","google compute engine startup script log","Instance template","Startup script","Startup Script in Google Compute Engine"],"articleSection":["Google Cloud Platform"],"inLanguage":"en-GB","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.easydeploy.io\/blog\/how-to-use-the-startup-script-in-google-compute-engine\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.easydeploy.io\/blog\/how-to-use-the-startup-script-in-google-compute-engine\/","url":"https:\/\/www.easydeploy.io\/blog\/how-to-use-the-startup-script-in-google-compute-engine\/","name":"How to use the Startup Script in Google Compute Engine?","isPartOf":{"@id":"https:\/\/www.easydeploy.io\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.easydeploy.io\/blog\/how-to-use-the-startup-script-in-google-compute-engine\/#primaryimage"},"image":{"@id":"https:\/\/www.easydeploy.io\/blog\/how-to-use-the-startup-script-in-google-compute-engine\/#primaryimage"},"thumbnailUrl":"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2021\/06\/Untitled-2.png","datePublished":"2021-07-13T09:01:33+00:00","dateModified":"2021-07-16T09:39:32+00:00","description":"In this article we are going to learn about how to use the startup script in Google Compute Engine to automatically install the Apache web server and run the HTTP web site in the browser.","breadcrumb":{"@id":"https:\/\/www.easydeploy.io\/blog\/how-to-use-the-startup-script-in-google-compute-engine\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.easydeploy.io\/blog\/how-to-use-the-startup-script-in-google-compute-engine\/"]}]},{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/www.easydeploy.io\/blog\/how-to-use-the-startup-script-in-google-compute-engine\/#primaryimage","url":"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2021\/06\/Untitled-2.png","contentUrl":"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2021\/06\/Untitled-2.png","width":948,"height":647,"caption":"Startup Script in Google Compute Engine?"},{"@type":"BreadcrumbList","@id":"https:\/\/www.easydeploy.io\/blog\/how-to-use-the-startup-script-in-google-compute-engine\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.easydeploy.io\/blog\/"},{"@type":"ListItem","position":2,"name":"How to use the Startup Script in Google Compute Engine?"}]},{"@type":"WebSite","@id":"https:\/\/www.easydeploy.io\/blog\/#website","url":"https:\/\/www.easydeploy.io\/blog\/","name":"easydeploy.io","description":"A Cloud Architect Company","publisher":{"@id":"https:\/\/www.easydeploy.io\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.easydeploy.io\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-GB"},{"@type":"Organization","@id":"https:\/\/www.easydeploy.io\/blog\/#organization","name":"EasyDeploy Technologies Pvt Ltd","url":"https:\/\/www.easydeploy.io\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/www.easydeploy.io\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2019\/02\/easydeploy.png","contentUrl":"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2019\/02\/easydeploy.png","width":536,"height":100,"caption":"EasyDeploy Technologies Pvt Ltd"},"image":{"@id":"https:\/\/www.easydeploy.io\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.easydeploy.io\/blog\/#\/schema\/person\/0e7f79e0cd26f6446f7a76d9d2d3b20c","name":"Siranjeevi R","image":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/www.easydeploy.io\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/353661218917699fcc292e9bc0da9081?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/353661218917699fcc292e9bc0da9081?s=96&d=mm&r=g","caption":"Siranjeevi R"},"url":"https:\/\/www.easydeploy.io\/blog\/author\/siru\/"}]}},"_links":{"self":[{"href":"https:\/\/www.easydeploy.io\/blog\/wp-json\/wp\/v2\/posts\/1270"}],"collection":[{"href":"https:\/\/www.easydeploy.io\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.easydeploy.io\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.easydeploy.io\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.easydeploy.io\/blog\/wp-json\/wp\/v2\/comments?post=1270"}],"version-history":[{"count":10,"href":"https:\/\/www.easydeploy.io\/blog\/wp-json\/wp\/v2\/posts\/1270\/revisions"}],"predecessor-version":[{"id":1489,"href":"https:\/\/www.easydeploy.io\/blog\/wp-json\/wp\/v2\/posts\/1270\/revisions\/1489"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.easydeploy.io\/blog\/wp-json\/wp\/v2\/media\/1420"}],"wp:attachment":[{"href":"https:\/\/www.easydeploy.io\/blog\/wp-json\/wp\/v2\/media?parent=1270"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.easydeploy.io\/blog\/wp-json\/wp\/v2\/categories?post=1270"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.easydeploy.io\/blog\/wp-json\/wp\/v2\/tags?post=1270"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}