root / docs / scale / i-cyclades.rst @ 58350a50
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:`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 |
CPU_BAR_GRAPH_URL = 'https://cyclades.example.com/stats/%s/cpu-bar.png' |
49 |
CPU_TIMESERIES_GRAPH_URL = 'https://cyclades.example.com/stats/%s/cpu-ts.png' |
50 |
NET_BAR_GRAPH_URL = 'https://cyclades.example.com/stats/%s/net-bar.png' |
51 |
NET_TIMESERIES_GRAPH_URL = 'https://cyclades.example.com/stats/%s/net-ts.png' |
52 |
|
53 |
GANETI_DISK_TEMPLATES = ('blockdev', 'diskless', 'drbd', 'file', 'plain', |
54 |
'rbd', 'sharedfile', 'ext') |
55 |
ASTAKOS_URL = 'https://accounts.example.com/' |
56 |
|
57 |
SECRET_ENCRYPTION_KEY= "oEs0pt7Di1mkxA0P6FiK" |
58 |
|
59 |
GANETI_CREATEINSTANCE_KWARGS = { |
60 |
'os': 'snf-image+default', |
61 |
'hvparams': {'serial_console': False}, |
62 |
'wait_for_sync': False} |
63 |
|
64 |
GANETI_USE_HOTPLUG = True |
65 |
CLOUDBAR_LOCATION = 'https://accounts.example.com/static/im/cloudbar/' |
66 |
CLOUDBAR_ACTIVE_SERVICE = '2' |
67 |
CLOUDBAR_SERVICES_URL = 'https://accounts.example.com/im/get_services' |
68 |
CLOUDBAR_MENU_URL = 'https://accounts.example.com/im/get_menu' |
69 |
BACKEND_DB_CONNECTION = 'postgresql://synnefo:example_passw0rd@db.example.com:5432/snf_pithos' |
70 |
BACKEND_BLOCK_PATH = '/srv/pithos/data/' |
71 |
|
72 |
AMQP_HOSTS = ["amqp://synnefo:example_rabbitmq_passw0rd@mq.example.com:5672"] |
73 |
|
74 |
TIMEOUT = 60 * 1000 |
75 |
UI_UPDATE_INTERVAL = 2000 |
76 |
FEEDBACK_CONTACTS = ( |
77 |
('feedback@example.com', 'feedback@example.com'), |
78 |
) |
79 |
UI_LOGIN_URL = "https://accounts.example.com/im/login" |
80 |
UI_LOGOUT_URL = "https://accounts.example.com/im/logout" |
81 |
UI_FLAVORS_DISK_TEMPLATES_INFO = { |
82 |
'rbd': {'name': 'Rbd', |
83 |
'description': 'Volumes residing inside a RADOS cluster'}, |
84 |
|
85 |
'plain': {'name': 'Local', |
86 |
'description': 'Fast, not high available local storage (LVM)'}, |
87 |
|
88 |
'drbd': {'name': 'Standard', |
89 |
'description': 'High available persistent storage (DRBD)'}, |
90 |
|
91 |
'ext_vlmc': {'name': 'Tmp', |
92 |
'description': 'Volatile storage'}, |
93 |
} |
94 |
UI_SUPPORT_SSH_OS_LIST = ['debian', 'fedora', 'okeanos', 'ubuntu', 'kubuntu', |
95 |
'centos', 'archlinux', 'gentoo'] |
96 |
UI_SYSTEM_IMAGES_OWNERS = { |
97 |
'images@okeanos.io': 'system', |
98 |
} |
99 |
|
100 |
CACHE_BACKEND = 'memcached://127.0.0.1:11211/' |
101 |
VMAPI_BASE_URL = 'https://cyclades.example.com/' |
102 |
|
103 |
CYCLADES_ASTAKOS_SERVICE_TOKEN = "XXXXXXXXXX" |
104 |
|
105 |
UI_SYSTEM_IMAGES_OWNERS = { |
106 |
'admin@synnefo.gr': 'system', |
107 |
'images@synnefo.gr': 'system' |
108 |
} |
109 |
|
110 |
XXXXXXXX is the token for cyclades registered service and can be found |
111 |
in astakos node running: |
112 |
|
113 |
.. code-block:: console |
114 |
|
115 |
snf-manage service-list |
116 |
|
117 |
|
118 |
Restart services and initialize database: |
119 |
|
120 |
.. code-block:: console |
121 |
|
122 |
# /etc/init.d/gunicorn restart |
123 |
# /etc/init.d/apache2 restart |
124 |
# snf-manage syncdb |
125 |
# snf-manage migrate --delete-ghost-migrations |
126 |
# snf-manage loaddata flavors |
127 |
|
128 |
Enable dispatcher: |
129 |
|
130 |
.. code-block:: console |
131 |
|
132 |
# sed -i 's/false/true/' /etc/default/snf-dispatcher |
133 |
# /etc/init.d/snf-dispatcher start |
134 |
|
135 |
In order end-user to have access to the VM's console: |
136 |
|
137 |
.. code-block:: console |
138 |
|
139 |
# apt-get install snf-vncauthproxy |
140 |
|
141 |
Edit `/etc/default/vncauthproxy`: |
142 |
|
143 |
.. code-block:: console |
144 |
|
145 |
CHUID="www-data:nogroup" |
146 |
|
147 |
|
148 |
At this point you should setup a :ref:`backend <i-backends>`. Please refer to the |
149 |
coresponding section. Here we assume that at least one backend is up and running, |
150 |
so we can add it in Cyclades with: |
151 |
|
152 |
.. code-block:: console |
153 |
|
154 |
# snf-manage backend-add --clustername=ganeti.example.com --user=synnefo --pass=example_rapi_passw0rd |
155 |
|
156 |
After 0.13 every backend added stays in drained mode (no VMs can be added). |
157 |
Therefore get your backend ID (propably 1) and run: |
158 |
|
159 |
.. code-block:: console |
160 |
|
161 |
# snf-manage backend-list |
162 |
# snf-manage backend-modify --drained=False 1 |
163 |
|
164 |
Further assumptions: |
165 |
|
166 |
- Preprovisioned Bridges: ``br0``, ``prv0``, ``prv1..prv20`` |
167 |
- Available "public" Subnet: ``10.0.1.0/24`` |
168 |
- Available "public" Gateway: ``10.0.1.1`` |
169 |
- Connectivity link for public network: ``br0`` |
170 |
|
171 |
|
172 |
Here admin has to define two different resource pools in Synnefo: |
173 |
|
174 |
- MAC prefix Pool |
175 |
- Bridge Pool |
176 |
|
177 |
.. code-block:: console |
178 |
|
179 |
# snf-manage pool-create --type=mac-prefix --base=aa:00:0 --size=65536 |
180 |
# snf-manage pool-create --type=bridge --base=prv --size=20 |
181 |
|
182 |
Add the synnefo setting in :file:`/etc/synnefo/cyclades.conf`: |
183 |
|
184 |
.. code-block:: console |
185 |
|
186 |
DEFAULT_MAC_FILTERED_BRIDGE = 'prv0' |
187 |
|
188 |
Add public network where the VM's will eventually connect to in order to |
189 |
access Internet: |
190 |
|
191 |
.. code-block:: console |
192 |
|
193 |
# 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 |
194 |
|
195 |
|
196 |
Test your Setup: |
197 |
++++++++++++++++ |
198 |
|
199 |
In cyclades node run: |
200 |
|
201 |
.. code-block:: console |
202 |
|
203 |
snf-manage backend-list |
204 |
snf-manage network-list |
205 |
snf-manage server-list |
206 |
|
207 |
Visit https://cyclades.example.com/ui/ and create a VM or network. |
208 |
|