Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes to support che-in-che #2119

Merged
merged 11 commits into from
Aug 24, 2016
Merged

Changes to support che-in-che #2119

merged 11 commits into from
Aug 24, 2016

Conversation

TylerJewell
Copy link

@TylerJewell TylerJewell commented Aug 14, 2016

Motivation

There are a variety of things that we need to add to simplify running Che within a Che workspace for new users. The full description of the use case is located in #2116.

What does this PR do?

Adds in capabilities to make it easier to run che-in-che scenarios.
1: Improved the che-launcher and che.sh scripts so that the name of the che-server container can be defined by an environment property. This will allow workspaces starting a second che-server to change the name so that it does not conflict with the one that is already running.

2: Added CHE_WORKSPACE_VOLUME environment variable that lets user set an extra volume to be mounted into Che workspaces when they are started. Also introduces che.workspace.volume property and uses that value instead of machine.server.extra.volume property.

3: Adds a new ready-to-go stack that lists the components that are part of the new Che recipe and launches that container.

4: Adds a new template mapped to the Che stack, that will clone the che repo and add a series of commands to build / run che within Che.

5: Adds fix for Ubuntu where --env-file was getting misinterpreted by echo as -e flag.

6: Adds fix to handle Windows directories with spaces in the names for the mount path conversion.

7: Adds enhancement to provide new profile capability into the CLI. Profile capability lets user store the values of current environment variables into a profile that will be loaded and used by the che-launcher. This allows users to save multiple Che configurations and switch between them.

che profile add <name>                 Add a profile to ~/.che/ 
che profile set <name>                 Set this profile as the default for Che CLI
che profile unset                      Removes the default profile - leaves it unset
che profile rm <name>                  Remove this profile from ~/.che/
che profile update <name>              Update profile in ~/.che/
che profile info <name>                Print the profile configuration
che profile list                       List available profiles

8: Added fix for CHE_LOCAL_BINARY on boot2docker systems.

9: Added fix for CHE_DATA_FOLDER on boot2docker systems. Before we were only adding in the new CHE_WORSKPACE_STORAGE_CREATE_FOLDERS if it was docker for windows or mac, but this generally needed on all systems now.

10: Adds additional environment variables which can be end user configurable and stored within a Che profile. The benefit of setting these values is that you can have different profiles with different names for CHE_SERVER_CONTAINER name which lets you run multiple Che servers at the same time without the container names conflicting. Also, this allows us to support assemblies like the ARTIK IDE by letting them reuse the launcher and the CLI just changing a profile to get it to work.

  CHE_LAUNCHER_IMAGE_NAME
  CHE_SERVER_IMAGE_NAME
  CHE_FILE_IMAGE_NAME
  CHE_MOUNT_IMAGE_NAME
  CHE_TEST_IMAGE_NAME

  CHE_LAUNCHER_CONTAINER_NAME
  CHE_SERVER_CONTAINER_NAME
  CHE_FILE_CONTAINER_NAME 
  CHE_MOUNT_CONTAINER_NAME
  CHE_TEST_CONTAINER_NAME

@codenvy-ci
Copy link

Build # 90 - FAILED

Please check console output at https://ci.codenvycorp.com/job/che-pullrequests-build/90/ to view the results.

@codenvy-ci
Copy link

@codenvy-ci
Copy link

@TylerJewell
Copy link
Author

TylerJewell commented Aug 16, 2016

@eivantsov @benoitf @riuvshin - can you please test the new capabilities related to the che profile on Ubuntu? Sequence for users would be the following.

che profile add my-profile
che profile info my-profile
che profile set my-profile
che start  <-- uses values of my-profile
che profile unset 
che start <-- uses defaults or env variables

@eivantsov - one action would be to update the ARTIK Vagrant file to use this latest Che CLI. User can set CHE_ environment variables to define the name of the image and the name of the container that will be created.

@codenvy-ci
Copy link

@codenvy-ci
Copy link

@codenvy-ci
Copy link

@codenvy-ci
Copy link

Build # 125 - FAILED

Please check console output at https://ci.codenvycorp.com/job/che-pullrequests-build/125/ to view the results.

@codenvy-ci
Copy link

Build # 145 - FAILED

Please check console output at https://ci.codenvycorp.com/job/che-pullrequests-build/145/ to view the results.

@bmicklea bmicklea mentioned this pull request Aug 18, 2016
89 tasks
@benoitf
Copy link
Contributor

benoitf commented Aug 19, 2016

+1
I will need this PR merged to use the CHE_SERVER_CONTAINER_NAME / CHE_LAUNCHER_CONTAINER_NAME option

@benoitf benoitf mentioned this pull request Aug 22, 2016
20 tasks
@codenvy-ci
Copy link

echo "CHE_TEST_CONTAINER_NAME=$CHE_TEST_CONTAINER_NAME" >> ~/.che/"${3}"

env | grep CHE_ >> "${3}"
cat ~/.che/"${3}" | sort | uniq > ~/.che/"${3}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need to use intermediate file like in add section

@benoitf
Copy link
Contributor

benoitf commented Aug 24, 2016

I'm eager to have it in master 👍

@codenvy-ci
Copy link

@TylerJewell TylerJewell changed the title WIP: Changes to support che-in-che Changes to support che-in-che Aug 24, 2016
@TylerJewell TylerJewell merged commit fb088d0 into master Aug 24, 2016
@TylerJewell TylerJewell deleted the CHE-2116 branch August 24, 2016 20:02
@TylerJewell TylerJewell restored the CHE-2116 branch August 24, 2016 20:21
JPinkney pushed a commit to JPinkney/che that referenced this pull request Aug 17, 2017
* Che server container editable
* Add CHE_WORKSPACE_STORAGE variable
* stack and template
* fixed echo bug
* Added profiler
* Fix CHE_DATA_FOLDER issues
* Add additional variables to be honored
* ordering
* Fix profile add
* Revert change to ExtraVolumeProvider
* fixed profile update
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants