Skip to content

geolexica/deploy-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Operational instructions

General

This file contains operational instructions to create infrastructure in AWS by terraform.

Create AWS account

  • Create an AWS account in us region. (e.g. us-east-1).

  • Get your AWS account id. (e.g. 123456789)

  • Set up access key pair for the root user in IAM for the creation and modification of the infrastructure.

  • Set up the the AWS access key pair in the file ~/.aws/credentials. Add the lines listed below into this file.

[example-root]
aws_access_key_id = XXXXXXXXXXXXXXXXX
aws_secret_access_key = XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Install tfenv and terraform

Note
You can install higher version of terraform, however you may need to upgrade the syntax accordingly.

Create site

  • Go to site folder to perform changes. (e.g. sites/www.example.org)

  • Edit the variables.tf. Update the account id.

variable "allowed_account_ids" {
  type    = list(string)
  default = ["<account-id>"]
}
  • Edit the variables.tf. Update the domain name.

variable "fqdn-root" {
  default = "example.org"
}

variable "fqdn-main" {
  default = "www.example.org"
}

variable "fqdn-test" {
  default = "www-staging.example.org"
}
  • Edit the site-main.tf and site-test.tf. Change the value of MYSECRET1234567 as shown below.

refer_secret = base64sha512("MYSECRET1234567${var.fqdn-main}")
  • Under the site folder, perform the following tasks:

    • Run export AWS_PROFILE=example-root to setup AWS user.

    • Run terraform init.

    • Run terraform plan to review the planned changes.

    • Run terraform apply to apply changes.

Create DNS records

  • Go to routes53 folder of the site. (e.g. route53/example.org)

  • Edit the provider.tf. Update the account id.

provider "aws" {
  region              = var.region
  allowed_account_ids = ["<account-id>"]
}
  • Edit the variables.tf. Update the domain name.

variable "external_domain" {
  default = "example.org"
}
  • Under the routes53 folder, perform the following tasks:

    • Run export AWS_PROFILE=example-root to setup AWS user.

    • Run terraform init.

    • Run terraform plan to review the planned changes.

    • Run terraform apply to apply changes.

About

terraform deployment template for geolexica node

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages