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