Statistics
| Branch: | Tag: | Revision:

root / docs / scale / i-cyclades.rst @ 4ab620b6

History | View | Annotate | Download (6.2 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
    CYCLADES_USER_CATALOG_URL = 'https://accounts.example.com/user_catalogs'
117

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

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

    
126
.. code-block:: console
127

    
128
   snf-manage service-list
129

    
130

    
131
Restart services and initialize database:
132

    
133
.. code-block:: console
134

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

    
141
Enable dispatcher:
142

    
143
.. code-block:: console
144

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

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

    
150
.. code-block:: console
151

    
152
   # apt-get install snf-vncauthproxy
153

    
154
Edit `/etc/default/vncauthproxy`:
155

    
156
.. code-block:: console
157

    
158
   CHUID="www-data:nogroup"
159

    
160

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

    
165
.. code-block:: console
166

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

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

    
172
.. code-block:: console
173

    
174
   # snf-manage backend-list
175
   # snf-manage backend-modify --drained=False 1
176

    
177
Further assumptions:
178

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

    
184

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

    
187
 - MAC prefix Pool
188
 - Bridge Pool
189

    
190
.. code-block:: console
191

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

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

    
197
.. code-block:: console
198

    
199
   DEFAULT_MAC_FILTERED_BRIDGE = 'prv0'
200

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

    
204
.. code-block:: console
205

    
206
   # 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
207

    
208

    
209
Test your Setup:
210
++++++++++++++++
211

    
212
In cyclades node run:
213

    
214
.. code-block:: console
215

    
216
    snf-manage backend-list
217
    snf-manage network-list
218
    snf-manage server-list
219

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