root / docs / scale / i-cyclades.rst @ 301294a9
History | View | Annotate | Download (4.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:`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 snf-cyclades-app |
37 |
|
38 |
In `/etc/synnefo/cyclades.conf` add: |
39 |
|
40 |
.. code-block:: console |
41 |
|
42 |
MAX_CIDR_BLOCK = 21 |
43 |
PUBLIC_USE_POOL = True |
44 |
|
45 |
CUSTOM_BRIDGED_BRIDGE = 'br0' |
46 |
|
47 |
MAX_VMS_PER_USER = 5 |
48 |
VMS_USER_QUOTA = { |
49 |
'user@example.com': 20, |
50 |
} |
51 |
MAX_NETWORKS_PER_USER = 3 |
52 |
NETWORKS_USER_QUOTA = { 'user@example.com': 10 } |
53 |
GANETI_DISK_TEMPLATES = ('blockdev', 'diskless', 'drbd', 'file', 'plain', |
54 |
'rbd', 'sharedfile', 'ext') |
55 |
ASTAKOS_URL = 'https://accounts.example.com/im/authenticate' |
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 |
CACHE_BACKEND = 'memcached://127.0.0.1:11211/' |
75 |
VMAPI_BASE_URL = 'https://cyclades.example.com/' |
76 |
|
77 |
|
78 |
Restart services and initialize database: |
79 |
|
80 |
.. code-block:: console |
81 |
|
82 |
# /etc/init.d/gunicorn restart |
83 |
# /etc/init.d/apache2 restart |
84 |
# snf-manage syncdb |
85 |
# snf-manage migrate |
86 |
# snf-manage loaddata flavors |
87 |
|
88 |
Enable dispatcher: |
89 |
|
90 |
.. code-block:: console |
91 |
|
92 |
# sed -i 's/false/true/' /etc/default/snf-dispatcher |
93 |
# /etc/init.d/snf-dispatcher start |
94 |
|
95 |
In order end-user to have access to the VM's console: |
96 |
|
97 |
.. code-block:: console |
98 |
|
99 |
# apt-get install snf-vncauthproxy |
100 |
|
101 |
Edit `/etc/default/vncauthproxy`: |
102 |
|
103 |
.. code-block:: console |
104 |
|
105 |
CHUID="www-data:nogroup" |
106 |
|
107 |
|
108 |
At this point you should setup a :ref:`backend <i-backends>`. Please refer to the |
109 |
coresponding section. Here we assume that at least one backend is up and running, |
110 |
so we can add it in Cyclades with: |
111 |
|
112 |
.. code-block:: console |
113 |
|
114 |
# snf-manage backend-add --clustername=ganeti.example.com --user=synnefo --pass=example_rapi_passw0rd |
115 |
|
116 |
After 0.13 every backend added stays in drained mode (no VMs can be added). |
117 |
Therefore get your backend ID (propably 1) and run: |
118 |
|
119 |
.. code-block:: console |
120 |
|
121 |
# snf-manage backend-list |
122 |
# snf-manage backend-modify --drained=False 1 |
123 |
|
124 |
Further assumptions: |
125 |
|
126 |
- Preprovisioned Bridges: ``br0``, ``prv0``, ``prv1..prv20`` |
127 |
- Available "public" Subnet: ``10.0.1.0/24`` |
128 |
- Available "public" Gateway: ``10.0.1.1`` |
129 |
- Connectivity link for public network: ``br0`` |
130 |
|
131 |
|
132 |
Here admin has to define two different resource pools in Synnefo: |
133 |
|
134 |
- MAC prefix Pool |
135 |
- Bridge Pool |
136 |
|
137 |
.. code-block:: console |
138 |
|
139 |
# snf-manage pool-create --type=mac-prefix --base=aa:00:0 --size=65536 |
140 |
# snf-manage pool-create --type=bridge --base=prv --size=20 |
141 |
|
142 |
Add the synnefo setting in :file:`/etc/synnefo/cyclades.conf`: |
143 |
|
144 |
.. code-block:: console |
145 |
|
146 |
PRIVATE_MAC_FILTERED_BRIDGE = 'prv0' |
147 |
|
148 |
Add public network where the VM's will eventually connect to in order to |
149 |
access Internet: |
150 |
|
151 |
.. code-block:: console |
152 |
|
153 |
# 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 |
154 |
|
155 |
|
156 |
Test your Setup: |
157 |
++++++++++++++++ |