Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Sitegeist.MagicWand - Flow & Neos Meetup HH, No 7

Sitegeist
April 06, 2016
110

Sitegeist.MagicWand - Flow & Neos Meetup HH, No 7

Tools that make the Flow/Neos development easier.

Sitegeist

April 06, 2016
Tweet

Transcript

  1. SITEGEIST.

    MAGICWAND
    TOOLS THAT MAKE THE FLOW/NEOS
    DEVELOPMENT EASIER

    View Slide

  2. SITEGEIST.MAGICWAND
    WHO WE ARE
    » Wilhelm Behncke - Developer 


    [email protected]
    twitter: @WilhelmBehncke

    slack: @wbehncke


    Neos, Flow, JS

    NeosCore Member
    » Martin Ficzel - Developer


    [email protected]
    twitter/slack: @kopfaufholz


    Neos, Flow 


    TYPO3 3.6-6.2 / ext_caretaker

    View Slide

  3. SITEGEIST.MAGICWAND
    THE DAILY PAIN OF 

    A FLOW-DEV
    » Cloning Servers
    » Testing Migrations
    » Switching between branches with migrations
    SOLUTION:
    CREATE FLOW COMMANDS FOR THAT

    View Slide

  4. ./FLOW CLONE
    FETCH ALL MUTABLE INFORMATION 

    FROM A REMOTE FLOW INSTALLATION

    View Slide

  5. SITEGEIST.MAGICWAND
    ./FLOW CLONE - PROCEDURE
    1. Read local configuration → Flow configuration-manager
    2. Fetch remote configuration → ssh and remote configuration:show
    3. Check Configuration → verify mysql on both ends
    4. Drop and Recreate local DB
    5. Transfer Database → ssh "msqldump" | mysql
    6. Transfer Files → rsync Data/Persistent
    7. Clear Caches
    8. Migrate cloned DB
    9. Publish Resources
    10.Execute post_clone commands → add user / build elastic index etc.

    View Slide

  6. SITEGEIST.MAGICWAND
    ./FLOW CLONE - PRESETS
    Sitegeist:
    MagicWand:
    clonePresets:
    # preset to clone the staging environment
    staging:
    host: __ip_or_servername__
    user: __ssh_user__
    port: __ssh_port__
    path: __flow_path__
    context: __flow_context__
    postClone:
    - ’./flow user:create --Roles Administrator admin password..

    View Slide

  7. SITEGEIST.MAGICWAND
    ./FLOW CLONE - USAGE
    # show all available presets
    ./flow clone:list
    # clone from remote host with the information stored in the
    master preset
    ./flow clone:preset master
    # clone remote host with the information stored in the master
    preset
    ./flow clone:remotehost --host=host --user=user --port=port --
    path=path --context=context

    View Slide

  8. ./FLOW STASH
    SAVE ALL MUTABLE INFORMATIONS OF THE
    LOCAL FLOW UNDER A SPECIFIC NAME.

    View Slide

  9. SITEGEIST.MAGICWAND
    ./FLOW STASH:CREATE
    1. Create Folder with stash-name in Data/
    MagicWandStash
    2. Dump Database
    3. Copy Data/Persistent -> use fs-links instead with cp -l

    View Slide

  10. SITEGEIST.MAGICWAND
    ./FLOW STASH:RESTORE
    1. Check Configuration
    2. Drop and Recreate DB
    3. Restore Database from dump
    4. Restore Persistent Resources -> use fs-links instead with
    cp -l
    5. Clear Caches
    6. Migrate DB
    7. Publish Resources

    View Slide

  11. SITEGEIST.MAGICWAND
    ./FLOW CLONE - USAGE
    # Create a backup of the entire database and the directory `Data/
    Persistent` ("stash entry") under the given name
    ./flow stash:create --name=name
    # Lists all named stash entries
    ./flow stash:list
    # Restores a stash entry
    ./flow stash:restore --name=name
    # Removes all stash entries
    ./flow stash:clear

    View Slide

  12. SITEGEIST.MAGICWAND
    INSTALLATION
    composer require --dev sitegeist/magicwand
    ATTENTION: This is a dev-tool. You don't want to have
    code that drops your db on production!!!

    View Slide

  13. SITEGEIST.MAGICWAND
    CONTRIBUTION
    » https://github.com/sitegeist/Sitegeist.MagicWand
    » Pull Requests are welcome!
    » Support PostgreSQL
    » Support more ssh/rsync options
    » NO WINDOWS SUPPORT IS PLANNED!!!

    View Slide

  14. THANK
    YOU
    www.sitegeist.de
    we are hiring ;)

    View Slide