PageRenderTime 32ms CodeModel.GetById 25ms RepoModel.GetById 0ms app.codeStats 0ms

/doc_src/source/installation.rst

http://github.com/duointeractive/media-nommer
ReStructuredText | 160 lines | 120 code | 40 blank | 0 comment | 0 complexity | 29e1824e086c57d37a1ea1aad03b6529 MD5 | raw file
Possible License(s): BSD-3-Clause
  1. .. _installation:
  2. .. include:: global.txt
  3. Installation
  4. ============
  5. Due to the early state of this project, there is a good chance that parts of
  6. these instructions are out of date at any given time. If you run into any such
  7. issue please let us know on our `issue tracker`_.
  8. .. note::
  9. The following instructions are directed at what your eventual production
  10. environment will need. See :doc:`hacking` for details on setting up
  11. a development environment.
  12. Assumptions
  13. -----------
  14. For the sake of sanity, good deployment practices, and uniformity, we're
  15. going to make some assumptions. It is perfectly fine if you'd like to deviate,
  16. but it will be *much* more difficult for us to help you:
  17. * You are deploying or developing media-nommer in a virtualenv_. We highly
  18. recommend that and virtualenvwrapper_.
  19. * You are running a flavor of Linux, BSD, Mac OS, or something POSIX compatible.
  20. While Windows support is achievable, it's not something we currently have
  21. the resources to maintain (any takers?).
  22. * You have Python_ 2.y or later. Python_ 2.7 is preferred. Python_ 3.x is
  23. not currently supported.
  24. * You have an `Amazon AWS`_ account, and can create S3_ buckets.
  25. Requirements
  26. ------------
  27. * Some flavor of Linux, Unix, BSD, Mac OS, or POSIX compliant OS.
  28. * Python_ 2.6 or higher, with Python 2.7 recommended. Python_ 3.x is not
  29. supported (yet).
  30. Installing
  31. ----------
  32. For the sake of clarity, the media-nommer Python package contains
  33. the sources for :doc:`feederd` and :doc:`ec2nommerd`. You will want to install
  34. this package on whatever machine you'd like to run :doc:`feederd` on. You do
  35. not need to do any setup work for :doc:`ec2nommerd`, as those are ran on an
  36. EC2_ instance that is based off of an AMI that we have created for you.
  37. Since we are not yet distributing media-nommer on PyPi, the easiest way is to
  38. install the package is through :command:`pip`::
  39. pip install txrestapi twisted
  40. pip install --upgrade git+http://github.com/duointeractive/media-nommer.git#egg=media_nommer
  41. .. note::
  42. If you don't have access to :command:`pip`, you may download a tarball/zip,
  43. from our `GitHub project`_ and install via the enclosed ``setup.py``. See
  44. the ``requirements.txt`` within the project for dependencies.
  45. We have to install Twisted before media-nommer because of an odd behavior
  46. with :command:`pip`.
  47. .. tip:: Any time that you upgrade or re-install Twisted, you must also
  48. re-install media-nommer.
  49. Signing up for AWS
  50. ------------------
  51. After you have installed the media-nommer Python package on your machine(s),
  52. you'll need to visit `Amazon AWS`_ and sign up for the following services:
  53. * SimpleDB_
  54. * SQS_
  55. * EC2_
  56. It is important to understand that even if you already have an Amazon account,
  57. you need to sign up to each of these services specifically for your account to
  58. have access to said services. This is a very quick process, and typically
  59. involves looking over an agreement and accepting it.
  60. .. tip:: Signing up for these services is outside the scope of this document.
  61. Please contact AWS_ support with questions regarding this step. Their
  62. community forums are also a great resource.
  63. Fees are based on what you actually use, so signing up for these services will
  64. incur no costs unless you use them.
  65. AWS Management Console stuff
  66. ----------------------------
  67. After you've signed up for all of the necessary services, there are a few
  68. steps to work through within the `AWS Management Console`_. Sign in and take
  69. care of the following.
  70. Create a Security Group
  71. ^^^^^^^^^^^^^^^^^^^^^^^
  72. You will need to create a ``media_nommer`` EC2 *Security Group* through the
  73. AWS_ management console for your EC2_ instances to be part of. You don't need
  74. to add any rules, though, unless you want SSH access to the encoding nodes.
  75. .. warning:: Failure to create an EC2 security group will result in
  76. media-nommer not being able to spawn EC2 instances, which means
  77. no encoding for you.
  78. Create or import an SSH key pair
  79. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  80. Click on the **EC2** tab and find the **Key Pairs** link on the navigation bar.
  81. You can then either create or import a key pair. Make sure to keep track of the
  82. name of your keypair, as you'll need to specify it in your media-nommer
  83. configuration later on.
  84. .. warning:: Failure to create or import an SSH key pair will also lead to
  85. media-nommer being unable to spawn EC2 instances.
  86. .. _installing_configuring:
  87. Configuring
  88. -----------
  89. Once media-nommer is installed, create a directory to store a few files in.
  90. Within said directory, create a file called :file:`nomconf.py`. You will
  91. want to add these settings values (at minimum):
  92. .. code-block:: python
  93. # The AWS SSH key pair to use for creating instances. This is just the
  94. # name of it, as per your Account Security Credentials panel on AWS.
  95. EC2_KEY_NAME = 'xxxxxxxxx'
  96. # The AWS credentials used to access SimpleDB, SQS, and EC2.
  97. AWS_ACCESS_KEY_ID = 'YYYYYYYYYYYYYYYYYYYY'
  98. AWS_SECRET_ACCESS_KEY = 'ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ'
  99. # The S3 bucket to store a copy of ``nomconf.py`` for nommer instances.
  100. # NOTE: CREATE A BUCKET AND CHANGE THIS VALUE BEFORE YOU START!
  101. CONFIG_S3_BUCKET = 'change-this-value'
  102. # The AWS security groups to create EC2 instances under. They don't need
  103. # any rules set.
  104. EC2_SECURITY_GROUPS = ['media_nommer']
  105. See :py:mod:`media_nommer.conf.settings` for a full list of settings (and their
  106. defaults) that you may override in your :file:`nomconf.py`.
  107. Starting feederd
  108. ----------------
  109. You will now want to start :doc:`feederd` using whatever init script or
  110. init daemon you use. We have had good results with Supervisor_, but you can
  111. use whatever you're comfortable with. Make sure that the server running
  112. :doc:`feederd` is reachable by the machines that will be sending API requests
  113. to start encoding jobs. Here is an example command string, assuming you're in
  114. your top-level :file:`media-nommer` directory (not :file:`media_nommer`)::
  115. PYTHONPATH=media_nommer twistd -n --pidfile=feederd.pid feederd
  116. Using
  117. -----
  118. From here, you'll want to select and start using a :ref:`client_api_libraries`.
  119. These are what communicate with :doc:`feederd`'s RESTful web API, and ultimately
  120. help get stuff done.