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

Make Theia plugin state and workspace state persistent #12260

Closed
mmorhun opened this issue Dec 22, 2018 · 14 comments
Closed

Make Theia plugin state and workspace state persistent #12260

mmorhun opened this issue Dec 22, 2018 · 14 comments
Assignees

Comments

@mmorhun
Copy link
Contributor

mmorhun commented Dec 22, 2018

Description

We need to make persistent plugin globalState and workspaceState from the plugin context, so after workspace restart data shouldn't be lost.

@mmorhun
Copy link
Contributor Author

mmorhun commented Apr 22, 2019

At this moment we need to decide which way we want to go.

My proposal is to use volume for ~/.theia directory which holds Theia data including all plugin's storage.
This way we'll persist all plugin's related information and Theia global configuration.
However, as far as I know, there is not ability with current Che API to have a volume which is shared between workspaces, so I am going to have a volume per workspace for such data. @skabashnyuk @sleshchenko am I correct about shared between workspaces volumes?

About encryption. It is nice feature, but I thinks that this is more global problem and should be addressed on higher than Che-Theia level. For example, a flag which turns on encryption for specified volume on infrastructure level.

@l0rd @benoitf would like to see your opinion on this. Thanks.

@AndrienkoAleksandr
Copy link
Contributor

use volume for ~/.theia directory which holds Theia data including all plugin's storage

+1

@olexii4
Copy link
Contributor

olexii4 commented Apr 22, 2019

use volume for ~/.theia directory which holds Theia data including all plugin's storage

+1

@gorkem
Copy link
Contributor

gorkem commented Apr 22, 2019

Would this mean an additional PV per workspace?

@skabashnyuk
Copy link
Contributor

What for you want to encrypt this data?

@mmorhun
Copy link
Contributor Author

mmorhun commented Apr 23, 2019

@skabashnyuk that was request from previous discussion about this issue.
As I described above, I think that this is not Che-Theia component responsibility and should be handled in another issue and in more general way.

@skabashnyuk
Copy link
Contributor

@skabashnyuk that was request from previous discussion about this issue.

Can you remind me of the motivation part in case if you are going to implement that?

@mmorhun
Copy link
Contributor Author

mmorhun commented Apr 23, 2019

@skabashnyuk the idea was to protect volume, so if someone access it without Che - it's encrypted and data cannot be read. But now I realize that the volume is inside cluster, beside user it could be accessed by cluster admins only.

@mmorhun
Copy link
Contributor Author

mmorhun commented Apr 23, 2019

So, if no objections I am removing encryption section from the description

@mmorhun
Copy link
Contributor Author

mmorhun commented Apr 23, 2019

@gorkem yes. It is the best solution I see for now form Che-Theia point of view.
I've tried to use symlink to projects volume, but it doesn't work and it will also add an extra directory in projects list, which is not good thing at all.

@sleshchenko
Copy link
Member

@gorkem @mmorhun

Would this mean an additional PV per workspace?

It means using an additional Che Volume per workspace. And whether an additional PV will be used or not - depends on PVC strategy configured on Che Server.
OSIO uses common PVC strategy, that means that all workspaces volumes use the same PVC that is bound to one PV, and multiple volumes are isolated in their own subfolders.
In the case of unique PVC strategy, each Che Volume(projects, Theia storage) will get their own PVC that is bound to separate PV.

@mmorhun
Copy link
Contributor Author

mmorhun commented Apr 23, 2019

Thanks @sleshchenko for really good clarification.

@l0rd
Copy link
Contributor

l0rd commented Apr 23, 2019

@mmorhun I understand that we still do not have a good solution for globalState right? Because if we don't have it we should probably wait for a solution that would work for both globalState and workspaceState (using postgre, configmaps, secrets, a che-server PV etc...).

@mmorhun
Copy link
Contributor Author

mmorhun commented Apr 24, 2019

@l0rd exactly, we do not have it, but for now we may do the state persistent, at least in scope of workspace, which is easy. Here is the very simple fix.

@mmorhun mmorhun closed this as completed Apr 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants