Skip to content

Commit

Permalink
Docker for AWS, uninstall, faq's, pix, copyedit (docker#4404)
Browse files Browse the repository at this point in the history
* added faq and topic on uninstall Docker for AWS

Signed-off-by: Victoria Bialas <victoria.bialas@docker.com>

* added screen snaps, corrected links

Signed-off-by: Victoria Bialas <victoria.bialas@docker.com>

* formatting updates

Signed-off-by: Victoria Bialas <victoria.bialas@docker.com>

* copyedits per review

Signed-off-by: Victoria Bialas <victoria.bialas@docker.com>
  • Loading branch information
londoncalling authored Aug 29, 2017
1 parent 657cd94 commit 99f0e0e
Show file tree
Hide file tree
Showing 17 changed files with 260 additions and 88 deletions.
48 changes: 36 additions & 12 deletions docker-for-aws/deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,15 @@ $ ssh docker@ip-172-31-31-40.us-east-2.compute.internal

#### Use SSH agent forwarding

SSH agent forwarding allows you to forward along your ssh keys when connecting from one node to another. This eliminates the need for installing your private key on all nodes you might want to connect from.
SSH agent forwarding allows you to forward along your ssh keys when connecting
from one node to another. This eliminates the need for installing your private
key on all nodes you might want to connect from.

You can use this feature to SSH into worker nodes from a manager node without
installing keys directly on the manager.

If your haven't added your ssh key to the `ssh-agent` you will also need to do this first.
If your haven't added your ssh key to the `ssh-agent` you will also need to do
this first.

To see the keys in the agent already, run:

Expand All @@ -102,13 +105,16 @@ If you don't see your key, add it like this.
$ ssh-add ~/.ssh/your_key
```

On Mac OS X, the `ssh-agent` will forget this key, once it gets restarted. But you can import your SSH key into your Keychain like this. This will have your key survive restarts.
On macOS, the `ssh-agent` will forget this key, once it gets restarted. But
you can import your SSH key into your Keychain like this. This will have your
key survive restarts.

```bash
$ ssh-add -K ~/.ssh/your_key
```

You can then enable SSH forwarding per-session using the `-A` flag for the ssh command.
You can then enable SSH forwarding per-session using the `-A` flag for the ssh
command.

Connect to the Manager.

Expand Down Expand Up @@ -139,11 +145,13 @@ You can now start creating containers and services.

$ docker run hello-world

You can run websites too. Ports exposed with `-p` are automatically exposed through the platform load balancer:
You can run websites too. Ports exposed with `-p` are automatically exposed
through the platform load balancer:

$ docker service create --name nginx -p 80:80 nginx

Once up, find the `DefaultDNSTarget` output in either the AWS or Azure portals to access the site.
Once up, find the `DefaultDNSTarget` output in either the AWS or Azure portals
to access the site.

### Execute docker commands in all swarm nodes

Expand All @@ -153,23 +161,39 @@ Usage : `swarm-exec {Docker command}`

The following will install a test plugin in all the nodes in the cluster

Example : `swarm-exec docker plugin install --grant-all-permissions mavenugo/test-docker-netplugin`
Example : `swarm-exec docker plugin install --grant-all-permissions
mavenugo/test-docker-netplugin`

This tool internally makes use of docker global-mode service that runs a task on each of the nodes in the cluster. This task in turn executes your docker command. The global-mode service also guarantees that when a new node is added to the cluster or during upgrades, a new task is executed on that node and hence the docker command will be automatically executed.
This tool internally makes use of docker global-mode service that runs a task on
each of the nodes in the cluster. This task in turn executes your docker
command. The global-mode service also guarantees that when a new node is added
to the cluster or during upgrades, a new task is executed on that node and hence
the docker command will be automatically executed.

### Distributed Application Bundles

To deploy complex multi-container apps, you can use [distributed application bundles](/compose/bundles.md). You can either run `docker deploy` to deploy a bundle on your machine over an SSH tunnel, or copy the bundle (for example using `scp`) to a manager node, SSH into the manager and then run `docker deploy` (if you have multiple managers, you have to ensure that your session is on one that has the bundle file).
To deploy complex multi-container apps, you can use [distributed application
bundles](/compose/bundles.md). You can either run `docker deploy` to deploy a
bundle on your machine over an SSH tunnel, or copy the bundle (for example using
`scp`) to a manager node, SSH into the manager and then run `docker deploy` (if
you have multiple managers, you have to ensure that your session is on one that
has the bundle file).

A good sample app to test application bundles is the [Docker voting app](https://github.com/docker/example-voting-app).
A good sample app to test application bundles is the [Docker voting
app](https://github.com/docker/example-voting-app).

By default, apps deployed with bundles do not have ports publicly exposed. Update port mappings for services, and Docker will automatically wire up the underlying platform load balancers:
By default, apps deployed with bundles do not have ports publicly exposed.
Update port mappings for services, and Docker will automatically wire up the
underlying platform load balancers:

docker service update --publish-add 80:80 <example-service>

### Images in private repos

To create swarm services using images in private repos, first make sure you're authenticated and have access to the private repo, then create the service with the `--with-registry-auth` flag (the example below assumes you're using Docker Hub):
To create swarm services using images in private repos, first make sure you're
authenticated and have access to the private repo, then create the service with
the `--with-registry-auth` flag (the example below assumes you're using Docker
Hub):

docker login
...
Expand Down
62 changes: 44 additions & 18 deletions docker-for-aws/faqs.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,39 +9,58 @@ toc_max: 2

Two different download channels are available for Docker for AWS:

* The **stable channel** provides a general availability release-ready deployment
for a fully baked and tested, more reliable cluster. The stable version of Docker
for AWS comes with the latest released version of Docker Engine. The release
schedule is synched with Docker Engine releases and hotfixes. On the stable
channel, you can select whether to send usage statistics and other data.

* The **edge channel** provides a deployment with new features we are working on,
but is not necessarily fully tested. It comes with the experimental version of
Docker Engine. Bugs, crashes, and issues are more likely to occur with the edge
cluster, but you get a chance to preview new functionality, experiment, and provide
feedback as the deployment evolve. Releases are typically more frequent than for
stable, often one or more per month. Usage statistics and crash reports are sent
by default. You do not have the option to disable this on the edge channel.
* The **stable channel** provides a general availability release-ready deployment for a fully baked and
tested, more reliable cluster. The stable version of Docker for AWS comes with
the latest released version of Docker Engine. The release schedule is synched
with Docker Engine releases and hotfixes. On the stable channel, you can select
whether to send usage statistics and other data.

* The **edge channel** provides a deployment with new features we are
working on, but is not necessarily fully tested. It comes with the
experimental version of Docker Engine. Bugs, crashes, and issues are
more likely to occur with the edge cluster, but you get a chance to preview
new functionality, experiment, and provide feedback as the deployment
evolve. Releases are typically more frequent than for stable, often one
or more per month. Usage statistics and crash reports are sent by default.
You do not have the option to disable this on the edge schannel.

## Can I use my own AMI?

No, at this time we only support the default Docker for AWS AMI.

## How can I 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 to. 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 to. When you have an **EC2-VPC** account, it will return only the availability zones you have access to.
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 to.
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 to. 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."
> "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.
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.
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 are in the EC2-Classic region.

[This AWS documentation page](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-supported-platforms.html) will describe how you can tell if you have EC2-Classic, EC2-VPC or both.
[This AWS documentation
page](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-supported-platforms.html)
will describe how you can tell if you have EC2-Classic, EC2-VPC or both.

### Possible fixes to the EC2-Classic region issue:
There are a few workarounds that you can try to get Docker for AWS up and running for you.
Expand Down Expand Up @@ -150,3 +169,10 @@ $ sudo ping 10.0.0.4
```

> **Note**: Access to Docker for AWS and Azure happens through a shell container that itself runs on Docker.
## How do I uninstall Docker for AWS?

You can remove the Docker for AWS setup and stacks through the [AWS
Console](https://console.aws.amazon.com/console/home){: target="_blank"
class="_"} on the CloudFormation page. See [Uninstalling or removing a
stack](/docker-for-aws/index.md#uninstalling-or-removing-a-stack).
Binary file modified docker-for-aws/img/autoscale_save.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docker-for-aws/img/autoscale_update.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docker-for-aws/img/aws-delete-stack.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docker-for-aws/img/aws-select-template.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docker-for-aws/img/aws-stack-update.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docker-for-aws/img/aws_support_center_link.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docker-for-aws/img/cloudformation_update.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docker-for-aws/img/managers.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 99f0e0e

Please sign in to comment.