amazon.rst 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. :title: Installation on Amazon EC2
  2. :description: Please note this project is currently under heavy development. It should not be used in production.
  3. :keywords: amazon ec2, virtualization, cloud, docker, documentation, installation
  4. Amazon EC2
  5. ==========
  6. .. include:: install_header.inc
  7. There are several ways to install Docker on AWS EC2:
  8. * :ref:`amazonquickstart_new` or
  9. * :ref:`amazonquickstart` or
  10. * :ref:`amazonstandard`
  11. **You'll need an** `AWS account <http://aws.amazon.com/>`_ **first, of course.**
  12. .. _amazonquickstart:
  13. Amazon QuickStart
  14. -----------------
  15. 1. **Choose an image:**
  16. * Launch the `Create Instance Wizard
  17. <https://console.aws.amazon.com/ec2/v2/home?#LaunchInstanceWizard:>`_ menu
  18. on your AWS Console.
  19. * Click the ``Select`` button for a 64Bit Ubuntu image. For example: Ubuntu Server 12.04.3 LTS
  20. * For testing you can use the default (possibly free)
  21. ``t1.micro`` instance (more info on `pricing
  22. <http://aws.amazon.com/en/ec2/pricing/>`_).
  23. * Click the ``Next: Configure Instance Details`` button at the bottom right.
  24. 2. **Tell CloudInit to install Docker:**
  25. * When you're on the "Configure Instance Details" step, expand the "Advanced
  26. Details" section.
  27. * Under "User data", select "As text".
  28. * Enter ``#include https://get.docker.io`` into the instance *User Data*.
  29. `CloudInit <https://help.ubuntu.com/community/CloudInit>`_ is part of the
  30. Ubuntu image you chose; it will bootstrap Docker by running the shell
  31. script located at this URL.
  32. 3. After a few more standard choices where defaults are probably ok, your AWS
  33. Ubuntu instance with Docker should be running!
  34. **If this is your first AWS instance, you may need to set up your
  35. Security Group to allow SSH.** By default all incoming ports to your
  36. new instance will be blocked by the AWS Security Group, so you might
  37. just get timeouts when you try to connect.
  38. Installing with ``get.docker.io`` (as above) will create a service named
  39. ``lxc-docker``. It will also set up a :ref:`docker group <dockergroup>` and you
  40. may want to add the *ubuntu* user to it so that you don't have to use ``sudo``
  41. for every Docker command.
  42. Once you've got Docker installed, you're ready to try it out -- head
  43. on over to the :doc:`../use/basics` or :doc:`../examples/index` section.
  44. .. _amazonquickstart_new:
  45. Amazon QuickStart (Release Candidate - March 2014)
  46. --------------------------------------------------
  47. Amazon just published new Docker-ready AMIs (2014.03 Release Candidate). Docker packages
  48. can now be installed from Amazon's provided Software Repository.
  49. 1. **Choose an image:**
  50. * Launch the `Create Instance Wizard
  51. <https://console.aws.amazon.com/ec2/v2/home?#LaunchInstanceWizard:>`_ menu
  52. on your AWS Console.
  53. * Click the ``Community AMI`` menu option on the left side
  54. * Search for '2014.03' and select one of the Amazon provided AMI, for example ``amzn-ami-pv-2014.03.rc-0.x86_64-ebs``
  55. * For testing you can use the default (possibly free)
  56. ``t1.micro`` instance (more info on `pricing
  57. <http://aws.amazon.com/en/ec2/pricing/>`_).
  58. * Click the ``Next: Configure Instance Details`` button at the bottom right.
  59. 2. After a few more standard choices where defaults are probably ok, your Amazon
  60. Linux instance should be running!
  61. 3. SSH to your instance to install Docker : ``ssh -i <path to your private key> ec2-user@<your public IP address>``
  62. 4. Once connected to the instance, type ``sudo yum install -y docker ; sudo service docker start`` to install and start Docker
  63. .. _amazonstandard:
  64. Standard Ubuntu Installation
  65. ----------------------------
  66. If you want a more hands-on installation, then you can follow the
  67. :ref:`ubuntu_linux` instructions installing Docker on any EC2 instance
  68. running Ubuntu. Just follow Step 1 from :ref:`amazonquickstart` to
  69. pick an image (or use one of your own) and skip the step with the
  70. *User Data*. Then continue with the :ref:`ubuntu_linux` instructions.
  71. Continue with the :ref:`hello_world` example.