Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
metamod:damocles_upgrade [2011-05-06 11:46:30] geira |
metamod:damocles_upgrade [2022-05-31 09:29:32] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== Checklist for upgrading production servers to 2.8 ====== | ====== Checklist for upgrading production servers to 2.8 ====== | ||
- | Sites to be upgraded on damocles.met.no: | + | See [[https://dokit.met.no/prosjekter/metsis/damocles_upgrade]] |
- | + | ||
- | * damocles (owns damocles_metadata and damocles_userbase) | + | |
- | * dokipy | + | |
- | * ipycoord | + | |
- | * gcwdemo | + | |
- | + | ||
- | Other sites: | + | |
- | + | ||
- | * arcticdata (separate server) | + | |
- | + | ||
- | ===== Phase 1. Preparation ===== | + | |
- | + | ||
- | Using gcwdemo as an example in code. | + | |
- | + | ||
- | ==== Server configuration ==== | + | |
- | + | ||
- | sudo apt-get install metno-perl-webdev-ver1 | + | |
- | + | ||
- | ==== Metamod source ==== | + | |
- | + | ||
- | cd / | + | |
- | sudo svn co https://svn.met.no/metamod/trunk | + | |
- | sudo chown -R damocles.damocles trunk/ # needed for building | + | |
- | + | ||
- | === PostgreSQL contribs === | + | |
- | + | ||
- | Use version 8.3, copy to | + | |
- | + | ||
- | ==== Site configuration ==== | + | |
- | + | ||
- | < | + | |
- | + | ||
- | Now that Egil is back we have backmerged the changes and is generating the code from his pc. | + | |
- | + | ||
- | Must be repeated for each site. Custom styles ignored at this point - must be added later. | + | |
- | + | ||
- | === Services === | + | |
- | + | ||
- | ^site ^port^base^harvester^upload^thredds^quest | + | |
- | |damocles|3000|yes |no | + | |
- | |dokipy | + | |
- | |ipycoord|3002|no | + | |
- | |gcwdemo |3003|no | + | |
- | + | ||
- | === base directory === | + | |
- | + | ||
- | < | + | |
- | + | ||
- | Use ''/ | + | |
- | + | ||
- | === Staticdata === | + | |
- | + | ||
- | * upgrade staticdata/ | + | |
- | * all <sc id=“x” type=“x”…> | + | |
- | * add dataset_file_location and dataset_file_size (see app/ | + | |
- | + | ||
- | === master_config === | + | |
- | + | ||
- | **Ignore this section** | + | |
- | + | ||
- | cd / | + | |
- | sudo -u damocles mkdir app | + | |
- | sudo -u damocles cp / | + | |
- | + | ||
- | Compare old master_config to default: | + | |
- | + | ||
- | cd .. | + | |
- | trunk/ | + | |
- | gcwdemo/ | + | |
- | + | ||
- | </ | + | |
- | + | ||
- | Upgrade master_config (see trunk/ | + | |
- | + | ||
- | === Custom texts and styles === | + | |
- | + | ||
- | Postponed until Phase 5 | + | |
- | + | ||
- | + | ||
- | ===== Phase 2. Setting up new database ===== | + | |
- | + | ||
- | Only done once. | + | |
- | + | ||
- | Database setup requires scripts generated to target. This means the Generate Target part of Phase 3 for site damocles must be executed first. | + | |
- | + | ||
- | The database is not on the damocles server, but on **metamoddb.met.no**. This contains among others the following databases: | + | |
- | + | ||
- | ^Name ^ Owner ^ | + | |
- | |damocles_metadata | + | |
- | |damocles_userbase | + | |
- | + | ||
- | To avoid conflicts and downtime, make two new databases for 2.8 instead: | + | |
- | + | ||
- | ==== damocles28_userbase ==== | + | |
- | + | ||
- | * userdb data are not duplicated anywhere else | + | |
- | * must dump 2.6 userdb and import into 2.8, then run upgradeuserdb_26-28.sh | + | |
- | * see http:// | + | |
- | + | ||
- | pg_dump -h metamoddb -U admin damocles_userbase > damocles_userbase.sql | + | |
- | createdb -U admin -h metamoddb -E UTF-8 damocles28_userbase | + | |
- | cat damocles_userbase.sql | psql -h metamoddb -U admin damocles28_userbase | + | |
- | cd / | + | |
- | target/ | + | |
- | + | ||
- | **[DONE]** | + | |
- | + | ||
- | ==== damocles28_metadata ==== | + | |
- | + | ||
- | * metadatadb must be generated from scratch using createdb.sh | + | |
- | * which xml files should be used to populate the DB? | + | |
- | * / | + | |
- | * run import_dataset.pl on files | + | |
- | * anything else to think of? (if so, probably best Heiko did this) | + | |
- | + | ||
- | ===== Phase 3. Setting up generic metamod ===== | + | |
- | + | ||
- | This will setup a generic Metamod 2.8 instance to test the system is running. Customization will be done afterwards, and the installation re-run. | + | |
- | + | ||
- | Must be repeated for each site. | + | |
- | + | ||
- | ==== Generate target ==== | + | |
- | + | ||
- | cd / | + | |
- | sudo -u damocles PERL5LIB=/ | + | |
- | + | ||
- | Note that Calalyst building tests during update_target will fail unless you have a working, up-to-date database; also, you cannot upgrade your database without running update_target. Chicken, meet egg. Suggest temporary commenting out the following on line 237 (+/-): | + | |
- | + | ||
- | # | + | |
- | # install Catalyst files before $appdir to avoid clobbering custom files | + | |
- | # | + | |
- | & | + | |
- | + | ||
- | You will now get the following error message: | + | |
- | + | ||
- | Configuring application '' | + | |
- | Cannot write to target dir / | + | |
- | + | ||
- | Time to take the weekend off and try again next week. | + | |
- | + | ||
- | Create/ | + | |
- | + | ||
- | sudo -u damocles ./ | + | |
- | + | ||
- | ==== Test Catalyst ==== | + | |
- | + | ||
- | Remember each site must have its own dedicated port: | + | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | ==== Apache configuration ==== | + | |
- | + | ||
- | This server uses DNS-based virtual hosting, however each site already has an existing | + | |
- | setup in sites-available. This means the generated httpd.conf in target/etc cannot be used directly; instead you must manually copy & paste the new config into the old file. | + | |
- | (Perhaps later when the 2.6 versions are turned off we could use the generated config files directly.) | + | |
- | + | ||
- | ==== Install services ==== | + | |
- | + | ||
- | Do not run install_jobs.sh; | + | |
- | + | ||
- | + | ||
- | + | ||
- | ===== Phase 4. Adding custom functions and styling ===== | + | |
- | + | ||
- | Todo by someone else (have no idea what is required and how to implement it). | + | |
- | + | ||
- | Must be repeated for each site. | + | |
- | + | ||
- | + | ||
- | --- // | + |