There are various configurations and applications required to build, deploy, and manage infrastructure. Carbon leverages reliable and trusted leaders in this space. We didn’t want to re-invent the wheel or force you to learn something only applicable to the offensive security domain. This makes customizing Carbon as simple as reading the documentation of the application being used.
This is the multi-page printable view of this section. Click here to print.
Infrastructure as Code
- 1: Projects
- 2: Ansible
- 3: Carbon
- 4: Cloud Init
- 5: Packer Image Building
- 6: Terraform
- 6.1: Modules
- 6.1.1: Remote State Module
1 - Projects
projects go here.
2 - Ansible
Ansible is not used by default. There are plans to leverage this in the future.
3 - Carbon
While other applications are doing the heavy lifting. These scripts make the installation process a little simpler.
4 - Cloud Init
WIP
5 - Packer Image Building
Packer is used to build images for use in Terraform.
Installation
MacOS
We can install packer using Hashicorp’s Brew Tap.
brew tap hashicorp/tap
brew install hashicorp/tap/packer
5.1 - Ubuntu 24.04 Packer Config
Ubuntu 24.04 is the default build for Carbon. It is based on a minimal server installation. This means you only install what you need to operate. Image customization will be facilitated through Cloud Init. This should make building and testing new configurations easy.
5.1.1 -
Usage
VirtualBox
Building with VirtualBox
packer build .
Testing with VirtualBox
A simple script has been provided to create a new VirtualBox machine with the newly created disk image.
scripts/test-carbon-ubuntu.sh
6 - Terraform
Terraform is used to deploy our infrastructure
Prerequisites
In order to properly use Terraform, you’ll need access to our AWS account.
Installation
MacOS
We can install terraform using Hashicorp’s Brew Tap.
brew tap hashicorp/tap
brew install hashicorp/tap/terraform
6.1 - Modules
Terraform modules are used to make easily reusable infrastructure
6.1.1 - Remote State Module
This module should be used to bootstrap an AWS environment. It contains minimal configurations to enable the rest of Terraform to use an S3 bucket as its backend.