Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 12 Next »

We now provide Terraform scripts that can be used to install FlexDeploy for you. Terraform download and installation instructions are located here.

System Requirements

Currently, the script mostly only works with Linux. This does not mean you can’t run the script on Windows (you can) however the script must run against a Linux instance. So if you are running it against the local instance you will need to be running on Linux. You can also run the script locally against windows.

If you want to use the Oracle database, you need to have both the ojdbc8-full.tar.gz and LINUX.X64_193000_db_home.zip files located in a folder called software in the root directory of the script. ojdbc drivers are version 8. Database install is Oracle 19.3, Linux x64 version.

Choosing which cloud provider to use

Currently, 3 providers are supported. AWS, Azure, and Oracle Cloud Infrastructure. Once you have chosen a provider, you’ll need to change the source of the cloud module. This is in the main.tf file in the root directory. For AWS you’ll change it to “./modules/aws” for Azure it will be “./modules/azure” and for OCI will be “./modules/oci”. If you’re executing locally or executing against an existing instance you need to change it to be “./modules/local”. If you are using AWS it should look like this:

module "cloud" {
  source = "./modules/aws"
...

Setup inputs

Inputs can be supplied using any of the methods supported by Terraform. However, we recommend using the .tfvars method. The following examples will use that format.

Inputs for installation

Provider-specific

The provider you have selected will require certain inputs, unless you are running locally in which case you do not need any of these inputs.

For AWS you need these:

aws_access_key        = "EXAMPLEEXAMPLEEXAMPLE"
aws_secret_key        = "EXAMPLEEXAMPLEEXAMPLEEXAMPLEEXAMPLEEXA+MPLE"

optionally you can select the region. Default is us-east-1.

aws_region = "us-east-1"

For Azure you need these:

azure_client_id       = "EXAMPLEE-XAMP-LEEX-AMPL-EXAMPLE"
azure_client_secret   = "EXAM_PLEEXA-MPL.EEXAMP_~LEEXAMPLEEXAM-"
azure_subscription_id = "EXAMPLEE-XAMP-LEEX-AMPL-EXAMPLE"
azure_tenant_id       = "EXAMPLEE-XAMP-LEEX-AMPL-EXAMPLE"

optionally you can select the location. Default is Central US.

azure_location = "Central US"

For OCI you need these:

oci_tenancy_ocid      = "ocid1.tenancy.oc1..EXAMPLEEXAMPLEEXAMPLEEXAMPLEEXAMPLEEXAMPLEEXAMPLEEXAMPLEEXAM"
oci_user_ocid         = "ocid1.user.oc1..EXAMPLEEXAMPLEEXAMPLEEXAMPLEEXAMPLEEXAMPLEEXAMPLEEXAMPLEEXAM"
oci_fingerprint       = "EX:AM:PL:EE:XA:MP:LE:EX:AM:PL:EE:XA:MP:LE"
oci_private_key_path  = "C:\\Users\\user\\documents\\oracleidentitycloudservice_example.user-01-01-70-00.pem"

optionally you can select the region. Default is us-ashburn-1.

oci_region = "us-ashburn-1"

SSH keys

SSH Keys can be provided or can be generated for you. We recommend you provide them so you can keep track of your own key. Here’s what it would look like to input a public and private key (both are required):

ssh_public_key        = <<EOT
ssh-rsa MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCqGKukO1De7zhZj6+H0qtjTkVxwTCpvKe4eCZ0FPqri0cb2JZfXJ/DgYSF6vUpwmJG8wVQZKjeGcjDOL5UlsuusFncCzWBQ7RKNUSesmQRMSGkVb1/3j+skZ6UtW+5u09lHNsj6tQ51s1SPrCBkedbNf0Tp0GbMJDyR4e9T04ZZwIDAQAB
EOT
ssh_private_key       = <<EOT
-----BEGIN RSA PRIVATE KEY-----
MIICXAIBAAKBgQCqGKukO1De7zhZj6+H0qtjTkVxwTCpvKe4eCZ0FPqri0cb2JZfXJ/DgYSF6vUp
wmJG8wVQZKjeGcjDOL5UlsuusFncCzWBQ7RKNUSesmQRMSGkVb1/3j+skZ6UtW+5u09lHNsj6tQ5
1s1SPrCBkedbNf0Tp0GbMJDyR4e9T04ZZwIDAQABAoGAFijko56+qGyN8M0RVyaRAXz++xTqHBLh
3tx4VgMtrQ+WEgCjhoTwo23KMBAuJGSYnRmoBZM3lMfTKevIkAidPExvYCdm5dYq3XToLkkLv5L2
pIIVOFMDG+KESnAFV7l2c+cnzRMW0+b6f8mR1CJzZuxVLL6Q02fvLi55/mbSYxECQQDeAw6fiIQX
GukBI4eMZZt4nscy2o12KyYner3VpoeE+Np2q+Z3pvAMd/aNzQ/W9WaI+NRfcxUJrmfPwIGm63il
AkEAxCL5HQb2bQr4ByorcMWm/hEP2MZzROV73yF41hPsRC9m66KrheO9HPTJuo3/9s5p+sqGxOlF
L0NDt4SkosjgGwJAFklyR1uZ/wPJjj611cdBcztlPdqoxssQGnh85BzCj/u3WqBpE2vjvyyvyI5k
X6zk7S0ljKtt2jny2+00VsBerQJBAJGC1Mg5Oydo5NwD6BiROrPxGo2bpTbu/fhrT8ebHkTz2epl
U9VQQSQzY1oZMVX8i1m5WUTLPz2yLJIBQVdXqhMCQBGoiuSoSjafUhV7i1cEGpb88h5NBYZzWXGZ
37sJ5QsW+sJyoNde3xH8vdXhzU7eT82D6X/scw9RZz+/6rCJ4p0=
-----END RSA PRIVATE KEY-----
EOT

If you want to have them generated for you, you can do so like this (again not recommended):

generate_key = true

Database Options

db_type is the type of database. Currently only supports ‘postgres’ and ‘oracle’. Oracle requires the database and ojdbc files to be in the software folder. More on this under system requirements. Default is postgres.

db_password is the password for an administrator user for the database.

db_fd_admin_password is the password for the fd_admin user for the database.

db_port is which port the database will listen on. Recommended to be 5432 for Postgres and 1521 for Oracle. Default is 5432.

Example of database configuration for postgres:

db_password = "Password1_"
db_fd_admin_password = "FDadminPassword1_"

Example for oracle:

db_type = "oracle"
db_password = "Password1_"
db_fd_admin_password = "FDadminPassword1_"
db_port = 1521

Instance Options

fd_version the version of FlexDeploy. Usually, the latest is recommended. This is required.

fd_install_directory is where FlexDeploy should be installed to. Defaults to /u01/flexdeploy.

fd_repository_directory is where the FlexDeploy artifact repository is located. Defaults to /u01/flexdeploy/artifacts.

db_install_directory. Directory where to install the database. Default is /u02/database.

db_data_directory. Directory where to keep the data for the database. Default is /u03/dbdata.

install_temp_directory is where temporary files will be stored for installation. Defaults to /var/tmp/fdinstall.

use_one_instance will choose whether or not to install the database on the same instance as FlexDeploy. We do not recommend this for production environments. Default is false.

execute_locally chooses whether or not to install FlexDeploy locally. This is not recommended for production environments, since it installs both the database and FlexDeploy on the same instance.

is_windows chooses whether or not this is installing on windows. If you choose this it will work locally. Not recommended since this will install database and FlexDeploy on the same instance.

existing_instance_hostname is the hostname for an existing instance. If this option is set, it will execute against this hostname.

existing_database_hostname is the hostname for a database instance. If this option is set database install will execute against this instance.

admin_user is the admin user for the local install. Only required when executing locally.

Example with only required inputs:

fd_version = "5.6.0.1"

More complex example:

fd_version = "5.6.0.1"
fd_install_directory = "/u02/flexdeploy"
fd_repository_directory = "/u03/flexdeploy/repository"
db_install_directory = "/u04/database"
db_data_directory = "/u05/databasedata"
install_temp_directory = "/tmp/fdinstall"
existing_instance_hostname = "www.example.com"
existing_database_hostname = "database.example.com"

Putting it together

Here are a few examples of all of this put together.

For AWS with postgres:

aws_access_key        = "EXAMPLEEXAMPLEEXAMPLE"
aws_secret_key        = "EXAMPLEEXAMPLEEXAMPLEEXAMPLEEXAMPLEEXA+MPLE"
aws_region = "us-east-1"
ssh_public_key        = <<EOT
ssh-rsa MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCqGKukO1De7zhZj6+H0qtjTkVxwTCpvKe4eCZ0FPqri0cb2JZfXJ/DgYSF6vUpwmJG8wVQZKjeGcjDOL5UlsuusFncCzWBQ7RKNUSesmQRMSGkVb1/3j+skZ6UtW+5u09lHNsj6tQ51s1SPrCBkedbNf0Tp0GbMJDyR4e9T04ZZwIDAQAB
EOT
ssh_private_key       = <<EOT
-----BEGIN RSA PRIVATE KEY-----
MIICXAIBAAKBgQCqGKukO1De7zhZj6+H0qtjTkVxwTCpvKe4eCZ0FPqri0cb2JZfXJ/DgYSF6vUp
wmJG8wVQZKjeGcjDOL5UlsuusFncCzWBQ7RKNUSesmQRMSGkVb1/3j+skZ6UtW+5u09lHNsj6tQ5
1s1SPrCBkedbNf0Tp0GbMJDyR4e9T04ZZwIDAQABAoGAFijko56+qGyN8M0RVyaRAXz++xTqHBLh
3tx4VgMtrQ+WEgCjhoTwo23KMBAuJGSYnRmoBZM3lMfTKevIkAidPExvYCdm5dYq3XToLkkLv5L2
pIIVOFMDG+KESnAFV7l2c+cnzRMW0+b6f8mR1CJzZuxVLL6Q02fvLi55/mbSYxECQQDeAw6fiIQX
GukBI4eMZZt4nscy2o12KyYner3VpoeE+Np2q+Z3pvAMd/aNzQ/W9WaI+NRfcxUJrmfPwIGm63il
AkEAxCL5HQb2bQr4ByorcMWm/hEP2MZzROV73yF41hPsRC9m66KrheO9HPTJuo3/9s5p+sqGxOlF
L0NDt4SkosjgGwJAFklyR1uZ/wPJjj611cdBcztlPdqoxssQGnh85BzCj/u3WqBpE2vjvyyvyI5k
X6zk7S0ljKtt2jny2+00VsBerQJBAJGC1Mg5Oydo5NwD6BiROrPxGo2bpTbu/fhrT8ebHkTz2epl
U9VQQSQzY1oZMVX8i1m5WUTLPz2yLJIBQVdXqhMCQBGoiuSoSjafUhV7i1cEGpb88h5NBYZzWXGZ
37sJ5QsW+sJyoNde3xH8vdXhzU7eT82D6X/scw9RZz+/6rCJ4p0=
-----END RSA PRIVATE KEY-----
EOT
db_password = "Password1_"
db_fd_admin_password = "FDadminPassword1_"
fd_version = "5.6.0.1"

For OCI with oracle:

oci_tenancy_ocid      = "ocid1.tenancy.oc1..EXAMPLEEXAMPLEEXAMPLEEXAMPLEEXAMPLEEXAMPLEEXAMPLEEXAMPLEEXAM"
oci_user_ocid         = "ocid1.user.oc1..EXAMPLEEXAMPLEEXAMPLEEXAMPLEEXAMPLEEXAMPLEEXAMPLEEXAMPLEEXAM"
oci_fingerprint       = "EX:AM:PL:EE:XA:MP:LE:EX:AM:PL:EE:XA:MP:LE"
oci_private_key_path  = "C:\\Users\\user\\documents\\oracleidentitycloudservice_example.user-01-01-70-00.pem"
oci_region = "us-ashburn-1"
ssh_public_key        = <<EOT
ssh-rsa MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCqGKukO1De7zhZj6+H0qtjTkVxwTCpvKe4eCZ0FPqri0cb2JZfXJ/DgYSF6vUpwmJG8wVQZKjeGcjDOL5UlsuusFncCzWBQ7RKNUSesmQRMSGkVb1/3j+skZ6UtW+5u09lHNsj6tQ51s1SPrCBkedbNf0Tp0GbMJDyR4e9T04ZZwIDAQAB
EOT
ssh_private_key       = <<EOT
-----BEGIN RSA PRIVATE KEY-----
MIICXAIBAAKBgQCqGKukO1De7zhZj6+H0qtjTkVxwTCpvKe4eCZ0FPqri0cb2JZfXJ/DgYSF6vUp
wmJG8wVQZKjeGcjDOL5UlsuusFncCzWBQ7RKNUSesmQRMSGkVb1/3j+skZ6UtW+5u09lHNsj6tQ5
1s1SPrCBkedbNf0Tp0GbMJDyR4e9T04ZZwIDAQABAoGAFijko56+qGyN8M0RVyaRAXz++xTqHBLh
3tx4VgMtrQ+WEgCjhoTwo23KMBAuJGSYnRmoBZM3lMfTKevIkAidPExvYCdm5dYq3XToLkkLv5L2
pIIVOFMDG+KESnAFV7l2c+cnzRMW0+b6f8mR1CJzZuxVLL6Q02fvLi55/mbSYxECQQDeAw6fiIQX
GukBI4eMZZt4nscy2o12KyYner3VpoeE+Np2q+Z3pvAMd/aNzQ/W9WaI+NRfcxUJrmfPwIGm63il
AkEAxCL5HQb2bQr4ByorcMWm/hEP2MZzROV73yF41hPsRC9m66KrheO9HPTJuo3/9s5p+sqGxOlF
L0NDt4SkosjgGwJAFklyR1uZ/wPJjj611cdBcztlPdqoxssQGnh85BzCj/u3WqBpE2vjvyyvyI5k
X6zk7S0ljKtt2jny2+00VsBerQJBAJGC1Mg5Oydo5NwD6BiROrPxGo2bpTbu/fhrT8ebHkTz2epl
U9VQQSQzY1oZMVX8i1m5WUTLPz2yLJIBQVdXqhMCQBGoiuSoSjafUhV7i1cEGpb88h5NBYZzWXGZ
37sJ5QsW+sJyoNde3xH8vdXhzU7eT82D6X/scw9RZz+/6rCJ4p0=
-----END RSA PRIVATE KEY-----
EOT
db_type = "oracle"
db_password = "Password1_"
db_fd_admin_password = "FDadminPassword1_"
db_port = 1521
fd_version = "5.6.0.1"

For Azure with postgres:

azure_client_id       = "EXAMPLEE-XAMP-LEEX-AMPL-EXAMPLE"
azure_client_secret   = "EXAM_PLEEXA-MPL.EEXAMP_~LEEXAMPLEEXAM-"
azure_subscription_id = "EXAMPLEE-XAMP-LEEX-AMPL-EXAMPLE"
azure_tenant_id       = "EXAMPLEE-XAMP-LEEX-AMPL-EXAMPLE"
ssh_public_key        = <<EOT
ssh-rsa MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCqGKukO1De7zhZj6+H0qtjTkVxwTCpvKe4eCZ0FPqri0cb2JZfXJ/DgYSF6vUpwmJG8wVQZKjeGcjDOL5UlsuusFncCzWBQ7RKNUSesmQRMSGkVb1/3j+skZ6UtW+5u09lHNsj6tQ51s1SPrCBkedbNf0Tp0GbMJDyR4e9T04ZZwIDAQAB
EOT
ssh_private_key       = <<EOT
-----BEGIN RSA PRIVATE KEY-----
MIICXAIBAAKBgQCqGKukO1De7zhZj6+H0qtjTkVxwTCpvKe4eCZ0FPqri0cb2JZfXJ/DgYSF6vUp
wmJG8wVQZKjeGcjDOL5UlsuusFncCzWBQ7RKNUSesmQRMSGkVb1/3j+skZ6UtW+5u09lHNsj6tQ5
1s1SPrCBkedbNf0Tp0GbMJDyR4e9T04ZZwIDAQABAoGAFijko56+qGyN8M0RVyaRAXz++xTqHBLh
3tx4VgMtrQ+WEgCjhoTwo23KMBAuJGSYnRmoBZM3lMfTKevIkAidPExvYCdm5dYq3XToLkkLv5L2
pIIVOFMDG+KESnAFV7l2c+cnzRMW0+b6f8mR1CJzZuxVLL6Q02fvLi55/mbSYxECQQDeAw6fiIQX
GukBI4eMZZt4nscy2o12KyYner3VpoeE+Np2q+Z3pvAMd/aNzQ/W9WaI+NRfcxUJrmfPwIGm63il
AkEAxCL5HQb2bQr4ByorcMWm/hEP2MZzROV73yF41hPsRC9m66KrheO9HPTJuo3/9s5p+sqGxOlF
L0NDt4SkosjgGwJAFklyR1uZ/wPJjj611cdBcztlPdqoxssQGnh85BzCj/u3WqBpE2vjvyyvyI5k
X6zk7S0ljKtt2jny2+00VsBerQJBAJGC1Mg5Oydo5NwD6BiROrPxGo2bpTbu/fhrT8ebHkTz2epl
U9VQQSQzY1oZMVX8i1m5WUTLPz2yLJIBQVdXqhMCQBGoiuSoSjafUhV7i1cEGpb88h5NBYZzWXGZ
37sJ5QsW+sJyoNde3xH8vdXhzU7eT82D6X/scw9RZz+/6rCJ4p0=
-----END RSA PRIVATE KEY-----
EOT
db_password = "Password1_"
db_fd_admin_password = "FDadminPassword1_"
fd_version = "5.6.0.1"

Install

Place those options inside of a file called terraform.tfvars inside of the root directory of the script.

now that the input variables are all set, we will first run

terraform init

to set up terraform. Next we will run

terraform plan

This will output showing everything that will be created. It will look similar to this for aws install:

 plan output

Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:

+ create

Terraform will perform the following actions:

# module.cloud.aws_default_vpc.default will be created

+ resource "aws_default_vpc" "default" {

+ arn = (known after apply)

+ assign_generated_ipv6_cidr_block = (known after apply)

+ cidr_block = (known after apply)

+ default_network_acl_id = (known after apply)

+ default_route_table_id = (known after apply)

+ default_security_group_id = (known after apply)

+ dhcp_options_id = (known after apply)

+ enable_classiclink = (known after apply)

+ enable_classiclink_dns_support = (known after apply)

+ enable_dns_hostnames = (known after apply)

+ enable_dns_support = true

+ id = (known after apply)

+ instance_tenancy = (known after apply)

+ ipv6_association_id = (known after apply)

+ ipv6_cidr_block = (known after apply)

+ main_route_table_id = (known after apply)

+ owner_id = (known after apply)

+ tags = {

+ "Name" = "Default VPC"

}

}

# module.cloud.aws_instance.flexdeploy will be created

+ resource "aws_instance" "flexdeploy" {

+ ami = "ami-08a1344b720a29c1a"

+ arn = (known after apply)

+ associate_public_ip_address = (known after apply)

+ availability_zone = (known after apply)

+ cpu_core_count = (known after apply)

+ cpu_threads_per_core = (known after apply)

+ get_password_data = false

+ host_id = (known after apply)

+ id = (known after apply)

+ instance_state = (known after apply)

+ instance_type = "t2.large"

+ ipv6_address_count = (known after apply)

+ ipv6_addresses = (known after apply)

+ key_name = (known after apply)

+ outpost_arn = (known after apply)

+ password_data = (known after apply)

+ placement_group = (known after apply)

+ primary_network_interface_id = (known after apply)

+ private_dns = (known after apply)

+ private_ip = (known after apply)

+ public_dns = (known after apply)

+ public_ip = (known after apply)

+ secondary_private_ips = (known after apply)

+ security_groups = (known after apply)

+ source_dest_check = true

+ subnet_id = (known after apply)

+ tags = (known after apply)

+ tenancy = (known after apply)

+ vpc_security_group_ids = (known after apply)

+ ebs_block_device {

+ delete_on_termination = (known after apply)

+ device_name = (known after apply)

+ encrypted = (known after apply)

+ iops = (known after apply)

+ kms_key_id = (known after apply)

+ snapshot_id = (known after apply)

+ tags = (known after apply)

+ throughput = (known after apply)

+ volume_id = (known after apply)

+ volume_size = (known after apply)

+ volume_type = (known after apply)

}

+ enclave_options {

+ enabled = (known after apply)

}

+ ephemeral_block_device {

+ device_name = (known after apply)

+ no_device = (known after apply)

+ virtual_name = (known after apply)

}

+ metadata_options {

+ http_endpoint = (known after apply)

+ http_put_response_hop_limit = (known after apply)

+ http_tokens = (known after apply)

}

+ network_interface {

+ delete_on_termination = (known after apply)

+ device_index = (known after apply)

+ network_interface_id = (known after apply)

}

+ root_block_device {

+ delete_on_termination = true

+ device_name = (known after apply)

+ encrypted = (known after apply)

+ iops = (known after apply)

+ kms_key_id = (known after apply)

+ throughput = (known after apply)

+ volume_id = (known after apply)

+ volume_size = 125

+ volume_type = "standard"

}

}

# module.cloud.aws_instance.flexdeploy_db[0] will be created

+ resource "aws_instance" "flexdeploy_db" {

+ ami = "ami-08a1344b720a29c1a"

+ arn = (known after apply)

+ associate_public_ip_address = (known after apply)

+ availability_zone = (known after apply)

+ cpu_core_count = (known after apply)

+ cpu_threads_per_core = (known after apply)

+ get_password_data = false

+ host_id = (known after apply)

+ id = (known after apply)

+ instance_state = (known after apply)

+ instance_type = "t2.large"

+ ipv6_address_count = (known after apply)

+ ipv6_addresses = (known after apply)

+ key_name = (known after apply)

+ outpost_arn = (known after apply)

+ password_data = (known after apply)

+ placement_group = (known after apply)

+ primary_network_interface_id = (known after apply)

+ private_dns = (known after apply)

+ private_ip = (known after apply)

+ public_dns = (known after apply)

+ public_ip = (known after apply)

+ secondary_private_ips = (known after apply)

+ security_groups = (known after apply)

+ source_dest_check = true

+ subnet_id = (known after apply)

+ tags = (known after apply)

+ tenancy = (known after apply)

+ vpc_security_group_ids = (known after apply)

+ ebs_block_device {

+ delete_on_termination = (known after apply)

+ device_name = (known after apply)

+ encrypted = (known after apply)

+ iops = (known after apply)

+ kms_key_id = (known after apply)

+ snapshot_id = (known after apply)

+ tags = (known after apply)

+ throughput = (known after apply)

+ volume_id = (known after apply)

+ volume_size = (known after apply)

+ volume_type = (known after apply)

}

+ enclave_options {

+ enabled = (known after apply)

}

+ ephemeral_block_device {

+ device_name = (known after apply)

+ no_device = (known after apply)

+ virtual_name = (known after apply)

}

+ metadata_options {

+ http_endpoint = (known after apply)

+ http_put_response_hop_limit = (known after apply)

+ http_tokens = (known after apply)

}

+ network_interface {

+ delete_on_termination = (known after apply)

+ device_index = (known after apply)

+ network_interface_id = (known after apply)

}

+ root_block_device {

+ delete_on_termination = true

+ device_name = (known after apply)

+ encrypted = (known after apply)

+ iops = (known after apply)

+ kms_key_id = (known after apply)

+ throughput = (known after apply)

+ volume_id = (known after apply)

+ volume_size = 125

+ volume_type = "standard"

}

}

# module.cloud.aws_key_pair.flexdeploy_key will be created

+ resource "aws_key_pair" "flexdeploy_key" {

+ arn = (known after apply)

+ fingerprint = (known after apply)

+ id = (known after apply)

+ key_name = (known after apply)

+ key_pair_id = (known after apply)

+ public_key = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC3Rbcp8V/pi0tr4ovWhwEAqhoaOAg8osb55u23eOZhlGSbEVgdKocqchKP8uwrLwqpJa0bNzjfqUUeBZttQIAShOGXh7xJ+r2UzhVjpH6WNIYu4ZG64sBNB3vgmAuouGxAQAMBeFHzRAF8Twwylu9n9s9GHb5fTTcMDrqKLqV7WEEj1rYjKWkaFMHnHOBsQeVY+Od3p8Ds2ruK6lQysoDJHHa5lJnLjvkI+3ROHyQLso3lPHtOqHzPJi0jc6i/L8bNHDh/38rDHvzZ8q01bu16P3aK5QsPglCOs3z+pH81zun32AGeyu0G9oBv0pIGKC1EYpp4oPg+hXJEARU2KPrGRwr+8ZJy5CoyQ6EPY7Buu7/2YBv6at3AnGTaNFpUA536u8Os0+oy0jPuwcUmwJyx+o5XIl1plFf/rmwzmE9flC4ps1arcRV+DNw/DgsuqMrH1MNTgnhNIy3iaYLd9CU+5kRieHOarBCM8Myo2oG8w6A8JNIeXy0KlQsaAB+pdsBnpND/zjH/NSe/0RIzlOM2E9fHhqUXVJ0pt4xCWXca0FGV6xZKxqCbUl/yXAPdJ4OHBexwCDlnWut2EeMFqhWgCJa616U91OBrViruJIWzyOozXZtKT2mFGfP+G6799d58cvT5962QwbVjYmsnRPWYrDKbkvoxNSHpr6LMI9gkKw=="

}

# module.cloud.aws_security_group.allow_ssh_connection will be created

+ resource "aws_security_group" "allow_ssh_connection" {

+ arn = (known after apply)

+ description = "Allow ssh traffic"

+ egress = [

+ {

+ cidr_blocks = [

+ "0.0.0.0/0",

]

+ description = "outbound connections"

+ from_port = 22

+ ipv6_cidr_blocks = []

+ prefix_list_ids = []

+ protocol = "tcp"

+ security_groups = []

+ self = false

+ to_port = 22

},

]

+ id = (known after apply)

+ ingress = [

+ {

+ cidr_blocks = [

+ "0.0.0.0/0",

]

+ description = "Incoming connections"

+ from_port = 22

+ ipv6_cidr_blocks = []

+ prefix_list_ids = []

+ protocol = "tcp"

+ security_groups = []

+ self = true

+ to_port = 22

},

]

+ name = (known after apply)

+ name_prefix = (known after apply)

+ owner_id = (known after apply)

+ revoke_rules_on_delete = false

+ tags = (known after apply)

+ vpc_id = (known after apply)

}

# module.cloud.aws_security_group.database_security_group will be created

+ resource "aws_security_group" "database_security_group" {

+ arn = (known after apply)

+ description = "Allow database traffic"

+ egress = [

+ {

+ cidr_blocks = [

+ "0.0.0.0/0",

]

+ description = "outbound connections"

+ from_port = 5432

+ ipv6_cidr_blocks = []

+ prefix_list_ids = []

+ protocol = "tcp"

+ security_groups = []

+ self = false

+ to_port = 5432

},

]

+ id = (known after apply)

+ ingress = [

+ {

+ cidr_blocks = [

+ "0.0.0.0/0",

]

+ description = "Incoming connections"

+ from_port = 5432

+ ipv6_cidr_blocks = []

+ prefix_list_ids = []

+ protocol = "tcp"

+ security_groups = []

+ self = true

+ to_port = 5432

},

]

+ name = (known after apply)

+ name_prefix = (known after apply)

+ owner_id = (known after apply)

+ revoke_rules_on_delete = false

+ tags = (known after apply)

+ vpc_id = (known after apply)

}

# module.cloud.aws_security_group.instance_security_group will be created

+ resource "aws_security_group" "instance_security_group" {

+ arn = (known after apply)

+ description = "Allow TLS outbound traffic"

+ egress = [

+ {

+ cidr_blocks = [

+ "0.0.0.0/0",

]

+ description = "outbound connections"

+ from_port = 0

+ ipv6_cidr_blocks = []

+ prefix_list_ids = []

+ protocol = "-1"

+ security_groups = []

+ self = false

+ to_port = 0

},

]

+ id = (known after apply)

+ ingress = [

+ {

+ cidr_blocks = [

+ "0.0.0.0/0",

]

+ description = "Incoming connections"

+ from_port = 8000

+ ipv6_cidr_blocks = []

+ prefix_list_ids = []

+ protocol = "tcp"

+ security_groups = []

+ self = true

+ to_port = 8000

},

]

+ name = (known after apply)

+ name_prefix = (known after apply)

+ owner_id = (known after apply)

+ revoke_rules_on_delete = false

+ tags = (known after apply)

+ vpc_id = (known after apply)

}

# module.cloud.random_id.unique_id will be created

+ resource "random_id" "unique_id" {

+ b64_std = (known after apply)

+ b64_url = (known after apply)

+ byte_length = 8

+ dec = (known after apply)

+ hex = (known after apply)

+ id = (known after apply)

}

# module.db_setup[0].null_resource.db_setup[0] will be created

+ resource "null_resource" "db_setup" {

+ id = (known after apply)

}

# module.db_setup[0].null_resource.postgres_db_install[0] will be created

+ resource "null_resource" "postgres_db_install" {

+ id = (known after apply)

}

# module.instance_setup[0].null_resource.instance_setup[0] will be created

+ resource "null_resource" "instance_setup" {

+ id = (known after apply)

}

# module.java_install[0].null_resource.java_install[0] will be created

+ resource "null_resource" "java_install" {

+ id = (known after apply)

}

# module.start_server[0].null_resource.start_server[0] will be created

+ resource "null_resource" "start_server" {

+ id = (known after apply)

}

# module.tomcat_install[0].null_resource.install_tomcat[0] will be created

+ resource "null_resource" "install_tomcat" {

+ id = (known after apply)

}

Plan: 14 to add, 0 to change, 0 to destroy.

Changes to Outputs:

+ admin_user = "ec2-user"

+ db_address = (known after apply)

+ flexdeploy_url = (known after apply)

+ hostname = (known after apply)

+ private_key = (sensitive value)

+ public_key = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC3Rbcp8V/pi0tr4ovWhwEAqhoaOAg8osb55u23eOZhlGSbEVgdKocqchKP8uwrLwqpJa0bNzjfqUUeBZttQIAShOGXh7xJ+r2UzhVjpH6WNIYu4ZG64sBNB3vgmAuouGxAQAMBeFHzRAF8Twwylu9n9s9GHb5fTTcMDrqKLqV7WEEj1rYjKWkaFMHnHOBsQeVY+Od3p8Ds2ruK6lQysoDJHHa5lJnLjvkI+3ROHyQLso3lPHtOqHzPJi0jc6i/L8bNHDh/38rDHvzZ8q01bu16P3aK5QsPglCOs3z+pH81zun32AGeyu0G9oBv0pIGKC1EYpp4oPg+hXJEARU2KPrGRwr+8ZJy5CoyQ6EPY7Buu7/2YBv6at3AnGTaNFpUA536u8Os0+oy0jPuwcUmwJyx+o5XIl1plFf/rmwzmE9flC4ps1arcRV+DNw/DgsuqMrH1MNTgnhNIy3iaYLd9CU+5kRieHOarBCM8Myo2oG8w6A8JNIeXy0KlQsaAB+pdsBnpND/zjH/NSe/0RIzlOM2E9fHhqUXVJ0pt4xCWXca0FGV6xZKxqCbUl/yXAPdJ4OHBexwCDlnWut2EeMFqhWgCJa616U91OBrViruJIWzyOozXZtKT2mFGfP+G6799d58cvT5962QwbVjYmsnRPWYrDKbkvoxNSHpr6LMI9gkKw=="

──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

Note: You didn't use the -out option to save this plan, so Terraform can't guarantee to take exactly these actions if you run "terraform apply" now.

Read over this and make sure you are ok with all of these resources being created.

Next we can run:

terraform apply

This will run the script and install everything necessary.

This can take quite some time to run depending on the specific configuration so please be patient.

Once it’s done you should see outputs that look similar to this:

 outputs

Outputs:

admin_user = "ec2-user"

db_address = "ec2-3-91-147-31.compute-1.amazonaws.com"

flexdeploy_url = "ec2-3-239-21-140.compute-1.amazonaws.com:8000/flexdeploy"

hostname = "ec2-3-239-21-140.compute-1.amazonaws.com"

private_key = <sensitive>

public_key = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC3Rbcp8V/pi0tr4ovWhwEAqhoaOAg8osb55u23eOZhlGSbEVgdKocqchKP8uwrLwqpJa0bNzjfqUUeBZttQIAShOGXh7xJ+r2UzhVjpH6WNIYu4ZG64sBNB3vgmAuouGxAQAMBeFHzRAF8Twwylu9n9s9GHb5fTTcMDrqKLqV7WEEj1rYjKWkaFMHnHOBsQeVY+Od3p8Ds2ruK6lQysoDJHHa5lJnLjvkI+3ROHyQLso3lPHtOqHzPJi0jc6i/L8bNHDh/38rDHvzZ8q01bu16P3aK5QsPglCOs3z+pH81zun32AGeyu0G9oBv0pIGKC1EYpp4oPg+hXJEARU2KPrGRwr+8ZJy5CoyQ6EPY7Buu7/2YBv6at3AnGTaNFpUA536u8Os0+oy0jPuwcUmwJyx+o5XIl1plFf/rmwzmE9flC4ps1arcRV+DNw/DgsuqMrH1MNTgnhNIy3iaYLd9CU+5kRieHOarBCM8Myo2oG8w6A8JNIeXy0KlQsaAB+pdsBnpND/zjH/NSe/0RIzlOM2E9fHhqUXVJ0pt4xCWXca0FGV6xZKxqCbUl/yXAPdJ4OHBexwCDlnWut2EeMFqhWgCJa616U91OBrViruJIWzyOozXZtKT2mFGfP+G6799d58cvT5962QwbVjYmsnRPWYrDKbkvoxNSHpr6LMI9gkKw=="

You can see the URL to connect to FlexDeploy.

Then you should be all set.

If something does not work correctly, or you are just done using this FlexDeploy instance you can run the following:

terraform destroy

This will destroy anything created in the cloud. It will not however undo any changes to existing servers.

  • No labels