0

I want to configure a Firewall and a Startup Script with Deployment Manager template in .yaml file

Below are the steps I need to perform

  1. A new Deployment Manager deployment has been created
  2. The deployment includes a virtual machine that has an embedded startup-script
  3. The virtual machine that has a startup-script also has a tag item called http
  4. A firewall rule exists that allows port 80 (http) traffic and is applied using a tag with a value of http
  5. The virtual machine responds to web requests using the Apache web server
  6. Check that Deployment manager includes startup script and firewall resources

I'm facing problem with fifth step. All other steps complete successfully. However, fifth step shows error that "No VM responds to web requets". I can see the Apache Welcome page.

EtherDragon
  • 2,679
  • 1
  • 18
  • 24
Ishuta W
  • 1
  • 4
  • 1
    Can you add the .yaml, or at least the section of the .yaml that isn't meeting your expectations in the question? – EtherDragon Mar 02 '20 at 23:27
  • Sir my .yaml is running well and even getting deployed. Here is the file- – Ishuta W Mar 03 '20 at 10:03
  • resources: - type: compute.v1.instance name: vm-test properties: zone: {{ properties["zone"] }} machineType: https://www.googleapis.com/compute/v1/projects/{{ env["project"] }}/zones/{{ properties["zone"] }}/machineTypes/f1-micro disks: - deviceName: boot type: PERSISTENT boot: true autoDelete: true initializeParams: diskName: disk-{{ env["deployment"] }} sourceImage: https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/family/debian-9 – Ishuta W Mar 03 '20 at 10:14
  • networkInterfaces: - network: https://www.googleapis.com/compute/v1/projects/{{ env["project"] }}/global/networks/default accessConfigs: - name: External NAT type: ONE_TO_ONE_NAT metadata: items: - key: startup-script value: | #!/bin/bash apt-get update apt-get install -y apache2 tags: items: - http serviceAccounts: - email: 27225449300-compute@developer.gserviceaccount.com – Ishuta W Mar 03 '20 at 10:15
  • scopes: - https://www.googleapis.com/auth/devstorage.read_only - https://www.googleapis.com/auth/logging.write - https://www.googleapis.com/auth/monitoring.write - https://www.googleapis.com/auth/servicecontrol - https://www.googleapis.com/auth/service.management.readonly - https://www.googleapis.com/auth/trace.append - type: compute.v1.firewall name: default-allow-http properties: network: https://www.googleapis.com/compute/v1/projects/{{ env["project"] }}/global/networks/default – Ishuta W Mar 03 '20 at 10:15
  • targetTags: - http allowed: - IPProtocol: tcp ports: - '80' sourceRanges: - 0.0.0.0/0 – Ishuta W Mar 03 '20 at 10:15
  • What is uploaded in parts is a jinja file – Ishuta W Mar 03 '20 at 10:16
  • Can you put the deployment yaml files formatted to your question, this is not clear. – Alioua Mar 04 '20 at 22:41
  • it worked wid same settings....thanks for help though :) – Ishuta W Mar 13 '20 at 19:22

0 Answers0