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

Adjust Workspace.Next model classes to latest updates in the Workspace.Next vision #10246

Merged
merged 3 commits into from
Jul 4, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 2 additions & 2 deletions deploy/kubernetes/kubectl/Deploy Che.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@ and clean redeploy of Che.
- Check Che pod status until it become `Running`: `kubectl get --namespace=che pods`

### Workspace Next:
There is a file `wsnext/feature-api.yaml` which contains kubesrv service needed to test Workspace Next on kubernetes infrastructure.
To use it call `kubectl apply --namespace=che -f wsnext/feature-api.yaml` and Che will be able to use Workspace Next flow.
There is a file `wsnext/feature-api.yaml` which contains apache service that hosts Workspace.Next files. It is needed to test Workspace.Next.
To use it call `kubectl apply --namespace=che -f wsnext/feature-api.yaml` and Che will be able to use Workspace.Next flow.
2 changes: 1 addition & 1 deletion deploy/kubernetes/kubectl/che-kubernetes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ items:
CHE_LOGS_APPENDERS_IMPL: "plaintext"
CHE_INFRA_KUBERNETES_INGRESS_DOMAIN: "192.168.99.100.nip.io"
CHE_INFRA_KUBERNETES_SERVER__STRATEGY: "default-host"
CHE_WORKSPACE_FEATURE_API: "http://feature-api-service:3000"
CHE_WORKSPACE_FEATURE_API: "http://marketplace:80"
- apiVersion: extensions/v1beta1
kind: Ingress
metadata:
Expand Down
17 changes: 17 additions & 0 deletions deploy/kubernetes/kubectl/wsnext/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM alpine/git:latest as clonning
# If value is git marketplace files will be cloned from git repo in $STORAGE_REPO
# Otherwise files will be copied from $STORAGE_PATH.
# Make sure $STORAGE_PATH is in the build context
ARG STORAGE_TYPE=git
ARG STORAGE_REPO=https://github.com/garagatyi/marketplace-storage
ARG STORAGE_PATH=.
COPY $STORAGE_PATH /tmp/local-marketplace-storage
RUN mkdir /tmp/marketplace-storage && \
if [ "$STORAGE_TYPE" == "git" ]; then \
git clone $STORAGE_REPO /tmp/marketplace-storage; \
else \
cp -r /tmp/local-marketplace-storage/* /tmp/marketplace-storage/; \
fi

FROM centos/httpd-24-centos7
COPY --from=clonning /tmp/marketplace-storage/ /var/www/html/
24 changes: 24 additions & 0 deletions deploy/kubernetes/kubectl/wsnext/Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
## Build marketplace docker image

Execute
```shell
docker build --no-cache -t garagatyi/che-marketplace:1 .
```
Where `--no-cache` is needed to prevent usage of cached layers with marketplace files.
Useful when you change marketplace files and rebuild the image.

`-t garagatyi/che-marketplace:1` is needed to set identifier of the image. Do not forget to change `feature-api/yaml` file accordingly if you change this identifier to something else.

## Use custome repository as a source of marketplace files

To use a custom git repo as a source of marketplace files use next command to build the image:
```shell
docker build --no-cache -t garagatyi/che-marketplace:1 --build-arg STORAGE_REPO=https://github.com/someuser/somerepo .
```

## Use local path as a source of marketplace files

To use local path as a source of marketplace files use next command to build the image:
```shell
docker build --no-cache -t garagatyi/che-marketplace:1 --build-arg STORAGE_TYPE=path --build-arg STORAGE_PATH=some_path_in_build_context path_to_build_context
```
78 changes: 21 additions & 57 deletions deploy/kubernetes/kubectl/wsnext/feature-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,80 +12,44 @@ items:
kind: Service
metadata:
labels:
app: feature-api
name: feature-api-service
app: marketplace
name: marketplace
spec:
ports:
- name: feature-api
port: 3000
- name: marketplace
port: 80
protocol: TCP
targetPort: 3000
targetPort: 8080
selector:
app: feature-api
- apiVersion: v1
kind: ConfigMap
metadata:
labels:
app: feature-api
name: feature-api
data:
CHE_REGISTRY_UPDATE_INTERVAL: "60"
CHE_REGISTRY_GITHUB_URL: "https://github.com/garagatyi/che-registry.git"
- apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: feature-api-ingress
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /
nginx.ingress.kubernetes.io/proxy-read-timeout: "3600"
nginx.ingress.kubernetes.io/proxy-connect-timeout: "3600"
spec:
rules:
- host: feature.192.168.99.100.nip.io
http:
paths:
- backend:
serviceName: feature-api-service
servicePort: 3000
app: marketplace
- apiVersion: extensions/v1beta1
kind: Deployment
metadata:
labels:
app: feature-api
name: feature-api
app: marketplace
name: marketplace
spec:
replicas: 1
revisionHistoryLimit: 2
selector:
matchLabels:
app: feature-api
app: marketplace
strategy:
type: Recreate
template:
metadata:
labels:
app: feature-api
app: marketplace
spec:
containers:
- env:
- name: CHE_REGISTRY_UPDATE_INTERVAL
valueFrom:
configMapKeyRef:
key: CHE_REGISTRY_UPDATE_INTERVAL
name: feature-api
- name: CHE_REGISTRY_GITHUB_URL
valueFrom:
configMapKeyRef:
key: CHE_REGISTRY_GITHUB_URL
name: feature-api
image: garagatyi/kubesrv:latest
imagePullPolicy: Always
name: feature-api
ports:
- containerPort: 3000
name: feature-api
resources:
limits:
memory: 600Mi
requests:
memory: 256Mi
- image: garagatyi/che-marketplace:os
imagePullPolicy: Always
name: marketplace-apache
ports:
- containerPort: 8080
name: marketplace
resources:
limits:
memory: 600Mi
requests:
memory: 256Mi
4 changes: 4 additions & 0 deletions deploy/openshift/templates/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -259,3 +259,7 @@ To allow creating workspace OpenShift resources in personal OpenShift accounts,
```


## Workspace.Next

There is a file `../../kubernetes/kubectl/wsnext/feature-api.yaml` which contains apache service that hosts Workspace.Next files. It is needed to test Workspace.Next.
To use it call `oc apply -f ../../kubernetes/kubectl/wsnext/feature-api.yaml` and Che will be able to use Workspace.Next flow.
2 changes: 1 addition & 1 deletion deploy/openshift/templates/che-server-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ objects:
name: openshift-identity-provider
optional: true
- name: CHE_WORKSPACE_FEATURE_API
value: "http://feature-api-service:3000"
value: "http://marketplace:80"
image: ${IMAGE_CHE}:${CHE_VERSION}
imagePullPolicy: "${PULL_POLICY}"
livenessProbe:
Expand Down
89 changes: 0 additions & 89 deletions deploy/openshift/templates/wsnext/feature-api.yaml

This file was deleted.

Loading