Skip to content

Commit

Permalink
Remove Vagrantfile and remove it from all docs
Browse files Browse the repository at this point in the history
This removes the Vagrantfile and updates the documentation to remove
the steps which explain how to install Docker in a VM via Vagrant.

Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
  • Loading branch information
unclejack committed Feb 22, 2014
1 parent 4f20538 commit 67d5586
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 511 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -22,3 +22,4 @@ bundles/
.git/
vendor/pkg/
pyenv
Vagrantfile
1 change: 0 additions & 1 deletion MAINTAINERS
Expand Up @@ -6,4 +6,3 @@ Michael Crosby <michael@crosbymichael.com> (@crosbymichael)
api.go: Victor Vieux <victor@dotcloud.com> (@vieux)
Dockerfile: Tianon Gravi <admwiggin@gmail.com> (@tianon)
Makefile: Tianon Gravi <admwiggin@gmail.com> (@tianon)
Vagrantfile: Cristian Staretu <cristian.staretu@gmail.com> (@unclejack)
206 changes: 0 additions & 206 deletions Vagrantfile

This file was deleted.

8 changes: 0 additions & 8 deletions docs/sources/contributing/devenvironment.rst
Expand Up @@ -92,14 +92,6 @@ To execute the test cases, run this command:
sudo make test
Note: if you're running the tests in vagrant, you need to specify a dns entry in
the command (either edit the Makefile, or run the step manually):

.. code-block:: bash
sudo docker run -dns 8.8.8.8 -privileged -v `pwd`:/go/src/github.com/dotcloud/docker docker hack/make.sh test
If the test are successful then the tail of the output should look something like this

.. code-block:: bash
Expand Down
6 changes: 3 additions & 3 deletions docs/sources/faq.rst
Expand Up @@ -25,9 +25,9 @@ Does Docker run on Mac OS X or Windows?

Not at this time, Docker currently only runs on Linux, but you can
use VirtualBox to run Docker in a virtual machine on your box, and
get the best of both worlds. Check out the
:ref:`macosx` and :ref:`windows` installation
guides.
get the best of both worlds. Check out the :ref:`macosx` and
:ref:`windows` installation guides. The small Linux distribution boot2docker
can be run inside virtual machines on these two operating systems.

How do containers compare to virtual machines?
..............................................
Expand Down
2 changes: 1 addition & 1 deletion docs/sources/index.rst
Expand Up @@ -24,6 +24,6 @@ For a high-level overview of Docker, please see the `Introduction
Docker, we have a `quick start <http://www.docker.io/gettingstarted>`_
and a more in-depth guide to :ref:`ubuntu_linux` and other
:ref:`installation_list` paths including prebuilt binaries,
Vagrant-created VMs, Rackspace and Amazon instances.
Rackspace and Amazon instances.

Enough reading! :ref:`Try it out! <running_examples>`
111 changes: 1 addition & 110 deletions docs/sources/installation/amazon.rst
Expand Up @@ -10,8 +10,7 @@ Amazon EC2
There are several ways to install Docker on AWS EC2:

* :ref:`amazonquickstart` or
* :ref:`amazonstandard` or
* :ref:`amazonvagrant`
* :ref:`amazonstandard`

**You'll need an** `AWS account <http://aws.amazon.com/>`_ **first, of course.**

Expand Down Expand Up @@ -73,112 +72,4 @@ running Ubuntu. Just follow Step 1 from :ref:`amazonquickstart` to
pick an image (or use one of your own) and skip the step with the
*User Data*. Then continue with the :ref:`ubuntu_linux` instructions.

.. _amazonvagrant:

Use Vagrant
-----------

.. include:: install_unofficial.inc

And finally, if you prefer to work through Vagrant, you can install
Docker that way too. Vagrant 1.1 or higher is required.

1. Install vagrant from http://www.vagrantup.com/ (or use your package manager)
2. Install the vagrant aws plugin

::

vagrant plugin install vagrant-aws


3. Get the docker sources, this will give you the latest Vagrantfile.

::

git clone https://github.com/dotcloud/docker.git


4. Check your AWS environment.

Create a keypair specifically for EC2, give it a name and save it
to your disk. *I usually store these in my ~/.ssh/ folder*.

Check that your default security group has an inbound rule to
accept SSH (port 22) connections.

5. Inform Vagrant of your settings

Vagrant will read your access credentials from your environment, so
we need to set them there first. Make sure you have everything on
amazon aws setup so you can (manually) deploy a new image to EC2.

Note that where possible these variables are the same as those honored by
the ec2 api tools.
::

export AWS_ACCESS_KEY=xxx
export AWS_SECRET_KEY=xxx
export AWS_KEYPAIR_NAME=xxx
export SSH_PRIVKEY_PATH=xxx

export BOX_NAME=xxx
export AWS_REGION=xxx
export AWS_AMI=xxx
export AWS_INSTANCE_TYPE=xxx

The required environment variables are:

* ``AWS_ACCESS_KEY`` - The API key used to make requests to AWS
* ``AWS_SECRET_KEY`` - The secret key to make AWS API requests
* ``AWS_KEYPAIR_NAME`` - The name of the keypair used for this EC2 instance
* ``SSH_PRIVKEY_PATH`` - The path to the private key for the named
keypair, for example ``~/.ssh/docker.pem``

There are a number of optional environment variables:

* ``BOX_NAME`` - The name of the vagrant box to use. Defaults to
``ubuntu``.
* ``AWS_REGION`` - The aws region to spawn the vm in. Defaults to
``us-east-1``.
* ``AWS_AMI`` - The aws AMI to start with as a base. This must be
be an ubuntu 12.04 precise image. You must change this value if
``AWS_REGION`` is set to a value other than ``us-east-1``.
This is because AMIs are region specific. Defaults to ``ami-69f5a900``.
* ``AWS_INSTANCE_TYPE`` - The aws instance type. Defaults to ``t1.micro``.

You can check if they are set correctly by doing something like

::

echo $AWS_ACCESS_KEY

6. Do the magic!

::

vagrant up --provider=aws


If it stalls indefinitely on ``[default] Waiting for SSH to become
available...``, Double check your default security zone on AWS
includes rights to SSH (port 22) to your container.

If you have an advanced AWS setup, you might want to have a look at
`vagrant-aws <https://github.com/mitchellh/vagrant-aws>`_.

7. Connect to your machine

.. code-block:: bash
vagrant ssh
8. Your first command

Now you are in the VM, run docker

.. code-block:: bash
sudo docker
Continue with the :ref:`hello_world` example.

2 comments on commit 67d5586

@lbustelo
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the interest of being OPEN, why are you doing this?

@unclejack
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lbustelo You can find out more about particular commits by finding the pull request which brought that commit. Please take a look at the pull request which brought this commit: #4281

If you have questions or comments, please comment on PR #4281.

Please sign in to comment.