-
Notifications
You must be signed in to change notification settings - Fork 7.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added latest docs from Editions AWS & Azure
Signed-off-by: French Ben <frenchben@docker.com>
- Loading branch information
French Ben
committed
Dec 14, 2016
1 parent
73a4b01
commit a1b77d6
Showing
12 changed files
with
729 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
--- | ||
description: Frequently asked questions | ||
keywords: aws faqs | ||
title: Frequently asked questions (FAQ) | ||
--- | ||
|
||
# Docker for AWS FAQ | ||
|
||
## Can I use my own AMI? | ||
|
||
No, at this time we only support the default Docker for AWS AMI. | ||
|
||
## How to use Docker for AWS with an AWS account in an EC2-Classic region. | ||
|
||
If you have an AWS account that was created before **December 4th, 2013** you have what is known as an **EC2-Classic** account on regions where you have previously deployed resources. **EC2-Classic** accounts don't have default VPC's or the associated subnets, etc. This causes a problem when using our CloudFormation template because we are using the [Fn:GetAZs](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-getavailabilityzones.html) function they provide to determine which availability zones you have access too. When used in a region where you have **EC2-Classic**, this function will return all availability zones for a region, even ones you don't have access too. When you have an **EC2-VPC** account, it will return only the availability zones you have access to. | ||
|
||
This will cause an error like the following: | ||
|
||
> "Value (us-east-1a) for parameter availabilityZone is invalid. Subnets can currently only be created in the following availability zones: us-east-1d, us-east-1c, us-east-1b, us-east-1e." | ||
If you have an **EC2-Classic** account, and you don't have access to the `a` and `b` availability zones for that region. | ||
|
||
There isn't anything we can do right now to fix this issue, we have contacted Amazon, and we are hoping they will be able to provide us with a way to determine if an account is either **EC2-Classic** or **EC2-VPC**, so we can act accordingly. | ||
|
||
#### How to tell if you have this issue. | ||
|
||
This AWS documentation page will describe how you can tell if you have EC2-Classic, EC2-VPC or both. http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-supported-platforms.html | ||
|
||
#### How to fix: | ||
There are a few work arounds that you can try to get Docker for AWS up and running for you. | ||
|
||
1. Use a region that doesn't have **EC2-Classic**. The most common region with this issue is `us-east-1`. So try another region, `us-west-1`, `us-west-2`, or the new `us-east-2`. These regions will more then likely be setup with **EC2-VPC** and you will not longer have this issue. | ||
2. Create an new AWS account, all new accounts will be setup using **EC2-VPC** and will not have this problem. | ||
3. You can try and contact AWS support to convert your **EC2-Classic** account to a **EC2-VPC** account. For more information checkout the following answer for **"Q. I really want a default VPC for my existing EC2 account. Is that possible?"** on https://aws.amazon.com/vpc/faqs/#Default_VPCs | ||
|
||
#### Helpful links: | ||
- http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/default-vpc.html | ||
- http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-supported-platforms.html | ||
- http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-vpc.html | ||
- https://aws.amazon.com/vpc/faqs/#Default_VPCs | ||
- https://aws.amazon.com/blogs/aws/amazon-ec2-update-virtual-private-clouds-for-everyone/ | ||
|
||
|
||
## Can I use my existing VPC? | ||
|
||
Not at this time, but it is on our roadmap for future releases. | ||
|
||
## Which AWS regions will this work with. | ||
|
||
Docker for AWS should work with all regions except for AWS China, which is a little different than the other regions. | ||
|
||
## How many Availability Zones does Docker for AWS use? | ||
|
||
All of Amazons regions have at least 2 AZ's, and some have more. To make sure Docker for AWS works in all regions, only 2 AZ's are used even if more are available. | ||
|
||
## What do I do if I get "KeyPair error" on AWS? | ||
As part of the prerequisites, you need to have an SSH key uploaded to the AWS region you are trying to deploy to. | ||
For more information about adding an SSH key pair to your account, please refer to the [Amazon EC2 Key Pairs docs](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html) | ||
|
||
## I have a problem/bug where do I report it? | ||
|
||
Send an email to <docker-for-iaas@docker.com> or post to the [Docker for AWS](https://github.com/docker/for-aws) GitHub repositories. | ||
|
||
In AWS, if your stack is misbehaving, please run the following diagnostic tool from one of the managers - this will collect your docker logs and send them to Docker: | ||
|
||
``` | ||
$ docker-diagnose | ||
OK hostname=manager1 | ||
OK hostname=worker1 | ||
OK hostname=worker2 | ||
Done requesting diagnostics. | ||
Your diagnostics session ID is 1234567890-xxxxxxxxxxxxxx | ||
Please provide this session ID to the maintainer debugging your issue. | ||
``` | ||
|
||
_Please note that your output will be slightly different from the above, depending on your swarm configuration_ | ||
|
||
## Analytics | ||
|
||
The beta versions of Docker for AWS and Azure send anonymized analytics to Docker. These analytics are used to monitor beta adoption and are critical to improve Docker for AWS and Azure. | ||
|
||
## How to run administrative commands? | ||
|
||
By default when you SSH into a manager, you will be logged in as the regular username: `docker` - It is possible however to run commands with elevated privileges by using `sudo`. | ||
For example to ping one of the nodes, after finding its IP via the Azure/AWS portal (e.g. 10.0.0.4), you could run: | ||
``` | ||
$ sudo ping 10.0.0.4 | ||
``` | ||
|
||
Note that access to Docker for AWS and Azure happens through a shell container that itself runs on Docker. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
--- | ||
description: Setup & Prerequisites | ||
keywords: aws, amazon, iaas, tutorial | ||
title: Docker for AWS Setup & Prerequisites | ||
--- | ||
|
||
# Docker for AWS Setup | ||
|
||
## Prerequisites | ||
|
||
- Access to an AWS account with permissions to use CloudFormation and creating the following objects | ||
- EC2 instances + Auto Scaling groups | ||
- IAM profiles | ||
- DynamoDB Tables | ||
- SQS Queue | ||
- VPC + subnets | ||
- ELB | ||
- CloudWatch Log Group | ||
- SSH key in AWS in the region where you want to deploy (required to access the completed Docker install) | ||
- AWS account that support EC2-VPC (See the [FAQ for details about EC2-Classic](../faq/aws.md)) | ||
|
||
For more information about adding an SSH key pair to your account, please refer to the [Amazon EC2 Key Pairs docs](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html) | ||
|
||
## Configuration | ||
|
||
Docker for AWS is installed with a CloudFormation template that configures Docker in swarm-mode, running on instances backed custom AMIs. There are two ways you can deploy Docker for AWS. You can use the AWS Management Console (browser based), or use the AWS CLI. Both have the following configuration options. | ||
|
||
### Configuration options | ||
|
||
#### KeyName | ||
Pick the SSH key that will be used when you SSH into the manager nodes. | ||
|
||
#### InstanceType | ||
The EC2 instance type for your worker nodes. | ||
|
||
#### ManagerInstanceType | ||
The EC2 instance type for your manager nodes. The larger your swarm, the larger the instance size you should use. | ||
|
||
#### ClusterSize | ||
The number of workers you want in your swarm (1-1000). | ||
|
||
#### ManagerSize | ||
The number of Managers in your swarm. You can pick either 1, 3 or 5 managers. We only recommend 1 manager for testing and dev setups. There are no failover guarantees with 1 manager — if the single manager fails the swarm will go down as well. Additionally, upgrading single-manager swarms is not currently guaranteed to succeed. | ||
|
||
We recommend at least 3 managers, and if you have a lot of workers, you should pick 5 managers. | ||
|
||
#### EnableSystemPrune | ||
|
||
Enable if you want Docker for AWS to automatically cleanup unused space on your swarm nodes. | ||
|
||
When enabled, `docker system prune` will run staggered every day, starting at 1:42AM UTC on both workers and managers. The prune times are staggered slightly so that not all nodes will be pruned at the same time. This limits resource spikes on the swarm. | ||
|
||
Pruning removes the following: | ||
- All stopped containers | ||
- All volumes not used by at least one container | ||
- All dangling images | ||
- All unused networks | ||
|
||
#### EnableCloudWatchLogs | ||
Enable if you want Docker to send your container logs to CloudWatch. ("yes", "no") Defaults to yes. | ||
|
||
#### WorkerDiskSize | ||
Size of Workers's ephemeral storage volume in GiB (20 - 1024). | ||
|
||
#### WorkerDiskType | ||
Worker ephemeral storage volume type ("standard", "gp2"). | ||
|
||
#### ManagerDiskSize | ||
Size of Manager's ephemeral storage volume in GiB (20 - 1024) | ||
|
||
#### ManagerDiskType | ||
Manager ephemeral storage volume type ("standard", "gp2") | ||
|
||
### Installing with the AWS Management Console | ||
The simplest way to use the template is with the CloudFormation section of the AWS Management Console. | ||
|
||
Go to the [Release Notes](release-notes.md) page, and click on the "launch stack" button to start the deployment process. | ||
|
||
### Installing with the CLI | ||
You can also invoke the Docker for AWS CloudFormation template from the AWS CLI: | ||
|
||
Here is an example of how to use the CLI. Make sure you populate all of the parameters and their values: | ||
``` | ||
$ aws cloudformation create-stack --stack-name teststack --template-url <templateurl> --parameters ParameterKey=KeyName,ParameterValue=<keyname> ParameterKey=InstanceType,ParameterValue=t2.micro ParameterKey=ManagerInstanceType,ParameterValue=t2.micro ParameterKey=ClusterSize,ParameterValue=1 --capabilities CAPABILITY_IAM | ||
``` | ||
|
||
To fully automate installs, you can use the [AWS Cloudformation API](http://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/Welcome.html). | ||
|
||
## How it works | ||
|
||
Docker for AWS starts with a CloudFormation template that will create everything that you need from scratch. There are only a few prerequisites that are listed above. | ||
|
||
It first starts off by creating a new VPC along with subnets and security groups. Once the networking is set up, it will create two Auto Scaling Groups, one for the managers and one for the workers, and set the desired capacity that was selected in the CloudFormation setup form. The managers will start up first and create a Swarm manager quorum using Raft. The workers will then start up and join the swarm one by one, until all of the workers are up and running. At this point you will have x number of managers and y number of workers in your swarm, that are ready to handle your application deployments. See the [deployment](../deploy.md) docs for your next steps. | ||
|
||
If you increase the number of instances running in your worker Auto Scaling Group (via the AWS console, or updating the CloudFormation configuration), the new nodes that will start up will automatically join the swarm. | ||
|
||
Elastic Load Balancers (ELBs) are set up to help with routing traffic to your swarm. | ||
|
||
## Logging | ||
|
||
Docker for AWS automatically configures logging to Cloudwatch for containers you run on Docker for AWS. A Log Group is created for each Docker for AWS install, and a log stream for each container. | ||
|
||
`docker logs` and `docker service logs` are not supported on Docker for AWS. Instead, you should check container in CloudWatch. | ||
|
||
## System containers | ||
|
||
Each node will have a few system containers running on them to help run your swarm cluster. In order for everything to run smoothly, please keep those containers running, and don't make any changes. If you make any changes, Docker for AWS will not work correctly. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
description: Docker's use of Open Source | ||
keywords: docker, opensource | ||
title: Open source components and licensing | ||
--- | ||
|
||
# Open Source | ||
|
||
Docker for AWS and Azure Editions are built using open source software. | ||
|
||
Docker for AWS and Azure Editions distribute some components that are licensed under the GNU General Public License. You can download the source for these components [here](https://download.docker.com/opensource/License.tar.gz). | ||
|
||
The sources for qemu-img can be obtained [here](http://wiki.qemu-project.org/download/qemu-2.4.1.tar.bz2). The sources for the gettext and glib libraries that qemu-img requires were obtained from [Homebrew](https://brew.sh/) and may be retrieved using `brew install --build-from-source gettext glib`. |
Oops, something went wrong.