Statistics
| Branch: | Tag: | Revision:

root / docs / scale / i-astakos.rst @ 64242f0a

History | View | Annotate | Download (4.4 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
    ASTAKOS_INVITATION_EMAIL_SUBJECT = 'Invitation to %s' % ASTAKOS_SITENAME
65
    ASTAKOS_GREETING_EMAIL_SUBJECT = 'Welcome to %s' % ASTAKOS_SITENAME
66
    ASTAKOS_FEEDBACK_EMAIL_SUBJECT = 'Feedback from %s' % ASTAKOS_SITENAME
67
    ASTAKOS_VERIFICATION_EMAIL_SUBJECT = '%s account activation is needed' % ASTAKOS_SITENAME
68
    ASTAKOS_ADMIN_NOTIFICATION_EMAIL_SUBJECT = '%s account created (%%(user)s)' % ASTAKOS_SITENAME
69
    ASTAKOS_HELPDESK_NOTIFICATION_EMAIL_SUBJECT = '%s account activated (%%(user)s)' % ASTAKOS_SITENAME
70
    ASTAKOS_EMAIL_CHANGE_EMAIL_SUBJECT = 'Email change on %s' % ASTAKOS_SITENAME
71
    ASTAKOS_PASSWORD_RESET_EMAIL_SUBJECT = 'Password reset on %s' % ASTAKOS_SITENAME
72

    
73
    EMAIL_BACKEND = 'django.core.mail.backends.dummy.EmailBackend'
74

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

    
79
.. code-block:: console
80

    
81
   MIDDLEWARE_CLASSES.remove('django.middleware.csrf.CsrfViewMiddleware')
82

    
83
Then initialize the Database and register services with:
84

    
85
.. code-block:: console
86

    
87
   # /etc/init.d/gunicorn restart
88
   # snf-manage syncdb --noinput
89
   # snf-manage migrate im --delete-ghost-migrations
90
   # snf-manage loaddata groups
91
   # snf-manage service-add "home" https://cms.example.com/ home-icon.png
92
   # snf-manage service-add "cyclades" https://cyclades.example.com/ui/
93
   # snf-manage service-add "pithos+" https://pithos.example.com/ui/
94
   # snf-manage astakos-init --load-service-resources
95
   # snf-manage quota --sync
96
   # /etc/init.d/gunicorn restart
97
   # /etc/init.d/apache2 restart
98

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

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

    
109
Now we need to activate that user. Return to a command prompt aand run:
110

    
111
.. code-block:: console
112

    
113
   # snf-manage user-list
114
   # snf-manage user-modify --set-active 1
115

    
116
where 1 should be the id of the user you previously created.
117

    
118
All this can be done with one command:
119

    
120
.. code-block:: console
121

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

    
124

    
125
Test your Setup:
126
++++++++++++++++
127

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