IXP Manager v6.0.0
Welcome to the release of IXP Manager v6 and thanks for your patience to date - we know this release was some time in the making.
One of the biggest changes in v6 relates to a significant framework change - Doctrine ORM has been completely removed and replaced with Laravel's Eloquent. This work is thanks to @yannrobin who has done all the heavy-lifting on rewriting all database-related code within the project over the past few months. Using Eloquent, which is a key component of Laravel and integrates fully with the framework, should allow us to develop new features with greater ease and speed.
This release also introduces two new major features: core bundle management (inter-switch links) and database change logging.
Release Summary
git --no-pager diff --shortstat release-v5 release-v6
1280 files changed, 83436 insertions(+), 138379 deletions(-)
A brief summery of the biggest changes in IXP Manager v6 include:
- Significant framework changes - Doctrine ORM has been completely removed and replaced with Eloquent.
- Core bundles - management of the IXP's own inter-switch links.
- Database change logging - additions, edits and deletions to database objects are now recorded for six months.
- Command line tools for user management - these have been requested a number of times and should prove very useful.
We have also released a video tutorial of the IXP Manager v5.8.0 to v6.0.0 upgrade process which includes upgrading to PHP 8 on an existing system (e.g. Ubuntu 18.04 in the video) and a second option of upgrading to Ubuntu 20.04 and then to PHP 8.0.
Upgrade Instructions
If you are upgrading to IXP Manager v6, this is where to start. We assume that you are upgrading from v5.8.0. No other upgrade paths are supported or recommended.
To help with upgrades, we've cloned INEX's own installation of IXP Manager v5.8.0 running on Ubuntu 18.04 LTS with PHP 7.3 and we've recorded a video of the upgrade process for both IXP Manager to v6.0.0 and to replace PHP 7.3 with PHP 8.0. You can find that video here and these instructions were created when doing test runs for that same video. The last section of that video also demonstrates an upgrade from Ubuntu 18.04 to 20.04 and how to over come a couple issues.
Prerequisite: PHP >= v8.0 is required for IXP Manager v6.0.0. If you are using Ubuntu, we recommend this PPA and video above shows the 7.3 -> 8.0 upgrade process. We would also recommend that you upgrade to Ubuntu 20.04 LTS as part of this process if you are using an older version of Ubuntu (however it will work fine on 18.04 with PHP 8.0). The end of the referenced video includes a 18.04 -> 20.04 upgrade.
The process we describe here is based on a standard installation of IXP Manager using the automated installation scripts. If you have installed IXP Manager in a custom location / using custom settings then just be sure to adjust the following to match your own environment.
We will assume your installation of IXP Manager is installed at a location identified by the shell variable IXPROOT
. This is set in step (1) below.
Remember: you can follow along with the video for a more detailed discussion on these steps.
-
Set up some variables and ensure directory permissions are okay:
# set this to your IXP Manager installation directory IXPROOT=/srv/ixpmanager # fix as appropriate to your operating system. ubuntu/debian is fine with this: MY_WWW_USER=www-data
-
Let's take some backups of both the IXP Manager installation and the database:
# Start with the IXP Manager installation tar -jcf /srv/ixpmanager-v5.8.tar.bz2 $IXPROOT # And now the database: source $IXPROOT/.env mysqldump --no-tablespaces -h $DB_HOST -u $DB_USERNAME -p$DB_PASSWORD $DB_DATABASE | \ bzip2 -9 >/srv/ixpmanager-database-v5.8.sql.bz2
You should copy both of these files off the server before proceeding.
Before continuing, you should also ensure your IXP Manager MySQL user has
SUPER
privileges. This needs to be done as the MySQL root user. The command you need to execute with MySQL can be determined as follows:source $IXPROOT/.env echo "GRANT SUPER ON *.* TO \`$DB_USERNAME\`@\`$DB_HOST\`;"
This command will need to be run on MySQL as the root user.
-
Enable maintenance mode to let your users know what's happening:
cd $IXPROOT php artisan down --message='Upgrading to IXP Manager v6. Check back after 23:00 BST.'
-
Shut down the sflow p2p data collection system and safely flush the rrdcached process if this is being used:
killall sflowtool killall -USR1 rrdcached
-
Ensure our operating system is fully up to date:
apt update apt upgrade
-
We now need to upgrade PHP to 8.0 and install any other required packages:
# We use a Ubuntu PPA for the 8.0 packages. You may already be using this but it can be set-up as follows: apt-get install -yq software-properties-common add-apt-repository -y ppa:ondrej/php apt update # With that set-up, we install all the packages required by IXP Manager v6.0.0. # (you may already have a lot of these installed - taken from https://docs.ixpmanager.org/install/manually/): apt install -qy apache2 php8.0 php8.0-intl php-rrd php8.0-cgi php8.0-cli \ php8.0-snmp php8.0-curl php-memcached libapache2-mod-php8.0 mysql-server \ mysql-client php8.0-mysql memcached snmp php8.0-mbstring php8.0-xml php8.0-gd \ php8.0-bcmath bgpq3 php-memcache unzip php8.0-zip git php-yaml \ php-ds libconfig-general-perl libnetaddr-ip-perl mrtg libconfig-general-perl \ libnetaddr-ip-perl rrdtool librrds-perl curl composer
-
The above will possibly have left PHP in a bit of a mess. Best to review the video but essentially, we want to remove any crud from older versions. In the example I'm using, our crud relates to PHP 7.3.
# find old packages and, if nothing looks unusual, purge them: dpkg -l | grep php7.3 dpkg --purge `dpkg -l | grep php7.3 | awk '{print $2}'` # see if there are any other versions lingering around (php-xxx packages are fine): dpkg -l | grep php # ... and remove and purge them if there are. # check your php version now and it should be >= 8.0.0: php -v
If you have more than ~20 members or members with huge route server prefix lists, then you should edit
/etc/php/8.0/apache2/php.ini
and setmemory_limit
to >=1024
andmax_execution_time
to300
.In our test runs, Apache was not setup to run PHP 8.0 after the above. This is corrected with:
apt install libapache2-mod-php8.0 a2enmod php8.0 systemctl restart apache2.service
-
Upgrade IXP Manager:
# pull the latest code git fetch --all # check out the version you are upgrading to git checkout v6.0.0
-
Install Composer locally. This is important because Ubuntu uses v1 at the moment which is not compatible with PHP 8.0. These instructions come straight from getcomposer.org and you should browse to here and follow the latest as the hash in this example may be out of date:
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" php -r "if (hash_file('sha384', 'composer-setup.php') === '756890a4488ce9024fc62c56153228907f1545c228516cbf63f885e036d37e9a59d27d63f46af1d4d07ee0f76181c7d3') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" php composer-setup.php php -r "unlink('composer-setup.php');"
-
Install the required libraries via composer:
# this assumes composer.phar is in the IXP Manager install directory. YMMV - see notes on the upgrade instructions. sudo -u $MY_WWW_USER bash -c "HOME=${IXPROOT}/storage && cd ${IXPROOT} && php ./composer.phar install --no-dev --prefer-dist"
-
Restart Memcached and clear the cache. Do not forget / skip this step!
# (assuming we're still in $IXPROOT) systemctl restart memcached.service php artisan cache:clear
-
Update the database schema:
# (assuming we're still in $IXPROOT) # (you really should take a mysqldump of your database first if you haven't already) # see what will change: php artisan migrate:status # migrate: php artisan migrate --force
-
Ensure file permissions are still correct.
chown -R $MY_WWW_USER: ${IXPROOT}/storage $IXPROOT/vendor $IXPROOT/bootstrap/cache chmod -R u+rwX ${IXPROOT}/storage $IXPROOT/vendor $IXPROOT/bootstrap/cache
-
Clear out all caches:
# (assuming we're still in $IXPROOT) php artisan cache:clear php artisan config:clear php artisan route:clear php artisan view:clear
-
Now work through the rest of the release notes before proceeding and disabling maintenance mode.
-
Disable maintenance mode:
# (assuming we're still in $IXPROOT) ./artisan up
-
Recreate SQL views
Some older scripts, including the sflow modules, rely on MySQL view tables that may be affected by SQL updates. You can safely run this to recreate them:
# (assuming we're still in $IXPROOT) source .env mysql -h $DB_HOST -u $DB_USERNAME -p$DB_PASSWORD $DB_DATABASE < $IXPROOT/tools/sql/views.sql
-
Restart sflow. The process for restarting sflow is implementation-dependent, but you'll need to restart the rrdcached daemon too:
systemctl restart rrdcached
Post Upgrade Requirements
Please edit your .env. file and replace
MAIL_DRIVERwith
MAIL_MAILER`. E.g.
-MAIL_DRIVER=smtp
+MAIL_MAILER=smtp
Improvements
Among others:
- Expand Patch Panel Port Name Prefix Length - #701
- Add Notes for Infrastructure - #699
- CSS / Tailwind + new alerts design - 5379299
- Set Connected dialog should prompt for colocation ref - #634
- Add 25g as a port speed - #685
- Facility should restrict rack selection - #691
Bug Fixes
Among others:
- Peering matrix http includes entries where activepeeringmatrix = 0 (islandbridgenetworks/IXP-Manager-Archive-Yann#270
fixes for peering matrix / ip address controller address family specification) - Count incorrect in Members by Location - #688
- Patch panel move feature can't move to duplexed ports - #640
- Insufficient permissions error clicking on port status tag - #669