Skip to content
This repository has been archived by the owner on Feb 10, 2021. It is now read-only.

Commit

Permalink
Update Dockerfile and README (#2)
Browse files Browse the repository at this point in the history
* Update README

* Update Dockerfile

* Update Dockerfile

* Update `terraform-root-modules` version

* Update README
  • Loading branch information
aknysh authored Jul 19, 2018
1 parent c8482cb commit 7a9eb84
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 28 deletions.
53 changes: 31 additions & 22 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,35 +1,44 @@
FROM cloudposse/terraform-root-modules:0.4.5 as terraform-root-modules
FROM cloudposse/terraform-root-modules:0.4.8 as terraform-root-modules

FROM cloudposse/geodesic:0.11.6

ENV DOCKER_IMAGE="cloudposse/prod.cloudposse.co"
ENV DOCKER_TAG="latest"

# Geodesic banner
ENV BANNER="prod.cloudposse.co"

# Default AWS Profile name
ENV AWS_DEFAULT_PROFILE="cpco-prod-admin"

# AWS Region for the cluster
# AWS Region
ENV AWS_REGION="us-west-2"

# Terraform State Bucket
ENV TF_BUCKET="cpco-prod-terraform-state"
ENV TF_BUCKET_REGION="us-west-2"
ENV TF_DYNAMODB_TABLE="cpco-prod-terraform-state-lock"
# Terraform vars
ENV TF_VAR_region="${AWS_REGION}"
ENV TF_VAR_account_id="845778104613"
ENV TF_VAR_namespace="cpco"
ENV TF_VAR_stage="prod"
ENV TF_VAR_domain_name="prod.cloudposse.co"
ENV TF_VAR_zone_name="prod.cloudposse.co."

# Terraform Vars
ENV TF_VAR_domain_name=prod.cloudposse.co
ENV TF_VAR_namespace=cpco
ENV TF_VAR_stage=prod
# chamber KMS config
ENV CHAMBER_KMS_KEY_ALIAS="alias/${TF_VAR_namespace}-${TF_VAR_stage}-chamber"

ENV TF_VAR_REDIS_INSTANCE_TYPE=cache.r3.large
# Terraform State Bucket
ENV TF_BUCKET_REGION="${AWS_REGION}"
ENV TF_BUCKET="${TF_VAR_namespace}-${TF_VAR_stage}-terraform-state"
ENV TF_DYNAMODB_TABLE="${TF_VAR_namespace}-${TF_VAR_stage}-terraform-state-lock"

# chamber KMS config
ENV CHAMBER_KMS_KEY_ALIAS="alias/cpco-prod-chamber"
# Default AWS Profile name
ENV AWS_DEFAULT_PROFILE="${TF_VAR_namespace}-${TF_VAR_stage}-admin"

# Copy root modules
COPY --from=terraform-root-modules /aws/ /conf/
COPY --from=terraform-root-modules /aws/tfstate-backend/ /conf/tfstate-backend/
COPY --from=terraform-root-modules /aws/account-dns/ /conf/account-dns/
COPY --from=terraform-root-modules /aws/acm/ /conf/acm/
COPY --from=terraform-root-modules /aws/backing-services/ /conf/backing-services/
COPY --from=terraform-root-modules /aws/chamber/ /conf/chamber/
COPY --from=terraform-root-modules /aws/cloudtrail/ /conf/cloudtrail/
COPY --from=terraform-root-modules /aws/kops/ /conf/kops/
COPY --from=terraform-root-modules /aws/kops-aws-platform/ /conf/kops-aws-platform/

# Place configuration in 'conf/' directory
COPY conf/ /conf/
Expand All @@ -41,15 +50,15 @@ RUN s3 fstab '${TF_BUCKET}' '/' '/secrets/tf'
ENV KUBERNETES_VERSION="1.9.6"
ENV KOPS_CLUSTER_NAME="us-west-2.prod.cloudposse.co"
ENV KOPS_DNS_ZONE=${KOPS_CLUSTER_NAME}
ENV KOPS_STATE_STORE="s3://cpco-prod-kops-state"
ENV KOPS_STATE_STORE="s3://${TF_VAR_namespace}-${TF_VAR_stage}-kops-state"
ENV KOPS_STATE_STORE_REGION="us-west-2"
ENV KOPS_AVAILABILITY_ZONES="us-west-2a,us-west-2b,us-west-2c"
ENV KOPS_BASTION_PUBLIC_NAME="bastion"
ENV BASTION_MACHINE_TYPE="t2.medium"
ENV MASTER_MACHINE_TYPE="m4.large"
ENV NODE_MACHINE_TYPE="m4.large"
ENV NODE_MAX_SIZE="8"
ENV NODE_MIN_SIZE="8"
ENV MASTER_MACHINE_TYPE="t2.medium"
ENV NODE_MACHINE_TYPE="t2.medium"
ENV NODE_MAX_SIZE="2"
ENV NODE_MIN_SIZE="2"

# Generate kops manifest
RUN build-kops-manifest
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,13 @@ Here is the list of tools we use to provision `cloudposse.co` infrastructure:

__NOTE:__ You need to do it only once.

Configure AWS profile in `~/.aws/config`. Make sure to change username (username@cloudposse.com) to your own.
Configure AWS profile in `~/.aws/config`. Make sure to change username (username@cloudposse.co) to your own.

```bash
[profile cpco-prod-admin]
region=us-west-2
role_arn=arn:aws:iam::590638247571:role/OrganizationAccountAccessRole
mfa_serial=arn:aws:iam::681280261279:mfa/username@cloudposse.com
role_arn=arn:aws:iam::845778104613:role/OrganizationAccountAccessRole
mfa_serial=arn:aws:iam::323330167063:mfa/username@cloudposse.co
source_profile=cpco
```

Expand Down
6 changes: 3 additions & 3 deletions README.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,13 @@ quickstart: |-
__NOTE:__ You need to do it only once.
Configure AWS profile in `~/.aws/config`. Make sure to change username (username@cloudposse.com) to your own.
Configure AWS profile in `~/.aws/config`. Make sure to change username (username@cloudposse.co) to your own.
```bash
[profile cpco-prod-admin]
region=us-west-2
role_arn=arn:aws:iam::590638247571:role/OrganizationAccountAccessRole
mfa_serial=arn:aws:iam::681280261279:mfa/username@cloudposse.com
role_arn=arn:aws:iam::845778104613:role/OrganizationAccountAccessRole
mfa_serial=arn:aws:iam::323330167063:mfa/username@cloudposse.co
source_profile=cpco
```
Expand Down

0 comments on commit 7a9eb84

Please sign in to comment.