Copy SWXL Links to CMS Tables

OVERVIEW:

  • Export SWXL tables to data.myersmediagroup.com
  • Import SWXL tables to CMS
  • Publish CMS with new SWXL links

PROCESS:

Export SWXL tables to data.myersmediagroup.com

  1. Connect to cms staging server
$ cmssh staging01-cms
  1. Copy and customize db/sqlserver/conf.sample.mk
    (“SWXL_TEMPLATE_{START,END}”should be the SWXL CMS template ID range)
  2. Generate the CMS files
$ make swxl_{categories,keywords,relations,urls}.csv.gz

NOTE: Do not run ‘svn update’ on CMS servers. These production sites are managed by the CMS team. You may need to replace “MakeFile” and “conf.mk” first with a newer version temporarily, ie.

$ svn cat https://dev.myersmediagroup.com/mmgsvn/KMS/trunk/SEOCluster/trunk/cms-v2/db/sqlserver/Makefile > Makefile

$ svn cat https://dev.myersmediagroup.com/mmgsvn/KMS/trunk/SEOCluster/trunk/cms-v2/db/sqlserver/conf.sample.mk > conf.mk
  1. On prod02> D:\MMG\data\public\cluster\{pos}\{lob}\
    • Move existing swxl_*.csv.gz files to the _old directory and date-stamp the file names with the original file date (not the current date).
    • Remove old swxl_*.ok files
    • Remove old swxl_*.db files
  2. Copy new swxl_*.csv.gz files to prod02 (D:\MMG\data\public\cluster\{pos}\{lob})
  3. Commit a new entry in:
    https://dev.myersmediagroup.com/mmgsvn/KMS/trunk/SEOCluster/trunk/cms-v2/doc/data-repo/CHANGELOG.md
  4. Repeat for each LOB

Import SWXL tables to CMS

  1. $ cmssh {lob}-staging-{pos}
  2. Delete old files
    • db/swxl_*.db files
    • db/data/swxl_*.csv files
    • db/.deps/swxl_*.d files
  3. Create new db files
    $ make db/swxl_{categories,keywords,relations,urls}
  4. Confirm data has been imported
$ make mysql
mysql> show tables;
mysql> select 'swxl_categories' as tbl, count(*) as cnt from swxl_categories
union all select 'swxl_keywords' as tbl, count(*) as cnt from swxl_keywords
union all select 'swxl_relations' as tbl, count(*) as cnt from swxl_relations
union all select 'swxl_urls' as tbl, count(*) as cnt from swxl_urls;

Publish CMS with new SWXL links

This is managed by the CMS team; simply notify the PM in charge that the given sites are ready.

History

Leave a Reply