/infra

infra provisioning repo

Primary LanguageShell

Infrastructure

Setting up AWS infrastructure using terraform and ansible on aws, gcp and azure.

Layout

The scripts will create following infrastructure components on all the clouds.

  • VPC, to span all the subnets
    • Subnet 1, in AZ1
    • Subnet 2, in AZ2
    • Subnet 3, in AZ3
  • Public facing instance in Subnet 1

GCP

$ docker run --name gcloud-config -v $(pat/to/keys/on/host):/keys/ google/cloud-sdk:196.0.0-alpine gcloud auth activate-service-account --key-file=/keys/<key-file>.json
Activated service account credentials for: [<service-account-name>]
  • authenticated gcp commands can now be executed from containers
$ sudo docker run --volumes-from gcloud-config google/cloud-sdk:196.0.0-alpine gcloud compute images --project <your-project> list
NAME                                                  PROJECT            FAMILY                            DEPRECATED  STATUS
centos-6-v20180716                                    centos-cloud       centos-6                                      READY
centos-7-v20180716                                    centos-cloud       centos-7                                      READY
...

Azure

TODO

  • naming convention for extensibility
  • IAM roles and access control for VPC and subnets
  • define tiers
  • different/same VPC for prod/dev/test
    • permissions to be set accordingly