Statistics
| Branch: | Tag: | Revision:

root / docs / scale / i-astakos.rst @ cfb7dd4f

History | View | Annotate | Download (3.7 kB)

1
.. _i-astakos:
2

    
3
Synnefo
4
-------
5

    
6
:ref:`synnefo <i-synnefo>` ||
7
:ref:`ns <i-ns>` ||
8
:ref:`apt <i-apt>` ||
9
:ref:`mq <i-mq>` ||
10
:ref:`db <i-db>` ||
11
:ref:`gunicorn <i-gunicorn>` ||
12
:ref:`apache <i-apache>` ||
13
:ref:`webproject <i-webproject>` ||
14
astakos ||
15
:ref:`cms <i-cms>` ||
16
:ref:`pithos <i-pithos>` ||
17
:ref:`cyclades <i-cyclades>` ||
18
:ref:`kamaki <i-kamaki>` ||
19
:ref:`backends <i-backends>`
20

    
21
Astakos Setup
22
+++++++++++++
23

    
24
The following apply to ``astakos`` node. In the following sections
25
we will refer to its IP as ``accounts.example.com`` . Make sure
26
you have db, mq, apache and gunicorn setup already.
27

    
28
IMPORTANT: Currently if astakos coexists with cyclades/pithos roles, your setup is prone to csrf attacks.
29
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
30

    
31
First install the corresponding package:
32

    
33
.. code-block:: console
34

    
35
   # apt-get install snf-astakos-app
36

    
37
In `/etc/synnefo/astakos.conf` add:
38

    
39
.. code-block:: console
40

    
41
    CLOUDBAR_LOCATION = 'https://accounts.example.com/static/im/cloudbar/'
42
    CLOUDBAR_SERVICES_URL = 'https://accounts.example.com/im/get_services'
43
    CLOUDBAR_MENU_URL = 'https://accounts.example.com/im/get_menu'
44

    
45
    ASTAKOS_IM_MODULES = ['local']
46

    
47
    ASTAKOS_BASEURL = 'https://accounts.example.com'
48

    
49
    ASTAKOS_SITENAME = '~okeanos @ example.com'
50
    ASTAKOS_RECAPTCHA_PUBLIC_KEY = '6LeFidMSAAAAAM7Px7a96YQzsBcKYeXCI_sFz0Gk'
51
    ASTAKOS_RECAPTCHA_PRIVATE_KEY = '6LeFidMSAAAAAFv5U5NSayJJJhr0roludAidPd2M'
52

    
53
    ASTAKOS_RECAPTCHA_USE_SSL = True
54
    ASTAKOS_RECAPTCHA_ENABLED = True
55

    
56
    ASTAKOS_COOKIE_DOMAIN = 'example.com'
57

    
58
    ASTAKOS_LOGIN_MESSAGES = []
59
    ASTAKOS_SIGNUP_MESSAGES = []
60
    ASTAKOS_PROFILE_MESSAGES = []
61
    ASTAKOS_GLOBAL_MESSAGES = []
62

    
63
    ASTAKOS_PROFILE_EXTRA_LINKS = []
64

    
65
    EMAIL_BACKEND = 'django.core.mail.backends.dummy.EmailBackend'
66

    
67
If ``astakos`` is on the same node with ``cyclades`` or ``pithos``, add the following
68
line in `/etc/synnefo/astakos.conf` but please note that your setup will be prone to
69
csrf attacks:
70

    
71
.. code-block:: console
72

    
73
   MIDDLEWARE_CLASSES.remove('django.middleware.csrf.CsrfViewMiddleware')
74

    
75
Then initialize the Database and register services with:
76

    
77
.. code-block:: console
78

    
79
   # /etc/init.d/gunicorn restart
80
   # snf-manage syncdb --noinput
81
   # snf-manage migrate im --delete-ghost-migrations
82
   # snf-manage loaddata groups
83
   # snf-manage service-add "home" https://cms.example.com/ home-icon.png
84
   # snf-manage service-add "cyclades" https://cyclades.example.com/ui/
85
   # snf-manage service-add "pithos+" https://pithos.example.com/ui/
86
   # snf-manage astakos-init --load-service-resources
87
   # snf-manage quota --sync
88
   # /etc/init.d/gunicorn restart
89
   # /etc/init.d/apache2 restart
90

    
91
Please note that in case pithos and cyclades nodes are the same node, the pithos url
92
should be ``https://pithos.example.com/pithos/ui/`` .
93

    
94
Let's create our first user. Go at ``http://accounts.example.com/im/`` and
95
click the "CREATE ACCOUNT" button and fill all your data at the sign up form.
96
Then click "SUBMIT". You should now see a green box on the top, which informs
97
you that you made a successful request and the request has been sent to the
98
administrators. So far so good, let's assume that you created the user with
99
username ``user@example.com``.
100

    
101
Now we need to activate that user. Return to a command prompt aand run:
102

    
103
.. code-block:: console
104

    
105
   # snf-manage user-list
106
   # snf-manage user-modify --set-active 1
107

    
108
where 1 should be the id of the user you previously created.
109

    
110
All this can be done with one command:
111

    
112
.. code-block:: console
113

    
114
   # snf-manage user-add --password=12345 --active user@example.com Name LastName
115

    
116

    
117
Test your Setup:
118
++++++++++++++++
119

    
120
Visit ``http://accounts.example.com/im/`` and login with your credentials.