Add initial content for dev spaces talk.
This commit is contained in:
		
							
								
								
									
										125
									
								
								2024-12-04-openshift-dev-spaces/README.org
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										125
									
								
								2024-12-04-openshift-dev-spaces/README.org
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,125 @@
 | 
				
			|||||||
 | 
					#+TITLE: OpenShift Dev Spaces Setup
 | 
				
			||||||
 | 
					#+DATE: <2024-12-03 Tue>
 | 
				
			||||||
 | 
					#+AUTHOR: James Blair
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					* Install the dev spaces operator
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#+NAME: Install dev spaces operator
 | 
				
			||||||
 | 
					#+begin_src tmux
 | 
				
			||||||
 | 
					cat << EOF | oc apply --filename -
 | 
				
			||||||
 | 
					# Create a dedicated namespace for dev spaces
 | 
				
			||||||
 | 
					apiVersion: v1
 | 
				
			||||||
 | 
					kind: Namespace
 | 
				
			||||||
 | 
					metadata:
 | 
				
			||||||
 | 
					  name: openshift-devspaces
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					---
 | 
				
			||||||
 | 
					# Create an operatorgroup resource for the devspaces namespace
 | 
				
			||||||
 | 
					apiVersion: operators.coreos.com/v1
 | 
				
			||||||
 | 
					kind: OperatorGroup
 | 
				
			||||||
 | 
					metadata:
 | 
				
			||||||
 | 
					  name:  devspaces-operator-group
 | 
				
			||||||
 | 
					  namespace:  openshift-devspaces
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					---
 | 
				
			||||||
 | 
					# Create a subscription for the dev spaces operator
 | 
				
			||||||
 | 
					apiVersion: operators.coreos.com/v1alpha1
 | 
				
			||||||
 | 
					kind: Subscription
 | 
				
			||||||
 | 
					metadata:
 | 
				
			||||||
 | 
					  name: openshift-devspaces
 | 
				
			||||||
 | 
					  namespace: openshift-devspaces
 | 
				
			||||||
 | 
					spec:
 | 
				
			||||||
 | 
					  channel: stable
 | 
				
			||||||
 | 
					  installPlanApproval: Automatic
 | 
				
			||||||
 | 
					  source: redhat-operators
 | 
				
			||||||
 | 
					  sourceNamespace: openshift-marketplace
 | 
				
			||||||
 | 
					  name: devspaces
 | 
				
			||||||
 | 
					EOF
 | 
				
			||||||
 | 
					#+end_src
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					* Create the che cluster resource
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#+begin_src tmux
 | 
				
			||||||
 | 
					cat << EOF | oc apply --filename -
 | 
				
			||||||
 | 
					apiVersion: org.eclipse.che/v2
 | 
				
			||||||
 | 
					kind: CheCluster
 | 
				
			||||||
 | 
					metadata:
 | 
				
			||||||
 | 
					  name: devspaces
 | 
				
			||||||
 | 
					  namespace: openshift-devspaces
 | 
				
			||||||
 | 
					spec:
 | 
				
			||||||
 | 
					  components:
 | 
				
			||||||
 | 
					    cheServer:
 | 
				
			||||||
 | 
					      debug: false
 | 
				
			||||||
 | 
					      logLevel: INFO
 | 
				
			||||||
 | 
					    dashboard:
 | 
				
			||||||
 | 
					      logLevel: ERROR
 | 
				
			||||||
 | 
					    devWorkspace: {}
 | 
				
			||||||
 | 
					    devfileRegistry: {}
 | 
				
			||||||
 | 
					    imagePuller:
 | 
				
			||||||
 | 
					      enable: false
 | 
				
			||||||
 | 
					      spec: {}
 | 
				
			||||||
 | 
					    metrics:
 | 
				
			||||||
 | 
					      enable: true
 | 
				
			||||||
 | 
					    pluginRegistry: {}
 | 
				
			||||||
 | 
					  containerRegistry: {}
 | 
				
			||||||
 | 
					  devEnvironments:
 | 
				
			||||||
 | 
					    containerBuildConfiguration:
 | 
				
			||||||
 | 
					      openShiftSecurityContextConstraint: container-build
 | 
				
			||||||
 | 
					    defaultNamespace:
 | 
				
			||||||
 | 
					      autoProvision: true
 | 
				
			||||||
 | 
					      template: <username>-devspaces
 | 
				
			||||||
 | 
					    maxNumberOfWorkspacesPerUser: 1
 | 
				
			||||||
 | 
					    maxNumberOfRunningWorkspacesPerUser: 1
 | 
				
			||||||
 | 
					    secondsOfInactivityBeforeIdling: 1800
 | 
				
			||||||
 | 
					    secondsOfRunBeforeIdling: -1
 | 
				
			||||||
 | 
					    security: {}
 | 
				
			||||||
 | 
					    startTimeoutSeconds: 300
 | 
				
			||||||
 | 
					    storage:
 | 
				
			||||||
 | 
					      pvcStrategy: per-user
 | 
				
			||||||
 | 
					  gitServices: {}
 | 
				
			||||||
 | 
					  networking:
 | 
				
			||||||
 | 
					    auth:
 | 
				
			||||||
 | 
					      gateway:
 | 
				
			||||||
 | 
					        configLabels:
 | 
				
			||||||
 | 
					          app: che
 | 
				
			||||||
 | 
					          component: che-gateway-config
 | 
				
			||||||
 | 
					        kubeRbacProxy:
 | 
				
			||||||
 | 
					          logLevel: 0
 | 
				
			||||||
 | 
					        oAuthProxy:
 | 
				
			||||||
 | 
					          cookieExpireSeconds: 86400
 | 
				
			||||||
 | 
					        traefik:
 | 
				
			||||||
 | 
					          logLevel: INFO
 | 
				
			||||||
 | 
					EOF
 | 
				
			||||||
 | 
					#+end_src
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					* Create a custom devfile sample
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#+NAME: Create a custom devfile sample
 | 
				
			||||||
 | 
					#+begin_src tmux
 | 
				
			||||||
 | 
					# Create the configmap with sample json config
 | 
				
			||||||
 | 
					oc create configmap getting-started-samples --from-file=samples.json -n openshift-devspaces
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Label the configmap for use by dev spaces
 | 
				
			||||||
 | 
					oc label configmap getting-started-samples app.kubernetes.io/part-of=che.eclipse.org app.kubernetes.io/component=getting-started-samples -n openshift-devspaces
 | 
				
			||||||
 | 
					#+end_src
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					* Remove default samples
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#+NAME: Hide default samples
 | 
				
			||||||
 | 
					#+begin_src tmux
 | 
				
			||||||
 | 
					cat << EOF | oc apply --filename -
 | 
				
			||||||
 | 
					apiVersion: org.eclipse.che/v2
 | 
				
			||||||
 | 
					kind: CheCluster
 | 
				
			||||||
 | 
					metadata:
 | 
				
			||||||
 | 
					  name: devspaces
 | 
				
			||||||
 | 
					  namespace: openshift-devspaces
 | 
				
			||||||
 | 
					spec:
 | 
				
			||||||
 | 
					  components:
 | 
				
			||||||
 | 
					    devfileRegistry:
 | 
				
			||||||
 | 
					      disableInternalRegistry: true
 | 
				
			||||||
 | 
					EOF
 | 
				
			||||||
 | 
					#+end_src
 | 
				
			||||||
							
								
								
									
										23
									
								
								2024-12-04-openshift-dev-spaces/samples.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								2024-12-04-openshift-dev-spaces/samples.json
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							@ -26,3 +26,4 @@ Whether you attended one of my talks or just stumbled upon this repository, I ho
 | 
				
			|||||||
| 06-06-2024 | Wellington | Kubernetes for the next decade                                     | [[./2024-06-06-kubertens-meetup][link]]     |
 | 
					| 06-06-2024 | Wellington | Kubernetes for the next decade                                     | [[./2024-06-06-kubertens-meetup][link]]     |
 | 
				
			||||||
| 20-06-2024 | Wellington | Building OpenShift Appliances                                      | [[./2024-06-20-openshift-meetup][link]]     |
 | 
					| 20-06-2024 | Wellington | Building OpenShift Appliances                                      | [[./2024-06-20-openshift-meetup][link]]     |
 | 
				
			||||||
| 28-08-2024 | Wellington | Securing supply chain with Red Hat Advanced Cluster Security       | [[2024-08-28-rhacs-actions-pipeline][link]]     |
 | 
					| 28-08-2024 | Wellington | Securing supply chain with Red Hat Advanced Cluster Security       | [[2024-08-28-rhacs-actions-pipeline][link]]     |
 | 
				
			||||||
 | 
					| 04-12-2024 | Remote     | An introduction to OpenShift Dev Spaces                            | [[2024-12-04-openshift-dev-spaces][link]]     |
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user