Skip to content

Commit

Permalink
Move deployment files out of dockerfiles folder
Browse files Browse the repository at this point in the history
Move openshift/k8s deployment files from dockerfiles/init folder
to deploy folder with a better structure because they are not
related to init dockerfile.
Add readme files in each deployment target folder with links to
Che docs where the process of deployment is described.
Remove delivery of deployment files by init image which is
useless.
Remove empty docs files from the repo and init image.
Fix some minor typos and trailing spaces.
Signed-off-by: Oleksandr Garagatyi <ogaragat@redhat.com>
  • Loading branch information
Oleksandr Garagatyi committed Mar 20, 2018
1 parent 3039163 commit d047863
Show file tree
Hide file tree
Showing 64 changed files with 20 additions and 56 deletions.
1 change: 1 addition & 0 deletions deploy/docker/Readme.md
@@ -0,0 +1 @@
Docs are located at [https://www.eclipse.org/che/docs/6/che/docs/docker-single-user.html](https://www.eclipse.org/che/docs/6/che/docs/docker-single-user.html).
1 change: 1 addition & 0 deletions deploy/kubernetes/Readme.md
@@ -0,0 +1 @@
Docs are located at [https://www.eclipse.org/che/docs/6/che/docs/kubernetes-single-user.html](https://www.eclipse.org/che/docs/6/che/docs/kubernetes-single-user.html).
File renamed without changes.
File renamed without changes.
Expand Up @@ -6,6 +6,6 @@
#

apiVersion: v1
description: A Helm chart for postgresql, used by Che and Keycloak
description: A Helm chart for postgresql, used by Che
name: che-postgres
version: 1.0.0
Expand Up @@ -38,22 +38,22 @@ The context of the commands below is the directory in which this readme file res
#### Deployment types
Currenty, only minikube deployment is supported.

##### Single User
##### Single User
Only Che will be deployed.

```bash
helm upgrade --install <che-release> --namespace <che-namespace> --set global.cheDomain=<domain> ./
```
##### Multi User

##### Multi User
Che, KeyCloak and Postgres will be deployed.

```bash
helm upgrade --install <che-release> --namespace <che-namespace> --set global.multiuser=true --set global.cheDomain=<domain> ./
```

##### No Host:
Ingress will serve requests on minikube-ip.
Ingress will serve requests on minikube-ip.
Path based routing to Che, Secondary servers (KeyCloak) and Workspace servers.

```bash
Expand All @@ -62,25 +62,25 @@ Che, KeyCloak and Postgres will be deployed.
Workspaces: http://<minikube-ip>/<path-to-server>
Keycloak (if multiuser) : http://<minikube-ip>/auth/
```
##### Host (partial):

##### Host (partial):
WS Master Ingress will serve requests on provided domain
Workspaces: Ingress will serve requests on minikube-ip, Path Based routing to workspaces.
KeyCloak : dedicated hostname
Workspaces: Ingress will serve requests on minikube-ip, Path Based routing to workspaces.
KeyCloak : dedicated hostname

```bash
helm upgrade --install <che-release> --namespace <che-namespace> --set global.cheDomain=<minikube-ip>.xip.io ./
Master: http://master.<minikube-ip>.xip.io
Workspaces: http://<minikube-ip>/<path-to-server>
Keycloak (if multiuser): http://keycloak.<minikube-ip>.xip.io/
```


##### Future options:
- Path Based: single hostname for all components (che, keycloak, WS servers)
- Path Based: single hostname for all components (che, keycloak, WS servers)
- Host Based: unique host for each component
- TLS

## Deleting a Deployment
You can delete a deployment using the following command:
``` bash
Expand Down
File renamed without changes.
File renamed without changes.
@@ -1,6 +1,6 @@
# Deploy single user Che to k8s
Tested on minikube with vm providers Virtualbox and kvm2. Note that Che with workspaces requires quite a lot
of RAM. Initial tests were done with 10GB, but it is definitely more than it is needed to start Che
of RAM. Initial tests were done with 10GB, but it is definitely more than it is needed to start Che
and couple of workspaces.

IP of VM is supposed to be `192.168.99.100`. `nip.io` is also used for handling hosts resolution.
Expand Down
1 change: 1 addition & 0 deletions deploy/openshift/Readme.md
@@ -0,0 +1 @@
Docs are located at [https://www.eclipse.org/che/docs/6/che/docs/openshift-single-user.html](https://www.eclipse.org/che/docs/6/che/docs/openshift-single-user.html).
File renamed without changes.
File renamed without changes.
Expand Up @@ -8,7 +8,7 @@
# This script is meant for quick & easy install of Che on OpenShift via:
#
# ``` bash
# DEPLOY_SCRIPT_URL=https://raw.githubusercontent.com/eclipse/che/master/dockerfiles/cli/scripts/openshift/deploy_che.sh
# DEPLOY_SCRIPT_URL=https://raw.githubusercontent.com/eclipse/che/master/deploy/openshift/deploy_che.sh
# curl -fsSL ${DEPLOY_SCRIPT_URL} -o get-che.sh
# bash get-che.sh --wait-che
# ```
Expand Down
Expand Up @@ -34,11 +34,6 @@ export JQ_BINARY_DOWNLOAD_URL=${JQ_BINARY_DOWNLOAD_URL:-${DEFAULT_JQ_BINARY_DOWN
DEFAULT_CHE_MULTIUSER="false"
export CHE_MULTIUSER=${CHE_MULTIUSER:-${DEFAULT_CHE_MULTIUSER}}

#Using local scripts is error prone and should only be used temporarly while developing Che.
#If unsure leave the default value true set.
DEFAULT_CHE_OPENSHIFT_GENERATE_SCRIPTS=true
export CHE_OPENSHIFT_GENERATE_SCRIPTS=${CHE_OPENSHIFT_GENERATE_SCRIPTS:-${DEFAULT_CHE_OPENSHIFT_GENERATE_SCRIPTS}}

DEFAULT_OPENSHIFT_USERNAME="developer"
export OPENSHIFT_USERNAME=${OPENSHIFT_USERNAME:-${DEFAULT_OPENSHIFT_USERNAME}}

Expand Down Expand Up @@ -75,9 +70,6 @@ export IMAGE_PULL_POLICY=${IMAGE_PULL_POLICY:-${DEFAULT_IMAGE_PULL_POLICY}}
DEFAULT_CHE_IMAGE_REPO="eclipse/che-server"
export CHE_IMAGE_REPO=${CHE_IMAGE_REPO:-${DEFAULT_CHE_IMAGE_REPO}}

DEFAULT_IMAGE_INIT="eclipse/che-init:nightly"
export IMAGE_INIT=${IMAGE_INIT:-${DEFAULT_IMAGE_INIT}}

DEFAULT_CHE_CLI_IMAGE="eclipse/che-cli:nightly"
export CHE_CLI_IMAGE=${CHE_CLI_IMAGE:-${DEFAULT_CHE_CLI_IMAGE}}

Expand Down Expand Up @@ -178,21 +170,6 @@ run_ocp() {
}

deploy_che_to_ocp() {
OPENSHIFT_SCRIPTS_FOLDER="${CONFIG_DIR}/instance/config/openshift/scripts/"
#Repull init image only if IMAGE_PULL_POLICY is set to Always
if [ $IMAGE_PULL_POLICY == "Always" ]; then
docker pull "$IMAGE_INIT"
fi
#Only generate scripts and config files if CHE_OPENSHIFT_GENERATE_SCRIPTS=true
if [ $CHE_OPENSHIFT_GENERATE_SCRIPTS == true ]; then
echo "OCP generating temporary scripts and configuration files at ${OPENSHIFT_SCRIPTS_FOLDER} ."
#wipeout config folder
docker run -v "${CONFIG_DIR}":/to_remove alpine sh -c "rm -rf /to_remove/" || true
docker run -t --rm -v /var/run/docker.sock:/var/run/docker.sock -v "${CONFIG_DIR}":/data -e IMAGE_INIT="$IMAGE_INIT" -e CHE_MULTIUSER="$CHE_MULTIUSER" ${CHE_CLI_IMAGE} config --skip:pull --skip:nightly
cd ${OPENSHIFT_SCRIPTS_FOLDER}
else
echo "OCP using existing scripts and configuration files in current folder."
fi
if [[ ! -f "deploy_che.sh" ]]; then
CURRENT_PWD=$(pwd)
echo "OCP script deploy_che.sh does not exist in ${CURRENT_PWD} ."
Expand Down Expand Up @@ -257,8 +234,7 @@ parse_args() {
ENV vars
CHE_IMAGE_TAG - set che-server image tag, default: nightly
CHE_CLI_IMAGE - set che-cli image, default: eclipse/che-cli:nightly
IMAGE_INIT - set che-cli image, default: eclipse/che-init:nightly
CHE_MULTIUSER - set CHE multi user mode, default: false (single user)
CHE_MULTIUSER - set CHE multi user mode, default: false (single user)
OC_PUBLIC_HOSTNAME - set ocp hostname to admin console, default: host ip
OC_PUBLIC_IP - set ocp hostname for routing suffix, default: host ip
DNS_PROVIDER - set ocp DNS provider for routing suffix, default: nip.io
Expand Down
1 change: 0 additions & 1 deletion dockerfiles/init/Dockerfile
Expand Up @@ -32,7 +32,6 @@ RUN apk --update add openssh \

COPY manifests /etc/puppet/manifests
COPY modules /etc/puppet/modules
COPY docs /files/docs
COPY entrypoint.sh /
RUN chmod +x entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
Empty file removed dockerfiles/init/docs/DOCS.md
Empty file.
Empty file removed dockerfiles/init/docs/README.md
Empty file.
1 change: 0 additions & 1 deletion dockerfiles/init/modules/base/manifests/init.pp
Expand Up @@ -27,5 +27,4 @@
include traefik
include postgres
include keycloak
include openshift
}
13 changes: 0 additions & 13 deletions dockerfiles/init/modules/openshift/manifests/init.pp

This file was deleted.

0 comments on commit d047863

Please sign in to comment.