How william-hashicorp/multi-product-integration-demo works
Main Components
• Control Workspace: Represented by the “0_control-workspace”. This is the central orchestrator that triggers/delegates the deployment to all the downstream workspaces.
• Networking: The “1_networking” module sets up core networking (AWS VPC, HCP HVN, and peering).
• HCP Clusters: The “2_hcp-clusters” provisions service clusters for Vault, Boundary, and Consul.
• Vault Authentication: “3_vault-auth-config” bootstraps Vault configuration and enables JWT/OIDC trust with Terraform Cloud.
• Boundary Configuration: “4_boundary-config” and “8_boundary-adv” handle Boundary’s dynamic host sets and later additional user/group/role management.
• Nomad Clusters/Nodes: “5_nomad-cluster” provisions the Nomad server cluster, while “6_nomad-nodes” provisions client nodes (with separate node pools for x86 and ARM).
• Workload Deployment: “7_workload” deploys Nomad jobs (e.g., MongoDB, frontend application) and demonstrates dynamic credential injection from Vault as well as leveraging Consul Connect.
• Azure AD Integration: “10_aad_management” shows the integration for Just-in-Time Access using Azure AD.
• Additional Testing/Boundary: “11_boundary_test” might be used for testing Boundary configurations.
• Packer: The “packer” directory holds the Packer templates to build Nomad server/client AMIs.
• Doormat-Prereqs: The “doormat-prereqs” directory holds scripts and configs to prepare AWS accounts and credentials for using the doormat provider on TFC.
Relationships and Interactions
• Networking module as the foundation that provides connectivity between AWS and HCP.
• HCP Clusters as providing core security and service discovery with Vault, Boundary, and Consul.
• That the Vault configuration module not only authenticates Terraform Cloud but further integrates dynamic credential generation, which is consumed by Nomad jobs in the Workload module.
• Demonstrate that Boundary interacts with both Vault (for SSH signed certificate injection) and the Nomad clusters (to manage dynamic host sets for secure access).
• Point out that Packer is used to build Nomad AMIs, feeding into the Nomad cluster deployment.
• That Doormat-Prereqs provide initial setup for AWS credentials and environment preparation.
• Possibly include Terraform Cloud (TFC) as an external dependency/platform that orchestrates these workspaces and manages variable sets (as seen in the README instructions).
Architectural Patterns and Design Principles
• Modular Infrastructure as Code (IaC): Each numbered directory (e.g., 0_control-workspace, 1_networking, etc.) is an independent module/workspace that contributes to the overall environment.
• Orchestration via Terraform: The control workspace is a “parent” that triggers workspaces downstream, which exemplifies multi-space orchestration.
• Service Integration: Emphasize the integration of HashiCorp’s suite (Vault, Boundary, Consul, Nomad) and the corresponding external systems (AWS networking, Azure AD).
• Consistent Resource Naming and Tagging: Many modules use variables (for stack_id, region, etc.) to ensure names and resources are deployed consistently.
Step-by-Step Recommendations for the Principal Software Engineer
a. Begin by drawing a high-level layout where the Control Workspace is the central coordinator.
b. Branch out to the key modules—Networking, HCP Clusters, Vault Auth, Boundary Config, Nomad Cluster/Nodes, Workload, and any additional aspects like Azure AD and doormat-prereqs.
d. External interactions: e.g., AWS infrastructure, communication with HCP services, authentication via TFC, and integration with Azure AD.
e. Finally, review the README sections to ensure you capture integration points (such as the dynamic MongoDB credentials refresh in the Nomad jobs and the SSH certificate injection in Boundary).