Statistics
| Branch: | Tag: | Revision:

root / docs / scale / i-cyclades.rst @ be8c3784

History | View | Annotate | Download (5.5 kB)

1
.. _i-cyclades:
2

    
3
Synnefo
4
-------
5

    
6

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

    
22
Cyclades Setup
23
++++++++++++++
24

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

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

    
32
.. code-block:: console
33

    
34
    # apt-get install memcached
35
    # apt-get install python-memcache
36
    # apt-get install kamaki
37
    # apt-get install snf-pithos-backend
38
    # apt-get install snf-cyclades-app
39

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

    
42
.. code-block:: console
43

    
44
    MAX_CIDR_BLOCK = 21
45

    
46
    CPU_BAR_GRAPH_URL = 'https://cyclades.example.com/stats/%s/cpu-bar.png'
47
    CPU_TIMESERIES_GRAPH_URL = 'https://cyclades.example.com/stats/%s/cpu-ts.png'
48
    NET_BAR_GRAPH_URL = 'https://cyclades.example.com/stats/%s/net-bar.png'
49
    NET_TIMESERIES_GRAPH_URL = 'https://cyclades.example.com/stats/%s/net-ts.png'
50

    
51
    ASTAKOS_BASE_URL = 'https://accounts.example.synnefo.org/'
52

    
53
    SECRET_ENCRYPTION_KEY= "oEs0pt7Di1mkxA0P6FiK"
54

    
55
    GANETI_CREATEINSTANCE_KWARGS = {
56
        'os': 'snf-image+default',
57
        'hvparams': {'serial_console': False},
58
        'wait_for_sync': False}
59

    
60
    GANETI_USE_HOTPLUG = True
61
    CLOUDBAR_LOCATION = 'https://accounts.example.com/static/im/cloudbar/'
62
    CLOUDBAR_SERVICES_URL = 'https://accounts.example.com/ui/get_services'
63
    CLOUDBAR_MENU_URL = 'https://accounts.example.com/ui/get_menu'
64
    BACKEND_DB_CONNECTION = 'postgresql://synnefo:example_passw0rd@db.example.com:5432/snf_pithos'
65
    BACKEND_BLOCK_PATH = '/srv/pithos/data/'
66

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

    
69
    TIMEOUT = 60 * 1000
70
    UI_UPDATE_INTERVAL = 2000
71
    FEEDBACK_CONTACTS = (
72
        ('feedback@example.com', 'feedback@example.com'),
73
    )
74
    UI_FLAVORS_DISK_TEMPLATES_INFO = {
75
        'rbd': {'name': 'Rbd',
76
               'description': 'Volumes residing inside a RADOS cluster'},
77

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

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

    
84
        'ext_vlmc': {'name': 'Tmp',
85
                    'description': 'Volatile storage'},
86
    }
87
    UI_SUPPORT_SSH_OS_LIST = ['debian', 'fedora', 'okeanos', 'ubuntu', 'kubuntu',
88
                              'centos', 'archlinux', 'gentoo']
89
    UI_SYSTEM_IMAGES_OWNERS = {
90
        'images@okeanos.io': 'system',
91
    }
92

    
93
    CACHE_BACKEND = 'memcached://127.0.0.1:11211/'
94

    
95
    CYCLADES_SERVICE_TOKEN = "XXXXXXXXXX"
96

    
97
    UI_SYSTEM_IMAGES_OWNERS = {
98
        'admin@synnefo.gr': 'system',
99
        'images@synnefo.gr': 'system'
100
    }
101

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

    
105
.. code-block:: console
106

    
107
   snf-manage service-list
108

    
109

    
110
Restart services and initialize database:
111

    
112
.. code-block:: console
113

    
114
   # /etc/init.d/gunicorn restart
115
   # /etc/init.d/apache2 restart
116
   # snf-manage syncdb
117
   # snf-manage migrate --delete-ghost-migrations
118
   # snf-manage loaddata flavors
119

    
120
Enable dispatcher:
121

    
122
.. code-block:: console
123

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

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

    
129
.. code-block:: console
130

    
131
   # apt-get install snf-vncauthproxy
132

    
133
Edit `/etc/default/vncauthproxy`:
134

    
135
.. code-block:: console
136

    
137
   CHUID="www-data:nogroup"
138

    
139

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

    
144
.. code-block:: console
145

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

    
148
After 0.13 every backend added stays in drained mode (no VMs can be added).
149
Therefore get your backend ID (propably 1) and run:
150

    
151
.. code-block:: console
152

    
153
   # snf-manage backend-list
154
   # snf-manage backend-modify --drained=False 1
155

    
156
Further assumptions:
157

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

    
163

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

    
166
 - MAC prefix Pool
167
 - Bridge Pool
168

    
169
.. code-block:: console
170

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

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

    
176
.. code-block:: console
177

    
178
   DEFAULT_MAC_FILTERED_BRIDGE = 'prv0'
179

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

    
183
.. code-block:: console
184

    
185
   # snf-manage network-create --subnet=10.0.1.0/24 --gateway=10.0.1.1 --public --dhcp=True --flavor=CUSTOM --mode=bridged --link=br0 --name=Internet --backend-id=1
186

    
187

    
188
Test your Setup:
189
++++++++++++++++
190

    
191
In cyclades node run:
192

    
193
.. code-block:: console
194

    
195
    snf-manage backend-list
196
    snf-manage network-list
197
    snf-manage server-list
198

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