Dec 192020
 

My plan is to update the production website and database in place. To test this process, a copy of the production database has been copied to the pg02.int.unixathome.org PostgreSQL database server and is now available as freshports.dgnew.

The first test was the database update process. I think I have that settled now.

Pointing the devgit.freshports.org website at the database found a few missing pieces in the stored procedures.

Next, I want to try the ingress side of the website; the processing of commits.

What is involved in that process?

Configuration file changes and, to ensure integrity, stopping all processing first.

Stopping the processing

[dan@devgit-ingress01:~] $ sudo service ingress stop
Stopping ingress.
[dan@devgit-ingress01:~] $ sudo service ingress_svn stop
Stopping ingress_svn.
[dan@devgit-ingress01:~] $ sudo service freshports stop
Stopping freshports.
[dan@devgit-ingress01:~] $ 

That stops, respectively:

  1. the processing of XML files
  2. the processing of incoming svn commit emails and generation of XML files
  3. the detection of new git commits and creation of XML files

Configuration files

There are two sets of configuration files:

  • ingress – the jail used for ingesting commits into the database
  • website – the jail used for hosting the website

Usually, these run in separate jails, but they don’t have to. At present, production is running on single CPU non-ZFS system with hardware RAID and 8GB RAM. That host does not run jails.

website

The website website files are:

[dan@devgit-nginx01:/usr/local/etc/freshports] $ sudo grep freshports.devgit *
config.pm:$FreshPorts::Config::dbname			= 'freshports.devgit';
config.sh:DB=freshports.devgit
database.php:	$db = pg_connect("dbname=freshports.devgit host=pg02.int.unixathome.org user=www_dev_git password=[redacted] sslmode=require");
fp-listen.ini:DBNAME		= 'freshports.devgit'
[dan@devgit-nginx01:/usr/local/etc/freshports] $ 

Changing databases for the website also necessitates clearing the cache.

Yes, the database is specified in four different locations. We have shell scripts, python, PHP, and Perl all needing the configuration.

After making those changes, this clears the cache:

$ sudo zfs rollback system/data/freshports-cache/devgit-nginx01/ports@empty
$ sudo zfs rollback system/data/freshports-cache/devgit-nginx01/packages@empty

The website is now on the conversion test database (freshports.dgnew, as is dev git new).

ingress

The ingress configuration files are:

[dan@devgit-ingress01:/usr/local/etc/freshports] $ sudo grep freshports.devgit *
config.ini:DBNAME             = 'freshports.devgit'
config.pm:$FreshPorts::Config::dbname			= 'freshports.devgit';

The .ini file is used for processing new package building information.

The .pm file is used by the commit processing.

I will update both, let the commit processing resume, and see what happens.

*some time later*

I had some database permission issue because of missing pg_hba.conf settings, but once that was fixed, the commits started coming in:

Commits coming into the converted database

Commits coming into the converted database

Now I wait and monitor the incoming commits to be sure the ongoing processing is smooth.

Website Pin Facebook Twitter Myspace Friendfeed Technorati del.icio.us Digg Google StumbleUpon Premium Responsive