1 .. snf-cloudcms documentation master file, created by
2 sphinx-quickstart on Wed Feb 22 18:07:30 2012.
3 You can adapt this file completely to your liking, but it should at least
4 contain the root `toctree` directive.
6 Welcome to snf-cloudcms's documentation!
7 ========================================
12 snf-cloudcms is a cms application based on `django`_ and `feincms`_.
14 The project created to power websites that provide information about the
15 `cloud services`_ deployed by `GRNET`_.
17 Currentrly the application provides the following features:
19 * basic cms funcionality (adding/removing/editing hierarchical pages)
22 in the near future the following additional features will get included
23 within the application:
25 * Service resources management (presentations, technical papaer, white papers
27 * Service support (faq, userguide, service tickets etc.)
29 .. _django: http://www.djangoproject.com
30 .. _feincms: http://feinheit.ch/media/labs/feincms/
31 .. _cloud services: http://docs.dev.grnet.gr/
32 .. _GRNET: http://www.grnet.gr/
41 Although not required it is recommended to use `snf-webproject`_ to deploy the
42 cms application. If you want to deploy using your custom django project take
43 a look on `cloudcms/synnefo_settings.py`_ file which includes `snf-webproject`
44 hooks to find which django settings are required for cms to work.
46 .. _snf-webproject: http://docs.dev.grnet.gr/snf-webproject
48 Install required packages::
50 apt-get install snf-common snf-webproject
51 apt-get install python-django-feincms python-django-pagination python-django
55 ``python-django-feincms`` and ``python-django-pagination`` are not provided
56 currently on debian stable but can be backported from sid.
58 then, install ``snf-cloudcms`` package::
60 apt-get install snf-cloudcms
62 Change settings in ``/etc/synnefo/20-snf-cloudcms-*.conf`` to match your
69 For information on how to configure and initialize database and serve
70 ``snf-cloudcms`` static files please refer to `snf-webproject`_ documentation.
74 ``snf-cloudcms`` won't work with ``snf-webproject < 0.9.0``
77 ``snf-cloudcms`` uses the django sites framework so that multiple cms sites
78 can be deployed from the same django project and share common content. For each
79 service site you want to deploy you should set the appropriate
80 ``CLOUDCMS_SITE_ID`` environmental variable to match the site id added in your
83 A quick way to initialize the sites you want to deploy is to create a simple
84 fixtures file ``mysites.json`` containing the following::
89 "model": "sites.site",
91 "domain": "okeanos.grnet.gr",
92 "name": "okeanos.grnet.gr"
97 and load the fixtures in your db using::
99 snf-manage loaddata ./mysites.json
101 After that you can deploy each of the sites you included in the above fixtures
102 file using your prefered deployment method (fcgi, gunicorn etc.).
104 e.g. using django internal http server::
106 export CLOUDCMS_SITE_ID=1
109 If you skipped superuser creation as prompted on your database initialization
110 step, you should create one now::
112 snf-manage createsuperuser
114 Now you will be able to login using the superuser credentials you provided on
115 the above command on ``http://<deployment-domain>/cmsmanage/`` url and start
116 editing the content of your cms.
122 snf-cloudcms requires the following static files to be served by your django
125 * feincms static files for the admin interface
126 * django.contrib.admin static files
127 * snf-cloudcms static files
129 If you are using `snf-webproject`_ to deploy your cms all static file handlers
130 should be taken care for you and no additional steps required in the deployment
131 process. This automatic behaviour can be enabled/disabled from the
132 ``WEBPROJECT_SERVE_STATIC`` setting.
134 If you want to disable serving static files from your django project, set
135 ``WEBPROJECT_SERVE_STATIC`` to False in your settings and configure your
136 web server to serve static files of the following locations to the specific
137 urls which can be altered in your settings files:
139 * <feincms install dir>/feincms/static/ -> FEINCMS_ADMIN_MEDIA (default:/static/feincms/)
140 * <django install dir>/django/contrib/admin/media/ -> ADMIN_MEDIA_PREFIX (default:/static/djangoadminmedia/)
141 * <cloudcms install dir>/cloudcms/static/ -> MEDIA_URL (default:/static/)
147 snf-cloudcms uses feincms medialibrary application to store and display
148 files in cms pages. The location of those files is based on MEDIA_ROOT setting
149 and is calculated using the following expression::
151 MEDIA_ROOT + '/medialibrary/'
153 if you deploy using `snf-webproject`_ this defaults to
154 ``/usr/share/synnefo/static/medialibrary`` which you should create and grant
155 appropriate permissions for web app to be able to access it. e.g. if you deploy
156 using nginx/gunicorn and your gunicorn workers run with www-data user
159 mkdir /usr/share/synnefo/static/medialibrary
160 chown www-data:www-data /usr/share/synnefo/static/medialibrary
161 chmod o+rw /usr/share/synnefo/sattic/medialibrary