Skip to content

Instantly share code, notes, and snippets.

@nickboldt
Last active August 8, 2019 02:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nickboldt/0009e429cfb078867744eb20ad39a481 to your computer and use it in GitHub Desktop.
Save nickboldt/0009e429cfb078867744eb20ad39a481 to your computer and use it in GitHub Desktop.
che plugin registry with icons and plugins self-contained

HOWTO

b) don’t have the correct route URL or IP in the pod w/ the index.json. Need to inject the env var before applying the 0.0.0.0 transform

start up minishift and log in

minishift start
oc login 192.168.99.112:8443 -u developer -p 123

rebuild plugin reg from latest changes

docker build . -t quay.io/nickboldt/crw-pluginregistry-rhel8:nightly

deploy to quay

docker push quay.io/nickboldt/crw-pluginregistry-rhel8:nightly

delete from minishift’s images

eval $(minishift docker-env); docker rmi quay.io/nickboldt/crw-pluginregistry-rhel8:nightly

deploy using cr.yaml

cd /c/WORK/projects/codeready-workspaces/devdoc/building
chectl-win.exe server:start -a operator -p minishift --che-operator-cr-yaml=crw2-custom-images-cr.yaml -n che7n

check deployment via ssh login

oc rsh $(oc get pods | grep plugin-registry | grep Running | sed -e "s# \+1/1.\+##")

fix missing registry URL via injection

routebits=$(oc get routes | grep plugin-registry);
route=( $routebits );
regurl=${route[1]};
oc set env deployment/plugin-registry CHE_WORKSPACE_PLUGIN__REGISTRY__URL=${regurl}

then check it worked

oc rsh $(oc get pods | grep plugin-registry | grep Running | sed -e "s# \+1/1.\+##") \
/bin/bash -c "env | grep CHE_WORKSPACE_PLUGIN__REGISTRY__URL"

Things that didn’t work:

  • push more env vars into the pod using cr.yaml

  • using chectl with cr.yaml AND --plugin-registry-url=http://plugin-registry-che7w.192.168.99.112.nip.io/

  • using PLUGIN_REGISTRY_SERVICE_HOST or ETC_HOST_IP=$(awk 'END{print $1}' /etc/hosts), on 80, 8080, 8443, or 443

  • accessing the pliugin registry on https

Existing problems:

  • not all theia and vsix references in meta.yaml are being replaced: seems the /latest/ ones remain unchanged

  • could be that the replacement isn’t happening if the vsix is already archived locally?

  • could be that /latest is a special case fail (symlink? generated later?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment