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

New stacks loading policy #246

Merged
3 commits merged into from
Jun 22, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/main/_docs/devops/devops-runtime-stacks.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@ Che provides a form that can be used to write a recipe directly or copied/pasted

# Stack Administration
## Stack Loading
In 5.x, we introduced an underlying database for storing product configuration state, including the state of stacks and templates. In previous versions, we primarily allowed stack configuration through a `stacks.json` object file that was in the base of a Che assembly. The `stacks.json` object file is still there, and if you provide any stack definitions within it, they will be loaded (and override!) any stacks in the database whenever Che starts. We will be removing support for the JSON configuration approach in upcoming releases as it is error prone.

Stacks are loaded from a JSON file that is packaged into resources of a special component deployed with a workspace makes. This JSON isn't exposed to users and stack management is performed in User Dashboard (that uses REST API).

Stacks are loaded from a JSON file only when the database is initialized, i.e. when a user first stats Che. This is the default policy that can be changed. To keep getting updates with new Che stacks, set `CHE_PREDEFINED_STACKS_RELOAD__ON__START=true` in `che.env`. When set to true, stack.json will be used to update Che database, each time Che server starts.

Copy link
Contributor

Choose a reason for hiding this comment

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

We probably need to link/reference to the section bellow which is explaining stacks in a custom assembly.

Copy link
Author

Choose a reason for hiding this comment

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

Right now we don't have an convenient way to provide custom stacks in custom assemblies. There's an issue that needs to be done though - eclipse-che/che-archetypes#20

Existing users won't be affected.

Copy link
Contributor

Choose a reason for hiding this comment

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

Custom assemblies are able to define their own stacks.json.

Also the description is misleading. It is using "update", while what will happen is that all the existing stacks will be wipeout and completely reinitialize with the content of the stacks.json.

We need to explain to the user how:

  • he can get the new stacks from upstream
  • and keep the stacks that he added.

Copy link
Author

Choose a reason for hiding this comment

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

We don't have a clean nice way - this needs to be done eclipse-che/che-archetypes#20

Stacks are kept in a database - no need to do anything.

Copy link
Contributor

Choose a reason for hiding this comment

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

Even if it is not clean, it will still be needed for those who are creating custom Che. So either eclipse-che/che-archetypes#20 was a pre-requisite for merging eclipse-che/che#5234 or we provide documentation to explain how to handle that until eclipse-che/che-archetypes#20 is fixed.

Also "update" will mislead the user. The "update" must be completely explicit and clear to the user - so that he will know that when configuring the property, the system will wipeout all stacks currently in the product. Including those that he added manually. So he will cautiously configure that property.

It must also explain to the user how he can get stacks from a new version of Che and not loose the one he added. Here again, even if the way we handle that is not nice, etiher we have fixes that are coming and we make them pre-requisite for merging eclipse-che/che#5234 or we provide documentation to explain how it can be handled.

## Configuring Stacks
In the user dashboard, click the `Stacks` to view all the available stacks. New stacks can be created and existing stacks can be modified/searched.
Expand Down
5 changes: 3 additions & 2 deletions src/main/_docs/setup/setup-managing.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Workspaces are both portable and shared. Multiple browser clients (and humans!)

![che_farm.png]({{ base }}/docs/assets/imgs/che_farm.png)

You can deploy Che in a farm with an Nginx router. Each user would be provisioned their own Che instance, either running on its own port in a VM. In this configuration, each user can have their own workspaces and identity profile. Note that since Che exports two IP addresses, one for Che and another for the workspace machine running Docker, your router will need to manage traffic for all possible routes between browser, Che and machines.{%assign docs_todo="Provide link"%}
You can deploy Che in a farm with an Nginx router. Each user would be provisioned their own Che instance, either running on its own port in a VM. In this configuration, each user can have their own workspaces and identity profile. Note that since Che exports two IP addresses, one for Che and another for the workspace machine running Docker, your router will need to manage traffic for all possible routes between browser, Che and machines.{%assign docs_todo="Provide link"%}

## Scaling Che with Codenvy
Your Eclipse Che workspaces and plug-ins will work within [Codenvy](http://codenvy.com). Codenvy is a multi-tenant, multi-user and elastic cloud installed locally or used as a SaaS:
Expand Down Expand Up @@ -80,9 +80,10 @@ The upgrade process:
5. Backs up your installation
6. Initializes the new version
7. Starts Che
8. Important! If `CHE_PREDEFINED_STACKS_RELOAD__ON__START` is set to false, stacks packaged into new binaries won't be saved into a database.
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 describe the property in the "configuration.md" page as it explains most of the che.env properties and then link to the explanation from here.

Copy link
Author

Choose a reason for hiding this comment

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

Added CHE_PREDEFINED_STACKS_RELOAD__ON__START to config.md


# Backup
You can run `che backup` to create a copy of the relevant configuration information, user data, projects, and workspaces. We do not save workspace snapshots as part of a routine backup exercise. You can run `che restore` to recover che from a particular backup snapshot. The backup is saved as a TAR file that you can keep in your records. You can then use `che restore` to recover your user data and configuration.
You can run `che backup` to create a copy of the relevant configuration information, user data, projects, and workspaces. We do not save workspace snapshots as part of a routine backup exercise. You can run `che restore` to recover Che from a particular backup snapshot. The backup is saved as a TAR file that you can keep in your records. You can then use `che restore` to recover your user data and configuration.

# Security
Eclipse Che is designed as a single identity system to be used by an individual or small team working in a trusted environment. The following outlines some of the security capabilities and known gaps in Che.
Expand Down