mirror of
https://github.com/telekom-security/tpotce.git
synced 2025-05-12 19:28:09 +00:00
Update README.md
This commit is contained in:
parent
63131b6712
commit
bedd13af20
1 changed files with 65 additions and 30 deletions
|
@ -1,34 +1,73 @@
|
||||||
# T-Pot Terraform
|
# T-Pot Terraform
|
||||||
|
This [Terraform](https://www.terraform.io/) 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](https://www.terraform.io/docs/providers/index.html).
|
||||||
|
|
||||||
This [Terraform](https://www.terraform.io/) configuration can be used to provision a T-Pot instance in AWS in addition to all of the necessary pre-requisites. Specifically, the following resources will be created:
|
[Cloud-init](https://cloudinit.readthedocs.io/en/latest/) is used to bootstrap the instance and install T-Pot on startup.
|
||||||
|
|
||||||
|
# Table of Contents
|
||||||
|
- [What get's created](#what-created)
|
||||||
|
- [Amazon Web Services (AWS)](#what-created-aws)
|
||||||
|
- [Open Telekom Cloud (OTC)](#what-created-otc)
|
||||||
|
- [Pre-Requisites](#pre)
|
||||||
|
- [Amazon Web Services (AWS)](#pre-aws)
|
||||||
|
- [Open Telekom Cloud (OTC)](#pre-otc)
|
||||||
|
- [Terraform Variables](#variables)
|
||||||
|
- [Common configuration items](#variables-common)
|
||||||
|
- [Amazon Web Services (AWS)](#variables-aws)
|
||||||
|
- [Open Telekom Cloud (OTC)](#variables-otc)
|
||||||
|
- [Initialising](#initialising)
|
||||||
|
- [Applying the Configuration](#applying)
|
||||||
|
- [Connecting to the Instance](#connecting)
|
||||||
|
|
||||||
|
|
||||||
|
<a name="what-created"></a>
|
||||||
|
## What get's created
|
||||||
|
|
||||||
|
<a name="what-created-aws"></a>
|
||||||
|
### Amazon Web Services (AWS)
|
||||||
* EC2 instance:
|
* EC2 instance:
|
||||||
* t3.large (2 vCPU, 8 GiB RAM)
|
* t3.large (2 vCPU, 8 GiB RAM)
|
||||||
* 128GB disk
|
* 128GB disk
|
||||||
* [Debian Stretch](https://wiki.debian.org/Cloud/AmazonEC2Image/Stretch) (The T-Pot installation script will then upgrade this to Debian Sid)
|
* [Debian Buster](https://wiki.debian.org/Cloud/AmazonEC2Image/Buster)
|
||||||
* AWS Security Group:
|
* AWS Security Group:
|
||||||
* TCP/UDP ports <= 64000 open to the Internet
|
* TCP/UDP ports <= 64000 open to the Internet
|
||||||
* TCP ports 64294, 64295 and 64297 open to a chosen administrative IP
|
* TCP ports 64294, 64295 and 64297 open to a chosen administrative IP
|
||||||
|
|
||||||
[Cloud-init](https://cloudinit.readthedocs.io/en/latest/) is used to bootstrap the instance and install T-Pot on startup. Additional provisioning using Ansible etc. is not required.
|
<a name="what-created-otc"></a>
|
||||||
|
### Open Telekom Cloud (OTC)
|
||||||
The following resources are NOT automatically created and need to be specified in the configuration below:
|
*
|
||||||
|
*
|
||||||
* VPC
|
|
||||||
* Subnet
|
|
||||||
|
|
||||||
|
<a name="pre"></a>
|
||||||
## Pre-Requisites
|
## Pre-Requisites
|
||||||
|
|
||||||
* [Terraform](https://www.terraform.io/) 0.12
|
* [Terraform](https://www.terraform.io/) 0.12
|
||||||
|
|
||||||
|
<a name="pre-aws"></a>
|
||||||
|
### Amazon Web Services (AWS)
|
||||||
* AWS Account
|
* AWS Account
|
||||||
* Existing VPC. VPC ID should be specified in configuration below
|
* Existing VPC: VPC ID needs to be specified in `aws/variables.tf`
|
||||||
* Existing subnet. Subnet ID should be specified in configuration below
|
* Existing subnet: Subnet ID needs to be specified in `aws/variables.tf`
|
||||||
* AWS Authentication credentials should be [set using environment variables](https://www.terraform.io/docs/providers/aws/index.html#environment-variables)
|
* AWS Authentication credentials should be [set using environment variables](https://www.terraform.io/docs/providers/aws/index.html#environment-variables)
|
||||||
|
|
||||||
## Required Configuration Changes
|
<a name="pre-otc"></a>
|
||||||
|
### Open Telekom Cloud (OTC)
|
||||||
|
*
|
||||||
|
*
|
||||||
|
|
||||||
### Terraform Variables
|
<a name="variables"></a>
|
||||||
|
## Terraform Variables
|
||||||
|
|
||||||
|
<a name="variables-common"></a>
|
||||||
|
### Common configuration items
|
||||||
|
These variables exist in `aws/variables.tf` and `otc/variables.tf` respectively:
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
This will be used to configure credentials for the T-Pot Kibana interface.
|
||||||
|
|
||||||
|
<a name="variables-aws"></a>
|
||||||
|
### Amazon Web Services (AWS)
|
||||||
In `aws/variables.tf`, change the following variables to correspond to your existing EC2 infrastructure:
|
In `aws/variables.tf`, change the following variables to correspond to your existing EC2 infrastructure:
|
||||||
|
|
||||||
* `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"]`
|
* `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"]`
|
||||||
|
@ -36,38 +75,34 @@ In `aws/variables.tf`, change the following variables to correspond to your exis
|
||||||
* `ec2_subnet_id`
|
* `ec2_subnet_id`
|
||||||
* `ec2_region`
|
* `ec2_region`
|
||||||
|
|
||||||
### Admin Credentials
|
<a name="variables-otc"></a>
|
||||||
```
|
### Open Telekom Cloud (OTC)
|
||||||
myCONF_WEB_USER='webuser'
|
*
|
||||||
myCONF_WEB_PW='w3b$ecret'
|
*
|
||||||
```
|
|
||||||
This will be used to configure credentials for the T-Pot Kibana interface.
|
|
||||||
|
|
||||||
|
<a name="initialising"></a>
|
||||||
## Initialising
|
## Initialising
|
||||||
|
|
||||||
The [`terraform init`](https://www.terraform.io/docs/commands/init.html) command is used to initialize a working directory containing Terraform configuration files.
|
The [`terraform init`](https://www.terraform.io/docs/commands/init.html) command is used to initialize a working directory containing Terraform configuration files.
|
||||||
|
|
||||||
```
|
```
|
||||||
$ cd aws
|
$ cd aws
|
||||||
$ terraform init
|
$ terraform init
|
||||||
```
|
```
|
||||||
|
OR
|
||||||
|
```
|
||||||
|
$ cd otc
|
||||||
|
$ terraform init
|
||||||
|
```
|
||||||
|
|
||||||
|
<a name="applying"></a>
|
||||||
## Applying the Configuration
|
## Applying the Configuration
|
||||||
|
|
||||||
The [`terraform apply`](https://www.terraform.io/docs/commands/apply.html) 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`](https://www.terraform.io/docs/commands/plan.html) execution plan.
|
The [`terraform apply`](https://www.terraform.io/docs/commands/apply.html) 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`](https://www.terraform.io/docs/commands/plan.html) execution plan.
|
||||||
|
|
||||||
```
|
```
|
||||||
$ terraform apply
|
$ 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.
|
||||||
|
|
||||||
This will perform the following actions:
|
<a name="connecting"></a>
|
||||||
|
|
||||||
1. Create EC2 security group
|
|
||||||
2. Start a Debian EC2 instance
|
|
||||||
3. Update all packages and reboot if necessary
|
|
||||||
4. Install T-Pot and required dependencies
|
|
||||||
5. Reboot
|
|
||||||
|
|
||||||
## Connecting to the Instance
|
## Connecting to the Instance
|
||||||
|
|
||||||
When the installation is completed, you can proceed with connecting/logging in to the T-Pot according to the [documentation](https://github.com/dtag-dev-sec/tpotce#ssh-and-web-access).
|
When the installation is completed, you can proceed with connecting/logging in to the T-Pot according to the [documentation](https://github.com/dtag-dev-sec/tpotce#ssh-and-web-access).
|
||||||
|
|
Loading…
Reference in a new issue