stoney conductor: Adding a Virtual IP Address (VIP)

From stoney cloud
Jump to: navigation, search

This how to explains, how to reserve a Virtual IP Address (VIP) or a second Real IP Address (RIP) 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: 85f05e67-b0a0-449d-b8c8-a29ab6fa51cf.
  • The next free IP address in the proper range. For example: 192.168.1.133.
  • A free (unused) MAC address. For example: 52:54:00:12:c0:48.

Procedure

In the phpLDAPadmin web interface, copy the network entry with the proper UUID to UUID_1.

# 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

Before saving the newly created UUID_1 entry, make sure to remove the following entry:

  • dhcpstatements: option host-name "kvm-0962.example.com"

Update the following two attributes:

  • dhcphwaddress: ethernet 52:54:00:45:06:15 (the mac address must be unique)
  • dhcpstatements: fixed-address 192.168.1.133 (the desired VIP)

The final entry should then look something like:

# 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

Result

The Virtual IP Address (VIP) 192.168.1.133 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 getNextFreeMACaddress.sh, taken from stoney-cloud / stoney-conductor / helpers

./getNextFreeMACaddress.sh
Please enter the password for cn=Manager,dc=stoney-cloud,dc=org: *********
Next free MAC address: 52:54:00:12:c0:48