Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[che-dev] Proposal for changing Che assembly directory & CLI

All:

I'd like to improve the structure of the Che assembly directory and the core command line utilities.

Objectives:
1. Abstract the location of the application server used to run Che.  Today we echo the Tomcat folder structure and this should be altered.

2. Remove abbreviations which will not be obvious to end users, such as renaming /ext to /plugins.

3. Make the environment variables consistent and follow the basic pattern set by Java and Maven.

# Existing Directory Structure
/bin             # Scripts to start, stop, and manage Che
/che-templates   # Code templates, instantiated by the wizard
/conf            # Configuration files
/endorsed        # Specialty library files
/ext             # 3rd party plug-in JAR files to be added to assembly
/lib             # Java, tomcat, and platform library dependencies   
/logs            # Che output
/recipes         # Dockerfiles used by projects to build & run apps
/sdk-resources   # Tools to create new assemblies
/sdk-tools       # Libraries required by SDK
/tomcat          # App server used as a runner for Che extensions
/webapps         # The Che binary run by the app server

# Proposed Directory Structure
/bin                      # Scripts to start, stop, and manage Che
/conf                     # che.properties
/conf/machines            # Dockerfiles used by projects to build & run apps.
/conf/templates           # Previously che-templates
/docs                     # Include index.html which opens / redirects to ReadMe site.
/docs/javadoc.zip         # Include packaged JavaDoc as a ZIP file.  Need to get the JavaDoc included as part of our daily builds.
/internal                 # user.local.db, preferences.json, profiles.json, vfs
/plugins                  # This was previously named /ext
/plugins/server           # Previously ext-server
/lib                      # Che libraries that are JAR files
/lib/sdk                  # Contains what was in both /sdk-resources & /sdk-tools (maybe move to /resources?)
/lib/terminal             # Previously web-terminal (maybe move to /resources?)
/logs                     # Che output/appserver/tomcat
/workspaces               # Default location for workspaces if not set by user
/resources                # ZIP files & images
/tomcat/bin               
/tomcat/conf
/tomcat/endorsed
/tomcat/lib
/tomcat/logs --> redirects to /logs
/tomcat/webapps          # che.war goes here or it could go into /resources
/tomcat/work

Move extInstall.sh to /bin/che-install-extension.sh.
Move extInstall.bat to /bin/che-install-extension.bat.
Move license to /tomcat
Move license-logback to /tomcat
Move license-slf4j to /tomcat
Move release-notes to /tomcat
Move RUNNING /tomcat


Changes to Che environment variables:
  1. Change CHE_LOCAL_CONF_DIR to CHE_ROOT.
  2. CHE_HOME <-- Always set, root of Che.
  3. CHE_HOME\bin <-- add this to the PATH variable

 Changes to how properties are loaded and precedence:

  1.  If CHE_ROOT not set, then set it to CHE_HOME\projects.
  2. Load .properties from {target}/WEB-INF/classes/che/*.properties
  3. Then override those properties with any in CHE_HOME\conf\*.properties
  4. Then override those properties with any set with --settings <file>

Finally, we'd improve the Che CLI to offer more control over management of the system and the building of binaries.  With this new CLI it would be possible for users to create a basic assembly after cloning the source code repository without having to maven clean install the root directory.

# This is the specification for che.bat and che.sh, which should be added to the /bin directory of che once it is installed. che run <params>                         # Runs Che without opening a new console window che start <params>                       # Runs Che in a new console window che stop                                 # Stops Che che list                                 # Lists plug-ins che install <params>                     # Creates a new Che assembly with staged plug-ins. che plugin <plugin:version> <params>     # Makes a plugin unavailable, available, or staged   Params for start / run: --help --properties <properties-file> --properties <name=value> --workspace <workspace-directory> --ip <ip address> --port <port> --readonly  (makes files uneditable)   Params for install: --version:###               # IF specified, then will create an assembly from the tagged version provided.  If not provided, then will fetch & pull & build latest version from source. --get-core                  # IF specified, will also clone & fetch & pull & build che-core repository into a directory that is CHE_HOME\.. --get-plugins               # IF specified, will also clone & fetch & pull & build che-plugins repository into a directory that is CHE_HOME\.. --create-installer          # If specified, will also create Mac + Windows installers, instead of just a /target/assembly   Params for plugin --unavailable               # Deletes the ZIP file from any directory. Cannot be made available or staged. --available                 # Makines the ZIP file unstaged, but available to be seen in a list.  Can be staged.  If plug-in is in staged directory, moves to available.  If plug-in is installed, moves to available directory. --staged                    # Adds an available plug-in to staged directory.  If a plug-in is available, moves to staged directory.  If a plug-in is installed, does nothing, prints out message saying plug-in is already installed. If versions provided & do not match, then stage version specified.

Tyler Jewell | CEO | tyler@​codenvy.​com | 9​78​.8​84​.53​55


Back to the top