Merging remote services

This page describes the use of the tool written so that multiple remote services can be merged into one. This requires at least Abiquo 3.2.

Contact Abiquo support to get the tool.

Base scenario

Assume we have an Abiquo environment serving 3 public cloud regions. The servers are located as described in the table below:

Abiquo componentPublic cloud providerIP
API + RS PCR1 (monolithic)AWS192.168.2.211
RS PCR2Digitalocean192.168.2.46
RS PCR3Rackspace US192.168.2.76

We are going to use the merging tool to manage all three public cloud regions from the monolithic server running API.

Do not perform the procedure described in this document without taking a valid backup from MySQL database and every Redis database in the platform.

Merge Redis data

First you need to stop Abiquo, Management server and Remote Services.

For the tool to work, you need remote access to Redis from the machine you are running the tool in.

Once services has been stopped, run the tool to merge one source Redis server into the target one.

We are going to merge the Redis data from PCR2 into the one running in the monolithic server. From the monolithic server:

[root@abiquo-dev ~]# java -Dredis.merge=true -Dredis.src.host=192.168.2.46 -Dredis.dst.host=localhost -jar mergeator-1.0.0.jar
Nov 26, 2014 1:03:24 PM com.abiquo.mergeator.App getSourceRedisRepository
INFO: Source redis at 192.168.2.46:6379
Nov 26, 2014 1:03:25 PM com.abiquo.mergeator.App getDestinationRedisRepository
INFO: Destination redis at localhost:6379Nov 26, 2014 1:03:25 PM com.abiquo.mergeator.App merge
INFO: Merging all hypervisors...
Nov 26, 2014 1:03:25 PM com.abiquo.mergeator.App merge
INFO: Merging Hypervisor{Id=2, UID=e1209cb5-5bf7-4065-96df-2c82fd8a2a09, Type=digitalocean, End point=ams2#https://api.digitalocean.com}Nov 26, 2014 1:03:25 PM com.abiquo.mergeator.App move
INFO: Moving Hypervisor{Id=2, UID=e1209cb5-5bf7-4065-96df-2c82fd8a2a09, Type=digitalocean, End point=ams2#https://api.digitalocean.com}...Nov 26, 2014 1:03:25 PM com.abiquo.mergeator.App move
INFO: Moved Hypervisor{Id=4, UID=e1209cb5-5bf7-4065-96df-2c82fd8a2a09, Type=digitalocean, End point=ams2#https://api.digitalocean.com}
Nov 26, 2014 1:03:25 PM com.abiquo.mergeator.App move
INFO: Moving Subscription{Id=2, Name=ABQ_3a47401a-60e8-4423-82b8-0984e8f4f990, Hypervisor=e1209cb5-5bf7-4065-96df-2c82fd8a2a09}...Nov 26, 2014 1:03:25 PM com.abiquo.mergeator.App move
INFO: Moved Subscription{Id=5, Name=ABQ_3a47401a-60e8-4423-82b8-0984e8f4f990, Hypervisor=e1209cb5-5bf7-4065-96df-2c82fd8a2a09} (1/2)
Nov 26, 2014 1:03:25 PM com.abiquo.mergeator.App move
INFO: Moving Subscription{Id=3, Name=ABQ_bbf55c16-bf19-47b1-978f-1d869845869b, Hypervisor=e1209cb5-5bf7-4065-96df-2c82fd8a2a09}...Nov 26, 2014 1:03:25 PM com.abiquo.mergeator.App move
INFO: Moved Subscription{Id=6, Name=ABQ_bbf55c16-bf19-47b1-978f-1d869845869b, Hypervisor=e1209cb5-5bf7-4065-96df-2c82fd8a2a09} (2/2)
Nov 26, 2014 1:03:25 PM com.abiquo.mergeator.App merge
INFO: Merged Hypervisor{Id=4, UID=e1209cb5-5bf7-4065-96df-2c82fd8a2a09, Type=digitalocean, End point=ams2#https://api.digitalocean.com} (1/2)
Nov 26, 2014 1:03:25 PM com.abiquo.mergeator.App merge
INFO: Merging Hypervisor{Id=1, UID=06238858-498d-4846-81de-658da720888e, Type=digitalocean, End point=ams2#https://api.digitalocean.com}Nov 26, 2014 1:03:25 PM com.abiquo.mergeator.App move
INFO: Moving Hypervisor{Id=1, UID=06238858-498d-4846-81de-658da720888e, Type=digitalocean, End point=ams2#https://api.digitalocean.com}...Nov 26, 2014 1:03:25 PM com.abiquo.mergeator.App move
INFO: Moved Hypervisor{Id=5, UID=06238858-498d-4846-81de-658da720888e, Type=digitalocean, End point=ams2#https://api.digitalocean.com}
Nov 26, 2014 1:03:25 PM com.abiquo.mergeator.App merge
INFO: Merged Hypervisor{Id=5, UID=06238858-498d-4846-81de-658da720888e, Type=digitalocean, End point=ams2#https://api.digitalocean.com} (2/2)
[root@abiquo-dev ~]#

Then we can merge the Redis data from PCR3:

[root@abiquo-dev ~]# java -Dredis.merge=true -Dredis.src.host=192.168.2.76 -Dredis.dst.host=localhost -jar mergeator-1.0.0.jar
Nov 26, 2014 1:03:37 PM com.abiquo.mergeator.App getSourceRedisRepository
INFO: Source redis at 192.168.2.76:6379
Nov 26, 2014 1:03:38 PM com.abiquo.mergeator.App getDestinationRedisRepository
INFO: Destination redis at localhost:6379Nov 26, 2014 1:03:38 PM com.abiquo.mergeator.App merge
INFO: Merging all hypervisors...
Nov 26, 2014 1:03:38 PM com.abiquo.mergeator.App merge
INFO: Merging Hypervisor{Id=1, UID=472f9d72-2129-49de-a42e-a6ddea639f8a, Type=rackspace-cloudservers-us, End point=DFW#https://identity.api.rackspacecloud.com/v2.0/}Nov 26, 2014 1:03:38 PM com.abiquo.mergeator.App move
INFO: Moving Hypervisor{Id=1, UID=472f9d72-2129-49de-a42e-a6ddea639f8a, Type=rackspace-cloudservers-us, End point=DFW#https://identity.api.rackspacecloud.com/v2.0/}...Nov 26, 2014 1:03:38 PM com.abiquo.mergeator.App move
INFO: Moved Hypervisor{Id=6, UID=472f9d72-2129-49de-a42e-a6ddea639f8a, Type=rackspace-cloudservers-us, End point=DFW#https://identity.api.rackspacecloud.com/v2.0/}Nov 26, 2014 1:03:38 PM com.abiquo.mergeator.App move
INFO: Moving Subscription{Id=2, Name=ABQ_2c63c5fa-4fce-49ea-8ff9-260dae6edfbc, Hypervisor=472f9d72-2129-49de-a42e-a6ddea639f8a}...Nov 26, 2014 1:03:38 PM com.abiquo.mergeator.App move
INFO: Moved Subscription{Id=7, Name=ABQ_2c63c5fa-4fce-49ea-8ff9-260dae6edfbc, Hypervisor=472f9d72-2129-49de-a42e-a6ddea639f8a} (1/2)Nov 26, 2014 1:03:38 PM com.abiquo.mergeator.App move
INFO: Moving Subscription{Id=3, Name=ABQ_a4435eb0-4024-4278-a13a-d48a1aa07ed5, Hypervisor=472f9d72-2129-49de-a42e-a6ddea639f8a}...Nov 26, 2014 1:03:38 PM com.abiquo.mergeator.App move
INFO: Moved Subscription{Id=8, Name=ABQ_a4435eb0-4024-4278-a13a-d48a1aa07ed5, Hypervisor=472f9d72-2129-49de-a42e-a6ddea639f8a} (2/2)Nov 26, 2014 1:03:38 PM com.abiquo.mergeator.App merge
INFO: Merged Hypervisor{Id=6, UID=472f9d72-2129-49de-a42e-a6ddea639f8a, Type=rackspace-cloudservers-us, End point=DFW#https://identity.api.rackspacecloud.com/v2.0/} (1/1)

Merge API data

Once the Redis data has been transfered from every RS to the monolithic server, you need to delete their Redis databases so the tool can successfully change remote services values in Abiquo.

Log in to each RS an perform:

# redis-cli flushdb

Then start Abiquo tomcat again.

Now run the merging tool to modify the data:

[root@abiquo-dev ~]# java -Dapi.merge=true -Dapi.user=admin -Dapi.password=xabiquo -Dpcr.source=1 -Dpcr.dst=2,3 -jar mergeator-1.0.0.jar
[root@abiquo-dev ~]#

Note we have provided no API endpoint to the tool as it defaults to locahost and we were running the tool from the monolithic server. This command has no output, but when it finishes, you can check the UI (or database) for the remote services used in each public cloud region and they will all be pointing to our monolithic server.

 

Unable to render {include} The included page could not be found.