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

User can specify project name using openshift ocp.sh. #8154

Merged
merged 1 commit into from
Jan 15, 2018

Conversation

JamesDrummond
Copy link
Contributor

What does this PR do?

User can specify project name using ocp.sh using environment variable CHE_OPENSHIFT_PROJECT.

What issues does this PR fix or reference?

NA

Release Notes

User can specify project name using openshift ocp.sh script.

Signed-off-by: James Drummond james@devcomb.com

@JamesDrummond JamesDrummond added the kind/enhancement A feature request - must adhere to the feature request template. label Jan 3, 2018
@JamesDrummond JamesDrummond added this to the 6.0.0-M5 milestone Jan 3, 2018
@codenvy-ci
Copy link

Can one of the admins verify this patch?

1 similar comment
@codenvy-ci
Copy link

Can one of the admins verify this patch?

@benoitf benoitf added the status/code-review This issue has a pull request posted for it and is awaiting code review completion by the community. label Jan 3, 2018
@riuvshin
Copy link
Contributor

riuvshin commented Jan 3, 2018

The reason why we didn't allow to change project name was that there are some other places where it is hardcoded. To merge that you have to find all impacted places and make sure it will respect ENV

@JamesDrummond
Copy link
Contributor Author

@riuvshin I have tested it and successfully created a workspace after setting the project name to something else. Will there be conflicts if two are running at the same time by the same user? Is there additional tests I can do?

Signed-off-by: James Drummond <james@devcomb.com>
@JamesDrummond
Copy link
Contributor Author

@riuvshin I created two different projects named "che-eclipse-che-test" and "che-eclipse-che-test2" and created two different workspaces with the same user. I don't have any issues. The only thing I can think of being an issue is workspace project clean up which I don't know how to do through CLI. I usually have to delete one by one if the che server is deleted improperly.

I also have a different user that has it's own che project. I am not using multiuser though so I have to specify different project names.

I think another solution is to create a hash in the default project name values for the che server similar to workspaces. Something like DEFAULT_CHE_OPENSHIFT_PROJECT="eclipse-che-${hash}" for all but osio.

image

@JamesDrummond JamesDrummond self-assigned this Jan 4, 2018
@riuvshin
Copy link
Contributor

riuvshin commented Jan 4, 2018

@JamesDrummond have you tested this in multiuser mode? It may affect multi user

@JamesDrummond
Copy link
Contributor Author

Will test today.

@codenvy-ci
Copy link

Can one of the admins verify this patch?

Copy link
Member

@sleshchenko sleshchenko left a comment

Choose a reason for hiding this comment

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

I believe it should work fine. What is hardcoded and can't be changed easily is Che route name like here https://github.com/eclipse/che/blob/c46b3e7748276b808f2fe6d55bfcca44bc0a1d58/dockerfiles/init/modules/openshift/files/scripts/che-config#L9
where che is a route name.

@benoitf benoitf removed their request for review January 11, 2018 10:10
@JamesDrummond
Copy link
Contributor Author

JamesDrummond commented Jan 11, 2018

@sleshchenko I don't have an issue keeping the route name which give the url a suffix of che-. The project name just allows for a unique url like http://che-myprojectname.example.com/ for example. This is important for ocp multiuser setup where users need a way to setup a unique url address.

@JamesDrummond
Copy link
Contributor Author

@riuvshin Tested in multiuser mode. Works great :)

@JamesDrummond
Copy link
Contributor Author

@riuvshin Can you please review/approve?

@JamesDrummond JamesDrummond merged commit 0b17774 into master Jan 15, 2018
@JamesDrummond JamesDrummond deleted the openshift_init_patch1 branch January 15, 2018 15:37
@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 Jan 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement A feature request - must adhere to the feature request template.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants