This commit is contained in:
Maria Bermudez
2018-11-08 16:46:11 -08:00
committed by GitHub
parent 6d33979407
commit 6d007ada6c

View File

@@ -46,33 +46,33 @@ You can use environment variables:
- `--amazonec2-ami`: The AMI ID of the instance to use.
- `--amazonec2-block-duration-minutes`: AWS spot instance duration in minutes (60, 120, 180, 240, 300, or 360).
- `--amazonec2-device-name`: The root device name of the instance.
- `--amazonec2-endpoint`: Optional endpoint URL (hostname only or fully qualified URI)
- `--amazonec2-endpoint`: Optional endpoint URL (hostname only or a fully qualified URI).
- `--amazonec2-iam-instance-profile`: The AWS IAM role name to be used as the instance profile.
- `--amazonec2-insecure-transport`: Disable SSL when sending requests
- `--amazonec2-insecure-transport`: Disable SSL when sending requests.
- `--amazonec2-instance-type`: The instance type to run.
- `--amazonec2-keypair-name`: AWS keypair to use; requires --amazonec2-ssh-keypath
- `--amazonec2-keypair-name`: AWS keypair to use; requires `--amazonec2-ssh-keypath`.
- `--amazonec2-monitoring`: Enable CloudWatch Monitoring.
- `--amazonec2-open-port`: Make the specified port number accessible from the Internet.
- `--amazonec2-private-address-only`: Use the private IP address only.
- `--amazonec2-region`: The region to use when launching the instance.
- `--amazonec2-request-spot-instance`: Use spot instances.
- `--amazonec2-retries`: Set retry count for recoverable failures (use -1 to disable)
- `--amazonec2-retries`: Set retry count for recoverable failures (use `-1` to disable).
- `--amazonec2-root-size`: The root disk size of the instance (in GB).
- `--amazonec2-secret-key`: Your secret access key for the Amazon Web Services API.
- `--amazonec2-security-group`: AWS VPC security group name.
- `--amazonec2-security-group-readonly`: Skip adding default rules to security groups.
- `--amazonec2-session-token`: Your session token for the Amazon Web Services API.
- `--amazonec2-spot-price`: Spot instance bid price (in dollars). Require the `--amazonec2-request-spot-instance` flag.
- `--amazonec2-ssh-keypath`: Path to Private Key file to use for instance. Matching public key with .pub extension should exist
- `--amazonec2-ssh-user`: The SSH Login username, which must match the default SSH user set in the ami used.
- `--amazonec2-spot-price`: Spot instance bid price in dollars. Requires the `--amazonec2-request-spot-instance` flag.
- `--amazonec2-ssh-keypath`: Path to private key file to use for instance. Requires a matching public key with `.pub` extension to exist.
- `--amazonec2-ssh-user`: The SSH login username, which must match the default SSH user set in the AMI being used.
- `--amazonec2-subnet-id`: AWS VPC subnet ID.
- `--amazonec2-tags`: AWS extra tag key-value pairs. Comma-separated. For example, `key1,value1,key2,value2`.
- `--amazonec2-use-ebs-optimized-instance`: Create an EBS Optimized Instance, instance type must support it.
- `--amazonec2-tags`: A comma-separated list of AWS extra tag key-value pairs. For example, `key1,value1,key2,value2`.
- `--amazonec2-use-ebs-optimized-instance`: Create an EBS Optimized Instance. Instance type must support it.
- `--amazonec2-use-private-address`: Use the private IP address for docker-machine, but still create a public IP address.
- `--amazonec2-userdata`: Path to file with cloud-init user data.
- `--amazonec2-volume-type`: The Amazon EBS volume type to be attached to the instance.
- `--amazonec2-vpc-id`: Your VPC ID to launch the instance in.
- `--amazonec2-zone`: The AWS zone to launch the instance in (one of a,b,c,d,e).
- `--amazonec2-zone`: The AWS zone to launch the instance in (one of a,b,c,d, and e).
@@ -114,7 +114,7 @@ You can use environment variables:
## Default AMIs
By default, the Amazon EC2 driver uses a daily image of Ubuntu 16.04 LTS.
By default, the Amazon EC2 driver uses a daily image of `Ubuntu 16.04 LTS`.
| Region | AMI ID |
| -------------- | ------------ |
@@ -144,35 +144,32 @@ A security group is created and associated to the host. This security group has
- docker (2376/tcp)
- swarm (3376/tcp), only if the node is a swarm master
If you specify a security group yourself using the `--amazonec2-security-group` flag, the above ports are checked and opened and the security group modified.
If you want more ports to be opened, like application specific ports, use the AWS console and modify the configuration manually.
If you specify a security group yourself using the `--amazonec2-security-group` flag, the above ports are checked and opened and the security group is modified.
If you want more ports to be opened such as application-specific ports, use the AWS console and modify the configuration manually.
## VPC ID
We determine your default VPC ID at the start of a command.
In some cases, either because your account does not have a default vpc, or you don't want to use the default one, you can specify a vpc with the `--amazonec2-vpc-id` flag.
Your default VPC ID is determined at the start of a command. In some cases, either because your account does not have a default VPC, or you do not want to use the default one, you can specify a VPC with the `--amazonec2-vpc-id` flag.
To find the VPC ID:
### To find the VPC ID:
1. Login to the AWS console
1. Login to the AWS console.
2. Go to **Services -> VPC -> Your VPCs**.
3. Locate the VPC ID you want from the _VPC_ column.
4. Go to **Services -> VPC -> Subnets**. Examine the _Availability Zone_ column to verify that zone `a` exists and matches your VPC ID.
3. Locate the VPC ID you want from the *_VPC_* column.
4. Go to **Services -> VPC -> Subnets**. Examine the _Availability Zone_ column to verify that zone `a` exists and matches your VPC ID. For example, `us-east1-a` is in the `a` availability zone. If the `a` zone is not present, you can create a new subnet in that zone or specify a different zone when you create the machine.
For example, `us-east1-a` is in the `a` availability zone. If the `a` zone is not present, you can create a new subnet in that zone or specify a different zone when you create the machine.
To create a machine with a non-default VPC-ID:
### To create a machine with a non-default VPC-ID:
$ docker-machine create --driver amazonec2 --amazonec2-access-key AKI******* --amazonec2-secret-key 8T93C********* --amazonec2-vpc-id vpc-****** aws02
This example assumes the VPC ID was found in the `a` availability zone. Use the`--amazonec2-zone` flag to specify a zone other than the `a` zone. For example, `--amazonec2-zone c` signifies `us-east1-c`.
## VPC Connectivity
Machine uses SSH to complete the set up of instances in EC2 and requires the ability to access the instance directly.
Docker Machine uses SSH to complete the set up of instances in EC2 and requires the ability to access the instance directly.
If you use the flag `--amazonec2-private-address-only`, ensure that you can access the new instance from within the internal network of the VPC, such as a corporate VPN to the VPC, a VPN instance inside the VPC, or using `docker-machine` from an instance within your VPC.
Configuration of VPCs is beyond the scope of this guide, however the first step in troubleshooting is ensuring if you are using private subnets that you follow the design guidance in the [AWS VPC User Guide](http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Scenario2.html) and have some form of NAT available so that the set up process can access the internet to complete set up.
Configuration of VPCs is beyond the scope of this guide. However, the first step in troubleshooting is making sure that you are using private subnets that follow the design guidance in the [AWS VPC User Guide](http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Scenario2.html) and have some form of NAT available so that the setup process can access the internet to complete the setup.
## Custom AMI and SSH username
@@ -180,4 +177,4 @@ The default SSH username for the default AMIs is `ubuntu`.
You need to change the SSH username only if the custom AMI you use has a different SSH username.
You can change the SSH username with the `--amazonec2-ssh-user` according to the AMI you selected with the `--amazonec2-ami`.
You can change the SSH username with the `--amazonec2-ssh-user` according to the AMI you selected with the `--amazonec2-ami` option.