aboutsummaryrefslogtreecommitdiffstats
path: root/docs/source
diff options
context:
space:
mode:
Diffstat (limited to 'docs/source')
-rw-r--r--docs/source/_templates/mg_theme/layout.html39
-rw-r--r--docs/source/_templates/mg_theme/static/default.css_t299
-rw-r--r--docs/source/_templates/mg_theme/theme.conf31
-rw-r--r--docs/source/conf.py13
-rw-r--r--docs/source/configuration.rst42
-rw-r--r--docs/source/deploying.rst211
-rw-r--r--docs/source/foreword.rst8
-rw-r--r--docs/source/index.rst2
-rw-r--r--docs/source/media-types.rst34
-rw-r--r--docs/source/production-deployments.rst81
-rw-r--r--docs/source/themes/mg/layout.html29
-rw-r--r--docs/source/themes/mg/static/fonts/Lato-Bold.ttfbin0 -> 93224 bytes
-rw-r--r--docs/source/themes/mg/static/fonts/Lato-BoldItalic.ttfbin0 -> 81936 bytes
-rw-r--r--docs/source/themes/mg/static/fonts/Lato-Italic.ttfbin0 -> 83680 bytes
-rw-r--r--docs/source/themes/mg/static/fonts/Lato-Regular.ttfbin0 -> 96044 bytes
-rw-r--r--docs/source/themes/mg/static/fonts/OFL_1.1.txt97
-rw-r--r--docs/source/themes/mg/static/logo_docs.pngbin0 -> 6626 bytes
-rw-r--r--docs/source/themes/mg/static/mg.css161
-rw-r--r--docs/source/themes/mg/theme.conf5
19 files changed, 550 insertions, 502 deletions
diff --git a/docs/source/_templates/mg_theme/layout.html b/docs/source/_templates/mg_theme/layout.html
deleted file mode 100644
index eccda14b..00000000
--- a/docs/source/_templates/mg_theme/layout.html
+++ /dev/null
@@ -1,39 +0,0 @@
-{#
- default/layout.html
- ~~~~~~~~~~~~~~~~~~~
-
- Sphinx layout template for the default theme.
-
- :copyright: Copyright 2007-2010 by the Sphinx team, see AUTHORS.
- :license: BSD, see LICENSE for details.
-#}
-{% extends "basic/layout.html" %}
-
-{% if theme_collapsiblesidebar|tobool %}
-{% set script_files = script_files + ['_static/sidebar.js'] %}
-{% endif %}
-
-{%- block footer %}
- <div class="footer">
- <div>
- {% trans path=pathto('copyright'), copyright=copyright|e %}&copy; <a href="{{ path }}">Copyright</a> {{ copyright }}.{% endtrans %}
- {%- if last_updated %}
- {% trans last_updated=last_updated|e %}Last updated on {{ last_updated }}.{% endtrans %}
- {%- endif %}
- {% trans sphinx_version=sphinx_version|e %}Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> {{ sphinx_version }}.{% endtrans %}
- </div>
-<a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"><img alt="Creative Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by-sa/3.0/88x31.png" /></a><br /><span xmlns:dc="http://purl.org/dc/elements/1.1/" href="http://purl.org/dc/dcmitype/Text" property="dc:title" rel="dc:type">{{ shorttitle|e }}</span> by <a xmlns:cc="http://creativecommons.org/ns#" href="http://bluesock.org/~willg/" property="cc:attributionName" rel="cc:attributionURL">Will Kahn-Greene</a> is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/">Creative Commons Attribution-ShareAlike 3.0 Unported License</a>.<br />
- </div>
-
-<script type="text/javascript">
- var _gaq = _gaq || [];
- _gaq.push(['_setAccount', 'UA-163840-8']);
- _gaq.push(['_trackPageview']);
-
- (function() {
- var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
- ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
- var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
- })();
-</script>
-{%- endblock %}
diff --git a/docs/source/_templates/mg_theme/static/default.css_t b/docs/source/_templates/mg_theme/static/default.css_t
deleted file mode 100644
index f200a0fe..00000000
--- a/docs/source/_templates/mg_theme/static/default.css_t
+++ /dev/null
@@ -1,299 +0,0 @@
-/*
- * default.css_t
- * ~~~~~~~~~~~~~
- *
- * Sphinx stylesheet -- default theme.
- *
- * :copyright: Copyright 2007-2010 by the Sphinx team, see AUTHORS.
- * :license: BSD, see LICENSE for details.
- *
- */
-
-@import url("basic.css");
-
-/* -- page layout ----------------------------------------------------------- */
-
-body {
- font-family: {{ theme_bodyfont }};
- font-size: 100%;
- background-color: {{ theme_footerbgcolor }};
- color: #000;
- margin: 0;
- padding: 0;
-}
-
-div.document {
- background-color: {{ theme_sidebarbgcolor }};
-}
-
-div.documentwrapper {
- float: left;
- width: 100%;
-}
-
-div.bodywrapper {
- margin: 0 0 0 230px;
-}
-
-div.body {
- background-color: {{ theme_bgcolor }};
- color: {{ theme_textcolor }};
- padding: 0 20px 30px 20px;
-}
-
-{%- if theme_rightsidebar|tobool %}
-div.bodywrapper {
- margin: 0 230px 0 0;
-}
-{%- endif %}
-
-div.footer {
- color: {{ theme_footertextcolor }};
- width: 100%;
- padding: 9px 0 9px 0;
- text-align: center;
- font-size: 75%;
-}
-
-div.footer a {
- color: {{ theme_footertextcolor }};
- text-decoration: underline;
-}
-
-div.related {
- background-color: {{ theme_relbarbgcolor }};
- line-height: 30px;
- color: {{ theme_relbartextcolor }};
-}
-
-div.related a {
- color: {{ theme_relbarlinkcolor }};
-}
-
-div.sphinxsidebar {
- {%- if theme_stickysidebar|tobool %}
- top: 30px;
- bottom: 0;
- margin: 0;
- position: fixed;
- overflow: auto;
- height: auto;
- {%- endif %}
- {%- if theme_rightsidebar|tobool %}
- float: right;
- {%- if theme_stickysidebar|tobool %}
- right: 0;
- {%- endif %}
- {%- endif %}
-}
-
-{%- if theme_stickysidebar|tobool %}
-/* this is nice, but it it leads to hidden headings when jumping
- to an anchor */
-/*
-div.related {
- position: fixed;
-}
-
-div.documentwrapper {
- margin-top: 30px;
-}
-*/
-{%- endif %}
-
-div.sphinxsidebar h3 {
- font-family: {{ theme_headfont }};
- color: {{ theme_sidebartextcolor }};
- font-size: 1.4em;
- font-weight: normal;
- margin: 0;
- padding: 0;
-}
-
-div.sphinxsidebar h3 a {
- color: {{ theme_sidebartextcolor }};
-}
-
-div.sphinxsidebar h4 {
- font-family: {{ theme_headfont }};
- color: {{ theme_sidebartextcolor }};
- font-size: 1.3em;
- font-weight: normal;
- margin: 5px 0 0 0;
- padding: 0;
-}
-
-div.sphinxsidebar p {
- color: {{ theme_sidebartextcolor }};
-}
-
-div.sphinxsidebar p.topless {
- margin: 5px 10px 10px 10px;
-}
-
-div.sphinxsidebar ul {
- margin: 10px;
- padding: 0;
- color: {{ theme_sidebartextcolor }};
-}
-
-div.sphinxsidebar a {
- color: {{ theme_sidebarlinkcolor }};
-}
-
-div.sphinxsidebar input {
- border: 1px solid {{ theme_sidebarlinkcolor }};
- font-family: sans-serif;
- font-size: 1em;
-}
-
-
-/* -- hyperlink styles ------------------------------------------------------ */
-
-a {
- color: {{ theme_linkcolor }};
- text-decoration: none;
-}
-
-a:visited {
- color: {{ theme_visitedlinkcolor }};
- text-decoration: none;
-}
-
-a:hover {
- text-decoration: underline;
-}
-
-{% if theme_externalrefs|tobool %}
-a.external {
- text-decoration: none;
- border-bottom: 1px dashed {{ theme_linkcolor }};
-}
-
-a.external:hover {
- text-decoration: none;
- border-bottom: none;
-}
-{% endif %}
-
-/* -- body styles ----------------------------------------------------------- */
-
-div.body h1,
-div.body h2,
-div.body h3,
-div.body h4,
-div.body h5,
-div.body h6 {
- font-family: {{ theme_headfont }};
- background-color: {{ theme_headbgcolor }};
- font-weight: normal;
- color: {{ theme_headtextcolor }};
- border-bottom: 1px solid #ccc;
- margin: 20px -20px 10px -20px;
- padding: 3px 0 3px 10px;
-}
-
-div.body h1 { margin-top: 0; font-size: 200%; }
-div.body h2 { font-size: 160%; }
-div.body h3 { font-size: 140%; }
-div.body h4 { font-size: 120%; }
-div.body h5 { font-size: 110%; }
-div.body h6 { font-size: 100%; }
-
-a.headerlink {
- color: {{ theme_headlinkcolor }};
- font-size: 0.8em;
- padding: 0 4px 0 4px;
- text-decoration: none;
-}
-
-a.headerlink:hover {
- background-color: {{ theme_headlinkcolor }};
- color: white;
-}
-
-div.body p, div.body dd, div.body li {
- text-align: justify;
- line-height: 130%;
-}
-
-div.admonition p.admonition-title + p {
- display: inline;
-}
-
-div.admonition p {
- margin-bottom: 5px;
-}
-
-div.admonition pre {
- margin-bottom: 5px;
-}
-
-div.admonition ul, div.admonition ol {
- margin-bottom: 5px;
-}
-
-div.note {
- background-color: #eee;
- border: 1px solid #ccc;
-}
-
-div.seealso {
- background-color: #ffc;
- border: 1px solid #ff6;
-}
-
-div.topic {
- background-color: #eee;
-}
-
-div.warning {
- background-color: #ffe4e4;
- border: 1px solid #f66;
-}
-
-p.admonition-title {
- display: inline;
-}
-
-p.admonition-title:after {
- content: ":";
-}
-
-pre {
- padding: 5px;
- background-color: {{ theme_codebgcolor }};
- color: {{ theme_codetextcolor }};
- line-height: 120%;
- border: 1px solid #ac9;
- border-left: none;
- border-right: none;
-}
-
-tt {
- background-color: #ecf0f3;
- padding: 0 1px 0 1px;
- font-size: 0.95em;
-}
-
-th {
- background-color: #ede;
-}
-
-.warning tt {
- background: #efc2c2;
-}
-
-.note tt {
- background: #d6d6d6;
-}
-
-.viewcode-back {
- font-family: {{ theme_bodyfont }};
-}
-
-div.viewcode-block:target {
- background-color: #f4debf;
- border-top: 1px solid #ac9;
- border-bottom: 1px solid #ac9;
-}
diff --git a/docs/source/_templates/mg_theme/theme.conf b/docs/source/_templates/mg_theme/theme.conf
deleted file mode 100644
index 49442e3b..00000000
--- a/docs/source/_templates/mg_theme/theme.conf
+++ /dev/null
@@ -1,31 +0,0 @@
-[theme]
-inherit = basic
-stylesheet = default.css
-pygments_style = sphinx
-
-[options]
-rightsidebar = false
-stickysidebar = false
-collapsiblesidebar = false
-externalrefs = false
-
-footerbgcolor = #b11818
-footertextcolor = #ffffff
-sidebarbgcolor = #6a0000
-sidebartextcolor = #ffffff
-sidebarlinkcolor = #98dbcc
-relbarbgcolor = #b11818
-relbartextcolor = #ffffff
-relbarlinkcolor = #ffffff
-bgcolor = #ffffff
-textcolor = #000000
-headbgcolor = #fdeded
-headtextcolor = #20435c
-headlinkcolor = #c60f0f
-linkcolor = #355f7c
-visitedlinkcolor = #355f7c
-codebgcolor = #eeffcc
-codetextcolor = #333333
-
-bodyfont = sans-serif
-headfont = 'Trebuchet MS', sans-serif
diff --git a/docs/source/conf.py b/docs/source/conf.py
index 7ea3a340..3014e592 100644
--- a/docs/source/conf.py
+++ b/docs/source/conf.py
@@ -28,7 +28,7 @@ sys.path.insert(0, os.path.abspath('.'))
extensions = ["mgext.youcanhelp"]
# Add any paths that contain templates here, relative to this directory.
-templates_path = ['_templates']
+templates_path = ['source/_templates']
# The suffix of source filenames.
source_suffix = '.rst'
@@ -48,9 +48,9 @@ copyright = u'2011, Free Software Foundation, Inc and contributors'
# built documents.
#
# The short X.Y version.
-version = '0.0.5'
+version = '0.3.0'
# The full version, including alpha/beta/rc tags.
-release = '0.0.5'
+release = '0.3.0-dev'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
@@ -91,7 +91,8 @@ pygments_style = 'sphinx'
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
-html_theme = 'default'
+# html_theme = 'default'
+html_theme = 'mg'
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
@@ -99,7 +100,7 @@ html_theme = 'default'
#html_theme_options = {}
# Add any paths that contain custom themes here, relative to this directory.
-#html_theme_path = []
+html_theme_path = ['themes']
# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
@@ -110,7 +111,7 @@ html_theme = 'default'
# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
-#html_logo = None
+html_logo = 'logo_docs.png'
# The name of an image file (within the static path) to use as favicon of the
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
diff --git a/docs/source/configuration.rst b/docs/source/configuration.rst
index 093f492c..1e22ad2d 100644
--- a/docs/source/configuration.rst
+++ b/docs/source/configuration.rst
@@ -19,13 +19,13 @@ mediagoblin.ini
tweak settings for MediaGoblin, you'll usually tweak them here.
paste.ini
- This is primarily a server configuration file, on the python side
- (specifically, on the wsgi side, via `paste deploy
+ This is primarily a server configuration file, on the Python side
+ (specifically, on the WSGI side, via `paste deploy
<http://pythonpaste.org/deploy/>`_ / `paste script
<http://pythonpaste.org/script/>`_). It also sets up some
middleware that you can mostly ignore, except to configure
sessions... more on that later. If you are adding a different
- python server other than fastcgi / plain http, you might configure
+ Python server other than fastcgi / plain HTTP, you might configure
it here. You probably won't need to change this file very much.
@@ -47,19 +47,23 @@ Let's assume you're doing the virtualenv setup described elsewhere in this
manual, and you need to make local tweaks to the config files. How do you do
that? Let's see.
-To make changes to mediagoblin.ini:
+To make changes to mediagoblin.ini ::
- cp mediagoblin.ini mediagoblin_local.ini
+ cp mediagoblin.ini mediagoblin_local.ini
-To make changes to paste.ini:
- cp paste.ini paste_local.ini
+To make changes to paste.ini ::
+
+ cp paste.ini paste_local.ini
From here you should be able to make direct adjustments to the files,
and most of the commands described elsewhere in this manual will "notice"
your local config files and use those instead of the non-local version.
-(Note that all commands provide a way to pass in a specific config
-file also, usually by a -cf flag.)
+.. note::
+
+ Note that all commands provide a way to pass in a specific config
+ file also, usually by a ``-cf`` flag.
+
Common changes
==============
@@ -69,9 +73,9 @@ Enabling email notifications
You'll almost certainly want to enable sending emails. By default,
MediaGoblin doesn't really do this... for the sake of developer
-convenience, it runs in "email debug mode". Change this:
+convenience, it runs in "email debug mode". Change this::
- email_debug_mode = false
+ email_debug_mode = false
You can (and should) change the "from" email address by setting
``email_sender_address``.
@@ -82,21 +86,21 @@ If you have more custom SMTP settings, you also have the following
options at your disposal, which are all optional, and do exactly what
they sound like.
- - email_smtp_host
- - email_smtp_port
- - email_smtp_user
- - email_smtp_pass
+- email_smtp_host
+- email_smtp_port
+- email_smtp_user
+- email_smtp_pass
All other configuration changes
-------------------------------
-To be perfectly honest, there are quite a few options and I'm not
-going to be able to get to documanting them all in time for 0.1.0.
+To be perfectly honest, there are quite a few options and we haven't had
+time to document them all
So here's a cop-out section saying that if you get into trouble, hop
-onto IRC and we'll help you out:
+onto IRC and we'll help you out::
- #mediagoblin on irc.freenode.net
+ #mediagoblin on irc.freenode.net
Celery
======
diff --git a/docs/source/deploying.rst b/docs/source/deploying.rst
index 5f07a1d2..4aded2e6 100644
--- a/docs/source/deploying.rst
+++ b/docs/source/deploying.rst
@@ -11,9 +11,11 @@ it simple with some assumptions and use a setup that combines
mediagoblin + virtualenv + fastcgi + nginx on a .deb or .rpm based
GNU/Linux distro.
-Note: these tools are for administrators wanting to deploy a fresh
-install. If instead you want to join in as a contributor, see our
-`Hacking HOWTO <http://wiki.mediagoblin.org/HackingHowto>`_ instead.
+.. note::
+
+ These tools are for site administrators wanting to deploy a fresh
+ install. If instead you want to join in as a contributor, see our
+ `Hacking HOWTO <http://wiki.mediagoblin.org/HackingHowto>`_ instead.
Prepare System
--------------
@@ -33,12 +35,15 @@ MediaGoblin has the following core dependencies:
On a DEB-based system (e.g Debian, gNewSense, Trisquel, Ubuntu, and
derivatives) issue the following command: ::
- sudo apt-get install mongodb git-core python python-dev python-lxml python-imaging python-virtualenv
+ sudo apt-get install mongodb git-core python python-dev python-lxml \
+ python-imaging python-virtualenv
On a RPM-based system (e.g. Fedora, RedHat, and derivatives) issue the
following command: ::
- yum install mongodb-server python-paste-deploy python-paste-script git-core python python-devel python-lxml python-imaging python-virtualenv
+ yum install mongodb-server python-paste-deploy python-paste-script \
+ git-core python python-devel python-lxml python-imaging \
+ python-virtualenv
Configure MongoDB
~~~~~~~~~~~~~~~~~
@@ -46,10 +51,11 @@ Configure MongoDB
After installing MongoDB some preliminary database configuration may
be necessary.
-Ensure that MongoDB `journaling <http://www.mongodb.org/display/DOCS/Journaling>`_
-is enabled. Journaling is enabled by default in version 2.0 and later
-64-bit MongoDB instances. Check your deployment, and consider enabling
-journaling if you're running 32-bit systems or earlier version.
+Ensure that MongoDB `journaling
+<http://www.mongodb.org/display/DOCS/Journaling>`_ is enabled. Journaling
+is enabled by default in version 2.0 and later 64-bit MongoDB instances.
+Check your deployment, and consider enabling journaling if you're running
+32-bit systems or earlier version.
.. warning::
@@ -77,41 +83,42 @@ create "system account" or dedicated service user. Ensure that it is
not possible to log in to your system with as this user.
You should create a working directory for MediaGoblin. This document
-assumes your local git repository will be located at ``/srv/mediagoblin.example.org/mediagoblin/``
-for this documentation. Substitute your prefer ed local deployment path
-as needed.
+assumes your local git repository will be located at
+``/srv/mediagoblin.example.org/mediagoblin/`` for this documentation.
+Substitute your prefer ed local deployment path as needed.
This document assumes that all operations are performed as this
user. To drop privileges to this user, run the following command: ::
+ su - [mediagoblin]
- su - [mediagoblin]``
-
-Where, "``[mediagoblin]`` is the username of the system user that will
+Where, "``[mediagoblin]``" is the username of the system user that will
run MediaGoblin.
Install MediaGoblin and Virtualenv
----------------------------------
-As of |version|, MediaGoblin has a rapid development pace. As a result
-the following instructions recommend installing from the ``master``
-branch of the git repository. Eventually production deployments will
-want to transition to running from more consistent releases.
+.. note::
+
+ As of |version|, MediaGoblin has a rapid development pace. As a result
+ the following instructions recommend installing from the ``master``
+ branch of the git repository. Eventually production deployments will
+ want to transition to running from more consistent releases.
Issue the following commands, to create and change the working
-directory. Modify these commands to reflect your own environment: ::
+directory. Modify these commands to reflect your own environment::
- mkdir -p /srv/mediagoblin.example.org/
- cd /srv/mediagoblin.example.org/
+ mkdir -p /srv/mediagoblin.example.org/
+ cd /srv/mediagoblin.example.org/
-Clone the MediaGoblin repository: ::
+Clone the MediaGoblin repository::
- git clone git://gitorious.org/mediagoblin/mediagoblin.git
+ git clone git://gitorious.org/mediagoblin/mediagoblin.git
-And setup the in-package virtualenv: ::
+And setup the in-package virtualenv::
- cd mediagoblin
- virtualenv . && ./bin/python setup.py develop
+ cd mediagoblin
+ virtualenv . && ./bin/python setup.py develop
.. note::
@@ -127,11 +134,16 @@ more reliable and considerably easier to configure and illustrate. If
you're familiar with Python packaging you may consider deploying with
your preferred the method.
+Assuming you are going to deploy with FastCGI, you should also install
+flup::
+
+ ./bin/easy_install flup
+
This concludes the initial configuration of the development
environment. In the future, if at any point you want update your
-codebase, you should also run: ::
+codebase, you should also run::
- ./bin/python setup.py develop --upgrade && ./bin/gmg migrate.
+ ./bin/python setup.py develop --upgrade && ./bin/gmg migrate.
Deploy MediaGoblin Services
---------------------------
@@ -140,9 +152,9 @@ Test the Server
~~~~~~~~~~~~~~~
At this point MediaGoblin should be properly installed. You can
-test the deployment with the following command: ::
+test the deployment with the following command::
- ./lazyserver.sh --server-name=broadcast
+ ./lazyserver.sh --server-name=broadcast
You should be able to connect to the machine on port 6543 in your
browser to confirm that the service is operable.
@@ -151,7 +163,7 @@ Connect the Webserver to MediaGoblin with FastCGI
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This section describes how to configure MediaGoblin to work via
-fastcgi. Our configuration example will use nginx, however, you may
+FastCGI. Our configuration example will use nginx, however, you may
use any webserver of your choice as long as it supports the FastCGI
protocol. If you do not already have a web server, consider nginx, as
the configuration files may be more clear than the
@@ -161,94 +173,85 @@ Create a configuration file at
``/srv/mediagoblin.example.org/nginx.conf`` and create a symbolic link
into a directory that will be included in your ``nginx`` configuration
(e.g. "``/etc/nginx/sites-enabled`` or ``/etc/nginx/conf.d``) with
-one of the following commands (as the root user:) ::
+one of the following commands (as the root user)::
- ln -s /srv/mediagoblin.example.org/nginx.conf /etc/nginx/conf.d/
- ln -s /srv/mediagoblin.example.org/nginx.conf /etc/nginx/sites-enabled/
+ ln -s /srv/mediagoblin.example.org/nginx.conf /etc/nginx/conf.d/
+ ln -s /srv/mediagoblin.example.org/nginx.conf /etc/nginx/sites-enabled/
Modify these commands and locations depending on your preferences and
the existing configuration of your nginx instance. The contents of
-this ``nginx.conf`` file should be modeled on the following: ::
-
- server {
- #################################################
- # Stock useful config options, but ignore them :)
- #################################################
- include /etc/nginx/mime.types;
-
- autoindex off;
- default_type application/octet-stream;
- sendfile on;
-
- # Gzip
- gzip on;
- gzip_min_length 1024;
- gzip_buffers 4 32k;
- gzip_types text/plain text/html application/x-javascript text/javascript text/xml text/css;
-
- #####################################
- # Mounting MediaGoblin stuff
- # This is the section you should read
- #####################################
-
- server_name mediagoblin.example.org www.mediagoblin.example.org;
- access_log /var/log/nginx/mediagoblin.example.access.log;
- error_log /var/log/nginx/mediagoblin.example.error.log;
-
- # MediaGoblin's stock static files: CSS, JS, etc.
- location /mgoblin_static/ {
- alias /srv/mediagoblin.example.org/mediagoblin/static/;
- }
-
- # Instance specific media:
- location /mgoblin_media/ {
- alias /srv/mediagoblin.example.org/mediagoblin/user_dev/media/public/;
- }
-
- # Mounting MediaGoblin itself via fastcgi.
- location / {
- fastcgi_pass 127.0.0.1:26543;
- include /etc/nginx/fastcgi_params;
- }
+this ``nginx.conf`` file should be modeled on the following::
+
+ server {
+ #################################################
+ # Stock useful config options, but ignore them :)
+ #################################################
+ include /etc/nginx/mime.types;
+
+ autoindex off;
+ default_type application/octet-stream;
+ sendfile on;
+
+ # Gzip
+ gzip on;
+ gzip_min_length 1024;
+ gzip_buffers 4 32k;
+ gzip_types text/plain text/html application/x-javascript text/javascript text/xml text/css;
+
+ #####################################
+ # Mounting MediaGoblin stuff
+ # This is the section you should read
+ #####################################
+
+ # Change this to update the upload size limit for your users
+ client_max_body_size 8m;
+
+ server_name mediagoblin.example.org www.mediagoblin.example.org;
+ access_log /var/log/nginx/mediagoblin.example.access.log;
+ error_log /var/log/nginx/mediagoblin.example.error.log;
+
+ # MediaGoblin's stock static files: CSS, JS, etc.
+ location /mgoblin_static/ {
+ alias /srv/mediagoblin.example.org/mediagoblin/mediagoblin/static/;
+ }
+
+ # Instance specific media:
+ location /mgoblin_media/ {
+ alias /srv/mediagoblin.example.org/mediagoblin/user_dev/media/public/;
+ }
+
+ # Mounting MediaGoblin itself via FastCGI.
+ location / {
+ fastcgi_pass 127.0.0.1:26543;
+ include /etc/nginx/fastcgi_params;
+
+ # our understanding vs nginx's handling of script_name vs
+ # path_info don't match :)
+ fastcgi_param PATH_INFO $fastcgi_script_name;
+ fastcgi_param SCRIPT_NAME "";
}
+ }
Now, nginx instance is configured to serve the MediaGoblin
application. Perform a quick test to ensure that this configuration
works. Restart nginx so it picks up your changes, with a command that
-resembles one of the following (as the root user:) ::
+resembles one of the following (as the root user)::
- sudo /etc/init.d/nginx restart
- sudo /etc/rc.d/nginx restart
+ sudo /etc/init.d/nginx restart
+ sudo /etc/rc.d/nginx restart
Now start MediaGoblin. Use the following command sequence as an
-example: ::
+example::
- cd /srv/mediagoblin.example.org/mediagoblin/
- ./lazyserver.sh --server-name=fcgi fcgi_host=127.0.0.1 fcgi_port=26543
+ cd /srv/mediagoblin.example.org/mediagoblin/
+ ./lazyserver.sh --server-name=fcgi fcgi_host=127.0.0.1 fcgi_port=26543
Visit the site you've set up in your browser by visiting
<http://mediagobilin.example.org>. You should see MediaGoblin!
-Production MediaGoblin Deployments with Paste
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-The instance configured with ``lazyserver`` is not ideal for a
-production MediaGoblin deployment. Ideally, you should be able to use
-a a control script (i.e. init script.) to launch and restart the
-MediaGoblin process.
-
-Use the following command as the basis for such a script: ::
-
- CELERY_ALWAYS_EAGER=true \
- /srv/mediagoblin.example.org/mediagoblin/bin/paster serve \
- /srv/mediagoblin.example.org/mediagoblin/paste.ini \
- --pid-file=/tmp/mediagoblin.pid \
- --server-name=fcgi fcgi_host=127.0.0.1 fcgi_port=26543 \
-
.. note::
- The above configuration places MediaGoblin in "always eager" mode
- with Celery. This is fine for development and smaller
- deployments. However, if you're getting into the really large
- deployment category, consider reading the section of this manual on
- Celery.
+ The configuration described above is sufficient for development and
+ smaller deployments. However, for larger production deployments
+ with larger processing requirements, see the
+ ":doc:`production-deployments`" documentation.
diff --git a/docs/source/foreword.rst b/docs/source/foreword.rst
index 835a7e7a..aa27647f 100644
--- a/docs/source/foreword.rst
+++ b/docs/source/foreword.rst
@@ -5,14 +5,14 @@ Foreword
About the MediaGoblin Manual
============================
-This is the user manual for MediaGoblin. It covers how to set up and
-configure MediaGoblin and the kind of information that someone running
-MediaGoblin would need to know.
+This is the site administrator manual for MediaGoblin. It covers how
+to set up and configure MediaGoblin and the kind of information that
+someone running MediaGoblin would need to know.
We have other documentation at:
* http://mediagoblin.org/join/ for general "join us" information
-* http://wiki.mediagoblin.org/ for our contributor-focused wiki
+* http://wiki.mediagoblin.org/ for our contributor/developer-focused wiki
Improving the MediaGobiin Manual
diff --git a/docs/source/index.rst b/docs/source/index.rst
index e9f3993e..f9c9285d 100644
--- a/docs/source/index.rst
+++ b/docs/source/index.rst
@@ -14,7 +14,9 @@ Table of Contents:
foreword
about
deploying
+ production-deployments
configuration
+ media-types
help
theming
codebase
diff --git a/docs/source/media-types.rst b/docs/source/media-types.rst
new file mode 100644
index 00000000..76478143
--- /dev/null
+++ b/docs/source/media-types.rst
@@ -0,0 +1,34 @@
+.. _media-types-chapter:
+
+====================
+Enabling Media Types
+====================
+
+In the future, there will be all sorts of media types you can enable,
+but in the meanwhile there's only one additional media type: video.
+
+First, you should probably read ":doc:`configuration`" to make sure
+you know how to modify the mediagoblin config file.
+
+Video
+=====
+
+To enable video, first install gstreamer and the python-gstreamer
+bindings (as well as whatever gstremaer extensions you want,
+good/bad/ugly). On Debianoid systems::
+
+ sudo apt-get install python-gst0.10
+
+Next, modify (and possibly copy over from ``mediagoblin.ini``) your
+``mediagoblin_local.ini``. Uncomment this line in the ``[mediagoblin]``
+section::
+
+ media_types = mediagoblin.media_types.image, mediagoblin.media_types.video
+
+Now you should be able to submit videos, and mediagoblin should
+transcode them.
+
+Note that you almost certainly want to separate Celery from the normal
+paste process or your users will probably find that their connections
+time out as the video transcodes. To set that up, check out the
+":doc:`production-deployments`" section of this manual.
diff --git a/docs/source/production-deployments.rst b/docs/source/production-deployments.rst
new file mode 100644
index 00000000..ef0bcad6
--- /dev/null
+++ b/docs/source/production-deployments.rst
@@ -0,0 +1,81 @@
+=========================================
+Considerations for Production Deployments
+=========================================
+
+This document contains a number of suggestions for deploying
+MediaGoblin in actual production environments. Consider
+":doc:`deploying`" for a basic overview of how to deploy MediaGoblin.
+
+Deploy with Paste
+-----------------
+
+The instance configured with ``./lazyserver.sh`` is not ideal for a
+production MediaGoblin deployment. Ideally, you should be able to use
+an "init" or "control" script to launch and restart the MediaGoblin
+process.
+
+Use the following command as the basis for such a script: ::
+
+ CELERY_ALWAYS_EAGER=true \
+ /srv/mediagoblin.example.org/mediagoblin/bin/paster serve \
+ /srv/mediagoblin.example.org/mediagoblin/paste.ini \
+ --pid-file=/var/run/mediagoblin.pid \
+ --server-name=fcgi fcgi_host=127.0.0.1 fcgi_port=26543
+
+The above configuration places MediaGoblin in "always eager" mode
+with Celery, this means that submissions of content will be processed
+synchronously, and the user will advance to the next page only after
+processing is complete. If we take Celery out of "always eager mode,"
+the user will be able to immediately return to the MediaGoblin site
+while processing is ongoing. In these cases, use the following command
+as the basis for your script: ::
+
+ CELERY_ALWAYS_EAGER=false \
+ /srv/mediagoblin.example.org/mediagoblin/bin/paster serve \
+ /srv/mediagoblin.example.org/mediagoblin/paste.ini \
+ --pid-file=/var/run/mediagoblin.pid \
+ --server-name=fcgi fcgi_host=127.0.0.1 fcgi_port=26543
+
+Separate Celery
+---------------
+
+While the ``./lazyserer.sh`` configuration provides an efficient way to
+start using a MediaGoblin instance, it is not suitable for production
+deployments for several reasons:
+
+In nearly every scenario, work on the Celery queue will need to
+balance with the demands of other processes, and cannot proceed
+synchronously. This is a particularly relevant problem if you use
+MediaGoblin to host video content. Processing with Celery ought to be
+operationally separate from the MediaGoblin application itself, this
+simplifies management and support better workload distribution.
+
+Basically, if you're doing anything beyond a trivial workload, such as
+image hosting for a small set of users, or have limited media types
+such as "ASCII art" or icon sharing, you will need to run ``celeryd``
+as a separate process.
+
+Build an :ref:`init script <init-script>` around the following
+command::
+
+ CELERY_CONFIG_MODULE=mediagoblin.init.celery.from_celery ./bin/celeryd
+
+Modify your existing MediaGoblin and application init scripts, if
+necessary, to prevent them from starting their own ``celeryd``
+processes.
+
+.. _init-script:
+
+Use an Init Script
+------------------
+
+Look in your system's ``/etc/init.d/`` or ``/etc/rc.d/`` directory for
+examples of how to build scripts that will start, stop, and restart
+MediaGoblin and Celery. These scripts will vary by
+distribution/operating system. In the future, MediaGoblin will provide
+example scripts as examples.
+
+.. TODO insert init script here
+.. TODO are additional concerns ?
+ .. Other Concerns
+ .. --------------
diff --git a/docs/source/themes/mg/layout.html b/docs/source/themes/mg/layout.html
new file mode 100644
index 00000000..891ed64c
--- /dev/null
+++ b/docs/source/themes/mg/layout.html
@@ -0,0 +1,29 @@
+{#
+ default/layout.html
+ ~~~~~~~~~~~~~~~~~~~
+
+ Sphinx layout template for the default theme.
+
+ :copyright: Copyright 2007-2010 by the Sphinx team, see AUTHORS.
+ :license: BSD, see LICENSE for details.
+#}
+{% extends "basic/layout.html" %}
+
+{% if theme_collapsiblesidebar|tobool %}
+{% set script_files = script_files + ['_static/sidebar.js'] %}
+{% endif %}
+
+{%- block footer %}
+ <div class="footer">
+ <div>
+
+MediaGoblin documentation released into the public domain via <a href="http://creativecommons.org/publicdomain/zero/1.0/">CC0</a>.
+
+ {%- if last_updated %}
+ {% trans last_updated=last_updated|e %}Last updated on {{ last_updated }}.{% endtrans %}
+ {%- endif %}
+
+ {% trans sphinx_version=sphinx_version|e %}Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> {{ sphinx_version }}.{% endtrans %}
+ </div>
+ </div>
+{%- endblock %}
diff --git a/docs/source/themes/mg/static/fonts/Lato-Bold.ttf b/docs/source/themes/mg/static/fonts/Lato-Bold.ttf
new file mode 100644
index 00000000..bc3529fc
--- /dev/null
+++ b/docs/source/themes/mg/static/fonts/Lato-Bold.ttf
Binary files differ
diff --git a/docs/source/themes/mg/static/fonts/Lato-BoldItalic.ttf b/docs/source/themes/mg/static/fonts/Lato-BoldItalic.ttf
new file mode 100644
index 00000000..2cf5ae0d
--- /dev/null
+++ b/docs/source/themes/mg/static/fonts/Lato-BoldItalic.ttf
Binary files differ
diff --git a/docs/source/themes/mg/static/fonts/Lato-Italic.ttf b/docs/source/themes/mg/static/fonts/Lato-Italic.ttf
new file mode 100644
index 00000000..11ca3eb6
--- /dev/null
+++ b/docs/source/themes/mg/static/fonts/Lato-Italic.ttf
Binary files differ
diff --git a/docs/source/themes/mg/static/fonts/Lato-Regular.ttf b/docs/source/themes/mg/static/fonts/Lato-Regular.ttf
new file mode 100644
index 00000000..26ce1002
--- /dev/null
+++ b/docs/source/themes/mg/static/fonts/Lato-Regular.ttf
Binary files differ
diff --git a/docs/source/themes/mg/static/fonts/OFL_1.1.txt b/docs/source/themes/mg/static/fonts/OFL_1.1.txt
new file mode 100644
index 00000000..f1a20ac1
--- /dev/null
+++ b/docs/source/themes/mg/static/fonts/OFL_1.1.txt
@@ -0,0 +1,97 @@
+Copyright (c) <dates>, <Copyright Holder> (<URL|email>),
+with Reserved Font Name <Reserved Font Name>.
+Copyright (c) <dates>, <additional Copyright Holder> (<URL|email>),
+with Reserved Font Name <additional Reserved Font Name>.
+Copyright (c) <dates>, <additional Copyright Holder> (<URL|email>).
+
+This Font Software is licensed under the SIL Open Font License, Version 1.1.
+This license is copied below, and is also available with a FAQ at:
+http://scripts.sil.org/OFL
+
+
+-----------------------------------------------------------
+SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
+-----------------------------------------------------------
+
+PREAMBLE
+The goals of the Open Font License (OFL) are to stimulate worldwide
+development of collaborative font projects, to support the font creation
+efforts of academic and linguistic communities, and to provide a free and
+open framework in which fonts may be shared and improved in partnership
+with others.
+
+The OFL allows the licensed fonts to be used, studied, modified and
+redistributed freely as long as they are not sold by themselves. The
+fonts, including any derivative works, can be bundled, embedded,
+redistributed and/or sold with any software provided that any reserved
+names are not used by derivative works. The fonts and derivatives,
+however, cannot be released under any other type of license. The
+requirement for fonts to remain under this license does not apply
+to any document created using the fonts or their derivatives.
+
+DEFINITIONS
+"Font Software" refers to the set of files released by the Copyright
+Holder(s) under this license and clearly marked as such. This may
+include source files, build scripts and documentation.
+
+"Reserved Font Name" refers to any names specified as such after the
+copyright statement(s).
+
+"Original Version" refers to the collection of Font Software components as
+distributed by the Copyright Holder(s).
+
+"Modified Version" refers to any derivative made by adding to, deleting,
+or substituting -- in part or in whole -- any of the components of the
+Original Version, by changing formats or by porting the Font Software to a
+new environment.
+
+"Author" refers to any designer, engineer, programmer, technical
+writer or other person who contributed to the Font Software.
+
+PERMISSION & CONDITIONS
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of the Font Software, to use, study, copy, merge, embed, modify,
+redistribute, and sell modified and unmodified copies of the Font
+Software, subject to the following conditions:
+
+1) Neither the Font Software nor any of its individual components,
+in Original or Modified Versions, may be sold by itself.
+
+2) Original or Modified Versions of the Font Software may be bundled,
+redistributed and/or sold with any software, provided that each copy
+contains the above copyright notice and this license. These can be
+included either as stand-alone text files, human-readable headers or
+in the appropriate machine-readable metadata fields within text or
+binary files as long as those fields can be easily viewed by the user.
+
+3) No Modified Version of the Font Software may use the Reserved Font
+Name(s) unless explicit written permission is granted by the corresponding
+Copyright Holder. This restriction only applies to the primary font name as
+presented to the users.
+
+4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
+Software shall not be used to promote, endorse or advertise any
+Modified Version, except to acknowledge the contribution(s) of the
+Copyright Holder(s) and the Author(s) or with their explicit written
+permission.
+
+5) The Font Software, modified or unmodified, in part or in whole,
+must be distributed entirely under this license, and must not be
+distributed under any other license. The requirement for fonts to
+remain under this license does not apply to any document created
+using the Font Software.
+
+TERMINATION
+This license becomes null and void if any of the above conditions are
+not met.
+
+DISCLAIMER
+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
+COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
+DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
+OTHER DEALINGS IN THE FONT SOFTWARE.
diff --git a/docs/source/themes/mg/static/logo_docs.png b/docs/source/themes/mg/static/logo_docs.png
new file mode 100644
index 00000000..99f04cc7
--- /dev/null
+++ b/docs/source/themes/mg/static/logo_docs.png
Binary files differ
diff --git a/docs/source/themes/mg/static/mg.css b/docs/source/themes/mg/static/mg.css
new file mode 100644
index 00000000..96344df4
--- /dev/null
+++ b/docs/source/themes/mg/static/mg.css
@@ -0,0 +1,161 @@
+/*
+
+MediaGoblin theme - MediaGoblin-style Sphinx documentation theme
+
+Written in 2012 by Jef van Schendel <mail@jefvanschendel.nl>
+
+To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights to this software to the public domain worldwide. This software is distributed without any warranty.
+
+You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
+
+*/
+
+@import url("basic.css");
+
+/* text fonts and styles */
+
+@font-face {
+ font-family: 'Lato';
+ font-style: normal;
+ font-weight: 700;
+ src: local('Lato Bold'), local('Lato-Bold'), url('fonts/Lato-Bold.ttf') format('truetype');
+}
+@font-face {
+ font-family: 'Lato';
+ font-style: italic;
+ font-weight: 400;
+ src: local('Lato Italic'), local('Lato-Italic'), url('fonts/Lato-Italic.ttf') format('truetype');
+}
+@font-face {
+ font-family: 'Lato';
+ font-style: italic;
+ font-weight: 700;
+ src: local('Lato Bold Italic'), local('Lato-BoldItalic'), url('fonts/Lato-BoldItalic.ttf') format('truetype');
+}
+@font-face {
+ font-family: 'Lato';
+ font-style: normal;
+ font-weight: 400;
+ src: local('Lato Regular'), local('Lato-Regular'), url('fonts/Lato-Regular.ttf') format('truetype');
+}
+
+body {
+ font: 16px 'Lato',Helvetica,Arial,sans-serif;
+ background-color: #FCFCFC;
+ color: #3C3C3C;
+ margin: 0;
+ padding: 0;
+}
+
+h1, h2, h3, h4, h5, h6 {
+ border-bottom: 1px solid #CCCCCC;
+ background: none;
+ color: black;
+ font-weight: bold;
+ padding-bottom: 0.17em;
+ padding-top: 0.5em;
+}
+
+h1 {
+ font-size: 1.875em;
+}
+
+h2 {
+ font-size: 1.375em;
+}
+
+h3, h4, h5, h6 {
+ font-size: 1.125em;
+}
+
+p {
+ font-weight: normal;
+ margin: 0.4em 0 0.5em;
+}
+
+a {
+ color: #499776;
+}
+
+a:visited {
+ color: #2A5744;
+}
+
+a:active {
+ color: #65D1A3;
+}
+
+h1 a, h2 a, h3 a, h4 a, h5 a, h6 a {
+ text-decoration: none;
+}
+
+div.topic, pre {
+ background-color: #F1F1F1;
+ border: 1px dashed #ccc;
+ color: black;
+ line-height: 1.1em;
+ padding: 1em;
+}
+
+code, tt {
+ font: 14px monospace,"Courier New";
+ background-color: #FFFFDD;
+ border: thin solid #bbb;
+ padding-left: 5px;
+ padding-right: 5px;
+}
+
+pre {
+ font: 14px monospace,"Courier New";
+}
+
+div.related a, div.related a:visited, div.related a:active {
+ color: #86D4B1;
+}
+
+/* layout */
+
+div.documentwrapper {
+ float: left;
+ width: 100%;
+}
+
+div.bodywrapper {
+ margin: 0 0 0 270px;
+}
+
+div.body {
+ padding: 0 20px 30px 20px;
+}
+
+div.footer {
+ width: 100%;
+ padding: 9px 0 9px 0;
+ text-align: center;
+ font-size: 75%;
+}
+
+div.sphinxsidebar {
+ width: 240px;
+}
+
+div.sphinxsidebarwrapper {
+ padding: 10px 5px 0 30px;
+}
+
+div.sphinxsidebar ul {
+ margin: 10px 10px 10px 0;
+ padding: 0;
+}
+
+div.related {
+ line-height: 30px;
+ font-size: 90%;
+ width: 100%;
+ background-color: #161616;
+ color: #C3C3C3;
+}
+
+p.logo {
+ margin-top: 30px;
+}
diff --git a/docs/source/themes/mg/theme.conf b/docs/source/themes/mg/theme.conf
new file mode 100644
index 00000000..dd58038a
--- /dev/null
+++ b/docs/source/themes/mg/theme.conf
@@ -0,0 +1,5 @@
+[theme]
+inherit = basic
+stylesheet = mg.css
+pygments_style = sphinx
+