Skip to content

Commit

Permalink
i12974 - two new docs: creating-starting-workspaces.html (workspace f…
Browse files Browse the repository at this point in the history
…rom sample) and ide-projects.html (workspace from code import)

Change-Id: I183a9752e9b6dc7b3496fa5595eef4646759c663
Signed-off-by: nickboldt <nboldt@redhat.com>

move files into correct path; add missing section re: command palette for git clone

Change-Id: I1b0dd74a32acbb30f05dd67cc85bc6a3a8d78a99
Signed-off-by: nickboldt <nboldt@redhat.com>

apply fixes to copy
remove dupe files
replace/remove images

Change-Id: I10632cbb7b1a1d7ec8d96b469f50073934046e3c
Signed-off-by: nickboldt <nboldt@redhat.com>

add TODOs for after eclipse-che/che#13665 is done; tweak copy

Change-Id: I4209eecf2a6e5ef33f7901571792ab35e0611186
Signed-off-by: nickboldt <nboldt@redhat.com>

more tweaks to copy

Change-Id: I33bf5d21b3a6a0bffc9a1d6929b83720d5d99ae8
Signed-off-by: nickboldt <nboldt@redhat.com>

Update src/main/pages/che-7/hands-on-guidance/proc_creating-a-workspace-by-importing-source-code-of-your-project.adoc

Co-Authored-By: supriya <sbharadw@redhat.com>

Update src/main/pages/che-7/hands-on-guidance/proc_creating-a-workspace-by-importing-source-code-of-your-project.adoc

Co-Authored-By: supriya <sbharadw@redhat.com>

Update src/main/pages/che-7/hands-on-guidance/proc_creating-a-workspace-by-importing-source-code-of-your-project.adoc

Co-Authored-By: supriya <sbharadw@redhat.com>

Update src/main/pages/che-7/hands-on-guidance/proc_creating-a-workspace-by-importing-source-code-of-your-project.adoc

Co-Authored-By: supriya <sbharadw@redhat.com>

Update src/main/pages/che-7/hands-on-guidance/proc_creating-a-workspace-by-importing-source-code-of-your-project.adoc

Co-Authored-By: supriya <sbharadw@redhat.com>

Update src/main/pages/che-7/hands-on-guidance/proc_creating-a-workspace-by-importing-source-code-of-your-project.adoc

Co-Authored-By: supriya <sbharadw@redhat.com>

Update src/main/pages/che-7/hands-on-guidance/proc_creating-a-workspace-by-importing-source-code-of-your-project.adoc

Co-Authored-By: supriya <sbharadw@redhat.com>

Update src/main/pages/che-7/hands-on-guidance/proc_creating-a-workspace-by-importing-source-code-of-your-project.adoc

Co-Authored-By: supriya <sbharadw@redhat.com>

Update src/main/pages/che-7/hands-on-guidance/proc_creating-a-workspace-by-importing-source-code-of-your-project.adoc

Co-Authored-By: supriya <sbharadw@redhat.com>

Update src/main/pages/che-7/hands-on-guidance/proc_creating-a-workspace-by-importing-source-code-of-your-project.adoc

Co-Authored-By: supriya <sbharadw@redhat.com>

Update src/main/pages/che-7/hands-on-guidance/proc_configuring-a-che-workspace-using-a-devfile.adoc

Co-Authored-By: supriya <sbharadw@redhat.com>

Update src/main/pages/che-7/hands-on-guidance/proc_creating-a-workspace-by-importing-source-code-of-your-project.adoc

Co-Authored-By: supriya <sbharadw@redhat.com>

Update src/main/pages/che-7/hands-on-guidance/proc_creating-a-workspace-by-importing-source-code-of-your-project.adoc

Co-Authored-By: supriya <sbharadw@redhat.com>

Update src/main/pages/che-7/hands-on-guidance/proc_configuring-a-che-workspace-using-a-devfile.adoc

Co-Authored-By: supriya <sbharadw@redhat.com>

Update src/main/pages/che-7/hands-on-guidance/proc_configuring-a-che-workspace-using-a-devfile.adoc

Co-Authored-By: supriya <sbharadw@redhat.com>

Update src/main/pages/che-7/hands-on-guidance/proc_configuring-a-che-workspace-using-a-devfile.adoc

Co-Authored-By: supriya <sbharadw@redhat.com>

Update src/main/pages/che-7/hands-on-guidance/proc_creating-a-workspace-by-importing-source-code-of-your-project.adoc

Co-Authored-By: supriya <sbharadw@redhat.com>

tweak copy and fix missing link:

Change-Id: I77efe65b49497427b00d30a248c8f25f3fbe2989
Signed-off-by: nickboldt <nboldt@redhat.com>

fix case of Devfile tab

Change-Id: Ifba180d4f49d311a445e4620d317643988844aae
Signed-off-by: nickboldt <nboldt@redhat.com>

tweak copy re: devfiles and Che 6

Change-Id: Ibd3f1b620af9653e65b32029d318f0c9575c97f9
Signed-off-by: nickboldt <nboldt@redhat.com>

replace 'User Dashboard' with Dashboard (even though that's the name for it in the che-6 docs)

Change-Id: I4f2b63f44e197a1b353326ab2cfc104b19f8473a
Signed-off-by: nickboldt <nboldt@redhat.com>

move note into an admonition block

Change-Id: I480250b164aea2c5bc7ac5a86256b8b64e540e84
Signed-off-by: nickboldt <nboldt@redhat.com>

misc fixes from Robert and Supriya's feedback

Change-Id: I73db1489b2ffc4b9fae2176fb33381cb65f972f9
Signed-off-by: nickboldt <nboldt@redhat.com>

more copy tweaks and link fixes

Change-Id: I8dbee4941c72030d13b1c0c4f501616e9eb180f7
Signed-off-by: nickboldt <nboldt@redhat.com>

fix links to non-existant pages

Change-Id: Iaf5d2cc74100967b263e27b19c20eecfc21a0e31
Signed-off-by: nickboldt <nboldt@redhat.com>

add bullets to lists of steps

Change-Id: I0dd95aeb7f9c1be72ae79d74bd2c254e6a97768a
Signed-off-by: nickboldt <nboldt@redhat.com>

fix some links and some formatting

Change-Id: I9c6c1020da72232950174b025c68791cd44af125
Signed-off-by: nickboldt <nboldt@redhat.com>
  • Loading branch information
nickboldt committed Jul 12, 2019
1 parent 9842296 commit 1148877
Show file tree
Hide file tree
Showing 27 changed files with 319 additions and 45 deletions.
6 changes: 3 additions & 3 deletions src/main/_data/sidebars/che_7_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,9 @@ entries:
#- title: Che FAQ
#url: che-faq.html
#output: web
#- title: End-user tasks
#url: end-user-tasks.html
#output: web
- title: End-user tasks
url: end-user-tasks.html
output: web
- title: Contributor tasks
url: contributor-tasks.html
output: web
Binary file added src/main/images/workspaces/add-blank-project.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/images/workspaces/add-git-project.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/images/workspaces/add-sample-project.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/images/workspaces/configure-command.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/images/workspaces/create-and-edit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/images/workspaces/create-and-open.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/images/workspaces/git-clone-command.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/images/workspaces/git-clone-terminal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/images/workspaces/open-git-project.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/images/workspaces/run-command.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/images/workspaces/select-workpace.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/images/workspaces/welcome.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ This describes how to set up a environment for developing Che-Theia plug-ins in

.Procedure

. *Create a workspace for development.* Che has dedicated stack for plug-in development. Go to the Che *Dashboard*, switch to the *Workspaces* tab, and click the btn:[Add Workspace] button:
. *Create a workspace for development.* Che has dedicated stack for plug-in development. Go to the *Dashboard*, switch to the *Workspaces* tab, and click the btn:[Add Workspace] button:
+
.Adding a workspace
image::extensibility/adding-workspace.png[link="{imagesdir}/extensibility/adding-workspace.png"]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
title: End-user tasks
keywords:
keywords:
tags: []
sidebar: che_7_docs
permalink: che-7/end-user-tasks.html
folder: che-7/hands-on-guidance
summary:
summary:
---

:parent-context-of-end-user-tasks: {context}
Expand All @@ -26,22 +26,21 @@ This paragraph is the assembly introduction. It explains what the user will acco
* Delete the section title and bullets if the assembly has no prerequisites.



include::proc_creating-a-workspace-from-code-sample.adoc[leveloffset=+1]

include::proc_creating-a-workspace-by-importing-source-code-of-your-project.adoc[leveloffset=+1]

include::proc_configuring-a-che-workspace-using-a-devfile.adoc[leveloffset=+1]

include::proc_importing-a-kubernetes-application-into-a-che-worskspace.adoc[leveloffset=+1]
// include::proc_importing-a-kubernetes-application-into-a-che-worskspace.adoc[leveloffset=+1]

include::proc_using-a-visual-studio-code-extension-in-che.adoc[leveloffset=+1]
// include::proc_using-a-visual-studio-code-extension-in-che.adoc[leveloffset=+1]

include::proc_configuring-plug-ins.adoc[leveloffset=+1]
// include::proc_configuring-plug-ins.adoc[leveloffset=+1]

include::proc_remotely-accessing-your-workspace.adoc[leveloffset=+1]
// include::proc_remotely-accessing-your-workspace.adoc[leveloffset=+1]

include::proc_configuring-your-vcs-credentials-for-your-workspaces.adoc[leveloffset=+1]
// include::proc_configuring-your-vcs-credentials-for-your-workspaces.adoc[leveloffset=+1]



Expand Down
Original file line number Diff line number Diff line change
@@ -1,27 +1,93 @@
[id="configuring-a-che-workspace-using-a-devfile_{context}"]
= Configuring a Che workspace using a Devfile

This paragraph is the procedure module introduction: a short description of the procedure.
This section will show how to select a workspace, loading in the required stack and a sample project, all in one step.

Please refer to the link:https://redhat-developer.github.io/devfile/devfile[Devfile specifications] for detailed information how to add or remove components, or how to set memory and environment variables.

[discrete]
== Prerequisites

* A bulleted list of conditions that must be satisfied before the user starts following this assembly.
* You can also link to other modules or assemblies the user must follow before starting this assembly.
* Delete the section title and bullets if the assembly has no prerequisites.
* You need an OKD, OCP, or OSD cluster, if using Che on Openshift. See below for use of link:https://www.okd.io/minishift/[Minishift] (OKD).

* Or, you can use a Kubernetes cluster such as link:https://github.com/kubernetes/minikube#installation[Minikube].

* To install on Minishift or Minikube, see xref:che-quick-starts#deploying-che-using-chectl[Deploying Che using chectl].

[discrete]
== Procedure

. Start each step with an active verb.
=== Importing a project using a devfile

Stacks are defined as link:using-developer-environments-workspaces.html#making-a-workspace-portable-using-a-devfile_using-developer-environments-workspaces[devfiles]. This affords flexibility when defining the project(s), IDE, commands, tools, and application runtimes needed in your workspace.

[NOTE]
In Che 6, a stack is defined with a `Dockerfile`. In Che 7, `devfile.yaml` is used instead.

==== The minimal devfile

The following is the minimum content required in a `devfile.yaml` file:

* link:https://redhat-developer.github.io/devfile/devfile#apiversion[apiVersion]
* link:https://redhat-developer.github.io/devfile/devfile#metadata[metadata name]
* link:https://redhat-developer.github.io/devfile/devfile#projects[projects name and source]

```
apiVersion: 1.0.0
metadata:
name: che-in-che-out
projects:
- name: che
source:
type: git
location: 'https://github.com/eclipse/che.git'
```

For a complete `devfile` example file, see link:https://github.com/eclipse/che/blob/master/devfile.yaml[Eclipse Che in Che devfile.yaml].


. Include one command or action per step.
==== Creating a workspace from a devfile
To create a workspace from a devfile:
. Commit a `devfile.yaml` into the root of your git repo.

. Use an unnumbered bullet (*) if the procedure includes only one step.
. Once your repo contains a `devfile.yaml`, point a running Che 7 instance at that link:https://github.com/eclipse/che[project] and it will use the discovered link:https://github.com/eclipse/che/blob/master/devfile.yaml[devfile.yaml] to build you a workspace via its xref:api-reference#factory-api_api-reference[Factory API], `/f?url=`.

* For example, if you're using xref:che-quick-starts#deploying-che-using-chectl[Che inside Minishift]:

* http://che-che.`your.IP.address.here`.nip.io/f?url=link:https://github.com/eclipse/che[https://github.com/eclipse/che]

image:workspaces/che-in-che-devfile.png[Che in Che]

. You can also point at a plain text file:

* http://che-che.`your.IP.address.here`.nip.io/f?url=link:https://gist.githubusercontent.com/nickboldt/9551284c2c779a93ccf16bc801416205/raw/7ad1e949880d7f8ed30360e74bb9f8426450db05/devfile.yaml[https://path.to/my/devfile.yaml]

. If you are familiar with link:https://github.com/che-incubator/chectl/[chectl], you can also reference a local devfile.

* For example, if you're using xref:che-quick-starts#deploying-che-using-chectl[Che inside Minishift]:
+
```
wget https://raw.githubusercontent.com/eclipse/che/master/devfile.yaml -o /tmp/devfile.yaml
./chectl workspace:start --devfile=/tmp/devfile.yaml --chenamespace=mini-che
```
+
```
$➔ ./chectl workspace:start --devfile=/tmp/devfile.yaml -n mini-che
✔ Retrieving Che Server URL...http://che-che.`your.IP.address.here`.nip.io
✔ Verify if Che server is running
✔ Create workspace from Devfile /tmp/devfile.yaml

Workspace IDE URL:
http://che-che.`your.IP.address.here`.nip.io/dashboard/#/ide/che/che-in-che

```

[discrete]
== Additional resources

* A bulleted list of links to other material closely related to the contents of the procedure module.
* For more details on writing procedure modules, see the link:https://github.com/redhat-documentation/modular-docs#modular-documentation-reference-guide[Modular Documentation Reference Guide].
* Use a consistent system for file names, IDs, and titles. For tips, see _Anchor Names and File Names_ in link:https://github.com/redhat-documentation/modular-docs#modular-documentation-reference-guide[Modular Documentation Reference Guide].
* link:using-developer-environments-workspaces.html#making-a-workspace-portable-using-a-devfile_using-developer-environments-workspaces[Making a workspace portable using a Devfile]
* link:https://redhat-developer.github.io/devfile/devfile[Devfile specifications]

* xref:che-quick-starts#deploying-che-using-chectl[Deploying Che using chectl]
* link:https://docs.okd.io/latest/minishift/getting-started/preparing-to-install.html[Minishift installation]
* link:https://github.com/kubernetes/minikube#installation[Minikube installation]
Original file line number Diff line number Diff line change
@@ -1,27 +1,129 @@
[id="creating-a-workspace-by-importing-source-code-of-your-project_{context}"]
= Creating a workspace by importing source code of your project
= Creating a workspace by importing the source code of your project

This paragraph is the procedure module introduction: a short description of the procedure.
This section is about how to create a new workspace to edit an existing codebase.

There are 2 ways to do that *before* starting a workspace:

* xref:#configure-devfile[Select a stack from the *Dashboard*, then change the devfile to include your project]
* xref:#configuring-a-che-workspace-using-a-devfile_end-user-tasks[Add a devfile to a git repository and start the workspace using chectl or a factory]


To create a new workspace to edit an existing codebase, use one of the following three methods *after* you have started the workspace:

* xref:#importing-from-the-user-dashboard-into-an-existing-workspace[Import from the *Dashboard* into an existing workspace]
* xref:#importing-to-a-running-workspace-with-git-clone-command[Import to a running workspace with git clone command]
* xref:#importing-to-a-running-workspace-with-git-clone-in-a-terminal[Import to a running workspace with git clone in a terminal]
* Import a workspace from the *Dashboard* into an existing workspace. For details, see xref:#importing-from-the-user-dashboard-into-an-existing-workspace.
* Import to a running workspace using the `git clone` command. For details, see xref:#importing-to-a-running-workspace-with-git-clone-in-a-terminal.
* Import to a running workspace using the `git clone` command in a terminal. For details, see xref:#importing-to-a-running-workspace-with-git-clone-in-a-terminal.
[discrete]
== Prerequisites

* A bulleted list of conditions that must be satisfied before the user starts following this assembly.
* You can also link to other modules or assemblies the user must follow before starting this assembly.
* Delete the section title and bullets if the assembly has no prerequisites.
* You need an OKD, OCP, or OSD cluster, if using Che on Openshift. See below for use of link:https://www.okd.io/minishift/[Minishift] (OKD).

* Or, you can use a Kubernetes cluster such as link:https://github.com/kubernetes/minikube#installation[Minikube].

* To install on Minishift or Minikube, see xref:che-quick-starts#deploying-che-using-chectl[Deploying Che using chectl].

* You need to have created a workspace with plugins related to your development environment.

[discrete]
== Procedure
== Importing from the Dashboard into an existing workspace

There are at least two ways to import a project via the *Dashboard*.

From the *Dashboard*, select Workspaces, then select your workspace by clicking on its name, or use the gear icon. The former will link you to the workspace's *Overview* tab, while the latter will link to the *Devfile* tab where you can enter your own YAML configuration.
You can import a project using the *Dashboard* in one of the following two ways:

* On the *Dashboard*, click *Workspaces*. Then, click the required workspace. The *Overview* tab displays showing the overview of the workspace.
* On the *Dashboard*, click *Workspaces*. Then, click the gear icon next to the required workspace. The *Devfile* tab displays allowing you to enter the YAML configuration.
In either case, click the *Projects* tab next.
. Click the *Projects* tab.
// TODO https://github.com/eclipse/che/issues/13665 remove ref to blank and zip
. Click *Add Project*. You can then import a sample project, create a blank project, import from a Git project, or import from a zip file.

image::workspaces/workspace-config-projects.png[Add projects to workspace]

[NOTE]
====
You can add a project to a non-running workspace, but you must start the workspace to delete it.
====

// TODO https://github.com/eclipse/che/issues/13665 remove section
=== Creating a new repository

To add a blank project, take the following steps:

. Type a name and a description in the *Name* and *Description* fields.


image::workspaces/add-blank-project.png[Add blank project]

. Click *Open* to open your workspace.

image::workspaces/open-blank-project.png[Your empty project]

. Start each step with an active verb.
=== Edit an existing repository

. Include one command or action per step.
To edit an existing repository, choose the git project or zip file, and Che will load it into your workspace.

. Use an unnumbered bullet (*) if the procedure includes only one step.
image::workspaces/add-git-project.png[Add existing git project]

Next, open your workspace by clicking the green *Open* button.

// TODO https://github.com/eclipse/che/issues/13665 fix screenshot
image::workspaces/open-git-project.png[Your git project]

=== Editing the commands after importing a project

After you have a project in your workspace, you can add commands to it. Adding commands to your projects allows you to run, debug, or launch your application in a browser.

. To add commands to the project, open the workspace configuration in the *Dashboard*, then select the *Devfile* tab:
+
image::workspaces/workspace-config-yaml.png[Add commands to workspace]

. Open the workspace.

. To run a command, select *Terminal* > *Run Task...* from the main menu.
+
image::workspaces/run-command.png[Run task]

. To configure commands, select *Terminal* > *Configure Tasks...* from the main menu.
+
image::workspaces/configure-command.png[Configure tasks]

== Importing to a running workspace using the *Git: Clone...* command

. Start a workspace, then use the *Git: Clone...* command from the command palette or the Welcome screen to import a project to a running workspace.
+
image::workspaces/welcome.png[Welcome screen]

. Open the command palette with `F1` or `CTRL-SHIFT-P`, or from the link in the Welcome screen.
+
image::workspaces/git-clone-command.png[Invoke git clone command]

. Enter the path to the project you want to clone.
+
image::workspaces/git-clone-command-2.png[Configure git clone command]

== Importing to a running workspace with `git clone` in a terminal

In addition to the approaches above, you can also start a workspace, open a *Terminal*, and type `git clone` to pull code.

image::workspaces/git-clone-terminal.png[Run git clone in a terminal]

[NOTE]
====
Importing or deleting workspace projects in the terminal does not update workspace configuration, and the change is not reflected in the *Project* and *Devfile* tabs in the dashboard.
Similarly, if you add a project via the *Dashboard*, then delete it with `rm -fr myproject`, it may still appear in the *Projects* or *Devfile* tab.
====

[discrete]
== Additional resources

* A bulleted list of links to other material closely related to the contents of the procedure module.
* For more details on writing procedure modules, see the link:https://github.com/redhat-documentation/modular-docs#modular-documentation-reference-guide[Modular Documentation Reference Guide].
* Use a consistent system for file names, IDs, and titles. For tips, see _Anchor Names and File Names_ in link:https://github.com/redhat-documentation/modular-docs#modular-documentation-reference-guide[Modular Documentation Reference Guide].
* xref:che-quick-starts#deploying-che-using-chectl[Deploying Che using chectl]
* link:https://docs.okd.io/latest/minishift/getting-started/preparing-to-install.html[Minishift installation]
* link:https://github.com/kubernetes/minikube#installation[Minikube installation]

Loading

0 comments on commit 1148877

Please sign in to comment.