Skip to content

Latest commit

 

History

History
53 lines (37 loc) · 1.87 KB

running_bats_rake_task_against_aws.md

File metadata and controls

53 lines (37 loc) · 1.87 KB

Running BATs rake task against AWS

Infrastructure configuration

BATs that run against AWS infrastructure use aws generate tool to generate deployment manifests. They require two additional envrionment variables:

BOSH_JENKINS_DEPLOYMENTS_REPO environment variable should point to git repo that contains infrastructure configurations that is used to generate deployment manifests for BATs.

BOSH_VPC_SUBDOMAIN - is the name of folder in BOSH_JENKINS_DEPLOYMENTS_REPO that contains aws receipts used by bosh aws generate tool.

This folder should contain two files: aws_route53_receipt.yml and aws_vpc_receipt.yml. These files are being generated by bosh aws bootstrap tool.

aws_route53_receipt.yml

This file contains IP configuration for deployed Micro BOSH, full BOSH and BAT VM that is deployed to Micro BOSH and needs public IP.

---
elastic_ips:
  micro:
    ips:
    - <ELASTIC_IP_1>
    dns_record: micro
  bat:
    ips:
    - <ELASTIC_IP_2>
    dns_record: bat
  bosh:
    ips:
    - <ELASTIC_IP_3>
    dns_record: bosh

Make sure that specified elastic IPs exist in your AWS account and A records in route 53 point to those IPs.

aws_vpc_receipt.yml

Contains network and RDS configuration for AWS account that was setup by bootstraping tool.

Envrironment variables

The following environment variables are required by rake task that runs BATs against AWS:

  • BOSH_AWS_ACCESS_KEY_ID - AWS access key
  • BOSH_AWS_SECRET_ACCESS_KEY - AWS secret access key
  • BOSH_VPC_SUBDOMAIN - the subdomain that is being used in DNS record for micro BOSH IP. (e.g. if micro BOSH is being targetted as micro.test.mydomain.com this value should be set as test)
  • BOSH_KEY_PATH - the path to public key that has access to AWS account (e.g. $HOME/.ssh/id_rsa_bosh)

Rake command

bundle exec rake spec:system:micro[aws,xen,ubuntu,trusty,manual,go,true,raw]