This Terraform configuration can be used to launch a virtual machine, bootstrap any dependencies and install T-Pot in a single step.
Configuration for Amazon Web Services (AWS) and Open Telekom Cloud (OTC) is currently included.
This can easily be extended to support other Terraform providers.
Cloud-init is used to bootstrap the instance and install T-Pot on startup.
- What get's created
- Prerequisites
- Terraform Variables
- Initialising
- Applying the Configuration
- Connecting to the Instance
- EC2 instance:
- t3.large (2 vCPUs, 8 GB RAM)
- 128 GB disk
- Debian 10
- Public IP
- Security Group:
- TCP/UDP ports <= 64000 open to the Internet
- TCP ports 64294, 64295 and 64297 open to a chosen administrative IP
- ECS instance:
- s2.medium.8 (1 vCPU, 8 GB RAM)
- 128 GB disk
- Debian 10
- Public EIP
- Security Group
- Network, Subnet, Router (= Virtual Private Cloud [VPC])
- Terraform 0.13
- AWS Account
- Existing VPC: VPC ID needs to be specified in
aws/variables.tf
- Existing subnet: Subnet ID needs to be specified in
aws/variables.tf
- Existing SSH key pair: Key name needs to be specified in
aws/variables.tf
- Existing VPC: VPC ID needs to be specified in
- AWS Authentication credentials should be set using environment variables
- OTC Account
- Existing SSH key pair: Key name needs to be specified in
otc/variables.tf
- Existing SSH key pair: Key name needs to be specified in
- OTC Authentication credentials (Username, Password, Project Name, User Domain Name) can be set in the
otc/clouds.yaml
file
These variables exist in aws/variables.tf
and otc/variables.tf
respectively.
Settings for cloud-init:
timezone
- Set the Server's timezonelinux_password
- Set a password for the Linux Operating System user (which is also used on the Admin UI)
Settings for T-Pot:
tpot_flavor
- Set the flavor of the T-Pot (Available flavors are listed in the variable's description)web_user
- Set a username for the T-Pot Kibana Dasboardweb_password
- Set a password for the T-Pot Kibana Dashboard
In aws/variables.tf
, you can change the additional variables:
admin_ip
- source IP address(es) that you will use to administer the system. Connections to TCP ports 64294, 64295 and 64297 will be allowed from this IP only. Multiple IPs or CIDR blocks can be specified in the format:["127.0.0.1/32", "192.168.0.0/24"]
ec2_vpc_id
- Specify an existing VPC IDec2_subnet_id
- Specify an existing Subnet IDec2_region
ec2_ssh_key_name
- Specify an existing SSH key pairec2_instance_type
In otc/variables.tf
, you can change the additional variables:
availability_zone
flavor
key_pair
- Specify an existing SSH key pairimage_id
volume_size
Furthermore you can configure the naming of the created infrastructure (per default everything gets prefixed with "tpot-", e.g. "tpot-router").
The terraform init
command is used to initialize a working directory containing Terraform configuration files.
$ cd aws
$ terraform init
OR
$ cd otc
$ terraform init
The terraform apply
command is used to apply the changes required to reach the desired state of the configuration, or the pre-determined set of actions generated by a terraform plan
execution plan.
$ terraform apply
This will create your infrastructure and start a Cloud Server. On startup, the Server gets bootstrapped with cloud-init and will install T-Pot. Once this is done, the server will reboot.
If you want the remove the built infrastructure, you can run terraform destroy
to delete it.
When the installation is completed, you can proceed with connecting/logging in to the T-Pot according to the documentation.