Commit Graph

137 Commits (40cc6cbb2c2e36702dbb38579c094c312485063d)

Author SHA1 Message Date
Eugene Ivantsov 37e77730c8
Fix indentation in docker-compose template (#8016) 2017-12-22 15:27:45 +02:00
Eugene Ivantsov c46b3e7748
OCP deployment: more ram for keycloak and housepeeking (#8014)
* Use the right protocol. Use more RAM for Keycloak. Remove unused env

* Use the right ram value
2017-12-22 10:02:46 +02:00
Eugene Ivantsov 48264ca6b6
Make it possible to update Che on OCP, including rolling update (#8002)
* Make it possible to update Che on OCP, including rolling update

* Make it possible to update Che on OCP, including rolling update
2017-12-22 08:42:50 +02:00
Max Shaposhnik 8ff1be36f5
Added support of Idenvity brokering mechanism of Keycloak for Multi-user Che 2017-12-21 17:50:03 +02:00
Roman Iuvshyn 758d400e5f
Clean up after merge che6 to master (#7979) 2017-12-20 17:28:34 +02:00
Roman Iuvshyn ec91a22643
Wait keycloak is booted after deploy to ocp (#7954)
* Wait keycloak is booted after deploy to ocp
2017-12-19 15:13:30 +02:00
Roman Iuvshyn 38b7529a47
update ocp to 3.7.0 (#7841)
* update ocp to 3.7.0
2017-12-14 17:47:27 +02:00
James Drummond PE 1d12ef13f2
Added help menu to ocp.sh script. (#7851)
* Added help menu to ocp.sh script.
* Remove extra spaces in help menu.

Signed-off-by: James Drummond <james@devcomb.com>
2017-12-13 12:15:28 -06:00
Sergii Kabashniuk 026598d841
Optimize che-server ram usage on Docker (#7787)
Optimize che-server ram usage on Docker 
Proposal is to set container limit to 750M for both Docker and OpenShift and tune a bit GC

-XX:MaxRAMFraction=2 -XX:+UseParallelGC -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap -Dsun.zip.disableMemoryMapping=true -Xms20m
Important parts

-XX:MaxRAMFraction=2 -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap - tels jvm to use ~ CHE_MASTER_CONTAINER_RAM/MaxRAMFraction for heap
We need some space for off-heap activity. During test I saw VmRSS of jvm ~330_000k - 350_000k.
-XX:+UseParallelGC -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 ask GC to keep heap compact in cost of some CPU.
You can see changes in heap usage pattern in images below.
2017-12-08 18:53:27 +02:00
Anton Korneta 013d4bb058 Adds the ability to configure, pre-create subpaths for common strategy 2017-12-08 17:16:42 +02:00
Roman Iuvshyn c8778e5e03
[WIP] set correct limits for CHE pod (#7733)
* set correct limits for CHE pod
2017-12-05 18:20:38 +02:00
Roman Iuvshyn ea1b3ca341
Allow to update che server deploymentConfig (#7718)
* Allow updating che server deploymentConfig
2017-12-05 12:42:04 +02:00
Sergii Leshchenko 0491b4ed16
Fix configuring of OPENSHIFT_NAMESPACE_URL in deploy script (#7703)
* Add an ability to configure routing suffix instead of namespace url

* Fix usage of image pull policy in ocp.sh script
2017-12-04 15:23:56 +02:00
Roman Iuvshyn 0414b27e8c
Allow add che configurations in case of deploy on Openshift (#7692)
* Allow add che configurations in case of deploy on Openshift
2017-12-04 14:56:52 +02:00
Eugene Ivantsov 9a21636833
Make sure username and pass are not used when a token is used (#7648)
* Che in che stack improvements

* Edited commands

* Make sure username and password are not used when token is set

* More informative message
2017-12-01 08:19:45 +02:00
Roman Iuvshyn 52ae7f1776
Allow to use custom dns providers for ocp / minishift (#7654) 2017-11-30 15:51:25 +02:00
Sergii Leshchenko 879e38cff7 CHE-7155 Fix link to default stacks to replace 2017-11-29 11:36:10 +02:00
Roman Iuvshyn 4ed38202c6
Update ocp.sh (#7529) 2017-11-23 15:25:31 +02:00
Oleksandr Garagatyi 5874d84d40 fixup! Escape environment variables in script that deploys Che to OpenShift 2017-11-22 17:40:52 +02:00
Oleksandr Garagatyi 267c24255e Escape environment variables in script that deploys Che to OpenShift
Signed-off-by: Oleksandr Garagatyi <ogaragat@redhat.com>
2017-11-22 17:40:52 +02:00
James Drummond PE c6e2a64586 Update deployment-config.yaml
Signed-off-by: James Drummond <james@devcomb.com>
2017-11-17 08:09:30 +01:00
Anton Korneta 2b568079e0 Fix default openshift namespace url for minishift flavour 2017-11-16 18:10:07 +02:00
Anton Korneta b06c2a314a Fix provisioning of debug property for Che server 2017-11-16 18:10:07 +02:00
Roman Iuvshyn 4d6caf8a36
Introduce ocp script to run ocp locally and deploy che (#7395)
* Introduce ocp script to run ocp loaclly and deploy che
2017-11-16 16:12:51 +02:00
jpinkney c623c1e658 Fixed agent multi-line issue in replace_stacks
Signed-off-by: jpinkney <josh.pinkney@mail.utoronto.ca>
2017-11-16 10:16:52 +01:00
Oleksandr Garagatyi af6ca5ef4c Fix deploy_che.sh script
Signed-off-by: Oleksandr Garagatyi <ogaragat@redhat.com>
2017-11-15 15:27:49 +02:00
Roman Iuvshyn e0ed72abd2
Allow run more than one ws on ocp / minishift (#7366) 2017-11-14 22:21:55 +02:00
Roman Iuvshyn 880160f4ea
Fix deploy script (#7350) 2017-11-14 11:29:50 +02:00
Sergii Leshchenko e112077b24 Cleanup and improve deploy_che.sh script
It contains the following changes:
Remove usage of outdated configuration parameters in deploy script
Move default values from yml files to deploy script
Put settings of common defaults to one section
Rename all properties in deploy script according to the Che format with using uppercase symbols and underscores
Remove usage of CHE_DEBUG_SERVER and CHE_KEYCLOAK_DISABLED
Fix default Che image that is used by deploy script
Remove unused labels and annotations
Move configuration properties from CHE_SERVER_CONFIGURATION env var to config map
2017-11-13 16:12:31 +02:00
Max Shaposhnik c74bad367c
Remove snapshotting mechanism; 2017-11-13 14:25:40 +02:00
Sergii Kabashniuk d5a81a6ae3
Configure che-server only from environment variables (#7299)
Removed default properties extraction from war.
Removed all usage of CHE_LOCAL_CONF_DIR
Forced unset of CHE_LOCAL_CONF_DIR to make sure that Eclipse Che server can be configured only with environment variables.
Changed location of default properties from /codenvy/che.properties to /che/che.properties
2017-11-12 20:46:49 +02:00
Mario Loriedo e63e4ab17a Port fix #7301 to che6 branch
Signed-off-by: Mario Loriedo <mario.loriedo@gmail.com>
2017-11-10 18:35:25 +01:00
Roman Iuvshyn 5923fa8796
Fix kc db import on os (#7251)
* adopt kc json template in s2i assemble script
2017-11-09 10:55:39 +02:00
Roman Iuvshyn bbee7536a0
Add ability to set oAuth config for CHE deployed to Openshift (#7212)
* Add ability to set oAuth config for CHE deployed to Openshift
2017-11-07 15:03:57 +02:00
Max Shaposhnik ea7e071b3a
Use same assembly for single- and multiuser Che 2017-11-07 12:27:02 +02:00
Gerard Hickey 7e848b14ee Added Traefik's docker.network label to fix multiuser single_port (#7170)
Signed-off-by: Gerard Hickey <Gerard.Hickey@smartsheet.com>
2017-11-07 12:12:07 +02:00
Oleksandr Garagatyi 462ad715e9
Cleanup and simplify script that deploys Che to OpenShift (#7123)
Split deploy script into different areas:
- where defaults for each flavor are set
- where variables common to all flavors are set 
(may depend on flavor dependent defaults)
- where Che deployment YAML file is customized with sed
Signed-off-by: Oleksandr Garagatyi <ogaragat@redhat.com>
2017-11-02 15:44:22 +02:00
Anton Korneta 9e7386e726 Add different strategy for che wokrsapce PVCs 2017-10-31 15:00:32 +02:00
Oleksandr Garagatyi 2dff55806f
Fix deployment to Minishift with default behavior (#7012)
Fix deployment to Minishift with the default behavior, in particular:
- increase timeout of waiting for Postgres start
- remove the second check of Postgres after the first one (didn't get why there were 2 of them)
- fix bugs in checking for Postgres status
- fix TLS configuration for Minishift
- renamed deployment configuration
Signed-off-by: Oleksandr Garagatyi <ogaragat@redhat.com>
2017-10-31 11:55:49 +02:00
Roman Iuvshyn c96cfac0c8 Fix postgres container freeze on stop (#7045) 2017-10-27 16:14:22 +03:00
Roman Iuvshyn cb58bfa875 Fix custom port network (#7044)
* Fix multiuser network with custom port
2017-10-27 15:28:18 +03:00
Max Shaposhnik 57aa4400e4 Make /system/status service public to allow liveness checks by it 2017-10-25 12:53:43 +03:00
Max Shaposhnik 1e87b85742 Rename wsmaster.war into api.war and remove corresponding rewrite valve; (#6917) 2017-10-24 11:32:47 +03:00
Sergii Kabashniuk 487ad8508c Merge with master 2017-10-21 19:30:48 +03:00
Roman Iuvshyn a1190245f6 fix deploy che to local ocp (#6881) 2017-10-20 19:38:16 +03:00
David Festal 8871b5b08a Multi-tenant compatibility (#6738)
* Ping the wsagent URL (possibly external), not the *internal URL*.

* Use `getProperties().getInternalUrl()` when `getUrl()` returns `null` 

* Add a new provider for an optional routing suffix for workspaces to be
used in the external URLs of created workspace agents in the
use-cases where a custom server evaluation strategy is used (Openshift,
Traeffik, etc ...).

* Add 2 new macros for the custom server evaluation template which are:
    - `user`: the current environment context user if any,
    - `workspacesRoutingSuffix`: the suffix returned by the available
`WorspacesRoutingSuffixProvider` if any.

Both values can null, in which case they are not added to the ST
variables, so that it is possible to test on their existence in the
template. For example:

```
<if(workspacesRoutingSuffix)><user>-che.<workspacesRoutingSuffix><else><externalAddress><endif>
```

* Add a new provider to get workspace-related Openshift configuration containing:
    - the `io.fabric8.kubernetes.client.Config` object to connect the right
Openshift cluster / namespace in which workspaces will be created
    - The name of the namespace in which workspaces are cteated
    - A boolean that tell if the workspaces will be created in a different
cluster as the che-server.

These data returned by the subclasses of the new provider can of course
depend on the current user (and this will be the case for multi-tenancy)

* Also support the `application/vnd.api+json` content type in responses

* Now use the new providers to connect to the right clutser / namespace

* Allow the Docker connector to return the API endpoint...

The base `DockerConnector` class returns `null` as the endpoint, thus
keeping the previous behavior.

However the `OpenshiftConnector` implementation now returns the API
endpoint without the need for any environment variable:

Indeed in the case of Openshift, the API endpoint is either based on:

    - the internal fully-qualified name of the `che-host` service if
workspaces are to be hosted on the same Openshift cluster,
    - the external URL of the `che` route if workspaces may be hosted on a
distinct Openshift cluster.


* If related properties or env variables are void, use the connector to retrieve
the API endpoint.

* Required changes for multi-tenancy in deployment script

* Allow overriding the agent log directories in a clean way so that we don't need
to replace the `XXXWsMasterModule` class only
to override the `run_command` binding.

* Move some local-docker-related configuration into a separate `dynamodule`.
This avoid the need to override the `WsMasterModule` class and comment
these bindings in derived assemblies that use a distinct implementation
or don't need Traeffik (such as for Openshift deployments). 

* Return `OpenShiftException` when workspaces namespace cannot be reached 

* Add multi-tenancy options to the deploy script

* Add the `CHE_EPHEMERAL` and `CHE_USE_ACME_CERTIFICATE` options

* Fix the name of the used docker image for multi-tenant

Signed-off-by: David Festal <dfestal@redhat.com>
2017-10-19 15:01:56 +02:00
Ilya Buziuk 7622d46bcf rh-che #379: Migrating to a new GitHub token endpoint
Signed-off-by: Ilya Buziuk <ibuziuk@redhat.com>
2017-10-19 14:52:16 +02:00
Roman Iuvshyn 7f6ec2e409 Allow to disable require update password for default admin user (#6780)
* Fix FindTextFeatureTest selenium test (#6762)

* Allow to disable require update password for default admin user
2017-10-17 23:48:15 +03:00
Roman Iuvshyn dd4eaddf1e Allow to disable require update password for default admin user (#6777) 2017-10-17 20:29:39 +03:00
Sergii Kabashniuk e321ab00b1 Merge with master 2017-10-15 14:33:47 +03:00