 Hello everyone and thank you for joining. My name is Valery Sudenko and I'm going to present you how to customize your own online IDE is a DevFile. So in this talk I'm going to explain you what is a Quick Share, which components it has. Then we will see what is DevFile and which structure does it have. Also I want to demonstrate to you a small demo where I will change existing DevFile inside Eclipse IDE, Eclipse Share, to work with Corkus samples. Of course I will say a few words about Corkus and explain what is it. In the end we will see some benefits of DevFile, why it's good to use it and of course we'll have some time for questions in the end. So about Eclipse Share, Eclipse Share is Kubernetes native IDE for developer teams and it provides Kubernetes native workspaces. Workspaces inside share are Kubernetes spots and everything has been containerized. I mean editors, plugins, tools, environments all are working inside containers and you can bring your runtime applications inside your workspace. The editor which is packaged by default in Eclipse Share is based on Eclipse Share. We do that to provide VS Code-like experience. There is built-in support for language server protocol and for debug adapter protocol. Also there is compatibility with VS Code extensions but in here it's also easy to swap your editor. It's also possible to use for example Eclipse Dirigable or Jupyter Netbook or even Eclipse IDE or you can bring inside the workspace. Share also has two registries. The first one is plugin registry and the second one is DevFile registry. In DevFile registry you register your DevFiles and share already has own DevFile registry where we have DevFiles for Python, C-Sharp, Goal, Java, Node.js, C++ and each DevFile reference plugins which are living in plugin registry. Share plugin is a young file and it wraps VS Code extension or Thayer plugin and one share plugin can contain more than one VS Code extension. For example Java, share Java plugin contains two VS Code extensions. The first one is Java language server to support Java language and the second one is Java debugger which is provided by Microsoft to debug Java applications. DevFiles are living in DevFile registry and on the left you can see general structure of DevFile. What is DevFile? DevFile is a young file that describes and defines developer environment in share. So here you can specify the structure of your environment and it contains three general parts or blocks. The first one is project. It's where you can specify your project repository, project source repository. This part is optional. I mean if you don't want to clone some project in your workspace when it will be started you can just skip this part and your workspace will be empty without any projects. The second part is components. Components could have different types. For example it could be editor. Editor components includes editor and it describes the container where editor is running. It could be chat area or another editor which I show. Another type of components is plugin. It's the component where you can include some VS Code extension or another plugin's area plugin and this plugin should be like chat plugin. And one more type of components is environment. It could be build, test or run time. It depends what you need to do in your workspace. For example one run time you need to build your application, another one for testing, I mean to run some tests and one more to run the application. The last part of the DevFile is commands that you want to bring inside your workspace. It also could be a command to run the application or build or debug or some command that you or your team usually do when developing the application. Let's see a few examples of DevFile. This one is the simplest one. As you can see it contains just three lines but using this DevFile you can create your workspace and it will contain just editor where you can create file and write some message text but it works. You can just use it and create new workspace. Another one example is described developer environment to work with C sharp applications. It contains one project which will be cloned out to start in the workspace. Also it contains two components. The first one is chip plugin which provides C sharp plugin to work with C sharp language to providing some support for language. Another component is developer environment. It needs to build the application and run it. On the right side we can see commands which our DevFile contains. There are three commands. The first one is to update dependencies and the second to run and the last one to build the application. All these commands should be run inside the environment. Let's talk now more about structure of the file. I'm going to explain each attribute which could be input to the file and I will start with required attributes. The first one is API version. This attribute is required and it describes how you specify which API version you use for the files. Right now just supports just one version. It's 100. Another required attribute is metadata. It describes it could contain attribute name or generate name. If you put name it means that when you create some workspace from this DevFile the workspace will have name with this value. If you add generate name instead of name you can create many workspaces and each workspace will have name which starts with this prefix. The next attribute is projects and it's optional and tells the workspace where to find the project that will be included in your space. In this case we are pointing some one projects from GitHub repository. We can put the name for this project and we can see this name inside our project tree in IDE. Also we point in some GitHub repository and this project can have type git. Also it could be possible to put value as zip file and write location to file in your local system. And one another attribute for type git is it could be sparse checkout here. It could be useful when some repository contains many sub-projects and you want to clone just one project. You can specify this attribute and put the name of that sub-project. The next part is attributes. This part is optional and here you can pretty much specify anything you wish. In that case we have persisting false and we need that to make our workspace work quickly. It means that fmrl mode is activated and in fmrl mode workspaces has no persisted volumes. The next component is the biggest one I will say is the next attribute is components. Components could have each component could have a different type and it depends on which type it has. It can have different set of other attributes. For example each component could have type docker image, check plugin, check editor or Kubernetes or even OpenShift. If component has type check plugin it should contain ID. ID is identified to plugin registry where plugins are living. If the plugin doesn't live in check plugin registry you add instead of ID reference and point somewhere to raw file where the plugin is living. Another attribute is alias. It's name using which other places of this defile for example commands can refer to this command. This attribute is optional but must be unique in the defile. Another attribute is mount sources and if it has value true it makes that source code available in that container. So if we describe some developer environment or runtime environment we usually specify the type as docker image and this component should have image attribute which specifies docker image that should be used in that container. But usually we use community images but we need to specify this image for OpenShift specific technology. For example set some permissions to home directory to allow arbitrary users to write something into that. Also it could be possible to add some command to make our image always active. Another attribute which you can see here is endpoints and endpoints describes docker image component endpoints with name and port and the user will have an action inside ID to click on that endpoint and open another tab in browser. Also it is possible to define volumes. Volumes defines a directory within the workspace, within the container that is available to this workspace and it could be useful for for example for dependencies to avoid each time downloading the dependencies when you build the project. Another part is commands. In this section you can define custom command that will be available for you inside your workspace. Typically it's just a command line which will be executed in terminal but inside IDE we will see them like a buttons or where we can just click and execute that command. Each command has name which will be displayed inside IDE and actions. Right now she supports just one action for each command but in action you can describe type, command line, component where this command should be executed and working directory for sources where this should be executed. Also it is possible to define type as VS Code launch except of instead of exact. It means that you want to describe debug configuration which will be added into launches on file and by using this debug configuration you can use your debugger to debug the application. So let's see about the structure and right now I'm going to go to the demo and in the demo I will, I'm going to open hosted check, it's chair.io, chair.openshift.io and I'm going to create the workspace from existing the file and we'll modify it because as for me it's better to create your the file inside chair because we already have some content which we can modify. We can see existing plugins which provides chair plugin registry. Also in the clip share we have a nice editor where we can edit where we can use auto completion. It's Monaco editor which also provides young language chair. So for demo let's imagine I'm new in Corpus world. Corpus is cloud native stack for writing Java microservices and serverless applications and it's just a big week and it's really popular now because it provides hodger deploy for Java applications and it also provides native compilation. So let's imagine I want to start learn about Corpus. I want to follow some tutorial from Corpus Ion and for this I need to build my own developer environment. So I'm thinking what I need to work with Corpus. At least I need to have Maven and Java version 8 or 11 or higher. So let's open our IDE. This is a clip share. It's how dashboard looks like. Here we have stack of the files. They come from the file registry. So I want to choose one the file which already contains Java and Maven for example Java vertex and go to edit it. What I can see here. Here I have several tabs for example plugins tab where I can see plugins from plugin registry and I can just activate or deactivate some plugin. If I know that some plugin already is here I can just activate it and use it. Also I have the file tab is Monaco editor and here I can modify my def file to adapt to my work. So let's start modify it. Let's change the name. Let's go to projects and here I should describe the source code of my project. I know that Corpus I provide some repository with his tutorial. It's getting started guides and I just want to clone the URL, copy URL and put it as a location. It's here. It's her type git and also I don't want to clone all projects. I just want to start doing this tutorial. It's getting started. Let's go to source section and add as you can see I can use auto completion and you can use post checkout here with this value. Okay now let's save it. Actually I can modify each component step by step and check it by running the workspace and check if everything works. But to save our time I just want to continue editing this def file and we'll start it in the end. So persistent volumes is okay for us to make it work more quickly. Next go to components. The first component describes Che Java plugin which provides Java limit server and Java debugger but I also know that VSCode has extension for Corpus and I want to use it in my as in my plugin. I can build my own Che plugin. For example I have this plugin here. As you can see in the end in that young file I have three VSCode extensions. It's VSCode Java debug, Java language server and VSCode Corpus. Now I just want copy URL to raw file and put it as a reference of my Che plugin. Let's save it. Okay now let's go to another component. It describes developer environment. I already selected that the file which contains that environment. I mean which provides Java 8. As you can see here we can description of image. It's Che Java 8 is Maven. And it will work for me because for starting I just need to have Java and Maven in my container. Also as you can see we have an attribute which injects some environment variables inside my container. This environment variable specifies some configuration for Maven and Java so I can proceed with them. Next let's go to comments. Which comment I will need to work with my Corpus application. Let's say the first one should be to build. Let's change the name. The action should have type exact. The comment could be the same or we can change it. Maven clean install. The component value is Maven. It means that it should execute this comment in that component which has alias Maven as you can see here. Now we have to specify the working directory where this comment should be executed. For specifying some comments, some working directory which we can use environment variables from our containers. Chair projects route describes the route of our source code. But we have to change this part where our project is. It should be... let's change the name. Okay, see. Thank you. Let's copy this. And what we need also to add subfolder. It's getting start subproject. Let's save it and see if everything is okay. Okay. Now let's add another comment to run the application in development mode when we can debug our application. Okay. The working directory should be the same. We can just copy it. The type is exec and comment line. The comment line should be Maven. Compile. Corpus. Dev. Okay. The component is Maven. It's okay. And we don't need another comment. Let's just remove it. Also, here we have description of the bug configuration which should be added into laundry zone. And this configuration describes the bugger to attach to remote Java process. And it will work for us because it's Java application. So let's save our the file. Okay. And let's try it. Just open the workspace. Workspace is starting. And what is going here? Here we create Kubernetes port which we described in the file. And it downloads all images for all containers. And it will start all containers. And when the containers will be started, we will see our IDE. The editor is loading. Okay. We can see that our project is cloning and was cloned, actually. Let's open project three and we can see that our project is here. Let's open some Java file to start initializing Java language server. On the bottom, you can see the process from Java language server. Now let's go to workspace view. In the workspace view, we can see what we generated in what we created in our depth file. Here we have runtime component which calls Maven. We have our two commands to build corpus application to run it. Also, we have endpoint which we will use a bit later. Also, in plugins we have our VSCode corpus plugin. So now let's try to run some command. For example, let's run our application in development mode. Just click on the command and now we can see output that our application is building. I'm going to close this view. So now we can see that our application is running and right now we can open this application inside our IDE to see how it looks like. Or we can go to workspace view and just click on endpoint and we can see this application in another tab. So let's try how HoTRA deploy works. Let's create a local variable, for example. As you can see, I'm using features which Java language server provides. I can just execute extra to local variable. The name is okay and just add something to... Let's go to our browser and write execute fetch request. It's hello. It should be hello, greeting and some name. So we can see the response and now let's just change the value. It's Java code and I want to show you how HoTRA deploy works and just refresh our browser. As you can see, we have our changes on the board. Now I want to debug this code. What I need, I just put some breakpoint here. Go to debugger view. Here I can open launch it soon where I can see my debug configuration which I added in that file. And let's just execute this debugger. The debugger is started. Now let's refresh the page to call this get method. And we are here. So now we can see here some variables. We can change the debug application or continue executing. What else? I can see here also I included corpus via code extension and to check that it works, I can go to commands, write some corpus. I see some commands which were provided by via code corpus extension. For example, let's execute corpus welcome and we can see a welcome page from that extension. Probably that's it for Gimo. I go back to dashboard. I can stop my workspace. I see that something works. I can go through the tutorial and work some tests, something to work. And if I finally create my defile, I can just copy it from this editor and push in some local public place, for example, on the GitHub. As you can see, I have some defile. It's the same defile. And I can copy the raw URL to this defile and build factory which means it should be like chair host. It could be chair and shift IO. Then it should be F, which means factory and pass param with value of link to my raw file. And I copy this link and send to my friend and it just can reproduce the same workspace environment on his site. So right now, the new workspace is created and it will have the same developer environment which I had. Go back to my presentation. So workspace is starting and as a result, we'll have another one workspace in chair. So that's it about Gimo and just what I have else. I want to point you some benefits which we have with defile. So first of all, it's easy to build your complex developer environment. Just use some editor. And the second one is you can do that in each place where you are. So you don't need to download something. You can just open editor. I prefer to use Eclipse IDE because you can check IDE because you can try it on the fly. You can edit, change something and try it right now. Another point is that you can easily share this developer environment. You just copy the URL, send to somebody and that's it. So probably that's it what I want to say. So right now you can see some links, useful links, where Eclipse chair is leaving. We have some dev lists. Also we have recognized the documentation where you can find all description of all attributes in the file also you can find how to create it, how to share and another useful information. Also we have MetaMOS channel to ask questions and the link where you can try build your own developer environment. So now time for questions. Okay, the question is what is the limitation for using. If we are talking about chair open shift IO, it's limited by three gigs of RAM. But you can deploy your Eclipse chair as a local environment to MiniCube or MiniShift or Circe and you can use how much you have on your local machine. By the way, there is a discussion to increase RAM so to make it more than three gigabyte so to stay tuned and we will update the terms of service very likely because three gigs is we could get it started but we want also to provide something more. Is this limit because of some commercial like is the bigger license or is it just no no no it's just you know dollar problem because you have to pay for RAM. Yeah so yeah and we want to provide free of charge not street like a little bit more so it's under discussion now. I have a question. Are you are you doing fooding? Are you developing Eclipse chair itself using Eclipse chair? Yeah when I need to provide new the file for example if I need to provide new the file to the file registry I use Eclipse chair to create it because it's it's easiest way because you can you can write and you can see that everything is wrong and you can add something new try it again go back to dashboard editing try it again and then if when you got final result you just put it into repository and that's it. The question is why this workspace will be created as I understand here if I want to share my developer environment and so the workspace will be created in this namespace where I created my own the file so if it's multi user you you can just send it and the user will be created it's in its own namespace yeah. Is there any support there may be a plans for offline work for example you have a server deploy or publicly or in the premise with open shift and share and then you need to go to the meeting meeting meet someone and then you don't maybe don't have the connection or what's that? If you use hosted the question is what happened if I got some problems with this connection yeah. Yeah I'm asking about because for example Gmail has offline mode so you can use it you can for some level of degree but at least you can browse some some things that you are already downloaded to your local browser. Yeah so if you use hosted share and you have some unsaved changes so it's probably it's will be a problem because it will be lost and but you can have Eclipse share as a local deployment and then your changes will be on the on your laptop but for hosted share if it's has a formal mode if you don't push your changes everything will be lost. I don't talk about pushing I'm just talking about browsing so for example someone is writing an app and then goes to the client for presentation and want to talk about it and browse the code show something about that and is it possible or he needs a connection to do that? If you need the connection to show your work so if it's again if it's on hosted share you won't have an ability to open it because it's on the internet you have to have connection but you can present it and use share deployed on your local Kubernetes cluster mini shift or and demonstrate it without connection if you pull all images because to start the web space you need to pull images from the internet. If you pull it before you can use it locally. Maybe a similar question so if I start creating the project in in the open shift or on the internet hosted somewhere so I can synchronize it locally and just use a local installation like you said with MiniCube or something you have it locally and also the same project which also is online right? The question is if it's possible to synchronize from different instances for example from hosted share to local MiniCube deployment you can you can do that by changing your defile and in that defile you need to point on some repository which which you used in hosted share you need a bit customize your defile to port everything that you want. Also it's possible to use factory if your defile is on some GitHub repository you can build a factory which I show how to you can put a share host on your local deployment and then put f and url to raw file of your defile and it will be represented in your local deployment. Another question? Also a related question so let's imagine a scenario where I'm connected to the internet my Wi-Fi and I'm happily going in Eclipse share but then suddenly the Wi-Fi goes down am I still able to edit the file and do my coding and after two minutes when the Wi-Fi is working again does it synchronize or am I still able to edit code when suddenly the internet goes off? Yeah the content will be on your computer but if you click save button you lost your content because it won't be saved and the content in defile will be goes back which is on the cloud and your changes won't be here yeah it's possible to use autosave but as for me it's not really useful because when I try to type in something to add it every time tries to autosave and it can be a bit noisy. I also saw that there are some predefined stacks available like with Quarkus, Java with Maven, Java with Gradle. If I would like to contribute to a different stack, Java related, where would be the place to open a pull request? So the question is if it's possible to contribute and where I should put pull request so if you want to contribute to the files, chat the files, you can open github eclipse chat the file registry and just create a pull request with your defile. So also the stacks are based on defiles? The stack of defiles which we saw on the dashboard it comes from defile registry so that stack is chat the file registry. Any other questions? Thank you.