Skip to content
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

Merged
merged 9 commits into from
Aug 30, 2018

Conversation

skabashnyuk
Copy link
Contributor

@skabashnyuk skabashnyuk commented Aug 28, 2018

What does this PR do?

  • Added ability to deploy che plugin registry with ocp.sh ./ocp.sh --deploy-che --deploy-che-plugin-registry
  • Add environment variableCHE_PLUGIN_REGISTRY_URL for che-master with a link to che plugin registry

What issues does this PR fix or reference?

#10842

Release Notes

Added ability to deploy che plugin registry with ocp.sh

Docs PR

n/a

@skabashnyuk
Copy link
Contributor Author

ci-test

-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/"
Copy link
Member

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?

Copy link
Contributor Author

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?

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.

Copy link
Contributor Author

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.

Copy link
Contributor Author

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?

Copy link
Member

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?

Copy link
Contributor Author

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

Copy link
Contributor Author

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
Copy link
Member

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

Copy link
Member

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
Copy link
Member

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.

@benoitf benoitf added status/code-review This issue has a pull request posted for it and is awaiting code review completion by the community. kind/task Internal things, technical debt, and to-do tasks to be performed. labels Aug 28, 2018
@skabashnyuk
Copy link
Contributor Author

ci-test

@riuvshin
Copy link
Contributor

ci-test build report:
Build details
Test report
selenium tests report data
docker image: eclipseche/che-server:10954
https://github.com/orgs/eclipse/teams/eclipse-che-qa please check this report.

@skabashnyuk
Copy link
Contributor Author

@sleshchenko @garagatyi @eivantsov I've made some adjustments in scripts. Now it deploys registry only with che. Please take a look.

@skabashnyuk
Copy link
Contributor Author

ci-test

@@ -394,3 +400,4 @@ init
get_tools
parse_args "$@"
deploy_che_to_ocp

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove extra line

@riuvshin
Copy link
Contributor

ci-test build report:
Build details
Test report
selenium tests report data
docker image: eclipseche/che-server:10954
https://github.com/orgs/eclipse/teams/eclipse-che-qa please check this report.

@skabashnyuk skabashnyuk merged commit 2b7ebd8 into master Aug 30, 2018
@skabashnyuk skabashnyuk deleted the deploy_che_plugin_registry branch August 30, 2018 07:18
@benoitf benoitf added this to the 6.11.0 milestone Aug 30, 2018
@benoitf benoitf removed the status/code-review This issue has a pull request posted for it and is awaiting code review completion by the community. label Aug 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/task Internal things, technical debt, and to-do tasks to be performed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants