bucklander / aws-paloalto-transit-vpc

AWS Transit VPC using Palo Alto VM Appliances
Other
5 stars 4 forks source link

Implement cloud-init bootstrap via S3 into CF Template #1

Open bucklander opened 7 years ago

bucklander commented 7 years ago

For cloud-init to work on the PAVM, Palo Alto requires that their AWS EC2 instance retrieve a configuration file from S3 (versus directly within UserData itself): https://www.paloaltonetworks.com/documentation/71/virtualization/virtualization/bootstrap-the-vm-series-firewall/bootstrap-the-vm-series-firewall-in-aws

This is needed for the instances to be able to to boot with necessary initial configuration.

bucklander commented 7 years ago

Logic modifications required for PAVM (from CSR):

  1. User enters S3 bucket name into template inputs (already occurs)
  2. CF uses solution-helper functions to generate keypair, random password
  3. CF template generates a bootstrap.xml file for the PAVM including the pubkey rsa-sig generated in previous step. (https://www.paloaltonetworks.com/documentation/71/virtualization/virtualization/bootstrap-the-vm-series-firewall/prepare-the-bootstrap-package, https://www.paloaltonetworks.com/documentation/71/virtualization/virtualization/set-up-the-vm-series-firewall-in-aws/create-a-new-bootstrap-file-from-scratch)
  4. CF stores bootstramp.xml file and overall Palo Alto bootstramp dir structure on S3 bucket (possibly via CustomResource?). This step is the challenge.
  5. Instance's UserData in transit VPC template points to S3 bucket via vmseries-bootstrap-aws-s3bucket=<bucketname>