From 8efddbf2986524ad777b671af9935b44d009103e Mon Sep 17 00:00:00 2001 From: Christopher Allan Webber Date: Wed, 2 Nov 2011 09:09:35 -0500 Subject: 0.1.0, also in the docs file! ;) --- docs/source/conf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'docs/source') diff --git a/docs/source/conf.py b/docs/source/conf.py index 7ea3a340..eee9900f 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -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.1.0' # The full version, including alpha/beta/rc tags. -release = '0.0.5' +release = '0.1.0' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. -- cgit v1.2.3 From 99192f2452f75c0d8b0f04eefa0dd74f10e61e31 Mon Sep 17 00:00:00 2001 From: Christopher Allan Webber Date: Thu, 3 Nov 2011 09:41:48 -0500 Subject: Recommendation to install flup! --- docs/source/deploying.rst | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'docs/source') diff --git a/docs/source/deploying.rst b/docs/source/deploying.rst index 5f07a1d2..14665546 100644 --- a/docs/source/deploying.rst +++ b/docs/source/deploying.rst @@ -127,6 +127,11 @@ 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: :: -- cgit v1.2.3 From a5d50276b9fa26859766d4e4b52240f3d8f55896 Mon Sep 17 00:00:00 2001 From: Christopher Allan Webber Date: Thu, 3 Nov 2011 10:23:53 -0500 Subject: We left out a critical fastcgi variable from the nginx config --- docs/source/deploying.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'docs/source') diff --git a/docs/source/deploying.rst b/docs/source/deploying.rst index 14665546..61baddb8 100644 --- a/docs/source/deploying.rst +++ b/docs/source/deploying.rst @@ -213,6 +213,7 @@ this ``nginx.conf`` file should be modeled on the following: :: # Mounting MediaGoblin itself via fastcgi. location / { fastcgi_pass 127.0.0.1:26543; + fastcgi_param PATH_INFO $fastcgi_script_name; include /etc/nginx/fastcgi_params; } } -- cgit v1.2.3 From 996e9b4c4f6ad1ee8a03f5348a65895c88d040fe Mon Sep 17 00:00:00 2001 From: Christopher Allan Webber Date: Thu, 3 Nov 2011 10:27:39 -0500 Subject: Indentation was off by one ;) --- docs/source/deploying.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/source') diff --git a/docs/source/deploying.rst b/docs/source/deploying.rst index 61baddb8..cbdf9a4c 100644 --- a/docs/source/deploying.rst +++ b/docs/source/deploying.rst @@ -213,7 +213,7 @@ this ``nginx.conf`` file should be modeled on the following: :: # Mounting MediaGoblin itself via fastcgi. location / { fastcgi_pass 127.0.0.1:26543; - fastcgi_param PATH_INFO $fastcgi_script_name; + fastcgi_param PATH_INFO $fastcgi_script_name; include /etc/nginx/fastcgi_params; } } -- cgit v1.2.3 From 02e99c78cdb91d3dab52675d11f29bf834e4f6ca Mon Sep 17 00:00:00 2001 From: Christopher Allan Webber Date: Thu, 3 Nov 2011 10:59:47 -0500 Subject: A correct but compact set of instructions for fastcgi on nginx --- docs/source/deploying.rst | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'docs/source') diff --git a/docs/source/deploying.rst b/docs/source/deploying.rst index cbdf9a4c..fbe829af 100644 --- a/docs/source/deploying.rst +++ b/docs/source/deploying.rst @@ -213,8 +213,12 @@ this ``nginx.conf`` file should be modeled on the following: :: # Mounting MediaGoblin itself via fastcgi. location / { fastcgi_pass 127.0.0.1:26543; - fastcgi_param PATH_INFO $fastcgi_script_name; 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 ""; } } -- cgit v1.2.3 From baf03e9bf93483c474b5fcba379452071a8ae029 Mon Sep 17 00:00:00 2001 From: Christopher Allan Webber Date: Thu, 3 Nov 2011 17:10:39 -0500 Subject: Correcting the mediagoblin static/media aliases in the deployment guide --- docs/source/deploying.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'docs/source') diff --git a/docs/source/deploying.rst b/docs/source/deploying.rst index fbe829af..c2ba0c47 100644 --- a/docs/source/deploying.rst +++ b/docs/source/deploying.rst @@ -202,12 +202,12 @@ this ``nginx.conf`` file should be modeled on the following: :: # MediaGoblin's stock static files: CSS, JS, etc. location /mgoblin_static/ { - alias /srv/mediagoblin.example.org/mediagoblin/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/; + alias /srv/mediagoblin.example.org/mediagoblin/mediagoblin/user_dev/media/public/; } # Mounting MediaGoblin itself via fastcgi. -- cgit v1.2.3 From fc5695c538f2b6d230c0e431087e9c10e6deac6c Mon Sep 17 00:00:00 2001 From: Corey Farwell Date: Sat, 19 Nov 2011 10:43:31 -0800 Subject: incorrect path in nginx config --- docs/source/deploying.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/source') diff --git a/docs/source/deploying.rst b/docs/source/deploying.rst index c2ba0c47..b944a3d3 100644 --- a/docs/source/deploying.rst +++ b/docs/source/deploying.rst @@ -207,7 +207,7 @@ this ``nginx.conf`` file should be modeled on the following: :: # Instance specific media: location /mgoblin_media/ { - alias /srv/mediagoblin.example.org/mediagoblin/mediagoblin/user_dev/media/public/; + alias /srv/mediagoblin.example.org/mediagoblin/user_dev/media/public/; } # Mounting MediaGoblin itself via fastcgi. -- cgit v1.2.3 From b25b00d26e41158591822f5570c15f1baf2bc30b Mon Sep 17 00:00:00 2001 From: tycho garen Date: Sun, 4 Dec 2011 14:51:00 -0500 Subject: DOCS: update to deployment documentation and new production deployments doc --- docs/source/deploying.rst | 10 +++---- docs/source/production-deployments.rst | 48 ++++++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+), 5 deletions(-) create mode 100644 docs/source/production-deployments.rst (limited to 'docs/source') diff --git a/docs/source/deploying.rst b/docs/source/deploying.rst index b944a3d3..9c0acf30 100644 --- a/docs/source/deploying.rst +++ b/docs/source/deploying.rst @@ -244,7 +244,7 @@ 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 +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: :: @@ -252,13 +252,13 @@ 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 \ + --pid-file=/var/run/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. + deployments. However, for larger production deployments with larger + processing requirements, see the ":doc:`production-deployments`" + documentation. diff --git a/docs/source/production-deployments.rst b/docs/source/production-deployments.rst new file mode 100644 index 00000000..37251734 --- /dev/null +++ b/docs/source/production-deployments.rst @@ -0,0 +1,48 @@ +========================================= +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 Media +Goblin. + +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: + +1. 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. + +2. Processing with Celery ought to be operationally separate from the + MediaGoblin application itself, this simplifies management and + support better workload distribution. + +3. ... additional reason here. .... + +Build an :ref:`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 +------------------- + +TODO insert init script here + +Other Concerns +-------------- + +TODO What are they? + -- cgit v1.2.3 From 4752fdcf06764965d2f926d99f3831a968d8ea8d Mon Sep 17 00:00:00 2001 From: Christopher Allan Webber Date: Sun, 4 Dec 2011 15:27:00 -0600 Subject: Filled in reason #3 to submit separate out celery. --- docs/source/production-deployments.rst | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'docs/source') diff --git a/docs/source/production-deployments.rst b/docs/source/production-deployments.rst index 37251734..75acf9cf 100644 --- a/docs/source/production-deployments.rst +++ b/docs/source/production-deployments.rst @@ -23,7 +23,16 @@ deployments for several reasons: MediaGoblin application itself, this simplifies management and support better workload distribution. -3. ... additional reason here. .... +3. If your user submits something complex and it needs to process, + that's extra time your user has to sit around waiting when they + could get back immediately to doing things on the site. + Furthermore, if that processing step takes a long time, as it + certainly will for video, your user won't just be left waiting, + their connection will probably time out. + +Basically, if you're doing anything other than trivial images for a +small set of users (or something similarly trivial, like ascii art), +you want to switch over to doing a separate celery process. Build an :ref:`init script ` around the following command. -- cgit v1.2.3 From a085dda5d29a1353eaf7df3ddfc3a7c500af9186 Mon Sep 17 00:00:00 2001 From: tycho garen Date: Sun, 4 Dec 2011 17:06:54 -0500 Subject: DOCS:: #675 revision to deployment and production documents --- docs/source/deploying.rst | 25 ++-------- docs/source/index.rst | 1 + docs/source/production-deployments.rst | 83 ++++++++++++++++++++++------------ 3 files changed, 59 insertions(+), 50 deletions(-) (limited to 'docs/source') diff --git a/docs/source/deploying.rst b/docs/source/deploying.rst index 9c0acf30..70b1a6af 100644 --- a/docs/source/deploying.rst +++ b/docs/source/deploying.rst @@ -239,26 +239,9 @@ example: :: Visit the site you've set up in your browser by visiting . 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 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=/var/run/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, for larger production deployments with larger - processing requirements, see the ":doc:`production-deployments`" - documentation. + 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/index.rst b/docs/source/index.rst index e9f3993e..6ffe0974 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -14,6 +14,7 @@ Table of Contents: foreword about deploying + production-deployments configuration help theming diff --git a/docs/source/production-deployments.rst b/docs/source/production-deployments.rst index 75acf9cf..7bf26169 100644 --- a/docs/source/production-deployments.rst +++ b/docs/source/production-deployments.rst @@ -7,32 +7,54 @@ MediaGoblin in actual production environments. Consider ":doc:`deploying`" for a basic overview of how to deploy Media Goblin. -Celery ------- +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: -1. 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. +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. -2. Processing with Celery ought to be operationally separate from the - MediaGoblin application itself, this simplifies management and - support better workload distribution. - -3. If your user submits something complex and it needs to process, - that's extra time your user has to sit around waiting when they - could get back immediately to doing things on the site. - Furthermore, if that processing step takes a long time, as it - certainly will for video, your user won't just be left waiting, - their connection will probably time out. - -Basically, if you're doing anything other than trivial images for a -small set of users (or something similarly trivial, like ascii art), -you want to switch over to doing a separate celery process. +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 ` around the following command. @@ -46,12 +68,15 @@ processes. .. _init-script: Use an Init Script -------------------- - -TODO insert init script here - -Other Concerns --------------- - -TODO What are they? - +------------------ + +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 concernts ? + .. Other Concerns + .. -------------- -- cgit v1.2.3 From 438dd8cd8f79f32609cce15d70ef6a93f1531a3b Mon Sep 17 00:00:00 2001 From: Christopher Allan Webber Date: Mon, 12 Dec 2011 08:13:46 -0600 Subject: Add a note on how to up the upload size limit --- docs/source/deploying.rst | 3 +++ 1 file changed, 3 insertions(+) (limited to 'docs/source') diff --git a/docs/source/deploying.rst b/docs/source/deploying.rst index 70b1a6af..14b2c9cf 100644 --- a/docs/source/deploying.rst +++ b/docs/source/deploying.rst @@ -196,6 +196,9 @@ this ``nginx.conf`` file should be modeled on the following: :: # 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; -- cgit v1.2.3 From 076bf0cf28bae50dcd0f9e79e5c9e6501f1ad04a Mon Sep 17 00:00:00 2001 From: Will Kahn-Greene Date: Mon, 12 Dec 2011 10:20:05 -0500 Subject: Doc updates * fixed some language * fixed some consistency issues * fixed some 80-line-width issues * fixed some typos and markup problems --- docs/source/configuration.rst | 42 +++---- docs/source/deploying.rst | 195 +++++++++++++++++---------------- docs/source/foreword.rst | 8 +- docs/source/production-deployments.rst | 29 +++-- 4 files changed, 142 insertions(+), 132 deletions(-) (limited to 'docs/source') 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 `_ / `paste 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 14b2c9cf..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 `_ 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 `_ 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 `_ -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 +`_ 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,16 +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: :: +Assuming you are going to deploy with FastCGI, you should also install +flup:: - ./bin/easy_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 --------------------------- @@ -145,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. @@ -156,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 @@ -166,78 +173,78 @@ 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 - ##################################### - - # 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 ""; - } +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 . You should see MediaGoblin! 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/production-deployments.rst b/docs/source/production-deployments.rst index 7bf26169..ef0bcad6 100644 --- a/docs/source/production-deployments.rst +++ b/docs/source/production-deployments.rst @@ -4,8 +4,7 @@ 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 Media -Goblin. +":doc:`deploying`" for a basic overview of how to deploy MediaGoblin. Deploy with Paste ----------------- @@ -17,11 +16,11 @@ 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 \ + 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 @@ -31,11 +30,11 @@ 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 \ + 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 --------------- @@ -57,9 +56,9 @@ such as "ASCII art" or icon sharing, you will need to run ``celeryd`` as a separate process. Build an :ref:`init script ` around the following -command. +command:: - CELERY_CONFIG_MODULE=mediagoblin.init.celery.from_celery ./bin/celeryd + 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`` @@ -77,6 +76,6 @@ distribution/operating system. In the future, MediaGoblin will provide example scripts as examples. .. TODO insert init script here -.. TODO are additional concernts ? +.. TODO are additional concerns ? .. Other Concerns .. -------------- -- cgit v1.2.3 From 9bc2fc6c6a327a79ff5ad9d8f11f5b8f968154a6 Mon Sep 17 00:00:00 2001 From: Christopher Allan Webber Date: Mon, 12 Dec 2011 09:44:48 -0600 Subject: Added the "Media types" chapter --- docs/source/index.rst | 1 + docs/source/media-types.rst | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 docs/source/media-types.rst (limited to 'docs/source') diff --git a/docs/source/index.rst b/docs/source/index.rst index 6ffe0974..f9c9285d 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -16,6 +16,7 @@ Table of Contents: 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..809efe07 --- /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. -- cgit v1.2.3 From e91a4dcb738f28fe75d0387175e97dc16ea977fb Mon Sep 17 00:00:00 2001 From: Will Kahn-Greene Date: Mon, 12 Dec 2011 10:48:24 -0500 Subject: Tweak rest formatting --- docs/source/media-types.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'docs/source') diff --git a/docs/source/media-types.rst b/docs/source/media-types.rst index 809efe07..76478143 100644 --- a/docs/source/media-types.rst +++ b/docs/source/media-types.rst @@ -15,13 +15,13 @@ 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: +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: +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 -- cgit v1.2.3 From a46f645e7fc724547979ced22c8f9b7aa4ae0d51 Mon Sep 17 00:00:00 2001 From: Will Kahn-Greene Date: Mon, 12 Dec 2011 11:12:59 -0500 Subject: Fix doc footer This has the correct copyright statement. --- docs/source/_templates/mg_theme/layout.html | 39 --- .../_templates/mg_theme/static/default.css_t | 299 --------------------- docs/source/_templates/mg_theme/theme.conf | 31 --- docs/source/conf.py | 7 +- docs/source/themes/mg/layout.html | 29 ++ docs/source/themes/mg/theme.conf | 5 + 6 files changed, 38 insertions(+), 372 deletions(-) delete mode 100644 docs/source/_templates/mg_theme/layout.html delete mode 100644 docs/source/_templates/mg_theme/static/default.css_t delete mode 100644 docs/source/_templates/mg_theme/theme.conf create mode 100644 docs/source/themes/mg/layout.html create mode 100644 docs/source/themes/mg/theme.conf (limited to 'docs/source') 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 %} - - - -{%- 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 eee9900f..f4d194e6 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' @@ -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 # " v documentation". 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 %} + +{%- endblock %} diff --git a/docs/source/themes/mg/theme.conf b/docs/source/themes/mg/theme.conf new file mode 100644 index 00000000..f4fbd8cc --- /dev/null +++ b/docs/source/themes/mg/theme.conf @@ -0,0 +1,5 @@ +[theme] +inherit = default +stylesheet = default.css +pygments_style = sphinx + -- cgit v1.2.3 From 449f58e446ff50f9c84a99a123bd0225a4907f52 Mon Sep 17 00:00:00 2001 From: Will Kahn-Greene Date: Mon, 12 Dec 2011 11:41:29 -0500 Subject: Update version numbers --- docs/source/conf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'docs/source') diff --git a/docs/source/conf.py b/docs/source/conf.py index f4d194e6..829679b1 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -48,9 +48,9 @@ copyright = u'2011, Free Software Foundation, Inc and contributors' # built documents. # # The short X.Y version. -version = '0.1.0' +version = '0.2.0' # The full version, including alpha/beta/rc tags. -release = '0.1.0' +release = '0.2.0' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. -- cgit v1.2.3 From 6ae878e730e006ab674f12c581af8447a0994a9f Mon Sep 17 00:00:00 2001 From: Will Kahn-Greene Date: Mon, 12 Dec 2011 11:52:24 -0500 Subject: Changer version to -dev --- docs/source/conf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'docs/source') diff --git a/docs/source/conf.py b/docs/source/conf.py index 829679b1..dce254a1 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -48,9 +48,9 @@ copyright = u'2011, Free Software Foundation, Inc and contributors' # built documents. # # The short X.Y version. -version = '0.2.0' +version = '0.3.0' # The full version, including alpha/beta/rc tags. -release = '0.2.0' +release = '0.3.0-dev' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. -- cgit v1.2.3 From b957cba0cb9b6de33f9d50001a381ea94d9de57a Mon Sep 17 00:00:00 2001 From: Jef van Schendel Date: Fri, 6 Jan 2012 19:56:50 +0100 Subject: First push with new style (includes css file, logo image, fonts) --- docs/source/conf.py | 2 +- docs/source/themes/mg/static/fonts/Lato-Bold.ttf | Bin 0 -> 93224 bytes .../themes/mg/static/fonts/Lato-BoldItalic.ttf | Bin 0 -> 81936 bytes docs/source/themes/mg/static/fonts/Lato-Italic.ttf | Bin 0 -> 83680 bytes .../source/themes/mg/static/fonts/Lato-Regular.ttf | Bin 0 -> 96044 bytes docs/source/themes/mg/static/fonts/OFL_1.1.txt | 97 ++++++++++++++ docs/source/themes/mg/static/logo_docs.png | Bin 0 -> 6522 bytes docs/source/themes/mg/static/mg.css | 145 +++++++++++++++++++++ docs/source/themes/mg/theme.conf | 4 +- 9 files changed, 245 insertions(+), 3 deletions(-) create mode 100644 docs/source/themes/mg/static/fonts/Lato-Bold.ttf create mode 100644 docs/source/themes/mg/static/fonts/Lato-BoldItalic.ttf create mode 100644 docs/source/themes/mg/static/fonts/Lato-Italic.ttf create mode 100644 docs/source/themes/mg/static/fonts/Lato-Regular.ttf create mode 100644 docs/source/themes/mg/static/fonts/OFL_1.1.txt create mode 100644 docs/source/themes/mg/static/logo_docs.png create mode 100644 docs/source/themes/mg/static/mg.css (limited to 'docs/source') diff --git a/docs/source/conf.py b/docs/source/conf.py index dce254a1..3014e592 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -111,7 +111,7 @@ html_theme_path = ['themes'] # 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/themes/mg/static/fonts/Lato-Bold.ttf b/docs/source/themes/mg/static/fonts/Lato-Bold.ttf new file mode 100644 index 00000000..bc3529fc Binary files /dev/null and b/docs/source/themes/mg/static/fonts/Lato-Bold.ttf 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 Binary files /dev/null and b/docs/source/themes/mg/static/fonts/Lato-BoldItalic.ttf 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 Binary files /dev/null and b/docs/source/themes/mg/static/fonts/Lato-Italic.ttf 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 Binary files /dev/null and b/docs/source/themes/mg/static/fonts/Lato-Regular.ttf 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) , (), +with Reserved Font Name . +Copyright (c) , (), +with Reserved Font Name . +Copyright (c) , (). + +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..92879965 Binary files /dev/null and b/docs/source/themes/mg/static/logo_docs.png 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..3a0a1336 --- /dev/null +++ b/docs/source/themes/mg/static/mg.css @@ -0,0 +1,145 @@ +@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: 60px 0 0 230px; +} + +div.body { + padding: 0 20px 30px 20px; +} + +div.footer { + width: 100%; + padding: 9px 0 9px 0; + text-align: center; + font-size: 75%; +} + +div.sphinxsidebarwrapper { + padding: 10px 5px 0 20px; +} + +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-bottom: 20px; +} diff --git a/docs/source/themes/mg/theme.conf b/docs/source/themes/mg/theme.conf index f4fbd8cc..dd58038a 100644 --- a/docs/source/themes/mg/theme.conf +++ b/docs/source/themes/mg/theme.conf @@ -1,5 +1,5 @@ [theme] -inherit = default -stylesheet = default.css +inherit = basic +stylesheet = mg.css pygments_style = sphinx -- cgit v1.2.3 From 242509239fddf9ebb904dc9c174da522f3bdc8b7 Mon Sep 17 00:00:00 2001 From: Jef van Schendel Date: Fri, 6 Jan 2012 23:58:43 +0100 Subject: New docs logo, small css changes --- docs/source/themes/mg/static/logo_docs.png | Bin 6522 -> 6626 bytes docs/source/themes/mg/static/mg.css | 6 +++--- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'docs/source') diff --git a/docs/source/themes/mg/static/logo_docs.png b/docs/source/themes/mg/static/logo_docs.png index 92879965..99f04cc7 100644 Binary files a/docs/source/themes/mg/static/logo_docs.png and b/docs/source/themes/mg/static/logo_docs.png differ diff --git a/docs/source/themes/mg/static/mg.css b/docs/source/themes/mg/static/mg.css index 3a0a1336..3fa842cd 100644 --- a/docs/source/themes/mg/static/mg.css +++ b/docs/source/themes/mg/static/mg.css @@ -109,7 +109,7 @@ div.documentwrapper { } div.bodywrapper { - margin: 60px 0 0 230px; + margin: 0 0 0 270px; } div.body { @@ -124,7 +124,7 @@ div.footer { } div.sphinxsidebarwrapper { - padding: 10px 5px 0 20px; + padding: 10px 5px 0 30px; } div.sphinxsidebar ul { @@ -141,5 +141,5 @@ div.related { } p.logo { - margin-bottom: 20px; + margin-top: 30px; } -- cgit v1.2.3 From 0788e48c0ec4b0f32867d32e31ab6b204ee0df8e Mon Sep 17 00:00:00 2001 From: Jef van Schendel Date: Sat, 7 Jan 2012 00:04:38 +0100 Subject: Increase docs sidebar width --- docs/source/themes/mg/static/mg.css | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'docs/source') diff --git a/docs/source/themes/mg/static/mg.css b/docs/source/themes/mg/static/mg.css index 3fa842cd..b9355a5d 100644 --- a/docs/source/themes/mg/static/mg.css +++ b/docs/source/themes/mg/static/mg.css @@ -123,6 +123,10 @@ div.footer { font-size: 75%; } +div.sphinxsidebar { + width: 240px; +} + div.sphinxsidebarwrapper { padding: 10px 5px 0 30px; } -- cgit v1.2.3 From 20659de2344ccb8d14f8deaeaf9628d84a966e5a Mon Sep 17 00:00:00 2001 From: Jef van Schendel Date: Fri, 13 Jan 2012 17:38:20 +0100 Subject: Add CC0 license header to Sphinx MediaGoblin theme (mg.css) --- docs/source/themes/mg/static/mg.css | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'docs/source') diff --git a/docs/source/themes/mg/static/mg.css b/docs/source/themes/mg/static/mg.css index b9355a5d..96344df4 100644 --- a/docs/source/themes/mg/static/mg.css +++ b/docs/source/themes/mg/static/mg.css @@ -1,3 +1,15 @@ +/* + +MediaGoblin theme - MediaGoblin-style Sphinx documentation theme + +Written in 2012 by Jef van Schendel + +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 . + +*/ + @import url("basic.css"); /* text fonts and styles */ -- cgit v1.2.3