Creating MindTouch Packages

    Introduction

    This document will outline the standard process for creating MindTouch packages which ship with the default installations.

    Intended Audience

    MindTouch devs.

    References

    Two relevant links:

    Status

    Documented by RoyK

    Functional Specification

    Use Cases

    Upon installation, end-users automatically receive all deployable packages based on license capabilities

    Upon any new installation, MindTouch packages will automatically deploy that mirror those in SVN at last code freeze.

    Upon update, end-users automatically receive updates to all deployable packages based on license capabilities

    Upon update, MindTouch packages will automatically deploy that mirror those in SVN at last code freeze, with the exception of hierarchies that are flagged as "editable" - particularly those in the IDF/pages hierarchy.

    Non-goals

    Technical Specification

    Process

    Here is a rough outline of how the packages are created from the SVN tree:

    1. Completely delete from disk the SVN tree
    2. Update the SVN tree to pick up all new loose files (templates)
    3. Delete your Special:Report and Templates:MindTouch tree in your target MindTouch installation
    4. Run the import command for both /specials/ and /templates/ to your local machine
    5. Then run the packaging (export) command to generate the packages

    List of Packages

    Base SVN tree is: https://svn.mindtouch.com/source/pri...kiwiki/library

    Package Name Permissions Package Description Capability Capability
    (Commercial-type)
    Other Flags Hierarchies Covered
    0010-mindtouch-templates.mtapp Public This is core library of MindTouch templates which are used on every install N/A N/A  
    • /Template:MindTouch/Controls
    • /Template:MindTouch/Pages
    • /Template:MindTouch/Reports
    • /Template:MindTouch/Views
    0010-mindtouch-special-reports.mtapp Private These are the curation analytics reports, available on every install N/A N/A  
    • /Special:Reports
    0020-mindtouch-templates-idf.mtapp Public These are the IDF templates, excluding the pages. package-idf N/A  
    • /Template:MindTouch/IDF/Controls
    • /Template:MindTouch/IDF/SeeAlso
    • /Template:MindTouch/IDF/Views
    0030-mindtouch-templates-idf-pages.mtapp Public These are the IDF pages. (These are a separate package because IDF pages are editable by the end-user and are not to be overwritten upon updates) package-idf N/A  
    • Template:MindTouch/IDF/Pages
    0040-mindtouch-imm.mtapp Public The IMM modules package-imm N/A
     
     
    • Template:MindTouch/IMM
    0050-mindtouch-oobe-none.mtapp Public OOBE for the core install N/A none

    initonly

    importonce

    • Template:MindTouch/OOBE/Core 
    0050-mindtouch-oobe-commercial.mtapp Public OOBE for the commercial product N/A commercial

    initonly

    importonce

    • Template:MindTouch/OOBE/Commercial
    • Acme_Jetpack_User_Guide)
    0050-mindtouch-oobe-platform.mtapp Public OOBE for the platform N/A platform

    initonly

    importonce

    (same as core)
    0060-mindtouch-oobe-none-homepage.mtapp Public Core OOBE homepage insertion N/A none

    initonly

    importonce

    Inserts content from Template:MindTouch/OOBE/Core/Home to the root Main: page
    0060-mindtouch-oobe-commercial-homepage.mtapp Public Commercial OOBE homepage insertion N/A commercial

    initonly

    importonce

    Inserts content from Template:MindTouch/OOBE/Commercial/Home to the root Main: page
    0060-mindtouch-oobe-platform-homepage.mtapp Public Platform OOBE homepage insertion N/A platform

    initonly

    importonce

    Inserts content fromTemplate:MindTouch/OOBE/Core/Home to the root Main: page
    0065-mindtouch-oobe-idf.mtapp Public Sample IDF Pages  package-idf N/A

    initonly

    importonce

    Inserts content from /Acme_Jetpack_User_Guide

    Command Line

    These are the command line tools I run to create all the packages. They reference loose files ("mindtouch-templates") which are files with  absolute URLs (one per line) of the targeted template tree (as outlined in the table above under "hierarchies covered").

    mono mindtouch.import.exe -U "admin" -P "password" -h "TARGET-MINDTOUCH-INSTALL" -e -L mindtouch-templates -r -O ../packages/default/public/0010-mindtouch-templates.mtapp;
    mono mindtouch.import.exe -U "admin" -P "password" -h "TARGET-MINDTOUCH-INSTALL" -e -L mindtouch-special-reports -r -O ../packages/default/private/0010-mindtouch-special-reports.mtapp;
    mono mindtouch.import.exe -U "admin" -P "password" -h "TARGET-MINDTOUCH-INSTALL" -e -L mindtouch-templates-ckb -r -O -cap package-idf ../packages/default/public/0020-mindtouch-templates-idf.mtapp;
    mono mindtouch.import.exe -U "admin" -P "password" -h "TARGET-MINDTOUCH-INSTALL" -e -L mindtouch-templates-ckb-pages -r -l -cap package-idf ../packages/default/public/0030-mindtouch-templates-idf-pages.mtapp;
    mono mindtouch.import.exe -U "admin" -P "password" -h "TARGET-MINDTOUCH-INSTALL" -e -L mindtouch-imm -r -O -cap package-imm ../packages/default/public/0040-mindtouch-imm.mtapp;

     

    Creating/Updating Packages

    All steps assume you've checked out the base svn library, above.

    To create new packages (.mtapp files):

    • Go to the root library folder and run ./package.sh (provide host/name/password when prompted)
    • This checks out the latest content from svn, re-imports, and creates the packages above.
    • Packages are exported to ./packages/export/default. They can then be tested or checked into svn trunk.
    • Remove title nodes from package.xml for the OOBE homepages

    To update loose XML files in svn:

    Sample Scenario: Update default templates with new content

    • Go to the /oobe, /template, or /specials folder under the library
    • Import the loose XML files into your MindTouch installation: ./import.sh (you'll be prompted for host, name and password)
    • ...Make changes to template pages in your local installation...
    • Copy your MindTouch pages back to loose files: ./export.sh (again, prompted for host/name/password)
    • Commit the modified loose files into svn (including package.xml)
    • If repackaging the .mtapp files, create new packages as above


    To copy pages to another server

    Sample Scenario: Give Product Management a safe area to edit the OOBE experience

    • Export the desired pages as a zip file (suppose you are in the /oobe folder and want to export /Template:MindTouch/OOBE):
      •  mono ../mindtouch.import.exe -e -r -p /Template:MindTouch/OOBE -X /Template:MindTouch/OOBE oobe.zip
      • This recursively exports /Template:MindTouch/OOBE relative to /Template:MindTouch/OOBE, so it can be re-imported anywhere
    • Import the .zip file onto a hierarchy (/Product_Management/OOBE) on the new server
      • mono ../mindtouch.import.exe -I /Product_Management/OOBE oobe.zip
      • When prompted, enter the host/user/password for the destination
      • Edit the pages on the new server.
      • When finished, perform the reverse: Export the files from the new server, and import back into the old.
      • You can then export the files on the old server, commit to svn, and repackage.

    Administration Notes

    Note: The .mtapp files are zips, and can be extracted with "7za e package.mtapp" (apt-get install p7zip-full if 7za is not installed). For some reason, the packages do not open on Mac -- use Windows and Izarc (for example) to edit the contents of the package.

    Test Cases

    1. After fresh install Core OOBE loaded into homepage (admin tabs on how to use MindTouch) when license is core
    2. After fresh install, Commercial OOBE loaded into homepage (Description of MindTouch 2010, including Acme Jetpack subpages) when license is commercial
    3. After fresh install, Platform OOBE loaded into homepage (admin tabs on how to use MindTouch) when license is platform
    4. For test cases #1-3, OOBE only runs once, after a fresh install. Service restarts/license changes/upgrades do not trigger OOBE packages.
    5. Content under /Template:MindTouch/IDF only populated when capability package-IDF is enabled in license
    6. Content under /Template:MindTouch/IMM only populated when capability package-IMM is enabled in license 
    Tag page
    You must login to post a comment.

    Copyright © 2011 MindTouch, Inc. Powered by