Revision 2f6143c9 docs/quick-install-admin-guide.rst
b/docs/quick-install-admin-guide.rst | ||
---|---|---|
1001 | 1001 |
succeeds but you cannot connect, again find out what went wrong. Do *NOT* |
1002 | 1002 |
proceed to the next steps unless you are sure everything works till this point. |
1003 | 1003 |
|
1004 |
If everything works, you have successfully connected Ganeti with Pithos+. |
|
1005 |
Let's move on to networking now.
|
|
1004 |
If everything works, you have successfully connected Ganeti with Pithos+. Let's
|
|
1005 |
move on to networking now. |
|
1006 | 1006 |
|
1007 |
Network setup |
|
1008 |
~~~~~~~~~~~~~ |
|
1007 |
.. warning:: |
|
1008 |
You can bypass the networking sections and go straight to `FIXME`, if you do |
|
1009 |
not want to setup the Cyclades Network Service, but only the Cyclades Compute |
|
1010 |
Service (recommended for now). |
|
1011 |
|
|
1012 |
Network setup overview |
|
1013 |
~~~~~~~~~~~~~~~~~~~~~~ |
|
1014 |
|
|
1015 |
This part is deployment-specific and must be customized based on the specific |
|
1016 |
needs of the system administrator. However, to do so, the administrator needs |
|
1017 |
to understand how each level handles Virtual Networks, to be able to setup the |
|
1018 |
backend appropriately, before installing Cyclades. |
|
1019 |
|
|
1020 |
Network @ Cyclades level |
|
1021 |
```````````````````````` |
|
1022 |
|
|
1023 |
Cyclades understands two types of Virtual Networks: |
|
1024 |
|
|
1025 |
a) One common Public Network (Internet) |
|
1026 |
b) One or more distinct Private Networks (L2) |
|
1027 |
|
|
1028 |
a) When a new VM is created, it instantly gets connected to the Public Network |
|
1029 |
(Internet). This means it gets a public IPv4 and IPv6 and has access to the |
|
1030 |
public Internet. |
|
1031 |
|
|
1032 |
b) Then each user, is able to create one or more Private Networks manually and |
|
1033 |
add VMs inside those Private Networks. Private Networks provide Layer 2 |
|
1034 |
connectivity. All VMs inside a Private Network are completely isolated. |
|
1035 |
|
|
1036 |
From the VM perspective, every Network corresponds to a distinct NIC. So, the |
|
1037 |
above are translated as follows: |
|
1038 |
|
|
1039 |
a) Every newly created VM, needs at least one NIC. This NIC, connects the VM |
|
1040 |
to the Public Network and thus should get a public IPv4 and IPv6. |
|
1041 |
|
|
1042 |
b) For every Private Network, the VM gets a new NIC, which is added during the |
|
1043 |
connection of the VM to the Private Network (without an IP). This NIC should |
|
1044 |
have L2 connectivity with all other NICs connected to this Private Network. |
|
1045 |
|
|
1046 |
To achieve the above, first of all, we need Network and IP Pool management support |
|
1047 |
at Ganeti level, for Cyclades to be able to issue the corresponding commands. |
|
1048 |
|
|
1049 |
Network @ Ganeti level |
|
1050 |
`````````````````````` |
|
1051 |
|
|
1052 |
Currently, Ganeti does not support IP Pool management. However, we've been |
|
1053 |
actively in touch with the official Ganeti team, who are reviewing a relatively |
|
1054 |
big patchset that implements this functionality (you can find it at the |
|
1055 |
ganeti-devel mailing list). We hope that the functionality will be merged to |
|
1056 |
the Ganeti master branch soon and appear on Ganeti 2.7. |
|
1057 |
|
|
1058 |
Furthermore, currently the `~okeanos service <http://okeanos.grnet.gr>`_ uses |
|
1059 |
the same patchset with slight differencies on top of Ganeti 2.4.5. Cyclades |
|
1060 |
0.9 are compatible with this old patchset and we do not guarantee that will |
|
1061 |
work with the updated patchset sent to ganeti-devel. |
|
1062 |
|
|
1063 |
We do *NOT* recommend you to apply the patchset yourself on the current Ganeti |
|
1064 |
master, unless you are an experienced Cyclades and Ganeti integrator and you |
|
1065 |
really know what you are doing. |
|
1066 |
|
|
1067 |
Instead, be a little patient and we hope that everything will work out of the |
|
1068 |
box, once the patchset makes it into the Ganeti master. When so, Cyclades will |
|
1069 |
get updated to become compatible with that Ganeti version. |
|
1070 |
|
|
1071 |
Network @ Physical host level |
|
1072 |
````````````````````````````` |
|
1073 |
|
|
1074 |
We talked about the two types of Network from the Cyclades perspective, from the |
|
1075 |
VMs perspective and from Ganeti's perspective. Finally, we need to talk about |
|
1076 |
the Networks from the physical (VM container) host's perspective. |
|
1077 |
|
|
1078 |
If your version of Ganeti supports IP pool management, then you need to setup |
|
1079 |
your physical hosts for the two types of Networks. For the second type |
|
1080 |
(Private Networks), our reference installation uses a number of pre-provisioned |
|
1081 |
bridges (one for each Network), which are connected to the corresponding number |
|
1082 |
of pre-provisioned vlans on each physical host (node1 and node2). For the first |
|
1083 |
type (Public Network), our reference installation uses routing over one |
|
1084 |
preprovisioned vlan on each host (node1 and node2). It also uses the `NFDHCPD` |
|
1085 |
package for dynamically serving specific public IPs managed by Ganeti. |
|
1086 |
|
|
1087 |
Public Network setup |
|
1088 |
~~~~~~~~~~~~~~~~~~~~ |
|
1089 |
|
|
1090 |
Physical hosts' public network setup |
|
1091 |
```````````````````````````````````` |
|
1092 |
|
|
1093 |
The physical hosts' setup is out of the scope of this guide. |
|
1094 |
|
|
1095 |
However, two common cases that you may want to consider (and choose from) are: |
|
1096 |
|
|
1097 |
a) One public bridge, where all VMs' public tap interfaces will connect. |
|
1098 |
b) IP-less routing over the same vlan on every host. |
|
1099 |
|
|
1100 |
When you setup your physical hosts (node1 and node2) for the Public Network, |
|
1101 |
then you need to inform Ganeti about the Network's IP range. |
|
1102 |
|
|
1103 |
Add the public network to Ganeti |
|
1104 |
```````````````````````````````` |
|
1105 |
|
|
1106 |
Once you have Ganeti with IP pool management up and running, you need to choose |
|
1107 |
the public network for your VMs and add it to Ganeti. Let's assume, that you |
|
1108 |
want to assign IPs from the ``5.6.7.0/27`` range to your new VMs, with |
|
1109 |
``5.6.7.1`` as their gateway. You can add the network by running: |
|
1110 |
|
|
1111 |
.. code-block:: console |
|
1112 |
|
|
1113 |
# gnt-network add --network=5.6.7.0/27 --gateway=5.6.7.1 public_network |
|
1114 |
|
|
1115 |
Then, connect the network to all your nodegroups. We assume that we only have |
|
1116 |
one nodegroup (``default``) in our Ganeti cluster: |
|
1117 |
|
|
1118 |
.. code-block:: console |
|
1119 |
|
|
1120 |
# gnt-network connect public_network default public_link |
|
1121 |
|
|
1122 |
Your new network is now ready from the Ganeti perspective. Now, we need to setup |
|
1123 |
`NFDHCPD` to actually reply with the correct IPs (that Ganeti will choose for |
|
1124 |
each NIC). |
|
1125 |
|
|
1126 |
NFDHCPD |
|
1127 |
``````` |
|
1128 |
|
|
1129 |
At this point, Ganeti knows about your preferred network, it can manage the IP |
|
1130 |
pool and choose a specific IP for each new VM's NIC. However, the actual |
|
1131 |
assignment of the IP to the NIC is not done by Ganeti. It is done after the VM |
|
1132 |
boots and its dhcp client makes a request. When this is done, `NFDHCPD` will |
|
1133 |
reply to the request with Ganeti's chosen IP. So, we need to install `NFDHCPD` |
|
1134 |
on all VM-capable nodes of the Ganeti cluster (node1 and node2 in our case) and |
|
1135 |
connect it to Ganeti: |
|
1136 |
|
|
1137 |
.. code-block:: console |
|
1138 |
|
|
1139 |
# apt-get install nfdhcpd |
|
1140 |
|
|
1141 |
Edit ``/etc/nfdhcpd/nfdhcpd.conf`` to reflect your network configuration. At |
|
1142 |
least, set the ``dhcp_queue`` variable to ``42`` and the ``nameservers`` |
|
1143 |
variable to your DNS IP/s. Those IPs will be passed as the DNS IP/s of your new |
|
1144 |
VMs. Once you are finished, restart the server on all nodes: |
|
1145 |
|
|
1146 |
.. code-block:: console |
|
1147 |
|
|
1148 |
# /etc/init.d/nfdhcpd restart |
|
1149 |
|
|
1150 |
If you are using ``ferm``, then you need to run the following: |
|
1151 |
|
|
1152 |
.. code-block:: console |
|
1153 |
|
|
1154 |
# echo "@include 'nfdhcpd.ferm';" >> /etc/ferm/ferm.conf |
|
1155 |
# /etc/init.d/ferm restart |
|
1156 |
|
|
1157 |
Now, you need to connect `NFDHCPD` with Ganeti. To do that, you need to install |
|
1158 |
a custom KVM ifup script for use by Ganeti, as ``/etc/ganeti/kvm-vif-bridge``, |
|
1159 |
on all VM-capable GANETI-NODEs (node1 and node2). A sample implementation is |
|
1160 |
provided along with `snf-cyclades-gtools <snf-cyclades-gtools>`, that will |
|
1161 |
be installed in the next sections, however you will probably need to write your |
|
1162 |
own, according to your underlying network configuration. |
|
1163 |
|
|
1164 |
Testing the Public Network |
|
1165 |
`````````````````````````` |
|
1166 |
|
|
1167 |
So, we have setup the bridges/vlans on the physical hosts appropriately, we have |
|
1168 |
added the desired network to Ganeti, we have installed nfdhcpd and installed the |
|
1169 |
appropriate ``kvm-vif-bridge`` script under ``/etc/ganeti``. |
|
1170 |
|
|
1171 |
Now, it is time to test that the backend infrastracture is correctly setup for |
|
1172 |
the Public Network. We assume to have used the (b) method on setting up the |
|
1173 |
physical hosts. We will add a new VM, the same way we did it on the previous |
|
1174 |
testing section. However, now will also add one NIC, configured to be managed |
|
1175 |
from our previously defined network. Run on the GANETI-MASTER (node1): |
|
1176 |
|
|
1177 |
.. code-block:: console |
|
1178 |
|
|
1179 |
# gnt-instance add -o snf-image+default --os-parameters |
|
1180 |
img_passwd=my_vm_example_passw0rd, |
|
1181 |
img_format=diskdump, |
|
1182 |
img_id="pithos://user@example.com/pithos/debian_base-6.0-7-x86_64.diskdump", |
|
1183 |
img_properties='{"OSFAMILY":"linux"\,"ROOT_PARTITION":"1"}' |
|
1184 |
-t plain --disk 0:size=2G --no-name-check --no-ip-check |
|
1185 |
--net 0:ip=pool,mode=routed,link=public_link |
|
1186 |
testvm2 |
|
1187 |
|
|
1188 |
If the above returns successfully, connect to the new VM and run: |
|
1189 |
|
|
1190 |
.. code-block:: console |
|
1191 |
|
|
1192 |
root@testvm2:~ # ifconfig -a |
|
1193 |
|
|
1194 |
If a network interface appears with an IP from you Public Network's range |
|
1195 |
(``5.6.7.0/27``) and the corresponding gateway, then you have successfully |
|
1196 |
connected Ganeti with `NFDHCPD` (and ``kvm-vif-bridge`` works correctly). |
|
1197 |
|
|
1198 |
Now ping the outside world. If this works too, then you have also configured |
|
1199 |
correctly your physical hosts' networking. |
|
1200 |
|
|
1201 |
Make sure everything works as expected, before procceding with the Private |
|
1202 |
Networks setup. |
|
1203 |
|
|
1204 |
Private Networks setup |
|
1205 |
~~~~~~~~~~~~~~~~~~~~~~ |
|
1206 |
|
|
1207 |
Physical hosts' private networks setup |
|
1208 |
`````````````````````````````````````` |
|
1209 |
|
|
1210 |
Testing the Private Networks |
|
1211 |
```````````````````````````` |
|
1009 | 1212 |
|
1010 | 1213 |
Synnefo RAPI user |
1011 | 1214 |
~~~~~~~~~~~~~~~~~ |
... | ... | |
1090 | 1293 |
.. todo:: Mention vncauthproxy bug, snf-vncauthproxy, inability to install using pip |
1091 | 1294 |
.. todo:: kpap: fix installation commands |
1092 | 1295 |
|
1093 |
.. _cyclades-install-nfdhcpd: |
|
1094 |
|
|
1095 |
NFDHCPD |
|
1096 |
~~~~~~~ |
|
1097 |
|
|
1098 |
Setup Synnefo-specific networking on the Ganeti backend. |
|
1099 |
This part is deployment-specific and must be customized based on the |
|
1100 |
specific needs of the system administrators. |
|
1101 |
|
|
1102 |
A reference installation will use a Synnefo-specific KVM ifup script, |
|
1103 |
NFDHCPD and pre-provisioned Linux bridges to support public and private |
|
1104 |
network functionality. For this: |
|
1105 |
|
|
1106 |
Grab NFDHCPD from its own repository (https://code.grnet.gr/git/nfdhcpd), |
|
1107 |
install it, modify ``/etc/nfdhcpd/nfdhcpd.conf`` to reflect your network |
|
1108 |
configuration. |
|
1109 |
|
|
1110 |
Install a custom KVM ifup script for use by Ganeti, as |
|
1111 |
``/etc/ganeti/kvm-vif-bridge``, on GANETI-NODEs. A sample implementation is |
|
1112 |
provided under ``/contrib/ganeti-hooks``. Set ``NFDHCPD_STATE_DIR`` to point |
|
1113 |
to NFDHCPD's state directory, usually ``/var/lib/nfdhcpd``. |
|
1114 |
|
|
1115 |
.. todo:: soc: document NFDHCPD installation, settle on KVM ifup script |
|
1116 |
|
|
1117 |
synnefo components |
|
1118 |
------------------ |
|
1119 |
|
|
1120 |
You need to install the appropriate synnefo software components on each node, |
|
1121 |
depending on its type, see :ref:`Architecture <cyclades-architecture>`. |
|
1122 |
|
|
1123 |
Most synnefo components have dependencies on additional Python packages. |
|
1124 |
The dependencies are described inside each package, and are setup |
|
1125 |
automatically when installing using :command:`pip`, or when installing |
|
1126 |
using your system's package manager. |
|
1127 |
|
|
1128 |
Please see the page of each synnefo software component for specific |
|
1129 |
installation instructions, where applicable. |
|
1130 |
|
|
1131 |
Install the following synnefo components: |
|
1132 |
|
|
1133 |
Nodes of type :ref:`APISERVER <APISERVER_NODE>` |
|
1134 |
Components |
|
1135 |
:ref:`snf-common <snf-common>`, |
|
1136 |
:ref:`snf-webproject <snf-webproject>`, |
|
1137 |
:ref:`snf-cyclades-app <snf-cyclades-app>` |
|
1138 |
Nodes of type :ref:`GANETI-MASTER <GANETI_MASTER>` and :ref:`GANETI-NODE <GANETI_NODE>` |
|
1139 |
Components |
|
1140 |
:ref:`snf-common <snf-common>`, |
|
1141 |
:ref:`snf-cyclades-gtools <snf-cyclades-gtools>` |
|
1142 |
Nodes of type :ref:`LOGIC <LOGIC_NODE>` |
|
1143 |
Components |
|
1144 |
:ref:`snf-common <snf-common>`, |
|
1145 |
:ref:`snf-webproject <snf-webproject>`, |
|
1146 |
:ref:`snf-cyclades-app <snf-cyclades-app>`. |
|
1147 |
|
|
1148 | 1296 |
|
1149 | 1297 |
Configuration of Cyclades (and Plankton) |
1150 | 1298 |
======================================== |
Also available in: Unified diff