Difference between revisions of "Freeside:1.9:Documentation:Upgrading"

From Freeside
Jump to: navigation, search
(Upgrade instructions)
(Upgrade instructions)
 
(24 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
= Upgrade instructions =
 
= Upgrade instructions =
 +
 
* Upgrade HTML::Widgets::SelectLayers to 0.07 (or later)
 
* Upgrade HTML::Widgets::SelectLayers to 0.07 (or later)
 
* Install Authen::Passphrase
 
* Install Authen::Passphrase
 
* Install Net::Domain::TLD
 
* Install Net::Domain::TLD
 
* Install Business::US::USPS::WebTools
 
* Install Business::US::USPS::WebTools
* New packages/modules for RT 3.6.6: libxml-rss-perl libcalendar-simple-perl libgd-graph-perl libuniversal-require-perl libgd-text-perl libcss-squish-perl
+
* Install Net::Ping::External
 +
* New packages/modules for RT 3.6.6: libxml-rss-perl libcalendar-simple-perl libgd-graph-perl libgd-text-perl libcss-squish-perl
 
* <code>make install-perl-modules</code>
 
* <code>make install-perl-modules</code>
 
* As the freeside UNIX user, run <code>freeside-upgrade username</code>, passing the username of an internal Freeside user.
 
* As the freeside UNIX user, run <code>freeside-upgrade username</code>, passing the username of an internal Freeside user.
 
* If freeside-upgrade hangs, try stopping Apache, all Freeside processes, and anything else connected to your database, especially on older PostgreSQL versions.
 
* If freeside-upgrade hangs, try stopping Apache, all Freeside processes, and anything else connected to your database, especially on older PostgreSQL versions.
* Run <code>bin/freeside-migrate-events</code> to migrate your (deprecated) invoice events to the new billing events.  Keep an eye out for anything which does not migrate.  ''Note: if you have problems with this step, fix the migration, restore the database from backup and start again from freeside-upgrade.  Do not continue on with the upgrade!''
+
* <code>make install-docs</code>
 +
* Start Apache, go to Configuration -> Employees -> Employee groups and add "Edit global billing events" to your group.
 +
* Run <code>bin/freeside-migrate-events</code> to migrate your (deprecated) invoice events to the new billing events.  Keep an eye out for anything which does not migrate.  ''Note: if you have problems with this step, fix the migration, restore the database from backup and start again from freeside-upgrade.  Do not continue on with the upgrade!  This step is NOT optional!''
 +
** If any of your events had reasons, you need to go in to new event config and manually set them.
 
* <code>make configure-rt</code>
 
* <code>make configure-rt</code>
 
* <code>mv /opt/rt3/etc/RT_SiteConfig.pm /opt/rt3/etc/RT_SiteConfig.pm.OLD; make install-rt</code>
 
* <code>mv /opt/rt3/etc/RT_SiteConfig.pm /opt/rt3/etc/RT_SiteConfig.pm.OLD; make install-rt</code>
* <code>/opt/rt3/sbin/rt-setup-database --action insert --datadir rt/etc/upgrade/3.5.1</code>
+
** Something's going wrong with this step; need to edit /opt/rt3/etc/RT_SiteConfig.pm and re-substitute things in manually :/
 +
* <code>su freeside -c '/opt/rt3/sbin/rt-setup-database --action insert --datadir rt/etc/upgrade/3.5.1'</code>
 +
* <code>make install-texmf</code>
 
* <code>make install-docs</code> (or <code>make deploy</code> if you've got everything setup for that in the Makefile)
 
* <code>make install-docs</code> (or <code>make deploy</code> if you've got everything setup for that in the Makefile)
 
* You may want to check your ACLs under Configuration->Employees->View/Edit employee groups and grant some of the new rights to one or more groups.
 
* You may want to check your ACLs under Configuration->Employees->View/Edit employee groups and grant some of the new rights to one or more groups.
 +
* Restart Apache and the Freeside daemons.
 +
 +
= Possible gotchas =
  
== Possible gotchas ==
 
 
* "RT at a glance" ("Ticketing Main") blank?  Click "Edit" on the right, then click the "Reset to default" button.
 
* "RT at a glance" ("Ticketing Main") blank?  Click "Edit" on the right, then click the "Reset to default" button.
 
* Perl module errors?  Try <code>make clean</code> then <code>make install-perl-modules</code> then <code>make install-docs</code> or <code>make deploy</code> again
 
* Perl module errors?  Try <code>make clean</code> then <code>make install-perl-modules</code> then <code>make install-docs</code> or <code>make deploy</code> again
  
 
= Currently known issues =
 
= Currently known issues =
 +
 +
* If using freeside-daily with the -y switch, you may need to adjust the timing of your migrated events.  The -y offset now only applies to invoice generation, not event testing.  Subtract the number of days of your -y offset from the new events.
 +
 +
= SQL updates for specific scenarios =
  
 
* If you're using an early 1.9 snapshot from CVS, you may need to update the a column type in the conf table for freeside-upgrade to complete sucessfully:
 
* If you're using an early 1.9 snapshot from CVS, you may need to update the a column type in the conf table for freeside-upgrade to complete sucessfully:
  
PostgreSQL:
 
 
   ALTER TABLE conf ALTER COLUMN value TYPE text;
 
   ALTER TABLE conf ALTER COLUMN value TYPE text;
  
MySQL (?):
+
* If you're using an early 1.9 snapshot from CVS and want to do CDR rating:
   ALTER TABLE conf ALTER COLUMN value TYPE text;
+
 
 +
  ALTER TABLE cust_bill_pkg_detail  ALTER COLUMN detail TYPE varchar(255);
 +
  ALTER TABLE h_cust_bill_pkg_detail ALTER COLUMN detail TYPE varchar(255);
 +
  ALTER TABLE rate_prefix ALTER COLUMN npa TYPE varchar(10);
 +
  ALTER TABLE h_rate_prefix ALTER COLUMN npa TYPE varchar(10);
 +
 
 +
* If you have very long CDR filenames:
 +
 
 +
  ALTER TABLE cdr ALTER COLUMN cdrbatch TYPE varchar(255);
 +
   ALTER TABLE h_cdr ALTER COLUMN cdrbatch TYPE varchar(255);
 +
 
 +
* If you want to do sub-penny CDR rating (e.g. for termination):
  
= Random wishlist =
+
  ALTER TABLE cdr ALTER COLUMN rated_price TYPE decimal(10,4);
* cust_main::retry_realtime optimization?
+
  ALTER TABLE h_cdr ALTER COLUMN rated_price TYPE decimal(10,4);
* Use FCKeditor for config popups for textareas.
+
  ALTER TABLE cdr_termination ALTER COLUMN rated_price TYPE decimal(10,4);
* small_custview borders inside RT look janky
+
  ALTER TABLE h_cdr_termination ALTER COLUMN rated_price TYPE decimal(10,4);
* bin/fs-migrate-events doesn't make events that apply to a single agent into agent-editable events... perhaps it should?
+
  ALTER TABLE cust_bill_pkg_detail ALTER COLUMN amount TYPE decimal(10,4);
 +
  ALTER TABLE h_cust_bill_pkg_detail ALTER COLUMN amount TYPE decimal(10,4);

Latest revision as of 18:29, 27 September 2010

Upgrade instructions

  • Upgrade HTML::Widgets::SelectLayers to 0.07 (or later)
  • Install Authen::Passphrase
  • Install Net::Domain::TLD
  • Install Business::US::USPS::WebTools
  • Install Net::Ping::External
  • New packages/modules for RT 3.6.6: libxml-rss-perl libcalendar-simple-perl libgd-graph-perl libgd-text-perl libcss-squish-perl
  • make install-perl-modules
  • As the freeside UNIX user, run freeside-upgrade username, passing the username of an internal Freeside user.
  • If freeside-upgrade hangs, try stopping Apache, all Freeside processes, and anything else connected to your database, especially on older PostgreSQL versions.
  • make install-docs
  • Start Apache, go to Configuration -> Employees -> Employee groups and add "Edit global billing events" to your group.
  • Run bin/freeside-migrate-events to migrate your (deprecated) invoice events to the new billing events. Keep an eye out for anything which does not migrate. Note: if you have problems with this step, fix the migration, restore the database from backup and start again from freeside-upgrade. Do not continue on with the upgrade! This step is NOT optional!
    • If any of your events had reasons, you need to go in to new event config and manually set them.
  • make configure-rt
  • mv /opt/rt3/etc/RT_SiteConfig.pm /opt/rt3/etc/RT_SiteConfig.pm.OLD; make install-rt
    • Something's going wrong with this step; need to edit /opt/rt3/etc/RT_SiteConfig.pm and re-substitute things in manually :/
  • su freeside -c '/opt/rt3/sbin/rt-setup-database --action insert --datadir rt/etc/upgrade/3.5.1'
  • make install-texmf
  • make install-docs (or make deploy if you've got everything setup for that in the Makefile)
  • You may want to check your ACLs under Configuration->Employees->View/Edit employee groups and grant some of the new rights to one or more groups.
  • Restart Apache and the Freeside daemons.

Possible gotchas

  • "RT at a glance" ("Ticketing Main") blank? Click "Edit" on the right, then click the "Reset to default" button.
  • Perl module errors? Try make clean then make install-perl-modules then make install-docs or make deploy again

Currently known issues

  • If using freeside-daily with the -y switch, you may need to adjust the timing of your migrated events. The -y offset now only applies to invoice generation, not event testing. Subtract the number of days of your -y offset from the new events.

SQL updates for specific scenarios

  • If you're using an early 1.9 snapshot from CVS, you may need to update the a column type in the conf table for freeside-upgrade to complete sucessfully:
 ALTER TABLE conf ALTER COLUMN value TYPE text;
  • If you're using an early 1.9 snapshot from CVS and want to do CDR rating:
 ALTER TABLE cust_bill_pkg_detail   ALTER COLUMN detail TYPE varchar(255);
 ALTER TABLE h_cust_bill_pkg_detail ALTER COLUMN detail TYPE varchar(255);
 ALTER TABLE rate_prefix ALTER COLUMN npa TYPE varchar(10);
 ALTER TABLE h_rate_prefix ALTER COLUMN npa TYPE varchar(10);
  • If you have very long CDR filenames:
 ALTER TABLE cdr ALTER COLUMN cdrbatch TYPE varchar(255);
 ALTER TABLE h_cdr ALTER COLUMN cdrbatch TYPE varchar(255);
  • If you want to do sub-penny CDR rating (e.g. for termination):
 ALTER TABLE cdr ALTER COLUMN rated_price TYPE decimal(10,4);
 ALTER TABLE h_cdr ALTER COLUMN rated_price TYPE decimal(10,4);
 ALTER TABLE cdr_termination ALTER COLUMN rated_price TYPE decimal(10,4);
 ALTER TABLE h_cdr_termination ALTER COLUMN rated_price TYPE decimal(10,4);
 ALTER TABLE cust_bill_pkg_detail ALTER COLUMN amount TYPE decimal(10,4);
 ALTER TABLE h_cust_bill_pkg_detail ALTER COLUMN amount TYPE decimal(10,4);