| <!DOCTYPE html> |
| <html> |
| <head> |
| <meta charset="utf-8"> |
| <meta http-equiv="X-UA-Compatible" content="IE=edge"> |
| <meta name="viewport" content="width=device-width, initial-scale=1"> |
| <meta name="description" content=""> |
| <meta name="keywords" content="chedirfactories, chedir, factories"> |
| <title>Creating Factories | Eclipse Che Documentation</title> |
| <link rel="stylesheet" href="css/syntax.css"> |
| |
| <link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" crossorigin="anonymous"> |
| <!--<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">--> |
| <link rel="stylesheet" href="css/modern-business.css"> |
| <!-- Latest compiled and minified CSS --> |
| <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous"> |
| <link rel="stylesheet" href="css/customstyles.css"> |
| <link rel="stylesheet" href="css/boxshadowproperties.css"> |
| <!-- most color styles are extracted out to here --> |
| <link rel="stylesheet" href="css/theme-che.css"> |
| |
| |
| <link rel="stylesheet" href="/css/coderay.css" media="screen" type="text/css"> |
| |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.min.js" crossorigin="anonymous"></script> |
| |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-cookie/1.4.1/jquery.cookie.min.js" crossorigin="anonymous"></script> |
| <script src="js/jquery.navgoco.min.js"></script> |
| |
| |
| <!-- Latest compiled and minified JavaScript --> |
| <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script> |
| <!-- Anchor.js --> |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/anchor-js/2.0.0/anchor.min.js" crossorigin="anonymous"></script> |
| <script src="js/toc.js"></script> |
| <script src="js/customscripts.js"></script> |
| |
| <link rel="shortcut icon" href="che/docs/images/favicon.ico"> |
| |
| <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> |
| <!-- WARNING: Respond.js doesn't work if you view the page via file:// --> |
| <!--[if lt IE 9]> |
| <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script> |
| <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script> |
| <![endif]--> |
| |
| <link rel="alternate" type="application/rss+xml" title="che" href="http://0.0.0.0:4000/feed.xml"> |
| |
| <script> |
| $(document).ready(function() { |
| // Initialize navgoco with default options |
| $("#mysidebar").navgoco({ |
| caretHtml: '', |
| accordion: true, |
| openClass: 'active', // open |
| save: false, // leave false or nav highlighting doesn't work right |
| cookie: { |
| name: 'navgoco', |
| expires: false, |
| path: '/' |
| }, |
| slide: { |
| duration: 400, |
| easing: 'swing' |
| } |
| }); |
| |
| $("#collapseAll").click(function(e) { |
| e.preventDefault(); |
| $("#mysidebar").navgoco('toggle', false); |
| }); |
| |
| $("#expandAll").click(function(e) { |
| e.preventDefault(); |
| $("#mysidebar").navgoco('toggle', true); |
| }); |
| |
| }); |
| |
| </script> |
| <script> |
| $(function () { |
| $('[data-toggle="tooltip"]').tooltip() |
| }) |
| </script> |
| <script> |
| $(document).ready(function() { |
| $("#tg-sb-link").click(function() { |
| $("#tg-sb-sidebar").toggle(); |
| $("#tg-sb-content").toggleClass('col-md-9'); |
| $("#tg-sb-content").toggleClass('col-md-12'); |
| $("#tg-sb-icon").toggleClass('fa-toggle-on'); |
| $("#tg-sb-icon").toggleClass('fa-toggle-off'); |
| }); |
| }); |
| </script> |
| |
| |
| </head> |
| <body> |
| <!-- Navigation --> |
| <nav class="navbar navbar-inverse navbar-static-top"> |
| <div class="container topnavlinks"> |
| <div class="navbar-header"> |
| <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1"> |
| <span class="sr-only">Toggle navigation</span> |
| <span class="icon-bar"></span> |
| <span class="icon-bar"></span> |
| <span class="icon-bar"></span> |
| </button> |
| <a class="fa fa-home fa-lg navbar-brand" href="index.html"> <span class="projectTitle"> Eclipse Che Documentation</span></a> |
| </div> |
| <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1"> |
| <ul class="nav navbar-nav navbar-right"> |
| <!-- toggle sidebar button --> |
| <li><a id="tg-sb-link" href="#"><i id="tg-sb-icon" class="fa fa-toggle-on"></i> Nav</a></li> |
| <!-- entries without drop-downs appear here --> |
| |
| |
| |
| |
| |
| |
| |
| <li><a href="https://medium.com/eclipse-che-blog/" target="_blank">Blog</a></li> |
| |
| |
| |
| <li><a href="https://github.com/eclipse/che" target="_blank">Source Code</a></li> |
| |
| |
| |
| <!-- entries with drop-downs appear here --> |
| <!-- conditional logic to control which topnav appears for the audience defined in the configuration file.--> |
| |
| |
| <li class="dropdown"> |
| <a href="#" class="dropdown-toggle" data-toggle="dropdown">Get Support<b class="caret"></b></a> |
| <ul class="dropdown-menu"> |
| |
| |
| <li><a href="https://github.com/eclipse/che/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3Akind%2Fbug" target="_blank">Known Bugs</a></li> |
| |
| |
| |
| <li><a href="https://github.com/eclipse/che/issues/new" target="_blank">File an Issue</a></li> |
| |
| |
| |
| <li><a href="https://stackoverflow.com/questions/tagged/eclipse-che" target="_blank">Che on StackOverflow</a></li> |
| |
| |
| </ul> |
| </li> |
| |
| |
| <!-- |
| <li> |
| |
| |
| |
| <a class="email" title="Submit feedback" href="#" onclick="javascript:window.location='mailto:?subject= feedback&body=I have some feedback about the Creating Factories page: ' + window.location.href;"><i class="fa fa-envelope-o"></i> Feedback</a> |
| |
| </li> |
| --> |
| |
| <!--comment out this block if you want to hide search--> |
| <li> |
| <!--start search--> |
| <div id="search-demo-container"> |
| <input type="text" id="search-input" placeholder="search..."> |
| <ul id="results-container"></ul> |
| </div> |
| <script src="js/jekyll-search.js" type="text/javascript"></script> |
| <script type="text/javascript"> |
| SimpleJekyllSearch.init({ |
| searchInput: document.getElementById('search-input'), |
| resultsContainer: document.getElementById('results-container'), |
| dataSource: 'search.json', |
| searchResultTemplate: '<li><a href="{url}" title="Creating Factories">{title}</a></li>', |
| noResultsText: 'No results found.', |
| limit: 10, |
| fuzzy: true, |
| }) |
| </script> |
| <!--end search--> |
| </li> |
| </ul> |
| </div> |
| </div> |
| <!-- /.container --> |
| </nav> |
| |
| <!-- Page Content --> |
| <div class="container"> |
| <div id="main"> |
| <!-- Content Row --> |
| <div class="row"> |
| |
| |
| <!-- Sidebar Column --> |
| <div class="col-md-3" id="tg-sb-sidebar"> |
| |
| |
| <ul id="mysidebar" class="nav"> |
| <li class="sidebarTitle"> </li> |
| |
| |
| |
| |
| |
| <li> |
| <a href="#">Overview</a> |
| <ul> |
| |
| |
| |
| <li><a href="index.html">Introduction</a></li> |
| |
| |
| |
| |
| |
| |
| <li><a href="quick-start.html">Getting Started</a></li> |
| |
| |
| |
| |
| |
| |
| <li><a href="single-multi-user.html">Single and Multi-User Flavors</a></li> |
| |
| |
| |
| |
| |
| |
| <li><a href="infra-support.html">Supported Infrastructures</a></li> |
| |
| |
| |
| |
| </ul> |
| </li> |
| |
| |
| |
| <li> |
| <a href="#">Che on Docker</a> |
| <ul> |
| |
| |
| |
| <li><a href="docker-single-user.html">Docker - Single User</a></li> |
| |
| |
| |
| |
| |
| |
| <li><a href="docker-multi-user.html">Docker - Multi User</a></li> |
| |
| |
| |
| |
| |
| |
| <li><a href="docker-config.html">Docker - Configuration</a></li> |
| |
| |
| |
| |
| |
| |
| <li><a href="docker-cli.html">Docker - CLI Reference</a></li> |
| |
| |
| |
| |
| </ul> |
| </li> |
| |
| |
| |
| <li> |
| <a href="#">Che on Kubernetes</a> |
| <ul> |
| |
| |
| |
| <li><a href="kubernetes-single-user.html">Kubernetes - Single User</a></li> |
| |
| |
| |
| |
| |
| |
| <li><a href="kubernetes-multi-user.html">Kubernetes - Multi User</a></li> |
| |
| |
| |
| |
| |
| |
| <li><a href="kubernetes-config.html">Kubernetes - Configuration</a></li> |
| |
| |
| |
| |
| |
| |
| <li><a href="kubernetes-admin-guide.html">Kubernetes - Admin Guide</a></li> |
| |
| |
| |
| |
| </ul> |
| </li> |
| |
| |
| |
| <li> |
| <a href="#">Che on OpenShift</a> |
| <ul> |
| |
| |
| |
| <li><a href="openshift-single-user.html">OpenShift - Single User</a></li> |
| |
| |
| |
| |
| |
| |
| <li><a href="openshift-multi-user.html">OpenShift - Multi User</a></li> |
| |
| |
| |
| |
| |
| |
| <li><a href="openshift-config.html">OpenShift - Configuration</a></li> |
| |
| |
| |
| |
| |
| |
| <li><a href="openshift-admin-guide.html">OpenShift - Admin Guide</a></li> |
| |
| |
| |
| |
| </ul> |
| </li> |
| |
| |
| |
| <li> |
| <a href="#">User Management</a> |
| <ul> |
| |
| |
| |
| <li><a href="user-management.html">Authentication and Authorization</a></li> |
| |
| |
| |
| |
| |
| |
| <li><a href="authentication.html">Security Model</a></li> |
| |
| |
| |
| |
| |
| |
| <li><a href="permissions.html">Permissions</a></li> |
| |
| |
| |
| |
| |
| |
| <li><a href="organizations.html">Organizations in UD</a></li> |
| |
| |
| |
| |
| |
| |
| <li><a href="resource-management.html">Resource Management</a></li> |
| |
| |
| |
| |
| </ul> |
| </li> |
| |
| |
| |
| <li> |
| <a href="#">User Guides</a> |
| <ul> |
| |
| |
| |
| <li><a href="creating-starting-workspaces.html">Creating and starting Workspaces</a></li> |
| |
| |
| |
| |
| |
| |
| <li><a href="ide-projects.html">Projects</a></li> |
| |
| |
| |
| |
| |
| |
| <li><a href="editor-code-assistance.html">Editor and Code-Assistance</a></li> |
| |
| |
| |
| |
| |
| |
| <li><a href="dependency-management.html">Dependency Management</a></li> |
| |
| |
| |
| |
| |
| |
| <li><a href="commands-ide-macro.html">Commands and IDE Macros</a></li> |
| |
| |
| |
| |
| |
| |
| <li><a href="version-control.html">Version Control</a></li> |
| |
| |
| |
| |
| |
| |
| <li><a href="debug.html">Debug</a></li> |
| |
| |
| |
| |
| </ul> |
| </li> |
| |
| |
| |
| <li> |
| <a href="#">Workspace Administration</a> |
| <ul> |
| |
| |
| |
| <li><a href="what-are-workspaces.html">Workspace Overview</a></li> |
| |
| |
| |
| |
| |
| |
| <li><a href="stacks.html">Workspace - Stacks</a></li> |
| |
| |
| |
| |
| |
| |
| <li><a href="recipes.html">Workspace - Recipes</a></li> |
| |
| |
| |
| |
| |
| |
| <li><a href="servers.html">Workspace - Servers</a></li> |
| |
| |
| |
| |
| |
| |
| <li><a href="installers.html">Workspace - Installers</a></li> |
| |
| |
| |
| |
| |
| |
| <li><a href="volumes.html">Workspace - Volumes Mount</a></li> |
| |
| |
| |
| |
| |
| |
| <li><a href="env-variables.html">Workspace - Environment Variables</a></li> |
| |
| |
| |
| |
| |
| |
| <li><a href="projects.html">Workspace - Projects</a></li> |
| |
| |
| |
| |
| |
| |
| <li><a href="workspaces-troubleshooting.html">Workspace - Troubleshooting</a></li> |
| |
| |
| |
| |
| |
| |
| <li><a href="workspace-data-model.html">Workspace Data Model</a></li> |
| |
| |
| |
| |
| </ul> |
| </li> |
| |
| |
| |
| <li> |
| <a href="#">Portable Workspaces</a> |
| <ul> |
| |
| |
| |
| <li><a href="chedir-getting-started.html">Chedir - Getting Started</a></li> |
| |
| |
| |
| |
| |
| |
| <li><a href="why-chedir.html">Chedir - Why Chedir?</a></li> |
| |
| |
| |
| |
| |
| |
| <li><a href="chedir-installation.html">Chedir - Installation</a></li> |
| |
| |
| |
| |
| |
| |
| <li><a href="chedir-project-setup.html">Chedir - Project Setup</a></li> |
| |
| |
| |
| |
| |
| |
| <li><a href="chedir-up-and-down.html">Chedir - Up and Down</a></li> |
| |
| |
| |
| |
| |
| |
| <li><a href="chefile.html">Chedir - Chefile</a></li> |
| |
| |
| |
| |
| |
| |
| <li><a href="chedir-ssh.html">Chedir - SSH</a></li> |
| |
| |
| |
| |
| |
| |
| <li><a href="factories-getting-started.html">Factory - Getting Started</a></li> |
| |
| |
| |
| |
| |
| |
| <li class="active"><a href="creating-factories.html">Factory - Creating</a></li> |
| |
| |
| |
| |
| |
| |
| <li><a href="factories_json_reference.html">Factory - JSON Reference</a></li> |
| |
| |
| |
| |
| </ul> |
| </li> |
| |
| |
| |
| <li> |
| <a href="#">Developer Guides</a> |
| <ul> |
| |
| |
| |
| <li><a href="framework-overview.html">Overview</a></li> |
| |
| |
| |
| |
| |
| |
| <li><a href="rest-api.html">SDK - REST API</a></li> |
| |
| |
| |
| |
| |
| |
| <li><a href="che-in-che-quickstart.html">SDK - Your First Plugin</a></li> |
| |
| |
| |
| |
| |
| |
| <li><a href="build-reqs.html">SDK - Building Che</a></li> |
| |
| |
| |
| |
| |
| |
| <li><a href="assemblies.html">SDK - Assemblies</a></li> |
| |
| |
| |
| |
| |
| |
| <li><a href="logging.html">SDK - Logging</a></li> |
| |
| |
| |
| |
| |
| |
| <li><a href="ide-extensions-gwt.html">SDK - GWT IDE Extensions</a></li> |
| |
| |
| |
| |
| |
| |
| <li><a href="server-side-extensions.html">SDK - Server Side Extensions</a></li> |
| |
| |
| |
| |
| |
| |
| <li><a href="custom-installers.html">SDK - Installers</a></li> |
| |
| |
| |
| |
| |
| |
| <li><a href="project-types.html">SDK - Project Types</a></li> |
| |
| |
| |
| |
| |
| |
| <li><a href="language-servers.html">SDK - Language Support</a></li> |
| |
| |
| |
| |
| |
| |
| <li><a href="parts.html">IDE UI: Parts</a></li> |
| |
| |
| |
| |
| |
| |
| <li><a href="actions.html">IDE UI: Actions</a></li> |
| |
| |
| |
| |
| </ul> |
| </li> |
| |
| |
| |
| <li> |
| <a href="#">Dev Essentials</a> |
| <ul> |
| |
| |
| |
| <li><a href="guice.html">Dependency Injection</a></li> |
| |
| |
| |
| |
| |
| |
| <li><a href="dto.html">Transport: DTO</a></li> |
| |
| |
| |
| |
| |
| |
| <li><a href="json-rpc.html">Communication: JSON-RPC</a></li> |
| |
| |
| |
| |
| |
| |
| <li><a href="handling-projects-in-plugins.html">Handling Projects in Plugins</a></li> |
| |
| |
| |
| |
| |
| |
| <li><a href="dao.html">Persistence, DAO</a></li> |
| |
| |
| |
| |
| |
| |
| <li><a href="properties.html">Properties</a></li> |
| |
| |
| |
| |
| </ul> |
| </li> |
| |
| |
| |
| <li> |
| <a href="#">Infrastructure and SPI</a> |
| <ul> |
| |
| |
| |
| <li><a href="spi_overview.html">Overview</a></li> |
| |
| |
| |
| |
| |
| |
| <li><a href="spi-implementation.html">Implementation Notes</a></li> |
| |
| |
| |
| |
| </ul> |
| </li> |
| |
| |
| |
| <!-- if you aren't using the accordion, uncomment this block: |
| <p class="external"> |
| <a href="#" id="collapseAll">Collapse All</a> | <a href="#" id="expandAll">Expand All</a> |
| </p> |
| --> |
| </ul> |
| |
| <!-- this highlights the active parent class in the navgoco sidebar. this is critical so that the parent expands when you're viewing a page. This must appear below the sidebar code above. Otherwise, if placed inside customscripts.js, the script runs before the sidebar code runs and the class never gets inserted.--> |
| <script>$("li.active").parents('li').toggleClass("active");</script> |
| |
| </div> |
| |
| |
| |
| |
| <!-- Content Column --> |
| <div class="col-md-9" id="tg-sb-content"> |
| <div class="post-header"> |
| <h1 class="post-title-main">Creating Factories</h1> |
| </div> |
| |
| |
| |
| <div class="post-content"> |
| |
| |
| |
| |
| |
| <!-- this handles the automatic toc. use ## for subheads to auto-generate the on-page minitoc. if you use html tags, you must supply an ID for the heading element in order for it to appear in the minitoc. --> |
| <script> |
| $( document ).ready(function() { |
| // Handler for .ready() called. |
| $('#toc').toc({ minimumHeaders: 0, listType: 'ul', showSpeed: 0, headers: 'h2' }); |
| /* this offset helps account for the space taken up by the floating toolbar. */ |
| $('#toc').on('click', 'a', function() { |
| var target = $(this.getAttribute('href')) |
| , scroll_target = target.offset().top |
| $(window).scrollTop(scroll_target - 10); |
| return false |
| }) |
| |
| }); |
| </script> |
| |
| <div id="toc"></div> |
| |
| |
| |
| |
| <!-- |
| |
| |
| --> |
| |
| <div class="sect1"> |
| <h2 id="create-a-factory-in-the-dashboard">Create a Factory in the Dashboard</h2> |
| <div class="sectionbody"> |
| <table class="tableblock frame-all grid-all stretch"> |
| <colgroup> |
| <col style="width: 20%;"> |
| <col style="width: 80%;"> |
| </colgroup> |
| <tbody> |
| <tr> |
| <td class="tableblock halign-left valign-top"><p class="tableblock">Action</p></td> |
| <td class="tableblock halign-left valign-top"><p class="tableblock">In the user dashboard: <code>Dashboard > Factories > Create Factory</code>.</p></td> |
| </tr> |
| <tr> |
| <td class="tableblock halign-left valign-top"><p class="tableblock">Sample Factory</p></td> |
| <td class="tableblock halign-left valign-top"><p class="tableblock"><a href="https://che.openshift.io/f?id=factorymtyoro1y0qt8tq2j">https://che.openshift.io/f?id=factorymtyoro1y0qt8tq2j</a></p></td> |
| </tr> |
| </tbody> |
| </table> |
| <div class="paragraph"> |
| <p>Creating a Factory in the dashboard gives you the most freedom and control. The simplest way is to create a Factory based on an existing workspace, but you can also create Factories based on a template we provide or by pasting in a <code>factory.json</code> file and then generating a Factory URL using our CLI or API. Learn more the JSON structure and options in our <a href="factories_json_reference.html">Factory JSON reference</a>.</p> |
| </div> |
| <div class="paragraph"> |
| <p>A Factory created from the dashboard will be persisted into Che database and kept when upgrading to a newer version.</p> |
| </div> |
| </div> |
| </div> |
| <div class="sect1"> |
| <h2 id="create-a-factory-in-the-ide">Create a Factory in the IDE</h2> |
| <div class="sectionbody"> |
| <table class="tableblock frame-all grid-all stretch"> |
| <colgroup> |
| <col style="width: 20%;"> |
| <col style="width: 80%;"> |
| </colgroup> |
| <tbody> |
| <tr> |
| <td class="tableblock halign-left valign-top"><p class="tableblock">Action</p></td> |
| <td class="tableblock halign-left valign-top"><p class="tableblock">In the IDE: <code>Workspace > Create Factory</code>.</p></td> |
| </tr> |
| <tr> |
| <td class="tableblock halign-left valign-top"><p class="tableblock">Sample Factory</p></td> |
| <td class="tableblock halign-left valign-top"><p class="tableblock"><a href="https://che.openshift.io/f?id=factorymtyoro1y0qt8tq2j">https://che.openshift.io/f?id=factorymtyoro1y0qt8tq2j</a></p></td> |
| </tr> |
| </tbody> |
| </table> |
| <div class="paragraph"> |
| <p>Creating a Factory from inside the IDE in a running workspace will generate a Factory to replicate that workspace including both runtime and project settings.</p> |
| </div> |
| <div class="paragraph"> |
| <p>A Factory created from the dashboard will be persisted onto Che and kept when upgrading to a newer version.</p> |
| </div> |
| </div> |
| </div> |
| <div class="sect1"> |
| <h2 id="create-a-factory-based-on-a-repo">Create a Factory based on a Repo</h2> |
| <div class="sectionbody"> |
| <table class="tableblock frame-all grid-all stretch"> |
| <colgroup> |
| <col style="width: 20%;"> |
| <col style="width: 80%;"> |
| </colgroup> |
| <tbody> |
| <tr> |
| <td class="tableblock halign-left valign-top"><p class="tableblock">Action</p></td> |
| <td class="tableblock halign-left valign-top"><p class="tableblock">Specify the repo URL. In this case the configuration must be stored inside the repository.</p></td> |
| </tr> |
| <tr> |
| <td class="tableblock halign-left valign-top"><p class="tableblock">Sample Factories</p></td> |
| <td class="tableblock halign-left valign-top"><p class="tableblock"><a href="http://che.openshift.io/f?url=https://github.com/eclipse/che" class="bare">http://che.openshift.io/f?url=https://github.com/eclipse/che</a><br> |
| <a href="http://che.openshift.io/f?url=https://github.com/eclipse/che/tree/language-server" class="bare">http://che.openshift.io/f?url=https://github.com/eclipse/che/tree/language-server</a><br> |
| <a href="http://che.openshift.io/f?url=https://gitlab.com/benoitf/simple-project" class="bare">http://che.openshift.io/f?url=https://gitlab.com/benoitf/simple-project</a></p></td> |
| </tr> |
| </tbody> |
| </table> |
| <div class="paragraph"> |
| <p>URL Factories work with GitHub and GitLab repositories. By using URL Factories, the project referenced by the URL is automatically imported.</p> |
| </div> |
| <div class="paragraph"> |
| <p>The Factory URL can include a branch or a subfolder. Here is an example of optional parameters:</p> |
| </div> |
| <div class="ulist"> |
| <ul> |
| <li> |
| <p><code>?url=https://github.com/eclipse/che</code> che will be imported with master branch</p> |
| </li> |
| <li> |
| <p><code>?url=https://github.com/eclipse/che/tree/5.0.0</code> che is imported by using 5.0.0 branch</p> |
| </li> |
| <li> |
| <p><code>?url=https://github.com/eclipse/che/tree/5.0.0/dashboard</code> subfolder dashboard is imported by using 5.0.0 branch</p> |
| </li> |
| </ul> |
| </div> |
| <div class="sect2"> |
| <h3 id="customizing-url-factories">Customizing URL Factories</h3> |
| <div class="paragraph"> |
| <p>There are 2 ways of customizing the runtime and configuration.</p> |
| </div> |
| <div class="paragraph"> |
| <p><strong>Customizing only the runtime</strong></p> |
| </div> |
| <div class="paragraph"> |
| <p><strong>Dockerfile works on Docker infra only!</strong></p> |
| </div> |
| <div class="paragraph"> |
| <p>Providing a <code>.factory.dockerfile</code> inside the repository will signal to the Che URL Factory to use this Dockerfile for the workspace agent runtime. By default imported projects are set to a <code>blank</code> project type, however project type can be set in the <code>.factory.json</code> or workspace definition that the Factory inherits from.</p> |
| </div> |
| <div class="paragraph"> |
| <p><strong>Customizing the project and runtime</strong><br> |
| Providing a <code>.factory.json</code> file inside the repository will signal to Che URL Factory to configure the project and runtime according to this configuration file. When a <code>.factory.json</code> file is stored inside the repository, any <code>Dockerfile</code> content is ignored as the workspace runtime configuration is defined inside the JSON file.</p> |
| </div> |
| </div> |
| </div> |
| </div> |
| <div class="sect1"> |
| <h2 id="factory-policies">Factory policies</h2> |
| <div class="sectionbody"> |
| <div class="paragraph"> |
| <p>Policies are a way to send instructions to the automation engine about the number of workspaces to create and their meta data such as lifespan and resource allocation.</p> |
| </div> |
| </div> |
| </div> |
| <div class="sect1"> |
| <h2 id="limitations">Limitations</h2> |
| <div class="sectionbody"> |
| <div class="dlist"> |
| <dl> |
| <dt class="hdlist1"><strong>Referer</strong></dt> |
| <dd> |
| <p>Checks the hostname of the acceptor and only allows the Factory to execute if there is a match.</p> |
| </dd> |
| <dt class="hdlist1"><strong>Since</strong> & <strong>Until</strong></dt> |
| <dd> |
| <p>Defines the time window in which the Factory can be activated. For example, instructors who want to create an exercise that can only be accessed for two hours could set these properties.</p> |
| </dd> |
| </dl> |
| </div> |
| </div> |
| </div> |
| <div class="sect1"> |
| <h2 id="multiplicity">Multiplicity</h2> |
| <div class="sectionbody"> |
| <div class="paragraph"> |
| <p>Defines how many workspaces should be created from the factory.</p> |
| </div> |
| <div class="dlist"> |
| <dl> |
| <dt class="hdlist1"><strong>Multiple Workspaces: perClick</strong></dt> |
| <dd> |
| <p>Every click of the Factory URL will generate a different workspace, each with its own identifier, name and resources.</p> |
| </dd> |
| <dt class="hdlist1"><strong>Single Workspace: perUser</strong></dt> |
| <dd> |
| <p>Exactly one workspace will be generated for each unique user that clicks on the Factory URL. If the workspace has previously been generated, we will reopen the existing workspace.</p> |
| </dd> |
| </dl> |
| </div> |
| <div class="paragraph"> |
| <p>See <a href="factories_json_reference.html">JSON reference</a> to learn how to configure Factory policies.</p> |
| </div> |
| </div> |
| </div> |
| <div class="sect1"> |
| <h2 id="ide-customization">IDE Customization</h2> |
| <div class="sectionbody"> |
| <div class="paragraph"> |
| <p>You can instruct the Factory to invoke a series of IDE actions based upon events in the lifecycle of the workspace.</p> |
| </div> |
| </div> |
| </div> |
| <div class="sect1"> |
| <h2 id="lifecycle-events">Lifecycle Events</h2> |
| <div class="sectionbody"> |
| <div class="paragraph"> |
| <p>The lifecycle of the workspace is defined with the following events:</p> |
| </div> |
| <div class="ulist"> |
| <ul> |
| <li> |
| <p><code>onAppLoaded</code> : Triggered when the IDE is loaded.</p> |
| </li> |
| <li> |
| <p><code>onProjectsLoaded</code> : Triggered when the workspace and all projects have been activated.</p> |
| </li> |
| <li> |
| <p><code>onAppClosed</code> : Triggered when the IDE is closed.</p> |
| </li> |
| </ul> |
| </div> |
| <div class="paragraph"> |
| <p>Each event type has a set of actions that can be triggered. There is no ordering of actions executed when you provide a list; Che will asynchronously invoke multiple actions if appropriate.</p> |
| </div> |
| </div> |
| </div> |
| <div class="sect1"> |
| <h2 id="factory-actions">Factory Actions</h2> |
| <div class="sectionbody"> |
| <div class="paragraph"> |
| <p>Below is the list of all possible actions which can be configured with your Factory.</p> |
| </div> |
| <div class="dlist"> |
| <dl> |
| <dt class="hdlist1"><strong>Run Command</strong></dt> |
| <dd> |
| <p><em>Description:</em> Specify the name of the command to invoke after the IDE is loaded.<br> |
| <em>Associated Event:</em> <code>onProjectsLoaded</code></p> |
| </dd> |
| <dt class="hdlist1"><strong>Open File</strong></dt> |
| <dd> |
| <p><em>Description:</em> Open project files in the editor. Optionally define line to be highlighted.<br> |
| <em>Associated Event:</em> <code>onProjectsLoaded</code></p> |
| </dd> |
| <dt class="hdlist1"><strong>Open a Welcome Page</strong></dt> |
| <dd> |
| <p><em>Description:</em> Customize content of a welcome panel displayed when the workspace is loaded.<br> |
| <em>Associated Event:</em> <code>onAppLoaded</code></p> |
| </dd> |
| <dt class="hdlist1"><strong>Warm on Uncommitted Changes</strong></dt> |
| <dd> |
| <p><em>Description:</em> Opens a warning popup when the user closes the browser tab with a project that has uncommitted changes.<br> |
| <em>Associated Event:</em> <code>onAppClosed</code></p> |
| </dd> |
| </dl> |
| </div> |
| <div class="paragraph"> |
| <p>See the <a href="factories_json_reference.html#ide-customization">Factory JSON reference</a> to learn how to configure Factory actions.</p> |
| </div> |
| </div> |
| </div> |
| <div class="sect1"> |
| <h2 id="find-and-replace">Find and Replace</h2> |
| <div class="sectionbody"> |
| <div class="paragraph"> |
| <p>Sometimes you may not want to expose certain sensitive information in source code (passwords, URLs, account names, API keys etc). Factories make it possible to replace variables or placeholders with real values. Find and replace can be run as a <strong>Run Command</strong> during <code>onProjectsLoaded</code> event. You can use <code>sed</code>, <code>awk</code> or any other tools that are available in your workspace environment.</p> |
| </div> |
| <div class="paragraph"> |
| <p>Find in the <a href="factories_json_reference.html#action-find-and-replace">Factory JSON reference</a> a sample showing how to configure a "Find and Replace" command. Alternatively, you may also add IDE actions in Factory tab, in User Dashboard.</p> |
| </div> |
| <div class="paragraph"> |
| <p>Use <a href="https://www.gnu.org/software/sed/manual/html_node/Regular-Expressions.html">regular expressions</a> in sed, both in find/replace and file/file types patterns.</p> |
| </div> |
| </div> |
| </div> |
| <div class="sect1"> |
| <h2 id="pull-request-workflow">Pull Request Workflow</h2> |
| <div class="sectionbody"> |
| <div class="paragraph"> |
| <p>Factories can be configured with a dedicated pull request workflow. The PR workflow handles local & remote branching, forking, and issuing the pull request. Pull requests generated from within Che have another Factory placed into the comments of the pull requests that a PR reviewer can use to quickly start the workspace.</p> |
| </div> |
| <div class="paragraph"> |
| <p>When enabled, the pull request workflow adds a contribution panel to the IDE.</p> |
| </div> |
| <div class="imageblock"> |
| <div class="content"> |
| <img src="/che/docs/images/git/pr_panel.png" alt="pr panel"> |
| </div> |
| </div> |
| </div> |
| </div> |
| <div class="sect1"> |
| <h2 id="repository-badging">Repository Badging</h2> |
| <div class="sectionbody"> |
| <div class="paragraph"> |
| <p>If you have projects in GitHub or GitLab, you can help your contributors to get started by providing them ready-to-code developer workspaces. Create a factory and add the following badge on your repositories <code>readme.md</code>:</p> |
| </div> |
| <div class="listingblock"> |
| <div class="content"> |
| <pre class="CodeRay highlight"><code data-lang="markdown">[](your-factory-url)</code></pre> |
| </div> |
| </div> |
| </div> |
| </div> |
| <div class="sect1"> |
| <h2 id="nest-steps">Nest Steps</h2> |
| <div class="sectionbody"> |
| <div class="paragraph"> |
| <p>Read on to learn more about:</p> |
| </div> |
| <div class="ulist"> |
| <ul> |
| <li> |
| <p>Customizing factories with the <a href="factories_json_reference.html">Factory JSON reference</a>. Or jump back to the <a href="factories-getting-started.html">Factory getting started page</a> if you missed it.</p> |
| </li> |
| </ul> |
| </div> |
| </div> |
| </div> |
| |
| <div class="tags"> |
| |
| <b>Tags: </b> |
| |
| |
| |
| <a href="tag_chedir.html" class="btn btn-default navbar-btn cursorNorm" role="button">chedir</a> |
| |
| |
| |
| <a href="tag_factories.html" class="btn btn-default navbar-btn cursorNorm" role="button">factories</a> |
| |
| |
| |
| </div> |
| |
| <!-- |
| --> |
| |
| </div> |
| |
| <hr class="shaded"/> |
| |
| <footer> |
| <div class="row"> |
| <div class="col-lg-12 footer"> |
| Eclipse Che - Documentation <br/> |
| Site last generated: Sep 13, 2018 <br/> |
| <hr> |
| <a href="http://www.eclipse.org" target="_blank">Eclipse Foundation</a><br/> |
| <a href="http://www.eclipse.org/legal/privacy.php" target="_blank">Privacy Policy</a><br/> |
| <a href="http://www.eclipse.org/legal/termsofuse.php" target="_blank">Terms of Use</a><br/> |
| <a href="https://www.eclipse.org/legal/epl-2.0/" target="_blank">Eclipse Public License</a><br/> |
| <a href="http://www.eclipse.org/legal" target="_blank">Legal Resources</a><br/> |
| </div> |
| </div> |
| </footer> |
| |
| |
| |
| |
| <!-- /.row --> |
| </div> |
| <!-- /.container --> |
| </div> |
| <!-- /#main --> |
| </div> |
| |
| </body> |
| |
| </html> |