EC2¶
This guide demonstrates a basic EC2 driver setup: a single inventory namespace is configured to populate itself with some arbitrary servers.
Note
For further configuration details, please refer to the documentation.
Directory structure¶
You should have a directory structure as follows:
.
├── .aws
│ └── keys
└── bcome
└── networks.yml
The networks.yml file contains your network configuration, whilst ‘keys’ contains your AWS access keys.
Note
For further information on linking AWS accounts, see Aws Authorization.
Network Configuration¶
The networks.yml configuration is simple:
---
wbz:
type: inventory
description: Entire WBZ estate
network:
type: ec2
credentials_key: webzakimbo
provisioning_region: eu-west-1
filters:
instance-state-name: running
ssh_settings:
timeout_in_seconds: 10
proxy:
host_lookup: by_bcome_namespace
namespace: bastion
Note
For a full list of namespace attributes see namespace attributes.
Ascii Cast¶
The following Ascii Cast illustrates the above configuration:
Note
To replay this Asciicast in your own terminal, install the asciinema
package from https://asciinema.org/, and then enter the following in your terminal:
asciinema play https://asciinema.org/a/0kwvSqjdkl9N3GYE39ZgHzzWP