root / docs / scale / i-cyclades.rst @ 42646d5c
History | View | Annotate | Download (5.5 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_FLAVORS_DISK_TEMPLATES_INFO = { |
76 |
'rbd': {'name': 'Rbd', |
77 |
'description': 'Volumes residing inside a RADOS cluster'}, |
78 |
|
79 |
'plain': {'name': 'Local', |
80 |
'description': 'Fast, not high available local storage (LVM)'}, |
81 |
|
82 |
'drbd': {'name': 'Standard', |
83 |
'description': 'High available persistent storage (DRBD)'}, |
84 |
|
85 |
'ext_vlmc': {'name': 'Tmp', |
86 |
'description': 'Volatile storage'}, |
87 |
} |
88 |
UI_SUPPORT_SSH_OS_LIST = ['debian', 'fedora', 'okeanos', 'ubuntu', 'kubuntu', |
89 |
'centos', 'archlinux', 'gentoo'] |
90 |
UI_SYSTEM_IMAGES_OWNERS = { |
91 |
'images@okeanos.io': 'system', |
92 |
} |
93 |
|
94 |
CACHE_BACKEND = 'memcached://127.0.0.1:11211/' |
95 |
|
96 |
CYCLADES_SERVICE_TOKEN = "XXXXXXXXXX" |
97 |
|
98 |
UI_SYSTEM_IMAGES_OWNERS = { |
99 |
'admin@synnefo.gr': 'system', |
100 |
'images@synnefo.gr': 'system' |
101 |
} |
102 |
|
103 |
XXXXXXXX is the token for cyclades registered service and can be found |
104 |
in astakos node running: |
105 |
|
106 |
.. code-block:: console |
107 |
|
108 |
snf-manage service-list |
109 |
|
110 |
|
111 |
Restart services and initialize database: |
112 |
|
113 |
.. code-block:: console |
114 |
|
115 |
# /etc/init.d/gunicorn restart |
116 |
# /etc/init.d/apache2 restart |
117 |
# snf-manage syncdb |
118 |
# snf-manage migrate --delete-ghost-migrations |
119 |
# snf-manage loaddata flavors |
120 |
|
121 |
Enable dispatcher: |
122 |
|
123 |
.. code-block:: console |
124 |
|
125 |
# sed -i 's/false/true/' /etc/default/snf-dispatcher |
126 |
# /etc/init.d/snf-dispatcher start |
127 |
|
128 |
In order end-user to have access to the VM's console: |
129 |
|
130 |
.. code-block:: console |
131 |
|
132 |
# apt-get install snf-vncauthproxy |
133 |
|
134 |
Edit `/etc/default/vncauthproxy`: |
135 |
|
136 |
.. code-block:: console |
137 |
|
138 |
CHUID="www-data:nogroup" |
139 |
|
140 |
|
141 |
At this point you should setup a :ref:`backend <i-backends>`. Please refer to the |
142 |
coresponding section. Here we assume that at least one backend is up and running, |
143 |
so we can add it in Cyclades with: |
144 |
|
145 |
.. code-block:: console |
146 |
|
147 |
# snf-manage backend-add --clustername=ganeti.example.com --user=synnefo --pass=example_rapi_passw0rd |
148 |
|
149 |
After 0.13 every backend added stays in drained mode (no VMs can be added). |
150 |
Therefore get your backend ID (propably 1) and run: |
151 |
|
152 |
.. code-block:: console |
153 |
|
154 |
# snf-manage backend-list |
155 |
# snf-manage backend-modify --drained=False 1 |
156 |
|
157 |
Further assumptions: |
158 |
|
159 |
- Preprovisioned Bridges: ``br0``, ``prv0``, ``prv1..prv20`` |
160 |
- Available "public" Subnet: ``10.0.1.0/24`` |
161 |
- Available "public" Gateway: ``10.0.1.1`` |
162 |
- Connectivity link for public network: ``br0`` |
163 |
|
164 |
|
165 |
Here admin has to define two different resource pools in Synnefo: |
166 |
|
167 |
- MAC prefix Pool |
168 |
- Bridge Pool |
169 |
|
170 |
.. code-block:: console |
171 |
|
172 |
# snf-manage pool-create --type=mac-prefix --base=aa:00:0 --size=65536 |
173 |
# snf-manage pool-create --type=bridge --base=prv --size=20 |
174 |
|
175 |
Add the synnefo setting in :file:`/etc/synnefo/cyclades.conf`: |
176 |
|
177 |
.. code-block:: console |
178 |
|
179 |
DEFAULT_MAC_FILTERED_BRIDGE = 'prv0' |
180 |
|
181 |
Add public network where the VM's will eventually connect to in order to |
182 |
access Internet: |
183 |
|
184 |
.. code-block:: console |
185 |
|
186 |
# 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 |
187 |
|
188 |
|
189 |
Test your Setup: |
190 |
++++++++++++++++ |
191 |
|
192 |
In cyclades node run: |
193 |
|
194 |
.. code-block:: console |
195 |
|
196 |
snf-manage backend-list |
197 |
snf-manage network-list |
198 |
snf-manage server-list |
199 |
|
200 |
Visit https://cyclades.example.com/ui/ and create a VM or network. |
201 |
|