Closed akosma closed 2 years ago
https://loft.sh/blog/python-flask-development-on-kubernetes-with-devspace/ can be used as inspiration.
Unfortunately it appears that DevSpace is not compatible with OpenShift, as it deploys auxiliary images requesting privileged ports (80) or performing operations that require root permissions (read/write operations mostly) on the pod. The documentation does not mention OpenShift anywhere, so most probably this is not a supported platform. Closing.
My mistake, retried again and made it work. Working on this.
What worked was devspace deploy -p production
; this ticket explains that what does not work is devspace dev
, which apparently syncs files between the local laptop and the container automatically.
Tried again following suggestion by developer, without success. See original ticket for details.
Could not get devspace to work with OpenShift. Closing.
I got it working... The main issue is that the /app
folder isn't writable, but with a simple "trick" we can have a writable path mounted there:
diff --git a/devspace.yaml b/devspace.yaml
index b4854cf..da4bd70 100755
--- a/devspace.yaml
+++ b/devspace.yaml
@@ -76,6 +76,14 @@ dev:
- "9999999"
- op: remove
path: spec.containers[0].securityContext
+ - op: add
+ path: spec.containers[0].env
+ value:
+ - name: HOME
+ value: /app
+ persistPaths:
+ - path: /app
+ skipPopulate: true
See https://devspace.sh/cli/docs/configuration/development/replace-pods#persistence for more information about persistence. skipPopulate: true
is necessary, because otherwise an init container tries to copy stuff around which again leads into:
cp: preserving times for '/devspace-persistence/.': Operation not permitted`.
Setting the HOME
env var is needed so that the various dev tools are using a writable location.
With that we should be able to write a page about DevSpace on APPUiO Cloud.
Create a tutorial about using DevSpace to write apps for APPUiO Cloud.