Statistics
| Branch: | Tag: | Revision:

root / docs / scale / i-cyclades.rst @ 73ebcd68

History | View | Annotate | Download (5.8 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
    PUBLIC_USE_POOL = True
46

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

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

    
56
    SECRET_ENCRYPTION_KEY= "oEs0pt7Di1mkxA0P6FiK"
57

    
58
    GANETI_CREATEINSTANCE_KWARGS = {
59
        'os': 'snf-image+default',
60
        'hvparams': {'serial_console': False},
61
        'wait_for_sync': False}
62

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

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

    
73
    TIMEOUT = 60 * 1000
74
    UI_UPDATE_INTERVAL = 2000
75
    FEEDBACK_CONTACTS = (
76
        ('feedback@example.com', 'feedback@example.com'),
77
    )
78
    UI_LOGIN_URL = "https://accounts.example.com/im/login"
79
    UI_LOGOUT_URL = "https://accounts.example.com/im/logout"
80
    UI_FLAVORS_DISK_TEMPLATES_INFO = {
81
        'rbd': {'name': 'Rbd',
82
               'description': 'Volumes residing inside a RADOS cluster'},
83

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

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

    
90
        'ext_vlmc': {'name': 'Tmp',
91
                    'description': 'Volatile storage'},
92
    }
93
    UI_SUPPORT_SSH_OS_LIST = ['debian', 'fedora', 'okeanos', 'ubuntu', 'kubuntu',
94
                              'centos', 'archlinux', 'gentoo']
95
    UI_SYSTEM_IMAGES_OWNERS = {
96
        'images@okeanos.io': 'system',
97
    }
98

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

    
102
    CYCLADES_ASTAKOS_SERVICE_TOKEN = "XXXXXXXXXX"
103

    
104
    UI_SYSTEM_IMAGES_OWNERS = {
105
        'admin@synnefo.gr': 'system',
106
        'images@synnefo.gr': 'system'
107
    }
108

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

    
112
.. code-block:: console
113

    
114
   snf-manage service-list
115

    
116

    
117
Restart services and initialize database:
118

    
119
.. code-block:: console
120

    
121
   # /etc/init.d/gunicorn restart
122
   # /etc/init.d/apache2 restart
123
   # snf-manage syncdb
124
   # snf-manage migrate --delete-ghost-migrations
125
   # snf-manage loaddata flavors
126

    
127
Enable dispatcher:
128

    
129
.. code-block:: console
130

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

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

    
136
.. code-block:: console
137

    
138
   # apt-get install snf-vncauthproxy
139

    
140
Edit `/etc/default/vncauthproxy`:
141

    
142
.. code-block:: console
143

    
144
   CHUID="www-data:nogroup"
145

    
146

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

    
151
.. code-block:: console
152

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

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

    
158
.. code-block:: console
159

    
160
   # snf-manage backend-list
161
   # snf-manage backend-modify --drained=False 1
162

    
163
Further assumptions:
164

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

    
170

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

    
173
 - MAC prefix Pool
174
 - Bridge Pool
175

    
176
.. code-block:: console
177

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

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

    
183
.. code-block:: console
184

    
185
   DEFAULT_MAC_FILTERED_BRIDGE = 'prv0'
186

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

    
190
.. code-block:: console
191

    
192
   # 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
193

    
194

    
195
Test your Setup:
196
++++++++++++++++
197

    
198
In cyclades node run:
199

    
200
.. code-block:: console
201

    
202
    snf-manage backend-list
203
    snf-manage network-list
204
    snf-manage server-list
205

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