Administer > Service Manager Service Portal administration > Service Manager Service Portal administration tips and tasks > Migration from Service Manager Service Portal single node to HA nodes

Migration from Service Manager Service Portal single node to HA nodes

Note This instructions provided in this section apply to Service Manager Service Portal 9.52 HF3, 9.60 or later versions.

Service Manager Service Portal provides a migration tool that enables you to migrate a Service Manager Service Portal instance to Service Manager Service Portal HA hosts.

The migration tool is a set of Ansible scripts that migrates data and configurations across different hosts.

Important You must set up five latest Service Manager Service Portal systems as the target hosts for the migration process. You also need to make sure the same version of Service Manager Service Portal instances are installed on source and all target hosts.

Migration overview

Tip You can perform the migration again if it fails.

The migration scripts automatically perform the following migration steps:

  1. Stop the Service Manager Service Portal services. The Service Manager Service Portal services on both the source host and the target app hosts are stopped.

  2. Perform the pre-migration steps.

  3. Export the data and configuration from the source Service Manager Service Portal host.

  4. Import the data and configuration to the target Service Manager Service Portal app hosts.

  5. Start the Service Manager Service Portal services on the target Service Manager Service Portal app hosts.

Prerequisites

Ansible 2.2.0.0 must be installed on the source Service Manager Service Portal host before you can begin executing the steps in this section to migrate your single Service Manager Service Portal system.

Note  

  • We recommend that you perform the migration before propeld.yml (HA scripts).
  • The "propel" user must have the sudo privilege.

The initial steps for Service Manager Service Portal migration

  1. If you are running version 9.60, go to the migrator directory by running the following command:

    # cd /opt/hp/propel/migrator

    Note This directory already exists in version 9.60. If you are running version 9.52 HF3, you need to manually create the /opt/hp/propel/migrator directory and extract the zip file shipped with this document into this directory.

  2. Use “propel” to log in to the source Service Manager Service Portal host, run commands below to set up SSH keys used to access the source and target hosts.

    # ssh-keygen -t rsa -f ~/.ssh/id_rsa 
    # ssh-copy-id propel@source propel hostname 
    # ssh-copy-id propel@target LB hostname 
    # ssh-copy-id propel@target propel node1 hostname 
    # ssh-copy-id propel@target propel node2 hostname 
    # ssh-copy-id propel@target DB master hostname 
    # ssh-copy-id propel@target DB slave hostname
    

Set up the Ansible inventory

Note Postgres ‘old_vip‘, ‘new_vip‘ and ports ‘old_vip_port‘, ‘new_vip_port‘ will be omitted as there is no VIP replacement needed, so there is no need to change the values of them.

# cd /opt/hp/migrator
# cp inventory.ini.ha-example inventory.ini
# vim inventory.ini

Example migrator inventory is as follows:

[source_app]
$source_propel_hostname
[source_db]
$source_propel_hostname
[target_app]
$target_propel_node1_hostname
$target_propel_node2_hostname
[target_db]
$target_DB_master_hostname

[target_lb]
$target_LB_hostname

[target_lb:vars]
;old VIP with port
old_vip=16.156.128.57
old_vip_port=9999
;new VIP with port (current ha uses iptables to redirect to pgpool vip using port number)
new_vip=localhost
new_vip_port=5432
;replace hosts from old deployment to new host names in configuration files
hosts_replacement='[ {"old":"$source_propel_hostname ", "new":" target_LB_master"}, {"old":"$source_propel_hostname ", "new":" target_propel_node1_hostname"}, {"old":"$source_propel_hostname ", "new":" target_propel_node2_hostname"}]'

[target_app:vars]
;replace hosts from old deployment to new host names in configuration files
hosts_replacement='[ {"old":"$source_propel_hostname ", "new":" target_LB_master"}, {"old":"$source_propel_hostname ", "new":" target_propel_node1_hostname"}, {"old":"$source_propel_hostname ", "new":" target_propel_node2_hostname"}]'

Run migration shell

# ./run-migrate.sh | tee migrate.log