Enonic XP Homes - They contains all the data/config/... that is specific to an instance of a server.
Enonic XP Distributions - These distributions use an XP home defined by the env variable XP_HOME.
You can see the distribution as something immutable, a binary.
While the home is the real state of server. You switch home, you switch "server" in a way.
The problem with setting "XP_HOME", is that you need to keep track of this mapping: Distribution version <-> Home.
You do not want to start a home with an incorrect version of XP. You could in theory corrupt your data.
With the CLI, we will have instead the concept of
Enonic XP Sandbox: An instance of a server on your local machine
Technically, it is an Enonic XP Home. But with a file ".enonic" mentioning the version of Enonic XP.
So from the CLI interface, you do not start a distribution. You start a sandbox.
This will start the distribution mentionned in its ".enonic" file and the distribution will use the sandbox as a home.
File structure
Enonic CLI will create a dot folder in the user folder to store the XP distributions and sandboxes.
~/.enonic
distributions
7.0.0-macos-jdk
7.1.0-SNAPSHOT-macos-jdk
sandboxes
default
.enonic: distribution=7.0.0
home
blob
customer-a
.enonic: distribution=7.1.0-SNAPSHOT
home
blob
.enonic: running=customer-a
CLI options
enonic sandbox # List available sandbox commands
enonic sandbox help [command] # Display help page for a specific sandbox command
enonic sandbox ls # List all sandboxes in the CLI folder (and mention the running one if there is one)
enonic sandbox start [sandboxName] # Start the sandbox. (Download XP distro if necessary)
enonic sandbox stop [sandboxName] # Stop the sandbox
enonic sandbox new # Wizard: Create a new sandbox.
Download XP JDK distribution if necessary (if not already present)
Unzip into distributions folder
Copy the home folder to the sandboxes folder as [sandboxName]
Create the .enonic file
enonic sandbox delete [sandboxName] # Delete a sandbox
Delete the distribution if not used by any other sandbox
enonic sandbox version [sandboxName] [distributionVersiobn] # Updates the distribution version
Today we have 2 concepts:
You can see the distribution as something immutable, a binary. While the home is the real state of server. You switch home, you switch "server" in a way.
The problem with setting "XP_HOME", is that you need to keep track of this mapping: Distribution version <-> Home. You do not want to start a home with an incorrect version of XP. You could in theory corrupt your data.
With the CLI, we will have instead the concept of
So from the CLI interface, you do not start a distribution. You start a sandbox. This will start the distribution mentionned in its ".enonic" file and the distribution will use the sandbox as a home.
File structure
CLI options
enonic sandbox
# List available sandbox commandsenonic sandbox help [command]
# Display help page for a specific sandbox commandenonic sandbox ls
# List all sandboxes in the CLI folder (and mention the running one if there is one)enonic sandbox start [sandboxName]
# Start the sandbox. (Download XP distro if necessary)enonic sandbox stop [sandboxName]
# Stop the sandboxenonic sandbox new
# Wizard: Create a new sandbox.enonic sandbox delete [sandboxName]
# Delete a sandboxenonic sandbox version [sandboxName] [distributionVersiobn]
# Updates the distribution version