-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added ability to deploy che plugin registry with ocp.sh #10954
Conversation
ci-test |
deploy/openshift/ocp.sh
Outdated
-p IMAGE_TAG=${CHE_PLUGIN_REGISTRY_IMAGE_TAG} | ||
CHE_PLUGIN_REGISTRY_ROUTE=$($OC_BINARY get route/che-plugin-registry --namespace=${CHE_OPENSHIFT_PROJECT} -o=jsonpath={'.spec.host'}) | ||
echo "Che plugin registry deployment complete. $CHE_PLUGIN_REGISTRY_ROUTE" | ||
${OC_BINARY} set env dc/che CHE_PLUGIN_REGISTRY_URL="http://$CHE_PLUGIN_REGISTRY_ROUTE/plugins/" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as I understand it will invoke che deploy one more time. So, user has to wait until Che becomes ready one more time. Can we avoid this? Like deploy the registry and only then deploy Che with right env variable there?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can avoid it. Not sure about do we need to. @garagatyi wdyt?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I completely agree with @sleshchenko!
We can add a variable to Che deployment and set it to the correct value in case registry is needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll take a look.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sleshchenko @garagatyi I've tried to do what you want. But honestly, it required some complex refactoring of ocp.sh and che_deploy.sh that will be thrown away when plugin-registry become a part of che. do you think it's mandatory for this pr?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is not exporting of CHE_PLUGIN_REGISTRY_URL
enough since deploy script automatically detect envs vars beginning with "CHE_" and passes them to Che deployments?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can do that way, but I would say it's a workaround and prefer to do that over the template. Another issue is that registry deployment requires che to be already deployed. To change that I need to rewrite a lot in che_deploy.sh
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sleshchenko I'll try to test your idea.
spec: | ||
containers: | ||
- image: ${IMAGE}:${IMAGE_TAG} | ||
imagePullPolicy: Always |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It may be useful to have an ability to configure this value, for example for testing purpose
displayName: Memory Limit | ||
name: MEMORY_LIMIT | ||
value: 256Mi | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can remove extra line here
name: che-plugin-registry | ||
parameters: | ||
- name: IMAGE | ||
value: eclipse/che-plugin-registry |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please consider adding descriptions for these parameters with described default values there.
ci-test |
ci-test build report: |
@sleshchenko @garagatyi @eivantsov I've made some adjustments in scripts. Now it deploys registry only with che. Please take a look. |
ci-test |
deploy/openshift/ocp.sh
Outdated
@@ -394,3 +400,4 @@ init | |||
get_tools | |||
parse_args "$@" | |||
deploy_che_to_ocp | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove extra line
…y_che_plugin_registry
ci-test build report: |
What does this PR do?
./ocp.sh --deploy-che --deploy-che-plugin-registry
CHE_PLUGIN_REGISTRY_URL
for che-master with a link to che plugin registryWhat issues does this PR fix or reference?
#10842
Release Notes
Added ability to deploy che plugin registry with ocp.sh
Docs PR
n/a