Changes between Version 22 and Version 23 of MoveOffTrac


Ignore:
Timestamp:
2025-08-21T12:25:37Z (3 months ago)
Author:
btlogy
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • MoveOffTrac

    v22 v23  
    7878     * preview: https://www.lafs.eval.latfa.net/
    7979     * live: https://www.lafs.eval.latfa.net/
    80 2. **IN PROGRESS** - Production:
     802. **IN PROGRESS** - Production (details in #4161):
    8181   1. **PENDING** - Website only: VPS + OS + NGinx + website + redirect/proxy rules to legacy resources
    8282      * ✅ Hetzner VPS is up and running on NixOS (webforge.of.tahoe-lafs.org)
     
    9090      * ➕ the Hall of Fame pages till needs to be "migrated"
    9191   2. **PENDING** - All features from the PoC above: issues and wiki hosted by Forgejo
    92       * ⏸️ Steps described in #4161 (will require new data dump from Trac)
     92      * ⛔ Extract the data and reconfigure Trac in RO via root access to the legacy server
     93      * ⏸️ OR asynchronous workaround with Meejah
     94      * ⏸️ Rework the redirect/proxy rules to use Forgejo instead of Trac
    9395
    9496== Deliverable 2 - migration plan from Trac to self-hosted Gitea or Forgejo ==
    9597
    96 * Tool: [https://github.com/tahoe-lafs/trac2gitea trac2gitea]
     98* Requirements:
     99  * Code: [https://github.com/tahoe-lafs/MoveOffTrac MoveOffTrac] and [https://github.com/tahoe-lafs/trac2gitea trac2gitea] submodule
     100  * Credentials:
     101    * SSH key to access Trac data on Linode server
     102    * API token to write content under the Forgejo org/owner
     103* Steps:
     104  1 On Trac server (the export is scripted in `helpers/trac_dump.sh` in [https://github.com/tahoe-lafs/MoveOffTrac MoveOffTrac]):
     105    1. Activate the  Python environment if needed
     106    2. Launch a `trac-admin <path/to/project>` shell and run the `hotcopy <dump_dir>` command
     107    3. Purge session from the hotcopy with `trac-admin <dump_dir>` and `session purge ...`
     108    4. Purge db backup from `rm -rf <dump_dir>/db/trac-backup*`
     109    5. Purge log files from the hotcopy `rm -f <dump_dir>/log/*`
     110    6. Compact the DB with `sqlite3 <dump_dir>/db/trac.db 'VACUUM;'`
     111    7. Copy trac.htdigest to <dump_dir>
     112    8. Copy trac public_html to <dump_dir>
     113    9. Archive the Trac data `tar -czvf <dump_file> <dump_dir>`
     114  2. On a workstation:
     115    1. Checkout [https://github.com/tahoe-lafs/MoveOffTrac MoveOffTrac] and [https://github.com/tahoe-lafs/trac2gitea trac2giteam] submodule (e.g. in `~/MoveOffTrac`)
     116    1. Restore the dump with `tar -C trac/project -xzvf <dump_file> --strip-components=1`
     117    2. Adapt or patch the configuration with `patch trac/project/conf/trac.ini < helpers/trac.ini.patch` if needed
     118    3. Launch a `docker-compose run --rm trac bash -c "trac-admin project"` session and run `permission add <username_here> admin` if needed
     119    4. Start the server with `docker-compose run --rm --service-ports trac`
     120    5. Open a browser on http://localhost:8000/project/ and verify the service (including the login if needed)
     121    6. Edit the WikiStart page to replace link: `/~trac/` -> `../chrome/site/` or transform them as attachment if needed
     122  3. On the Forgejo server:
     123    1. Checkout [https://github.com/tahoe-lafs/MoveOffTrac MoveOffTrac] and [https://github.com/tahoe-lafs/trac2gitea trac2giteam] submodule (e.g. in `~/MoveOffTrac`)
     124    2. Create an empty repository and (e.g. `trac`) and disable unwanted features (e.g. Unit/Code)
     125    3. Create an empty Wiki home page in the repository prepared above
     126    4. Build trac2gitea using the instructions provided (in [https://github.com/tahoe-lafs/trac2gitea trac2gitea])
     127    5. Transfer the Trac project directory from the workstation (previous sextion) (e.g.: in `~/MoveOffTrac/trac/project`)
     128    6. Remote: migrate the Trac project to Forgejo:
     129       {{{
     130         export TOKEN=<token>
     131         export OWNER=tahoe-lafs
     132         export REPO=trac
     133         sudo ./trac2gitea/trac2gitea --app-ini /var/lib/forgejo/custom/conf/app.ini --db-only trac/project /var/lib/forgejo $OWNER $REPO
     134         sudo ./trac2gitea/trac2gitea --app-ini /var/lib/forgejo/custom/conf/app.ini --wiki-only --wiki-token=$TOKEN --wiki-dir=/tmp/$REPO trac/project /var/lib/forgejo $OWNER $REPO
     135       }}}
     136    7. Remote: `systemctl start forgejo.service`
    97137* Caveats:
     138  * migration works only with sqlite DB!
    98139  * tables are not always correctly converted to MD (e.g. #1170 - possibly wrongly formatted)
    99140  * some original links are still not converted and points to tahoe-lafs.org (e.g. http://!?)
    100141  * tickets authors need to be created as user before the migration to link contributions to their profile
    101142  * changes history of wiki pages will be not be linked to their authors
    102 * Steps:
    103   TBD
    104143
    105144== Deliverable 3 - high-level migration plan from self-hosted to an SaaS provider ==