Botoform tools are namespaced under the
For a list built-in subcommands and interactive help, run
Currently Implemented subcommands:
List all existing VPC names.
You can also pass the particular AWS profile and/or region:
bf --profile developmemt --region us-west-2 list
Create a new VPC and related services, modeled after the given YAML template.
bf create dogtest01 -e 'vpc_cidr=192.168.1.0/24' tests/fixtures/webapp.yaml
this is destructive!
Destroy a VPC and all related services.
bf destroy dogtest01
Refresh VPC by adding resources defined but missing in given YAML template.
So far we have implemented the following subcommands:
not implemented yet.
this is destructive!
Make VPC reflect given YAML template by adding and removing resources.
Stop all instances in VPC including autoscaled instances.
Currently does _NOT_ skip “ephemeral” instances!
Start all instances in VPC including autoscaled instances.
Enable API Termination Protection on all instances in VPC.
Disable API Termination Protection on all instances in VPC.
Open an interactive REPL (read-eval-print-loop) with access to evpc object.
Once you have a repl, try running evpc.roles or evpc.instances.
usage: bf repl vpc_name [-h]
- Install bpython into your environment for more fun.
bf webapp01 repl You now have access to the evpc object, for example: evpc.roles >>> evpc.instances [<botoform.enriched.instance.EnrichedInstance object at 0x10e194350>, <botoform.enriched.instance.EnrichedInstance object at 0x10e1944d0> >>> map(str, evpc.instances) ['webapp01-web01', 'webapp01-web02']
Accept a Python program on STDIN and execute it.
Usage 1 (echo and pipe):
echo "print(set([i.image_id for i in evpc.instances]))" | bf --profile development exec dogtest01
Usage 2 (redirection):
bf --profile development exec dogtest01 < unique_active_amis.py
Where unique_active_amis.py has the following content:
print(set([i.image_id for i in evpc.instances]))
In both examples, the output would look something like this:
set(['ami-33333333', 'ami-55555555', 'ami-99999999', 'ami-77777777'])
Output existing resources or services in a Botoform campatible format.
For every AWS profile + region, dump every VPC to STDOUT.
This command takes a while to run, so you should likely redirect the output to a file.
Reason for this tool is we have many AWS accounts and we use many regions.
Using the output of this tool, we can easily grep for a vpc_name and find where it lives.