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

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
16
:ref:`qh <i-qh>` ||
17
18
19
20
21
22
23
24
25
26
27
28
29
:ref:`cms <i-cms>` ||
:ref:`pithos <i-pithos>` ||
cyclades ||
:ref:`kamaki <i-kamaki>` ||
:ref:`backends <i-backends>`

Cyclades Setup
++++++++++++++

The following apply to ``cyclades`` node. In the rest of the sections
we will refer to its IP with FQDN ``cyclades.example.com``.Please make sure you have
db, mq, gunicorn, apache, webproject, pithos and astakos already setup.

30
31
Install the corresponding package. Please note that memcache is needed for
versions >= 0.13 :
32
33
34

.. code-block:: console

35
36
    # apt-get install memcached
    # apt-get install python-memcache
Dimitris Aragiorgis's avatar
Dimitris Aragiorgis committed
37
38
    # apt-get install kamaki
    # apt-get install snf-pithos-backend
39
40
41
42
43
44
45
46
47
    # apt-get install snf-cyclades-app

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

.. code-block:: console

    MAX_CIDR_BLOCK = 21
    PUBLIC_USE_POOL = True

Dimitris Aragiorgis's avatar
Dimitris Aragiorgis committed
48
49
50
51
52
    CPU_BAR_GRAPH_URL = 'https://cyclades.example.com/stats/%s/cpu-bar.png'
    CPU_TIMESERIES_GRAPH_URL = 'https://cyclades.example.com/stats/%s/cpu-ts.png'
    NET_BAR_GRAPH_URL = 'https://cyclades.example.com/stats/%s/net-bar.png'
    NET_TIMESERIES_GRAPH_URL = 'https://cyclades.example.com/stats/%s/net-ts.png'

53
54
    GANETI_DISK_TEMPLATES = ('blockdev', 'diskless', 'drbd', 'file', 'plain',
                             'rbd',  'sharedfile', 'ext')
55
    ASTAKOS_URL = 'https://accounts.example.com/'
56
57
58
59
60

    SECRET_ENCRYPTION_KEY= "oEs0pt7Di1mkxA0P6FiK"

    GANETI_CREATEINSTANCE_KWARGS = {
        'os': 'snf-image+default',
61
        'hvparams': {'serial_console': False},
62
63
64
65
66
67
68
69
70
71
72
73
        'wait_for_sync': False}

    GANETI_USE_HOTPLUG = True
    CLOUDBAR_LOCATION = 'https://accounts.example.com/static/im/cloudbar/'
    CLOUDBAR_ACTIVE_SERVICE = '2'
    CLOUDBAR_SERVICES_URL = 'https://accounts.example.com/im/get_services'
    CLOUDBAR_MENU_URL = 'https://accounts.example.com/im/get_menu'
    BACKEND_DB_CONNECTION = 'postgresql://synnefo:example_passw0rd@db.example.com:5432/snf_pithos'
    BACKEND_BLOCK_PATH = '/srv/pithos/data/'

    AMQP_HOSTS = ["amqp://synnefo:example_rabbitmq_passw0rd@mq.example.com:5672"]

Dimitris Aragiorgis's avatar
Dimitris Aragiorgis committed
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
    TIMEOUT = 60 * 1000
    UI_UPDATE_INTERVAL = 2000
    FEEDBACK_CONTACTS = (
        ('feedback@example.com', 'feedback@example.com'),
    )
    UI_LOGIN_URL = "https://accounts.example.com/im/login"
    UI_LOGOUT_URL = "https://accounts.example.com/im/logout"
    UI_FLAVORS_DISK_TEMPLATES_INFO = {
        'rbd': {'name': 'Rbd',
               'description': 'Volumes residing inside a RADOS cluster'},

        'plain': {'name': 'Local',
                 'description': 'Fast, not high available local storage (LVM)'},

        'drbd': {'name': 'Standard',
                 'description': 'High available persistent storage (DRBD)'},

        'ext_vlmc': {'name': 'Tmp',
                    'description': 'Volatile storage'},
    }
    UI_SUPPORT_SSH_OS_LIST = ['debian', 'fedora', 'okeanos', 'ubuntu', 'kubuntu',
                              'centos', 'archlinux', 'gentoo']
    UI_SYSTEM_IMAGES_OWNERS = {
        'images@okeanos.io': 'system',
    }

100
101
102
    CACHE_BACKEND = 'memcached://127.0.0.1:11211/'
    VMAPI_BASE_URL = 'https://cyclades.example.com/'

Dimitris Aragiorgis's avatar
Dimitris Aragiorgis committed
103
104
105
106
107
108
109
110
111
112
113
114
115
116
    CYCLADES_ASTAKOS_SERVICE_TOKEN = "XXXXXXXXXX"

    UI_SYSTEM_IMAGES_OWNERS = {
        'admin@synnefo.gr': 'system',
        'images@synnefo.gr': 'system'
    }

XXXXXXXX is the token for cyclades registered service and can be found
in astakos node running:

.. code-block:: console

   snf-manage service-list

117
118
119
120
121
122
123
124

Restart services and initialize database:

.. code-block:: console

   # /etc/init.d/gunicorn restart
   # /etc/init.d/apache2 restart
   # snf-manage syncdb
Dimitris Aragiorgis's avatar
Dimitris Aragiorgis committed
125
   # snf-manage migrate --delete-ghost-migrations
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
   # snf-manage loaddata flavors

Enable dispatcher:

.. code-block:: console

   # sed -i 's/false/true/' /etc/default/snf-dispatcher
   # /etc/init.d/snf-dispatcher start

In order end-user to have access to the VM's console:

.. code-block:: console

   # apt-get install snf-vncauthproxy

Edit `/etc/default/vncauthproxy`:

.. code-block:: console

   CHUID="www-data:nogroup"


At this point you should setup a :ref:`backend <i-backends>`. Please refer to the
coresponding section.  Here we assume that at least one backend is up and running,
so we can add it in Cyclades with:

.. code-block:: console

   # snf-manage backend-add --clustername=ganeti.example.com --user=synnefo --pass=example_rapi_passw0rd

156
157
158
159
160
161
162
163
After 0.13 every backend added stays in drained mode (no VMs can be added).
Therefore get your backend ID (propably 1) and run:

.. code-block:: console

   # snf-manage backend-list
   # snf-manage backend-modify --drained=False 1

164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
Further assumptions:

- Preprovisioned Bridges: ``br0``, ``prv0``, ``prv1..prv20``
- Available "public" Subnet: ``10.0.1.0/24``
- Available "public" Gateway: ``10.0.1.1``
- Connectivity link for public network: ``br0``


Here admin has to define two different resource pools in Synnefo:

 - MAC prefix Pool
 - Bridge Pool

.. code-block:: console

   # snf-manage pool-create --type=mac-prefix --base=aa:00:0 --size=65536
   # snf-manage pool-create --type=bridge --base=prv --size=20

Add the synnefo setting in :file:`/etc/synnefo/cyclades.conf`:

.. code-block:: console

Dimitris Aragiorgis's avatar
Dimitris Aragiorgis committed
186
   DEFAULT_MAC_FILTERED_BRIDGE = 'prv0'
187
188
189
190
191
192
193

Add public network where the VM's will eventually connect to in order to
access Internet:

.. code-block:: console

   # snf-manage network-create --subnet=10.0.1.0/24 --gateway=10.0.1.1 --public --dhcp --flavor=CUSTOM --mode=bridged --link=br0 --name=Internet --backend-id=1
194
195
196
197


Test your Setup:
++++++++++++++++
Dimitris Aragiorgis's avatar
Dimitris Aragiorgis committed
198
199
200
201
202
203
204
205
206
207
208

In cyclades node run:

.. code-block:: console

    snf-manage backend-list
    snf-manage network-list
    snf-manage server-list

Visit https://cyclades.example.com/ui/ and create a VM or network.