-
Notifications
You must be signed in to change notification settings - Fork 56
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
Add installation guides #1371
Open
akurinnoy
wants to merge
1
commit into
devfile:main
Choose a base branch
from
akurinnoy:installation-guide
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Add installation guides #1371
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Installation Guide for DevWorkspace Operator | ||
|
||
- **Kind** | ||
- [Installation on Kind Without OLM (Linux)](installation/kind-without-olm-linux.md) | ||
- [Installation on Kind Without OLM (MacOs)](installation/kind-without-olm-macos.md) | ||
- **Minikube** | ||
- [Installation on Minikube Without OLM](installation/minikube-without-olm.md) | ||
- **OpenShift** | ||
- [Installation on OpenShift With OLM](installation/openshift-with-olm.md) | ||
- [Installation on OpenShift Without OLM](installation/openshift-without-olm.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,182 @@ | ||
# Installation on Kind Without OLM (Linux) | ||
|
||
## Prerequisites | ||
|
||
Before you begin, ensure you have the following tools installed: | ||
|
||
* **kubectl:** The Kubernetes command-line tool. | ||
* **kind:** A tool for running Kubernetes locally using Docker. | ||
* **Docker** (as a container runtime) | ||
|
||
## Steps | ||
|
||
### 1. Create Kind Cluster with Extra Port Mappings | ||
|
||
Create a Kind cluster with port mappings for HTTP and HTTPS traffic: | ||
|
||
```sh | ||
cat <<EOF | kind create cluster --config=- | ||
kind: Cluster | ||
apiVersion: kind.x-k8s.io/v1alpha4 | ||
nodes: | ||
- role: control-plane | ||
extraPortMappings: | ||
- containerPort: 80 | ||
hostPort: 80 | ||
protocol: TCP | ||
- containerPort: 443 | ||
hostPort: 443 | ||
protocol: TCP | ||
EOF | ||
``` | ||
|
||
### 2. Install NGINX Ingress Controller | ||
|
||
Install the NGINX ingress controller: | ||
|
||
```sh | ||
kubectl apply -f https://kind.sigs.k8s.io/examples/ingress/deploy-ingress-nginx.yaml | ||
``` | ||
|
||
Wait until the NGINX ingress controller pods are ready: | ||
|
||
```sh | ||
kubectl wait --namespace ingress-nginx \ | ||
--for=condition=ready pod \ | ||
--selector=app.kubernetes.io/component=controller \ | ||
--timeout=90s | ||
``` | ||
|
||
Redeploy the `ingress-nginx-controller` service to change its type from `LoadBalancer` to `NodePort`: | ||
|
||
```sh | ||
kubectl delete service ingress-nginx-controller -n ingress-nginx | ||
``` | ||
|
||
```sh | ||
kubectl expose deployment ingress-nginx-controller --name=ingress-nginx-controller --port=80 --type=NodePort -n ingress-nginx | ||
``` | ||
|
||
### 3. Create Namespace | ||
|
||
Create a dedicated namespace for the DevWorkspace Controller: | ||
|
||
```sh | ||
kubectl create namespace devworkspace-controller | ||
``` | ||
|
||
### 4. Install cert-manager | ||
|
||
Install cert-manager using the provided manifest: | ||
|
||
```sh | ||
kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.15.4/cert-manager.yaml | ||
``` | ||
|
||
Wait until cert-manager pods are ready: | ||
|
||
```sh | ||
kubectl wait --namespace cert-manager \ | ||
--timeout 90s \ | ||
--for=condition=ready pod \ | ||
--selector=app.kubernetes.io/instance=cert-manager | ||
``` | ||
|
||
### 5. Install the DevWorkspace Operator | ||
|
||
Install the DevWorkspace Operator from the given URL: | ||
|
||
```sh | ||
kubectl apply -f https://github.com/devfile/devworkspace-operator/raw/refs/tags/v0.31.2/deploy/deployment/kubernetes/combined.yaml | ||
``` | ||
|
||
Wait until the DevWorkspace Operator pods are ready: | ||
|
||
```sh | ||
kubectl wait --namespace devworkspace-controller \ | ||
--timeout 90s \ | ||
--for=condition=ready pod \ | ||
--selector=app.kubernetes.io/part-of=devworkspace-operator | ||
``` | ||
|
||
### 6. Create the DevWorkspace Operator Config | ||
|
||
#### 6.1 Get Kind Node IP | ||
|
||
Get the internal IP address of your Kind control-plane node: | ||
|
||
```sh | ||
kubectl get node -o wide | ||
``` | ||
Look for the `INTERNAL-IP` of the `kind-control-plane` node. Let's denote this as `<HOST_IP>`. You will use this IP in the next step. | ||
|
||
#### 6.2 Create the DevWorkspaceOperatorConfig | ||
|
||
Create the `DevWorkspaceOperatorConfig` resource, replacing `<HOST_IP>` with the IP you obtained in the previous step: | ||
|
||
```bash | ||
kubectl apply -f - <<EOF | ||
apiVersion: controller.devfile.io/v1alpha1 | ||
kind: DevWorkspaceOperatorConfig | ||
metadata: | ||
name: devworkspace-operator-config | ||
namespace: devworkspace-controller | ||
config: | ||
routing: | ||
clusterHostSuffix: "<HOST_IP>.nip.io" | ||
EOF | ||
``` | ||
|
||
### 7. Create a Sample DevWorkspace | ||
|
||
Create a sample DevWorkspace: | ||
|
||
```bash | ||
kubectl apply -f - <<EOF | ||
kind: DevWorkspace | ||
apiVersion: workspace.devfile.io/v1alpha2 | ||
metadata: | ||
name: git-clone-sample-devworkspace | ||
spec: | ||
started: true | ||
template: | ||
projects: | ||
- name: web-nodejs-sample | ||
git: | ||
remotes: | ||
origin: "https://github.com/che-samples/web-nodejs-sample.git" | ||
- name: devworkspace-operator | ||
git: | ||
checkoutFrom: | ||
remote: origin | ||
revision: 0.21.x | ||
remotes: | ||
origin: "https://github.com/devfile/devworkspace-operator.git" | ||
amisevsk: "https://github.com/amisevsk/devworkspace-operator.git" | ||
commands: | ||
- id: say-hello | ||
exec: | ||
component: che-code-runtime-description | ||
commandLine: echo "Hello from $(pwd)" | ||
workingDir: ${PROJECT_SOURCE}/app | ||
contributions: | ||
- name: che-code | ||
uri: https://eclipse-che.github.io/che-plugin-registry/main/v3/plugins/che-incubator/che-code/latest/devfile.yaml | ||
components: | ||
- name: che-code-runtime-description | ||
container: | ||
env: | ||
- name: CODE_HOST | ||
value: 0.0.0.0 | ||
EOF | ||
``` | ||
|
||
**Note:** The DevWorkspace creation may fail due to timeout if some container images are large and take longer than 5 minutes to pull. If the DevWorkspace fails, you can restart it by setting `spec.started` to `true`. Use the following command to re-trigger the DevWorkspace start: | ||
|
||
```bash | ||
kubectl patch devworkspace git-clone-sample-devworkspace -n default --type merge -p '{"spec": {"started": true}}' | ||
``` | ||
You can also check the DevWorkspace status by running: | ||
```sh | ||
kubectl get devworkspace -n default | ||
``` |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WDYT about adding something like:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When the DevWorkspace is running according to the status, open the editor by accesssing the URL from the
INFO
column in a web browser. For example:?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this is an important step I forgot to mention, and it should be in this doc.