SlideShare a Scribd company logo
1 of 19
Deploy a Compute Instance
with a Remote Startup Script
Mahmmoud Mahdi
Your challenge
Configure a Linux Google Compute Engine instance that
installs the Apache web server software using a remote
startup script. In order to confirm that a compute
instance Apache has successfully installed, the
Compute Engine instance must be accessible via HTTP
from the internet.
Deploy an Instance with a Remote Startup Script
1.Create a Bucket & Upload startup script.
2.Create a Compute Instance & config metadata.
3.Enable Public Access to Instance.
4.Check executing the startup script.
5.Check the URL and address.
Architecture Needed
Requirement Steps
2. Create VM Instance and
configure metadata
1. Create Startup script
and upload to bucket
3. Open firewall port
4. Test Connectivity
Solution 1
Do it manually
Create a Bucket Storage and upload Script file
● Bucket Name: project_id
● File name: resource-install-web.sh
Create a Compute Instance
● Name: apache
● Zone: us-central1-a
● Access: Enable Http
● Metadata: startup-script-url
Test Your Server
● Browse the server External IP
● Make sure it response.
Solution 2
Automate Script
Tasks
1.Create a Bucket & Upload startup script.
2.Create a Compute Instance & config metadata.
3.Enable Public Access to Instance.
4.Check executing the startup script.
5.Check the URL and address.
echo '#!/bin/bash
apt-get update
apt-get install -y apache2' > resource-install-web.sh
Prepare Apache Installation Script
gsutil mb gs://BUCKET_NAME/
gsutil cp resources-install-web.sh gs://BUCKET_NAME
create bucket, Replace BUCKET_NAME with project Id
create script file contains installation commands
copy startup script to bucket
BUCKET_NAME must be the same as first line
Create Machine
gcloud compute instances create apache 
--zone=us-central1-a 
--tags=http-server 
--metadata=startup-script-url=gs://$BUCKET_NAME/resource-install-web.sh
Machine name
Machine location
Network tag used to open port later
Script location run once machine start
Tasks
1.Create a Bucket & Upload startup script.
2.Create a Compute Instance & config metadata.
3.Enable Public Access to Instance.
4.Check executing the startup script.
5.Check the URL and address.
Create Firewall
gcloud compute firewall-rules create default-allow-http 
--direction=INGRESS --priority=1000 --network=default 
--action=ALLOW --rules=tcp:80 
--source-ranges=0.0.0.0/0 
--target-tags=http-server
Firewall rule name
Allow http port
From public interent address
Network tag (Same as tag name in create machine command)
Tasks
1.Create a Bucket & Upload startup script.
2.Create a Compute Instance & config metadata.
3.Enable Public Access to Instance.
4.Check executing the startup script.
5.Check the URL and address.
Test Server
gcloud compute instances describe apache
Machine name
Show external Ip and use to browse
Tasks
1.Create a Bucket & Upload startup script.
2.Create a Compute Instance & config metadata.
3.Enable Public Access to Instance.
4.Check executing the startup script.
5.Check the URL and address.
Hope it help :)

More Related Content

What's hot

Deploying Rails applications with Moonshine
Deploying Rails applications with MoonshineDeploying Rails applications with Moonshine
Deploying Rails applications with MoonshineRobot Mode
 
Jenkins on Docker
Jenkins on DockerJenkins on Docker
Jenkins on DockerCraig Trim
 
Controlling multiple VMs with the power of Python
Controlling multiple VMs with the power of PythonControlling multiple VMs with the power of Python
Controlling multiple VMs with the power of PythonYurii Vasylenko
 
How to contribute Apache CloudStack
How to contribute Apache CloudStackHow to contribute Apache CloudStack
How to contribute Apache CloudStackGo Chiba
 
Setup Kubernetes with flannel on ubuntu platform
Setup Kubernetes with flannel on ubuntu platformSetup Kubernetes with flannel on ubuntu platform
Setup Kubernetes with flannel on ubuntu platformAjeet Singh
 
Infrastructure = code - 1 year later
Infrastructure = code - 1 year laterInfrastructure = code - 1 year later
Infrastructure = code - 1 year laterChristian Ortner
 
Get started with docker & dev ops
Get started with docker & dev opsGet started with docker & dev ops
Get started with docker & dev opsAsya Dudnik
 
Get started with docker & dev ops
Get started with docker & dev opsGet started with docker & dev ops
Get started with docker & dev opsAsya Dudnik
 
Vagrant for real codemotion (moar tips! ;-))
Vagrant for real codemotion (moar tips! ;-))Vagrant for real codemotion (moar tips! ;-))
Vagrant for real codemotion (moar tips! ;-))Michele Orselli
 
Apache Web Services
Apache Web ServicesApache Web Services
Apache Web Serviceslkurriger
 
Vagrant for Virtualized Development
Vagrant for Virtualized DevelopmentVagrant for Virtualized Development
Vagrant for Virtualized DevelopmentAdam Culp
 
Building websites with Node.ACS
Building websites with Node.ACSBuilding websites with Node.ACS
Building websites with Node.ACSRicardo Alcocer
 
Aeon mike guide transparent ssl filtering
Aeon mike guide transparent ssl filteringAeon mike guide transparent ssl filtering
Aeon mike guide transparent ssl filteringConrad Cruz
 
Aeon mike guide transparent ssl filtering (1)
Aeon mike guide transparent ssl filtering (1)Aeon mike guide transparent ssl filtering (1)
Aeon mike guide transparent ssl filtering (1)Conrad Cruz
 
"13 ways to run web applications on the Internet" Andrii Shumada
"13 ways to run web applications on the Internet" Andrii Shumada"13 ways to run web applications on the Internet" Andrii Shumada
"13 ways to run web applications on the Internet" Andrii ShumadaFwdays
 
WordPress workflow of the future
WordPress workflow of the futureWordPress workflow of the future
WordPress workflow of the futureEli McMakin
 
How to install and configure LEMP stack
How to install and configure LEMP stackHow to install and configure LEMP stack
How to install and configure LEMP stackRootGate
 

What's hot (17)

Deploying Rails applications with Moonshine
Deploying Rails applications with MoonshineDeploying Rails applications with Moonshine
Deploying Rails applications with Moonshine
 
Jenkins on Docker
Jenkins on DockerJenkins on Docker
Jenkins on Docker
 
Controlling multiple VMs with the power of Python
Controlling multiple VMs with the power of PythonControlling multiple VMs with the power of Python
Controlling multiple VMs with the power of Python
 
How to contribute Apache CloudStack
How to contribute Apache CloudStackHow to contribute Apache CloudStack
How to contribute Apache CloudStack
 
Setup Kubernetes with flannel on ubuntu platform
Setup Kubernetes with flannel on ubuntu platformSetup Kubernetes with flannel on ubuntu platform
Setup Kubernetes with flannel on ubuntu platform
 
Infrastructure = code - 1 year later
Infrastructure = code - 1 year laterInfrastructure = code - 1 year later
Infrastructure = code - 1 year later
 
Get started with docker & dev ops
Get started with docker & dev opsGet started with docker & dev ops
Get started with docker & dev ops
 
Get started with docker & dev ops
Get started with docker & dev opsGet started with docker & dev ops
Get started with docker & dev ops
 
Vagrant for real codemotion (moar tips! ;-))
Vagrant for real codemotion (moar tips! ;-))Vagrant for real codemotion (moar tips! ;-))
Vagrant for real codemotion (moar tips! ;-))
 
Apache Web Services
Apache Web ServicesApache Web Services
Apache Web Services
 
Vagrant for Virtualized Development
Vagrant for Virtualized DevelopmentVagrant for Virtualized Development
Vagrant for Virtualized Development
 
Building websites with Node.ACS
Building websites with Node.ACSBuilding websites with Node.ACS
Building websites with Node.ACS
 
Aeon mike guide transparent ssl filtering
Aeon mike guide transparent ssl filteringAeon mike guide transparent ssl filtering
Aeon mike guide transparent ssl filtering
 
Aeon mike guide transparent ssl filtering (1)
Aeon mike guide transparent ssl filtering (1)Aeon mike guide transparent ssl filtering (1)
Aeon mike guide transparent ssl filtering (1)
 
"13 ways to run web applications on the Internet" Andrii Shumada
"13 ways to run web applications on the Internet" Andrii Shumada"13 ways to run web applications on the Internet" Andrii Shumada
"13 ways to run web applications on the Internet" Andrii Shumada
 
WordPress workflow of the future
WordPress workflow of the futureWordPress workflow of the future
WordPress workflow of the future
 
How to install and configure LEMP stack
How to install and configure LEMP stackHow to install and configure LEMP stack
How to install and configure LEMP stack
 

Similar to Deploy a compute instance with a remote startup script

Google cloud essential skills challenge lab
Google cloud essential skills challenge labGoogle cloud essential skills challenge lab
Google cloud essential skills challenge labMahmmoud Mahdi
 
Virtual Hosting With Apache and Linux
Virtual Hosting With Apache and LinuxVirtual Hosting With Apache and Linux
Virtual Hosting With Apache and LinuxIresha Rubasinghe
 
Learn nginx in 90mins
Learn nginx in 90minsLearn nginx in 90mins
Learn nginx in 90minsLarry Cai
 
Cloud 101: Hands-on Heroku & AWS
Cloud 101: Hands-on Heroku & AWSCloud 101: Hands-on Heroku & AWS
Cloud 101: Hands-on Heroku & AWSAmine Sadry
 
GCP - GCE, Cloud SQL, Cloud Storage, BigQuery Basic Training
GCP - GCE, Cloud SQL, Cloud Storage, BigQuery Basic TrainingGCP - GCE, Cloud SQL, Cloud Storage, BigQuery Basic Training
GCP - GCE, Cloud SQL, Cloud Storage, BigQuery Basic TrainingSimon Su
 
Aws overview part 2(compute services)
Aws overview   part 2(compute services)Aws overview   part 2(compute services)
Aws overview part 2(compute services)Parag Patil
 
Installing WordPress on AWS
Installing WordPress on AWSInstalling WordPress on AWS
Installing WordPress on AWSManish Jain
 
SCasia 2018 MSFT hands on session for Azure Batch AI
SCasia 2018 MSFT hands on session for Azure Batch AISCasia 2018 MSFT hands on session for Azure Batch AI
SCasia 2018 MSFT hands on session for Azure Batch AIHiroshi Tanaka
 
How to add a new hypervisor to CloudStack:Lessons learned from Hyper-V effort
How to add a new hypervisor to CloudStack:Lessons learned from Hyper-V effortHow to add a new hypervisor to CloudStack:Lessons learned from Hyper-V effort
How to add a new hypervisor to CloudStack:Lessons learned from Hyper-V effortDonal Lafferty
 
Deploying windows containers with kubernetes
Deploying windows containers with kubernetesDeploying windows containers with kubernetes
Deploying windows containers with kubernetesBen Hall
 
PVS-Studio: analyzing pull requests in Azure DevOps using self-hosted agents
PVS-Studio: analyzing pull requests in Azure DevOps using self-hosted agentsPVS-Studio: analyzing pull requests in Azure DevOps using self-hosted agents
PVS-Studio: analyzing pull requests in Azure DevOps using self-hosted agentsAndrey Karpov
 
Making the secure communication between Server and Client with https protocol
Making the secure communication between Server and Client with https protocolMaking the secure communication between Server and Client with https protocol
Making the secure communication between Server and Client with https protocolArmenuhi Abramyan
 
Amazon AWS Workspace Howto
Amazon AWS Workspace HowtoAmazon AWS Workspace Howto
Amazon AWS Workspace Howtomailbhargav
 
Azure serverless Full-Stack kickstart
Azure serverless Full-Stack kickstartAzure serverless Full-Stack kickstart
Azure serverless Full-Stack kickstartDavide Mauri
 
One commit, one release. Continuously delivering a Symfony project.
One commit, one release. Continuously delivering a Symfony project.One commit, one release. Continuously delivering a Symfony project.
One commit, one release. Continuously delivering a Symfony project.Javier López
 
Build Your Own CaaS (Container as a Service)
Build Your Own CaaS (Container as a Service)Build Your Own CaaS (Container as a Service)
Build Your Own CaaS (Container as a Service)HungWei Chiu
 
Jenkins Setup Document
Jenkins Setup DocumentJenkins Setup Document
Jenkins Setup Documentmobi fly
 
Install apache on centos
Install apache on centosInstall apache on centos
Install apache on centoshengko
 
Building drupal web farms with IIS - part 1
Building drupal web farms with IIS - part 1Building drupal web farms with IIS - part 1
Building drupal web farms with IIS - part 1Alessandro Pilotti
 

Similar to Deploy a compute instance with a remote startup script (20)

Google cloud essential skills challenge lab
Google cloud essential skills challenge labGoogle cloud essential skills challenge lab
Google cloud essential skills challenge lab
 
Virtual Hosting With Apache and Linux
Virtual Hosting With Apache and LinuxVirtual Hosting With Apache and Linux
Virtual Hosting With Apache and Linux
 
Learn nginx in 90mins
Learn nginx in 90minsLearn nginx in 90mins
Learn nginx in 90mins
 
Cloud 101: Hands-on Heroku & AWS
Cloud 101: Hands-on Heroku & AWSCloud 101: Hands-on Heroku & AWS
Cloud 101: Hands-on Heroku & AWS
 
GCP - GCE, Cloud SQL, Cloud Storage, BigQuery Basic Training
GCP - GCE, Cloud SQL, Cloud Storage, BigQuery Basic TrainingGCP - GCE, Cloud SQL, Cloud Storage, BigQuery Basic Training
GCP - GCE, Cloud SQL, Cloud Storage, BigQuery Basic Training
 
Aws overview part 2(compute services)
Aws overview   part 2(compute services)Aws overview   part 2(compute services)
Aws overview part 2(compute services)
 
Installing WordPress on AWS
Installing WordPress on AWSInstalling WordPress on AWS
Installing WordPress on AWS
 
SCasia 2018 MSFT hands on session for Azure Batch AI
SCasia 2018 MSFT hands on session for Azure Batch AISCasia 2018 MSFT hands on session for Azure Batch AI
SCasia 2018 MSFT hands on session for Azure Batch AI
 
How to add a new hypervisor to CloudStack:Lessons learned from Hyper-V effort
How to add a new hypervisor to CloudStack:Lessons learned from Hyper-V effortHow to add a new hypervisor to CloudStack:Lessons learned from Hyper-V effort
How to add a new hypervisor to CloudStack:Lessons learned from Hyper-V effort
 
Deploying windows containers with kubernetes
Deploying windows containers with kubernetesDeploying windows containers with kubernetes
Deploying windows containers with kubernetes
 
PVS-Studio: analyzing pull requests in Azure DevOps using self-hosted agents
PVS-Studio: analyzing pull requests in Azure DevOps using self-hosted agentsPVS-Studio: analyzing pull requests in Azure DevOps using self-hosted agents
PVS-Studio: analyzing pull requests in Azure DevOps using self-hosted agents
 
Making the secure communication between Server and Client with https protocol
Making the secure communication between Server and Client with https protocolMaking the secure communication between Server and Client with https protocol
Making the secure communication between Server and Client with https protocol
 
Amazon AWS Workspace Howto
Amazon AWS Workspace HowtoAmazon AWS Workspace Howto
Amazon AWS Workspace Howto
 
Azure serverless Full-Stack kickstart
Azure serverless Full-Stack kickstartAzure serverless Full-Stack kickstart
Azure serverless Full-Stack kickstart
 
One commit, one release. Continuously delivering a Symfony project.
One commit, one release. Continuously delivering a Symfony project.One commit, one release. Continuously delivering a Symfony project.
One commit, one release. Continuously delivering a Symfony project.
 
Build Your Own CaaS (Container as a Service)
Build Your Own CaaS (Container as a Service)Build Your Own CaaS (Container as a Service)
Build Your Own CaaS (Container as a Service)
 
Jenkins Setup Document
Jenkins Setup DocumentJenkins Setup Document
Jenkins Setup Document
 
Install apache on centos
Install apache on centosInstall apache on centos
Install apache on centos
 
Building drupal web farms with IIS - part 1
Building drupal web farms with IIS - part 1Building drupal web farms with IIS - part 1
Building drupal web farms with IIS - part 1
 
Oracle autovue
Oracle autovueOracle autovue
Oracle autovue
 

More from Mahmmoud Mahdi

Lesson 10: Managing Printers
Lesson 10: Managing PrintersLesson 10: Managing Printers
Lesson 10: Managing PrintersMahmmoud Mahdi
 
Lesson 9: Managing Files
Lesson 9: Managing FilesLesson 9: Managing Files
Lesson 9: Managing FilesMahmmoud Mahdi
 
Lesson.7: Configuring IP Routing A
Lesson.7: Configuring IP Routing ALesson.7: Configuring IP Routing A
Lesson.7: Configuring IP Routing AMahmmoud Mahdi
 
Lesson.7: Configuring IP Routing B
Lesson.7: Configuring IP Routing BLesson.7: Configuring IP Routing B
Lesson.7: Configuring IP Routing BMahmmoud Mahdi
 
Lesson 6: Dynamic Host Configuration Protocol B
Lesson 6: Dynamic Host Configuration Protocol BLesson 6: Dynamic Host Configuration Protocol B
Lesson 6: Dynamic Host Configuration Protocol BMahmmoud Mahdi
 
Lesson 6: Dynamic Host Configuration Protocol A
Lesson 6: Dynamic Host Configuration Protocol ALesson 6: Dynamic Host Configuration Protocol A
Lesson 6: Dynamic Host Configuration Protocol AMahmmoud Mahdi
 
Lesson 5: Configuring Name Resolution
Lesson 5: Configuring Name ResolutionLesson 5: Configuring Name Resolution
Lesson 5: Configuring Name ResolutionMahmmoud Mahdi
 
Lesson 4: Network Infrastucture
Lesson 4: Network InfrastuctureLesson 4: Network Infrastucture
Lesson 4: Network InfrastuctureMahmmoud Mahdi
 
Lesson 3: IPv6 Fundamentals
Lesson 3: IPv6 FundamentalsLesson 3: IPv6 Fundamentals
Lesson 3: IPv6 FundamentalsMahmmoud Mahdi
 
Lesson 2: Subnetting basics
Lesson 2: Subnetting basicsLesson 2: Subnetting basics
Lesson 2: Subnetting basicsMahmmoud Mahdi
 
Lesson1: Introduction To Networking Concepts
Lesson1: Introduction To Networking ConceptsLesson1: Introduction To Networking Concepts
Lesson1: Introduction To Networking ConceptsMahmmoud Mahdi
 

More from Mahmmoud Mahdi (11)

Lesson 10: Managing Printers
Lesson 10: Managing PrintersLesson 10: Managing Printers
Lesson 10: Managing Printers
 
Lesson 9: Managing Files
Lesson 9: Managing FilesLesson 9: Managing Files
Lesson 9: Managing Files
 
Lesson.7: Configuring IP Routing A
Lesson.7: Configuring IP Routing ALesson.7: Configuring IP Routing A
Lesson.7: Configuring IP Routing A
 
Lesson.7: Configuring IP Routing B
Lesson.7: Configuring IP Routing BLesson.7: Configuring IP Routing B
Lesson.7: Configuring IP Routing B
 
Lesson 6: Dynamic Host Configuration Protocol B
Lesson 6: Dynamic Host Configuration Protocol BLesson 6: Dynamic Host Configuration Protocol B
Lesson 6: Dynamic Host Configuration Protocol B
 
Lesson 6: Dynamic Host Configuration Protocol A
Lesson 6: Dynamic Host Configuration Protocol ALesson 6: Dynamic Host Configuration Protocol A
Lesson 6: Dynamic Host Configuration Protocol A
 
Lesson 5: Configuring Name Resolution
Lesson 5: Configuring Name ResolutionLesson 5: Configuring Name Resolution
Lesson 5: Configuring Name Resolution
 
Lesson 4: Network Infrastucture
Lesson 4: Network InfrastuctureLesson 4: Network Infrastucture
Lesson 4: Network Infrastucture
 
Lesson 3: IPv6 Fundamentals
Lesson 3: IPv6 FundamentalsLesson 3: IPv6 Fundamentals
Lesson 3: IPv6 Fundamentals
 
Lesson 2: Subnetting basics
Lesson 2: Subnetting basicsLesson 2: Subnetting basics
Lesson 2: Subnetting basics
 
Lesson1: Introduction To Networking Concepts
Lesson1: Introduction To Networking ConceptsLesson1: Introduction To Networking Concepts
Lesson1: Introduction To Networking Concepts
 

Recently uploaded

Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 

Recently uploaded (20)

Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 

Deploy a compute instance with a remote startup script

  • 1. Deploy a Compute Instance with a Remote Startup Script Mahmmoud Mahdi
  • 2. Your challenge Configure a Linux Google Compute Engine instance that installs the Apache web server software using a remote startup script. In order to confirm that a compute instance Apache has successfully installed, the Compute Engine instance must be accessible via HTTP from the internet.
  • 3. Deploy an Instance with a Remote Startup Script 1.Create a Bucket & Upload startup script. 2.Create a Compute Instance & config metadata. 3.Enable Public Access to Instance. 4.Check executing the startup script. 5.Check the URL and address.
  • 5. Requirement Steps 2. Create VM Instance and configure metadata 1. Create Startup script and upload to bucket 3. Open firewall port 4. Test Connectivity
  • 6. Solution 1 Do it manually
  • 7. Create a Bucket Storage and upload Script file ● Bucket Name: project_id ● File name: resource-install-web.sh
  • 8. Create a Compute Instance ● Name: apache ● Zone: us-central1-a ● Access: Enable Http ● Metadata: startup-script-url
  • 9. Test Your Server ● Browse the server External IP ● Make sure it response.
  • 11. Tasks 1.Create a Bucket & Upload startup script. 2.Create a Compute Instance & config metadata. 3.Enable Public Access to Instance. 4.Check executing the startup script. 5.Check the URL and address.
  • 12. echo '#!/bin/bash apt-get update apt-get install -y apache2' > resource-install-web.sh Prepare Apache Installation Script gsutil mb gs://BUCKET_NAME/ gsutil cp resources-install-web.sh gs://BUCKET_NAME create bucket, Replace BUCKET_NAME with project Id create script file contains installation commands copy startup script to bucket BUCKET_NAME must be the same as first line
  • 13. Create Machine gcloud compute instances create apache --zone=us-central1-a --tags=http-server --metadata=startup-script-url=gs://$BUCKET_NAME/resource-install-web.sh Machine name Machine location Network tag used to open port later Script location run once machine start
  • 14. Tasks 1.Create a Bucket & Upload startup script. 2.Create a Compute Instance & config metadata. 3.Enable Public Access to Instance. 4.Check executing the startup script. 5.Check the URL and address.
  • 15. Create Firewall gcloud compute firewall-rules create default-allow-http --direction=INGRESS --priority=1000 --network=default --action=ALLOW --rules=tcp:80 --source-ranges=0.0.0.0/0 --target-tags=http-server Firewall rule name Allow http port From public interent address Network tag (Same as tag name in create machine command)
  • 16. Tasks 1.Create a Bucket & Upload startup script. 2.Create a Compute Instance & config metadata. 3.Enable Public Access to Instance. 4.Check executing the startup script. 5.Check the URL and address.
  • 17. Test Server gcloud compute instances describe apache Machine name Show external Ip and use to browse
  • 18. Tasks 1.Create a Bucket & Upload startup script. 2.Create a Compute Instance & config metadata. 3.Enable Public Access to Instance. 4.Check executing the startup script. 5.Check the URL and address.