How truongntn/terraform-ops-tooling-deployment works
Main Components
• Infrastructure Provisioning Engine: Represent Terraform as the orchestrator and its various files (main.tf, provider.tf, terraform.tfvars, etc.).
• Modules Layer (Encapsulated Components):
• Instances Module: Deploys compute instances with cloud-init scripts.
• Network Module: Sets up the subnetworks, CIDRs, and related network constructs.
• Security Groups Module: Configures the firewall rules and port-based access controls.
• OpenStack Environment: Illustrate the target environment where OpenStack resources are created.
• Networks: Three key networks as per the README:
• Main Network (10.0.1.0/24), containing HAProxy, DNS, Postfix, and Ansible.
• Core Services Network (10.0.2.0/24), hosting GitLab, Billing, Jenkins, Nexus, FreeIPA, and Snappass.
• Shared Network (10.0.3.0/24) for inter-tenancy communication.
• Access/Configuration: Show how cloud-init initialization is used to set up security (SSH, user configuration) on instances.
Relationships and Interactions
• For the Instances module, indicate that instances are provisioned within these networks and configured using cloud-init.
• Security Groups module with both the Network and Instances modules to show that these rules are used to secure traffic flows (for example, control which ports are open within a network).
• Optionally, add an external block for “OpenStack” where Terraform is applying these configurations, clarifying the cloud target.
Architectural Patterns and Design Principles
• Modular design: Highlight how the use of Terraform modules (instances, network, security_groups) encapsulates functionality, improving reusability and maintenance.
• Network Segmentation: Emphasize how the three distinct networks provide isolation and controlled communication.
• Security by Design: Identify the use of security groups, limited port exposure, and internal-only SSH access as key security practices.
• Infrastructure as Code (IaC): Show the automated approach towards provisioning using Terraform scripts and variables.
Relevant Technologies and Tools
• Terraform and HCL as the configuration language.
• OpenStack as the cloud platform.
• Cloud-init for instance bootstrap and configuration.
• (Implicit) Modules and variable configuration that handle dynamic infrastructure aspects.
• Within the Instances module, further break down service instances by network groupings (Main Network services vs. Core Services, plus shared aspects).
• Security Groups module applying policy to each network or instance group.