Statistics
| Branch: | Tag: | Revision:

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

History | View | Annotate | Download (5.6 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
    ASTAKOS_BASE_URL = 'https://accounts.example.synnefo.org/'
53

    
54
    SECRET_ENCRYPTION_KEY= "oEs0pt7Di1mkxA0P6FiK"
55

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

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

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

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

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

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

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

    
96
    CACHE_BACKEND = 'memcached://127.0.0.1:11211/'
97

    
98
    CYCLADES_SERVICE_TOKEN = "XXXXXXXXXX"
99

    
100
    UI_SYSTEM_IMAGES_OWNERS = {
101
        'admin@synnefo.gr': 'system',
102
        'images@synnefo.gr': 'system'
103
    }
104

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

    
108
.. code-block:: console
109

    
110
   snf-manage service-list
111

    
112

    
113
Restart services and initialize database:
114

    
115
.. code-block:: console
116

    
117
   # /etc/init.d/gunicorn restart
118
   # /etc/init.d/apache2 restart
119
   # snf-manage syncdb
120
   # snf-manage migrate --delete-ghost-migrations
121
   # snf-manage loaddata flavors
122

    
123
Enable dispatcher:
124

    
125
.. code-block:: console
126

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

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

    
132
.. code-block:: console
133

    
134
   # apt-get install snf-vncauthproxy
135

    
136
Edit `/etc/default/vncauthproxy`:
137

    
138
.. code-block:: console
139

    
140
   CHUID="www-data:nogroup"
141

    
142

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

    
147
.. code-block:: console
148

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

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

    
154
.. code-block:: console
155

    
156
   # snf-manage backend-list
157
   # snf-manage backend-modify --drained=False 1
158

    
159
Further assumptions:
160

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

    
166

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

    
169
 - MAC prefix Pool
170
 - Bridge Pool
171

    
172
.. code-block:: console
173

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

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

    
179
.. code-block:: console
180

    
181
   DEFAULT_MAC_FILTERED_BRIDGE = 'prv0'
182

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

    
186
.. code-block:: console
187

    
188
   # 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
189

    
190

    
191
Test your Setup:
192
++++++++++++++++
193

    
194
In cyclades node run:
195

    
196
.. code-block:: console
197

    
198
    snf-manage backend-list
199
    snf-manage network-list
200
    snf-manage server-list
201

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