This document describes:

  • how to migrate Flex stores from pre-7.11.0 to post-7.11.0

  • how to patch post-7.11.0 Flex stores

  • how to add post-7.11.0 Flex stores

  • how to stop managing a post-7.11.0 Flex store

UUID Repositories

Starting with ePages 7.5.0 you’ll need a personal UUID to patch ePages.

Contact ePages support to get your UUID.

Following sections show how to patch Flex Site and Flex Store if the source version is 7.4.0 or lower and the target version is 7.5.0 or higher. Otherwise patch Flex installations the default way.

Hereinafter we use the example UUID 1234abcd-1234-1234-1234-0123456789ab, replace this by your personal UUID. With the example UUID, your UUID repository is:

ftp://epages-software.de/repo/usr/1234abcd-1234-1234-1234-0123456789ab

Create a Flex Management Host

Each Flex store has its own host. Either execute commands for migrate/patch/add Flex stores on each Flex host or prepare a specific host for managing all Flex stores. In pre-7.11.0 distributions you can use the Flex site host for doing this.

Unless otherwise mentioned, in this document run all commands as root on the Flex management host.

Update package epages-release to latest version (change EPAGES_UUID accordingly):

export EPAGES_UUID=1234abcd-1234-1234-1234-0123456789ab
export EPAGES_REPOURL=ftp://epages-software.de/repo/usr/$EPAGES_UUID
export EPAGES_INSTALLATION='-epages'
curl -L $EPAGES_REPOURL/install-epages.sh | bash

The tool ansible is used to manage all Flex stores from Flex management host. Run following commands to install ansible:

yum -y install epel-release
sed -ri 's,(enabled=).*,\10,' /etc/yum.repos.d/epel.repo
yum -y install ansible --enablerepo epel

Create SSH key pair for root unless already exists:

[[ -f ~/.ssh/id_rsa.pub ]] || ssh-keygen -t rsa -C "root@$(hostname --fqdn)"

Type the return key until ssh-keygen has finished.

Set global variabes EPAGES_UUID and FLEX_HOSTS (change them accordingly):

EPAGES_UUID=1234abcd-1234-1234-1234-0123456789ab
FLEX_HOSTS='vm-flex-store01 vm-flex-store02 vm-flex-store03'
ansible-playbook /var/epages/flex/ansible/update-conf.yml -e uuid=$EPAGES_UUID -e "{'stores': ['${FLEX_HOSTS// /','}']}"

Copy the public key to all Flex stores. With this method you are asked for the root password of each Flex store. SSH root login with password must be enabled.

for host in $FLEX_HOSTS ; do ssh-copy-id $host ; done

After running the last commands check that all Flex store connections are successful:

ansible flexstores -a hostname

Now you can go on with migrating/installing/patching Flex stores.

Flex Store Migration

Starting with ePages 7.11.0 each Flex store has its own Technical and Provider Backoffice (TBO/PBO). This section describes how-to migrate a pre-7.11.0 Flex store to a post-7.11.0 Flex store.

Pre-7.11.0 Flex stores can’t be patched to 7.11.0 or later.

First prepare the Flex management host as described above. Run all following commands as user root on the Flex management host.

Now you should change the configuration file flex-migration.conf (use vi or other editor):

vi /var/epages/flex/migrate/flex-migration.conf

Copy the migration script to the Flex stores and run it (change FLEX_HOSTS accordingly):

FLEX_HOSTS='vm-flex-store01 vm-flex-store02 vm-flex-store03'
ansible-playbook /var/epages/flex/ansible/migrate.yml --limit "${FLEX_HOSTS// /,}" -vvv

This may take a while. Do not interrupt the process.

Patch Flex Stores

First prepare the Flex management host as described above. Run all following commands as user root on the Flex management host.

Patch Flex stores:

ansible-playbook /var/epages/flex/ansible/patch.yml -vvv

This may take a while. Do not interrupt the process.

Add New Flex Store

First prepare the Flex management host as described above. Run all following commands as user root on the Flex management host.

Copy the public key to the new host and make it known to ansible (change NEW_HOST accordingly):

NEW_HOST=vm-flex-store-new
ssh-copy-id $NEW_HOST
ansible-playbook /var/epages/flex/ansible/update-conf.yml -e "{'stores': ['$NEW_HOST']}"

With this method you are asked for the root password of each Flex store. SSH root login with password must be enabled.

Check that the connection to the new Flex store works:

ansible $NEW_HOST, -a hostname

Install new Flex store:

ansible-playbook /var/epages/flex/ansible/install.yml --limit $NEW_HOST -vvv

This may take a while. Do not interrupt the process.

Stop Managing Flex Store

Show all used Flex stores:

ansible flexstores --list-hosts

All Flex stores are listed in /var/epages/flex/ansible/hosts. Simply drop the line with the specific host to stop managing the Flex store (change DROP_HOST accordingly):

DROP_HOST=vm-flex-store99
sed -i "/^$DROP_HOST$/d" /var/epages/flex/ansible/hosts

Now, the dropped Flex store should not be shown anymore:

ansible flexstores --list-hosts

Configuration Files

The ansible configuration file can be found in /root/.ansible.cfg.

Global variables for Flex store playbooks can be found in /var/epages/flex/ansible/group_vars/all.

All Flex store hosts are listed in /var/epages/flex/ansible/hosts.