forked from ansible/product-demos
-
Notifications
You must be signed in to change notification settings - Fork 0
/
devspaces.yml
112 lines (107 loc) · 3.55 KB
/
devspaces.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
---
- name: Deploy Dev Spaces on OCP
hosts: localhost
gather_facts: false
tasks:
- name: Create namespace
redhat.openshift.k8s:
name: eclipse-che
api_version: v1
kind: Namespace
state: present
- name: Create dev spaces subscription
redhat.openshift.k8s:
state: present
definition:
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
labels:
operators.coreos.com/devspaces.openshift-operators: ''
name: devspaces
namespace: openshift-operators
spec:
channel: stable
installPlanApproval: Automatic
name: devspaces
source: redhat-operators
sourceNamespace: openshift-marketplace
- name: Wait for dev spaces operator to install
kubernetes.core.k8s_info:
api_version: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
name: checlusters.org.eclipse.che
register: crd_che
until: crd_che.resources | list | length == 1
retries: 10
delay: 30
- name: Wait until devspaces-operator is up
kubernetes.core.k8s_info:
api_version: v1
kind: Deployment
name: devspaces-operator
namespace: openshift-operators
register: pod_list
until: pod_list | json_query('resources[*].status.readyReplicas') | unique == [1]
retries: 10
delay: 30
- name: Deploy dev spaces
redhat.openshift.k8s:
state: present
definition:
apiVersion: org.eclipse.che/v2
kind: CheCluster
metadata:
name: devspaces
namespace: eclipse-che
spec:
components:
cheServer:
debug: false
logLevel: INFO
dashboard: {}
database:
credentialsSecretName: postgres-credentials
externalDb: false
postgresDb: dbche
postgresHostName: postgres
postgresPort: '5432'
pvc:
claimSize: 1Gi
devWorkspace: {}
devfileRegistry: {}
imagePuller:
enable: false
spec: {}
metrics:
enable: true
pluginRegistry:
openVSXURL: 'https://open-vsx.org'
containerRegistry: {}
devEnvironments:
startTimeoutSeconds: 300
secondsOfRunBeforeIdling: -1
maxNumberOfWorkspacesPerUser: -1
containerBuildConfiguration:
openShiftSecurityContextConstraint: container-build
disableContainerBuildCapabilities: true
defaultEditor: che-incubator/che-code/insiders
defaultComponents:
- container:
image: >-
registry.redhat.io/devspaces/udi-rhel8@sha256:aa39ede33bcbda6aa2723d271c79ab8d8fd388c7dfcbc3d4ece745b7e9c84193
sourceMapping: /projects
name: universal-developer-image
defaultNamespace:
autoProvision: true
template: <username>-devspaces
secondsOfInactivityBeforeIdling: 1800
storage:
pvcStrategy: per-user
gitServices: {}
networking:
auth:
gateway:
configLabels:
app: che
component: che-gateway-config