Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Web server access improvements on VM-Series examples #47

Closed
seanyoungberg opened this issue Jun 10, 2024 · 2 comments
Closed

Web server access improvements on VM-Series examples #47

seanyoungberg opened this issue Jun 10, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@seanyoungberg
Copy link
Contributor

Is your feature request related to a problem?

When running the examples for POC, there is no obvious way to access the example spoke webserver instances to test traffic.

We must install SSM agent and permissions on the instances, or otherwise setup a jump host.

Describe the solution you'd like

Use an AMI that has SSM agent pre-installed and instance profile with SSM permissions. Similar to what is done in the cloudngfw_isolated_design example.

One improvement from the cloudngfw example is to set the web server install script userdata to retry, as it won't have outbound connectivity until the FW setup is complete.

Example:

locals {
  web_user_data = <<EOF
#!/bin/bash
sleep 120;
until sudo yum update -y; do echo "Retrying"; sleep 5; done
until sudo yum install -y php; do echo "Retrying"; sleep 5; done
until sudo yum install -y httpd; do echo "Retrying"; sleep 5; done
until sudo rm -f /var/www/html/index.html; do echo "Retrying"; sleep 5; done
until sudo wget -O /var/www/html/index.php https://raw.githubusercontent.com/wwce/terraform/master/gcp/adv_peering_2fw_2spoke_common/scripts/showheaders.php; do echo "Retrying"; sleep 2; done
until sudo systemctl start httpd; do echo "Retrying"; sleep 5; done
until sudo systemctl enable httpd; do echo "Retrying"; sleep 5; done
EOF
}

It would also be nice to describe in the example how to access the machines and validate traffic flows, etc.

Describe alternatives you've considered.

Manually installing ssm agent

Additional context

No response

@seanyoungberg seanyoungberg added the enhancement New feature or request label Jun 10, 2024
@sebastianczech
Copy link
Contributor

sebastianczech commented Jun 13, 2024

This feature request in some parts covers #34, in which spoke VM needs to be improved about with SSM agent.

@lstadnik
Copy link
Contributor

Duplicate - PR #57 was merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants