Changes

stoney conductor: Adding a Virtual IP Address (VIP)

2,774 bytes added, 14:39, 5 December 2014
Created page with "This how to explains, how to reserve a Virtual IP Address (VIP) in the OpenLDAP directory. == Prerequisites == * The UUID of the one of the two virtual machines you want to a..."
This how to explains, how to reserve a Virtual IP Address (VIP) in the OpenLDAP directory.

== Prerequisites ==
* The UUID of the one of the two virtual machines you want to add the Virtual IP Address (VIP). For example: <code>85f05e67-b0a0-449d-b8c8-a29ab6fa51cf</code>.
* The next free IP address in the proper range. For example: <code>192.168.1.133</code>.
* A free (unused) MAC address. For example: <code>52:54:00:12:c0:48</code>.

== Procedure ==
In the phpLDAPadmin web interface, copy the network entry with the proper <code>UUID</code> to <code>UUID_1</code>.
<source lang="ldif">
# Entry 1: cn=85f05e67-b0a0-449d-b8c8-a29ab6fa51cf,ou=virtual machines,cn...
dn: cn=85f05e67-b0a0-449d-b8c8-a29ab6fa51cf,ou=virtual machines,cn=192.168.1.0,cn=config-01,ou=dhcp,ou=networks,ou=virtualization,ou=services,dc=stoney-cloud,dc=org
cn: 85f05e67-b0a0-449d-b8c8-a29ab6fa51cf
dhcphwaddress: ethernet 52:54:00:45:06:14
dhcpstatements: fixed-address 192.168.1.132
dhcpstatements: option host-name "kvm-0962.example.com"
objectclass: sstVirtualizationNetwork
objectclass: dhcpHost
objectclass: top
sstbelongstocustomeruid: 3723426
sstbelongstopersonuid: 1000004
sstbelongstoreselleruid: 2000000
</source>

Before saving the newly created UUID_1 entry, make sure to remove the following entry:
* <code>dhcpstatements: option host-name "kvm-0962.example.com"</code>
Update the following two attributes:
* <code>dhcphwaddress: ethernet 52:54:00:45:06:15</code> (the mac address must be unique)
* <code>dhcpstatements: fixed-address 192.168.1.133</code> (the desired VIP)

The final entry should then look something like:
<source lang="ldif">
# Entry 1: cn=85f05e67-b0a0-449d-b8c8-a29ab6fa51cf_1,ou=virtual machines,...
dn: cn=85f05e67-b0a0-449d-b8c8-a29ab6fa51cf_1,ou=virtual machines,cn=192.168.1.0,cn=config-01,ou=dhcp,ou=networks,ou=virtualization,ou=services,,dc=stoney-cloud,dc=org
cn: 85f05e67-b0a0-449d-b8c8-a29ab6fa51cf_1
dhcphwaddress: ethernet 52:54:00:45:06:15
dhcpstatements: fixed-address 192.168.1.133
objectclass: sstVirtualizationNetwork
objectclass: dhcpHost
objectclass: top
sstbelongstocustomeruid: 3723426
sstbelongstopersonuid: 1000004
sstbelongstoreselleruid: 2000000
</source>

== Result ==
The Virtual IP Address (VIP) <code>192.168.1.133</code> is now reserved and can no be reused by the stoney conductor web interface.

= Scripts =
== getNextFreeMACaddress.sh ==
To get the next free (unused) MAC address, execute <code>getNextFreeMACaddress.sh</code>, taken from [https://github.com/stoney-cloud/stoney-conductor/tree/master/helpers stoney-cloud / stoney-conductor / helpers]

./getNextFreeMACaddress.sh
Please enter the password for cn=Manager,o=stepping-stone,c=ch: *********
Next free MAC address: 52:54:00:12:c0:48


[[Category: stoney conductor]]
SLB, editor, reviewer
3,407
edits