Statistics
| Branch: | Tag: | Revision:

root / docs / scale / i-cyclades.rst @ 6e27e449

History | View | Annotate | Download (6.1 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:`qh <i-qh>` ||
17
:ref:`cms <i-cms>` ||
18
:ref:`pithos <i-pithos>` ||
19
cyclades ||
20
:ref:`kamaki <i-kamaki>` ||
21
:ref:`backends <i-backends>`
22

    
23
Cyclades Setup
24
++++++++++++++
25

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

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

    
33
.. code-block:: console
34

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

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

    
43
.. code-block:: console
44

    
45
    MAX_CIDR_BLOCK = 21
46
    PUBLIC_USE_POOL = True
47

    
48
    MAX_VMS_PER_USER = 5
49
    VMS_USER_QUOTA = {
50
        'user@example.com': 20,
51
    }
52
    MAX_NETWORKS_PER_USER = 3
53
    NETWORKS_USER_QUOTA = { 'user@example.com': 10 }
54

    
55
    CPU_BAR_GRAPH_URL = 'https://cyclades.example.com/stats/%s/cpu-bar.png'
56
    CPU_TIMESERIES_GRAPH_URL = 'https://cyclades.example.com/stats/%s/cpu-ts.png'
57
    NET_BAR_GRAPH_URL = 'https://cyclades.example.com/stats/%s/net-bar.png'
58
    NET_TIMESERIES_GRAPH_URL = 'https://cyclades.example.com/stats/%s/net-ts.png'
59

    
60
    GANETI_DISK_TEMPLATES = ('blockdev', 'diskless', 'drbd', 'file', 'plain',
61
                             'rbd',  'sharedfile', 'ext')
62
    ASTAKOS_URL = 'https://accounts.example.com/'
63

    
64
    SECRET_ENCRYPTION_KEY= "oEs0pt7Di1mkxA0P6FiK"
65

    
66
    GANETI_CREATEINSTANCE_KWARGS = {
67
        'os': 'snf-image+default',
68
        'hvparams': {'serial_console': False},
69
        'wait_for_sync': False}
70

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

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

    
81
    TIMEOUT = 60 * 1000
82
    UI_UPDATE_INTERVAL = 2000
83
    FEEDBACK_CONTACTS = (
84
        ('feedback@example.com', 'feedback@example.com'),
85
    )
86
    UI_LOGIN_URL = "https://accounts.example.com/im/login"
87
    UI_LOGOUT_URL = "https://accounts.example.com/im/logout"
88
    UI_FLAVORS_DISK_TEMPLATES_INFO = {
89
        'rbd': {'name': 'Rbd',
90
               'description': 'Volumes residing inside a RADOS cluster'},
91

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

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

    
98
        'ext_vlmc': {'name': 'Tmp',
99
                    'description': 'Volatile storage'},
100
    }
101
    UI_SUPPORT_SSH_OS_LIST = ['debian', 'fedora', 'okeanos', 'ubuntu', 'kubuntu',
102
                              'centos', 'archlinux', 'gentoo']
103
    UI_SYSTEM_IMAGES_OWNERS = {
104
        'images@okeanos.io': 'system',
105
    }
106

    
107
    CACHE_BACKEND = 'memcached://127.0.0.1:11211/'
108
    VMAPI_BASE_URL = 'https://cyclades.example.com/'
109

    
110
    CYCLADES_QUOTAHOLDER_TOKEN = '1234'
111
    CYCLADES_QUOTAHOLDER_URL = 'https://qh.example.com/quotaholder/v'
112
    CYCLADES_USE_QUOTAHOLDER = True
113

    
114
    CYCLADES_ASTAKOS_SERVICE_TOKEN = "XXXXXXXXXX"
115

    
116
    UI_SYSTEM_IMAGES_OWNERS = {
117
        'admin@synnefo.gr': 'system',
118
        'images@synnefo.gr': 'system'
119
    }
120

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

    
124
.. code-block:: console
125

    
126
   snf-manage service-list
127

    
128

    
129
Restart services and initialize database:
130

    
131
.. code-block:: console
132

    
133
   # /etc/init.d/gunicorn restart
134
   # /etc/init.d/apache2 restart
135
   # snf-manage syncdb
136
   # snf-manage migrate --delete-ghost-migrations
137
   # snf-manage loaddata flavors
138

    
139
Enable dispatcher:
140

    
141
.. code-block:: console
142

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

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

    
148
.. code-block:: console
149

    
150
   # apt-get install snf-vncauthproxy
151

    
152
Edit `/etc/default/vncauthproxy`:
153

    
154
.. code-block:: console
155

    
156
   CHUID="www-data:nogroup"
157

    
158

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

    
163
.. code-block:: console
164

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

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

    
170
.. code-block:: console
171

    
172
   # snf-manage backend-list
173
   # snf-manage backend-modify --drained=False 1
174

    
175
Further assumptions:
176

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

    
182

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

    
185
 - MAC prefix Pool
186
 - Bridge Pool
187

    
188
.. code-block:: console
189

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

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

    
195
.. code-block:: console
196

    
197
   DEFAULT_MAC_FILTERED_BRIDGE = 'prv0'
198

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

    
202
.. code-block:: console
203

    
204
   # 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
205

    
206

    
207
Test your Setup:
208
++++++++++++++++
209

    
210
In cyclades node run:
211

    
212
.. code-block:: console
213

    
214
    snf-manage backend-list
215
    snf-manage network-list
216
    snf-manage server-list
217

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