2017 © Pedro Peláez
 

neos-package magicwand

Tools that make the Flow/Neos development easier

image

sitegeist/magicwand

Tools that make the Flow/Neos development easier

  • Tuesday, May 29, 2018
  • by sitegeist
  • Repository
  • 10 Watchers
  • 28 Stars
  • 9,649 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 5 Forks
  • 5 Open issues
  • 21 Versions
  • 29 % Grown

The README.md

Sitegeist.MagicWand

Tools that make the Flow/Neos development easier

This package is intended to be used on development systems and should NEVER be installed on production servers. Please add this package to the require-dev section of your composer.json., (*1)

Authors & Sponsors

  • Wilhelm Behncke - behncke@sitegeist.de
  • Martin Ficzel - ficzel@sitegeist.de
  • ... and others

The development and the public-releases of this package is generously sponsored by our employer https://www.sitegeist.de., (*2)

Easy and fast cloning of Flow and Neos Installations

The CLI commands clone:list, clone:preset to help to clone a remote Flow/Neos setup into the local Flow/Neos installation that executes the command., (*3)

Attention: These commands will empty the local database and resources of your local Flow installation. The data is replaced with the information from the remote host. Make sure you understand that before actually using the commands., (*4)

CLI-Examples

# show all available presets
./flow clone:list

# clone from remote host with the information stored in the master preset
./flow clone:preset master

Settings.yaml

The presets that are defined in the configuration path. Sitegeist.MagicWand.clonePresets, (*5)

Sitegeist:
  MagicWand:
    flowCommand: './flow'

    # preset which is used by the clone:default command
    defaultPreset: 'master'

    # available presets
    clonePresets:

       # the name of the preset for referencing on the clone:preset command
      master:
        # hostname or ip of the server to clone from
        host: ~
        # ssh username
        user: ~
        # ssh port
        port: ~
        # ssh options
        sshOptions: ~
        # path on the remote server
        path: ~
        # flow-context on the remote server
        context: Production

        # the flow cli command on the remote server
        # default is the main flowCommand-Setting
        flowCommand: ~

        # options to adjust the clone process
        clone: []

        # commands to execute after cloning like ./flow user:create ...
        postClone: []

        # informations to access the resources of the cloned setup via http
        # if this is configured the rsync of the persistent resources is skipped
        # and instead resources are fetched and imported on the fly once read
        resourceProxy:
          baseUri: http://vour.server.tld
          # define an optional subDirectory (defaults to: '_Resources/Persistent/', trailing slash is required!)
          subDirectory: '_Resources/Persistent/'
          # define wether or not the remote uses subdivideHashPathSegments
          subdivideHashPathSegment: false
          # curl options
          curlOptions:
            CURLOPT_USERPWD: very:secure

The settings should be added to the global Settings.yaml of the project, so that every developer with SSH-access to the remote server can easily clone the setup., (*6)

Quick backup and restore mechanisms for persistent data

Sometimes it's useful to quickly backup an integral persistent state of an application, to then perform some risky change operations and restore the data in case of failure. The stash:create,stash:restore,stash:list and stash:clear commands of this package allow for a flawless backup-try-restore workflow., (*7)

Attention: These commands will empty the database and resources of your local Flow installation. The data is replaced with the information from the stash. Make sure you understand that before actually using the commands., (*8)

CLI-Examples

# 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

Note: Use this command on a regular basis, because your stash tends to grow very large., (*9)

Resource proxies

While cloning the database to your local dev system is manageable even for larger projects, downloading all the assets is often not an option., (*10)

For this case the package offers the concept of resource proxies. Once activated, only the resources that are actually used are downloaded just at the moment they are rendered. This is done by custom implementations of WritableFileSystemStorage and ProxyAwareFileSystemSymlinkTarget and works out of the box if you use this storage and target in you local development environment. If you use other local storages, for example a local S3 storage, you can easily build your own proxy aware versions implementing the interfaces ProxyAwareStorageInterface and ProxyAwareTargetInterfaceof this package., (*11)

Installation

Sitegeist.Magicwand is available via packagist. Just add "sitegeist/magicwand" : "~1.0" to the require-dev section of the composer.json or run composer require --dev sitegeist/magicwand. We use semantic-versioning so every breaking change will increase the major-version number., (*12)

Contribution

We will gladly accept contributions especially to improve the rsync, and ssh-options for a specific preset. Please send us pull requests., (*13)

We will NOT add the following features to the main-repository

  • Windows support: We rely on a unix-shell and a filesystem that is capable of hard-links.
  • SSH with username/password: We consider this unsafe and recommend the use of public- and private-keys.

The Versions

29/05 2018

dev-master

9999999-dev

Tools that make the Flow/Neos development easier

  Sources   Download

MIT

The Requires

 

by Martin Ficzel
by Wilhelm Behncke

29/05 2018

v3.1.0

3.1.0.0

Tools that make the Flow/Neos development easier

  Sources   Download

MIT

The Requires

 

by Martin Ficzel
by Wilhelm Behncke

29/05 2018

2.2.x-dev

2.2.9999999.9999999-dev

Tools that make the Flow/Neos development easier

  Sources   Download

MIT

The Requires

 

by Martin Ficzel
by Wilhelm Behncke

29/05 2018

v2.2.0

2.2.0.0

Tools that make the Flow/Neos development easier

  Sources   Download

MIT

The Requires

 

by Martin Ficzel
by Wilhelm Behncke

29/05 2018

dev-feature/addSshOptionSupport

dev-feature/addSshOptionSupport

Tools that make the Flow/Neos development easier

  Sources   Download

MIT

The Requires

 

by Martin Ficzel
by Wilhelm Behncke

08/05 2018

v3.0.1

3.0.1.0

Tools that make the Flow/Neos development easier

  Sources   Download

MIT

The Requires

 

by Martin Ficzel
by Wilhelm Behncke

07/05 2018

v3.0.0

3.0.0.0

Tools that make the Flow/Neos development easier

  Sources   Download

MIT

The Requires

 

by Martin Ficzel
by Wilhelm Behncke

20/03 2018

dev-feature/status

dev-feature/status

Tools that make the Flow/Neos development easier

  Sources   Download

MIT

The Requires

 

by Martin Ficzel
by Wilhelm Behncke

09/03 2018

v2.1.1

2.1.1.0

Tools that make the Flow/Neos development easier

  Sources   Download

MIT

The Requires

 

by Martin Ficzel
by Wilhelm Behncke

09/03 2018

v2.1.x-dev

2.1.9999999.9999999-dev

Tools that make the Flow/Neos development easier

  Sources   Download

MIT

The Requires

 

by Martin Ficzel
by Wilhelm Behncke

19/09 2017

v2.1.0

2.1.0.0

Tools that make the Flow/Neos development easier

  Sources   Download

MIT

The Requires

 

by Martin Ficzel
by Wilhelm Behncke

20/01 2017

v2.0.0

2.0.0.0

Tools that make the Flow/Neos development easier

  Sources   Download

MIT

The Requires

 

by Martin Ficzel
by Wilhelm Behncke

09/08 2016

v1.0.5

1.0.5.0

Tools that make the Flow/Neos development easier

  Sources   Download

MIT

The Requires

 

by Martin Ficzel
by Wilhelm Behncke

09/08 2016

dev-bugfix/escape-remote-command

dev-bugfix/escape-remote-command

Tools that make the Flow/Neos development easier

  Sources   Download

MIT

The Requires

 

by Martin Ficzel
by Wilhelm Behncke

09/08 2016

dev-task/remobeMasterPresetDefaultDueToBreakiness

dev-task/remobeMasterPresetDefaultDueToBreakiness

Tools that make the Flow/Neos development easier

  Sources   Download

MIT

The Requires

 

by Martin Ficzel
by Wilhelm Behncke

05/08 2016

v1.0.4

1.0.4.0

Tools that make the Flow/Neos development easier

  Sources   Download

MIT

The Requires

 

by Martin Ficzel
by Wilhelm Behncke

04/08 2016

dev-feature/configureLocalAndRemoteFlowCommands

dev-feature/configureLocalAndRemoteFlowCommands

Tools that make the Flow/Neos development easier

  Sources   Download

MIT

The Requires

 

by Martin Ficzel
by Wilhelm Behncke

22/03 2016

v1.0.3

1.0.3.0

Tools that make the Flow/Neos development easier

  Sources   Download

MIT

The Requires

 

by Martin Ficzel
by Wilhelm Behncke

02/03 2016

v1.0.2

1.0.2.0

Tools that make the Flow/Neos development easier

  Sources   Download

MIT

The Requires

 

by Martin Ficzel
by Wilhelm Behncke

01/03 2016

v1.0.1

1.0.1.0

Tools that make the Flow/Neos development easier

  Sources   Download

MIT

The Requires

 

01/03 2016

v1.0.0

1.0.0.0

Tools that make the Flow/Neos development easier

  Sources   Download

The Requires