Adding a devfile to devfile registry at runtime doesn't work
See original GitHub issueDescribe the bug
I am following instructions here https://www.eclipse.org/che/docs/che-7/editing-a-devfile-and-plug-in-at-runtime/#adding-a-devfile-at-runtime_editing-a-devfile-and-plug-in-at-runtime
This step fails
$ kubectl exec ${DEVFILE_REG_POD} -i -t -- \
/var/www/html/index.sh > /var/www/html/devfiles/index.json
with error -bash: /var/www/html/devfiles/index.json: No such file or directory
Also there are errors with \
in $\{DEVFILE_REG_POD}
throughout the documentation. I had to remove that everywhere.
I tried to do this by rshing into the pod
$ oc rsh ${DEVFILE_REG_POD}
sh-4.2$ /var/www/html/index.sh > /var/www/html/devfiles/index.json
/var/www/html/index.sh: line 19: readarray: -d: invalid option
readarray: usage: readarray [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c quantum] [array]
sh-4.2$ find: 'devfiles': No such file or directory
The actual error is the -d
option in the script is not recognized.
Che version
- latest
- nightly
- other: please specify
Steps to reproduce
Add a devfile to devfile registry as explained in the documentation to test
Expected behavior
index.json
should have new entries and the stack should show up on the screen
Runtime
OCP 4.1.18
$ oc version
Client Version: version.Info{Major:"4", Minor:"1+", GitVersion:"v4.1.7-201907171753+dc76278-dirty", GitCommit:"dc76278", GitTreeState:"dirty", BuildDate:"2019-07-18T00:52:21Z", GoVersion:"go1.11.6", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"13+", GitVersion:"v1.13.4+c2a5caf", GitCommit:"c2a5caf", GitTreeState:"clean", BuildDate:"2019-09-21T02:12:52Z", GoVersion:"go1.11.13", Compiler:"gc", Platform:"linux/amd64"}
Screenshots
Installation method
- chectl
- [ x] che-operator
- minishift-addon
- I don’t know
Environment
- my computer
- Windows
- Linux
- [x ] macOS
- Cloud
- Amazon
- Azure
- GCE
- other (please specify)
- other: please specify
Additional context
Issue Analytics
- State:
- Created 4 years ago
- Comments:13 (9 by maintainers)
Top Results From Across the Web
Chapter 1. Customizing the devfile and plug-in registries
The devfile and plug-in registries run in two separate pods and are deployed when the CodeReady Workspaces server is deployed (that is the...
Read more >Building a custom devfile registry
In a multi-stage Docker build, add a Dockerfile to your devfile registry repository. ... /registry # Download the registry build tools RUN git...
Read more >Introduction to Devfile - GitHub Pages
The minimal devfile sufficient to run a workspace from it, consists of the following ... To get more functional workspace, the following parts...
Read more >Devfile v2 and IDE plug-ins in Eclipse Che | by Florent Benoit
You can still work with your previous workspaces and devfile v1. ... are not available in the Eclipse Che plug-in registry, it won't...
Read more >Devfile v2 and IDE plug-ins - Eclipse Che Blog
You can still work with your previous workspaces and Devfile v1. ... in the Eclipse Che plug-in registry, the workspace creation won't fail ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Folks, this is about the process to add devfiles to the registry on the fly by hand. IMO, this process is a hack should not even be in user documentation. The additions will go away the next time the registry pod is restarted. The right thing to do is to fork the registry.
@amisevsk yes, we tried the kubernetes version, but we have 2 registries at he end. The first deployed by chectl and the registry build by the command build.sh. We could not have two registries.
So we decided to fork the registry project on github, add our devfiles, update the index.json, and rebuild the docker image and hosted it in our cloud docker images.
During chectl intall, we tell to chectl to use a dedicaded helm file for the install. As result, we have one registry and all images provided by default by che and our devfiles.