python maap starter

A simple program that prints system information to the console.

Create configmap for the sample

kubectl create configmap getting-started-samples --from-file=maap_sample.json -n eclipse-che

Label the configmap

kubectl label configmap getting-started-samples app.kubernetes.io/part-of=che.eclipse.org app.kubernetes.io/component=getting-started-samples -n eclipse-che

Delete the configmap

kubectl delete configmap getting-started-samples -n eclipse-che

Add different splash screen

kubectl apply -f - <<EOF
apiVersion: v1
kind: Secret
metadata:
  name: che-dashboard-customization
  namespace: eclipse-che
  annotations:
    che.eclipse.org/mount-as: subpath
    che.eclipse.org/mount-path: /public/dashboard/assets/branding
  labels:
    app.kubernetes.io/component: che-dashboard-secret
    app.kubernetes.io/part-of: che.eclipse.org
data:
  loader.svg:<splash_screen>
  type: Opaque
EOF

Build and run the container

docker build -t maap-starter .
docker run -it --rm maap-starter bash

ToDo

Images

Reference image: quay.io/devfile/universal-developer-image:ubi8-latest #quay.io/igabriel185/maap-default:latest

  • for base docker environmental variable needs to be set:
export WORKSPACE_TYPE=vanilla

TL;DR

Minikube setup

minikube start --driver=virtualbox --addons=ingress,dashboard --vm=true --memory=16240 --cpus=8 --disk-size=50GB
minikube addons enable metrics-server
minikube dashboard --url
minikube kubectl -- proxy --address='0.0.0.0' --accept-hosts='^*$'
chectl server:deploy --platform minikube

Setup eclipse che

kubectl create configmap getting-started-samples --from-file=maap_sample.json -n eclipse-che
kubectl label configmap getting-started-samples app.kubernetes.io/part-of=che.eclipse.org app.kubernetes.io/component=getting-started-samples -n eclipse-che

Build image and push to quay.io

docker build --no-cache -t maap-ubi8-dev .
docker run docker.io/library/maap-ubi8-dev which python
docker commit <container_id> quay.io/igabriel185/maap-ubi8-dev
docker push quay.io/igabriel185/maap-ubi8-dev

kubectl cheatsheet

kubectl apply -f ubi8_kube.yaml
kubectl describe pod ubi8-demo

Plugins

ms-python.python ms-python.debugpy ms-toolsai.jupyter redhat.vscode-yaml redhat.vscode-commons redhat.vscode-xml