i-cms.rst 3.39 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14
.. _i-cms:

Synnefo
-------

:ref:`synnefo <i-synnefo>` ||
:ref:`ns <i-ns>` ||
:ref:`apt <i-apt>` ||
:ref:`mq <i-mq>` ||
:ref:`db <i-db>` ||
:ref:`gunicorn <i-gunicorn>` ||
:ref:`apache <i-apache>` ||
:ref:`webproject <i-webproject>` ||
:ref:`astakos <i-astakos>` ||
Dimitris Aragiorgis's avatar
Dimitris Aragiorgis committed
15
:ref:`qh <i-qh>` ||
16 17 18 19 20 21 22 23 24 25 26 27 28
cms ||
:ref:`pithos <i-pithos>` ||
:ref:`cyclades <i-cyclades>` ||
:ref:`kamaki <i-kamaki>` ||
:ref:`backends <i-backends>`

CMS Setup
+++++++++

The following apply to ``cms`` node. In the following sections
we will refer to its IP as ``cms.example.com`` . Before install make sure
you have db, apache and gunicorn setup already.

29 30
IMPORTANT: Currently cms cannot coexist with astakos, synnefo and pithos roles
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
31 32 33 34 35 36 37 38 39 40 41 42 43 44

First install the corresponding package:

.. code-block:: console

   # apt-get install snf-cloudcms


In `/etc/synnefo/cloudcms.conf` add:

.. code-block:: console

    CLOUDBAR_ACTIVE = True
    CLOUDBAR_LOCATION = 'https://accounts.example.com/static/im/cloudbar/'
45 46
    CLOUDBAR_SERVICES_URL = 'https://accounts.example.com/astakos/api/get_services'
    CLOUDBAR_MENU_URL = 'https://accounts.example.com/astakos/api/get_menu'
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132

    WEBPROJECT_SERVE_STATIC = True

Then restart the services and initialize database:

.. code-block:: console

    # /etc/init.d/gunicorn restart
    # /etc/init.d/apache2 restart
    # snf-manage syncdb
    # snf-manage migrate

Here we can load some initial data. Add in `/tmp/sites.json` :

.. code-block:: console

    [
        {
            "pk": 1,
            "model": "sites.site",
            "fields": {
                "domain": "okeanos.grnet.gr",
                "name": "okeanos.grnet.gr"
            }
        }
    ]


and in `/tmp/pages.json`:

.. code-block:: console

    [
        {
            "fields": {
                "_cached_url": "/",
                "_content_title": "",
                "_page_title": "",
                "active": true,
                "creation_date": "2012-11-16 14:52:19",
                "in_navigation": false,
                "language": "en",
                "level": 0,
                "lft": 1,
                "meta_description": "",
                "meta_keywords": "",
                "modification_date": "2012-11-16 14:52:19",
                "navigation_extension": null,
                "override_url": "/",
                "parent": null,
                "publication_date": "2012-11-16 14:50:00",
                "publication_end_date": null,
                "redirect_to": "",
                "rght": 2,
                "site": 1,
                "slug": "okeanos",
                "symlinked_page": null,
                "template_key": "twocolwide",
                "title": "Okeanos",
                "translation_of": null,
                "tree_id": 1
            },
            "model": "page.page",
            "pk": 1
        },
        {
            "fields": {
                "ordering": 0,
                "parent": 1,
                "region": "main",
                "text": "Welcome to Okeanos!!\r\n\r\n"
            },
            "model": "page.rawcontent",
            "pk": 1
        }
    ]



and finally run:

.. code-block:: console

    # snf-manage loaddata /tmp/sites.json
    # snf-manage loaddata /tmp/page.json
    # snf-manage createsuperuser --username=admin --email=admin@example --noinput
133 134 135 136


Test your Setup:
++++++++++++++++
Dimitris Aragiorgis's avatar
Dimitris Aragiorgis committed
137 138

Visit https://cms.example.com/