-
Notifications
You must be signed in to change notification settings - Fork 81
chore: Getting Started tutorials #760
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
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
832afff
add dev tutorial
38a94c2
begin adding Coder for Docker guide
c969bc9
Finish Docker guide; update manifest
04810f1
Update getting started docs
9775132
annotate screenshot
04bffc4
add final screenshot
7bd1061
add final screenshot
502680a
fix typo
e685634
Add links
3f2d907
apply changes based on review
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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.
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.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,142 @@ | ||
--- | ||
title: Developers | ||
description: Get started with Coder as a developer. | ||
--- | ||
|
||
This article will walk you through the process of getting started with a Coder | ||
workspace and a web development project featuring Node.js and React.js. You'll | ||
learn how to: | ||
|
||
- Connect Coder to your Git provider; | ||
- Create a workspace; | ||
- Add a sample project to your workspace; | ||
- Create a dev URL and preview changes to your project. | ||
|
||
## Prerequisites | ||
|
||
This guide assumes that you have a Coder deployment available to you and that | ||
you have the credentials needed to access the deployment. | ||
|
||
## Step 1: Log in and connect Coder to your Git provider | ||
|
||
In this step, you'll log into Coder and connect and authenticate with your Git | ||
provider. This will allow you to do things like pull repositories and push | ||
changes. | ||
|
||
1. Navigate to the Coder deployment using the URL provided to you by your site | ||
manager, and log in. | ||
|
||
1. Click on your avatar in the top-right, and select **Account**. | ||
|
||
 | ||
|
||
1. Provide Coder with your SSH key to connect and authenticate to GitHub. | ||
|
||
If your site manager has configured OAuth, go to **Linked Accounts** and | ||
follow the on-screen instructions to link your GitHub account. | ||
|
||
 | ||
|
||
If your site manager has _not_ configured OAuth, go to **SSH keys**. Copy | ||
your public SSH key and | ||
[provide it to GitHub](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account). | ||
|
||
 | ||
|
||
## Step 2: Create your workspace | ||
|
||
You will now create the workspace where you'll work on your development project. | ||
|
||
1. Return to **Workspaces** using the top navigation bar. | ||
|
||
1. Click **New workspace** to launch the workspace-creation dialog. | ||
|
||
1. Provide a **Workspace Name**. | ||
|
||
1. In the **Image** section, click **Packaged** (this tab contains | ||
Coder-provided images hosted in a Docker registry). Select **NodeJS**. This | ||
will populate the form in the **Import** tab. | ||
|
||
1. Under **Workspace providers**, leave the default option (which is | ||
**built-in**) selected. | ||
|
||
1. Expand the **Advanced** section. If the **Run as a container-based virtual | ||
machine** option is selected, _unselect_ the box. Leave the **CPU**, | ||
**Memory**, **Disk**, and **GPU** allocations as-is. | ||
|
||
1. Scroll to the bottom, and click **Create workspace**. The dialog will close, | ||
allowing you to see the main workspace page. You can track the workspace | ||
build process using the **Build log** on the right-hand side. | ||
|
||
 | ||
|
||
Once your workspace is ready for use, you'll see a chip that says **Running** | ||
next to the name of your workspace. | ||
|
||
## Step 3: Add a sample project to your workspace | ||
|
||
Once you've created your workspace, you can start using Coder after adding a | ||
sample project to your workspace. | ||
|
||
1. Under **Browser applications**, click **Code Web** to open VS Code in your | ||
browser. | ||
|
||
1. When VS Code launches in your browser, click **Open folder...**. In the | ||
prompt, you'll see `/home/coder`. This directory is where you'll clone a | ||
sample React app project Git repository. Click **OK** to proceed. | ||
|
||
 | ||
|
||
1. Click the hamburger icon in the top right, and select **Terminal** > **New | ||
Terminal** to open a new terminal. | ||
|
||
1. Clone the `create-react-app` repository: | ||
|
||
```console | ||
git clone git@github.com:facebook/create-react-app.git | ||
``` | ||
|
||
Once you've cloned the repository, you can click the **Explorer** icon and | ||
expand the **create-react-app** folder in the left-have nav bar to see the | ||
contents of the repo. | ||
|
||
 | ||
|
||
You're now ready to make changes to the application. | ||
|
||
## Step 4: Preview your app and view changes live | ||
|
||
Dev URLs allow you to access the web services you're developing in your | ||
workspace. Once you've created a dev URL, Coder listens on the port you | ||
specified and renders a browser link you can use to view your application. | ||
|
||
> Please note that your site manager must have enabled and configured dev URLs | ||
> for your Coder deployment before you can use this feature. | ||
|
||
1. Return to your workspace overview page, and find the **Dev URLs** section. | ||
|
||
1. Click **Add port**. | ||
|
||
1. Provide a **Name** for your port, and leave the remaining fields as-is. Click | ||
**Save**. | ||
|
||
 | ||
|
||
1. At this point, you can build and run the sample app by returning to your Code | ||
Web window and running the following in the terminal: | ||
|
||
```console | ||
npx create-react-app my-app | ||
cd my-app | ||
npm start | ||
``` | ||
|
||
1. From the workspace overview, launch your dev URL by clicking its name; Coder | ||
will open a new browser window and point you to the appropriate URL. | ||
|
||
 | ||
|
||
1. You can test preview by making changes to the `src/App.js` file; every time | ||
you save your changes to this file, your preview will reload. | ||
|
||
 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,135 @@ | ||
--- | ||
title: Coder for Docker | ||
description: Get started with Coder for Docker as a developer. | ||
--- | ||
|
||
This tutorial shows you how to create a Coder development workspace and getting | ||
set up to work on a web development project requiring Node.js and React.js. | ||
You'll learn how to: | ||
|
||
- Connect Coder to your Git provider; | ||
- Create a workspace; | ||
- Add a sample project to your workspace; | ||
- Create a dev URL and preview changes to your project. | ||
|
||
## Prerequisites | ||
|
||
Please [install Coder for Docker](../setup/docker.md) before proceeding. | ||
|
||
## Step 1: Log in and connect Coder to your Git provider | ||
|
||
In this step, you'll log into Coder and connect and authenticate with your Git | ||
provider. This will allow you to do things like pull repositories and push | ||
changes. | ||
|
||
1. Navigate to the Coder deployment using the URL provided to you during the | ||
Coder for Docker installation process, and log in. | ||
|
||
1. Click on your avatar in the top-right, and select **Account**. | ||
|
||
 | ||
|
||
1. Provide Coder with your SSH key to connect and authenticate to GitHub. | ||
|
||
If your site manager has configured OAuth, go to **Linked Accounts** and | ||
follow the on-screen instructions to link your GitHub account. | ||
|
||
 | ||
|
||
If your site manager has _not_ configured OAuth, go to **SSH keys**. Copy | ||
your public SSH key and | ||
[provide it to GitHub](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account). | ||
|
||
 | ||
|
||
## Step 2: Create your workspace | ||
|
||
You will now create the workspace where you'll work on your development project. | ||
|
||
1. Return to **Workspaces** using the top navigation bar. | ||
|
||
1. Click **New workspace** to launch the workspace-creation dialog. | ||
|
||
1. Provide a **Workspace Name**. | ||
|
||
1. In the **Image** section, click **Packaged** (this tab contains | ||
Coder-provided images hosted in a Docker registry). Select **Ubuntu**. This | ||
will populate the form in the **Import** tab. | ||
|
||
1. Under **Workspace providers**, leave the default option (which is **Docker**) | ||
selected. | ||
|
||
1. Scroll to the bottom, and click **Create workspace**. The dialog will close, | ||
allowing you to see the main workspace page. You can track the workspace | ||
build process using the **Build log** on the right-hand side. | ||
|
||
 | ||
|
||
Once your workspace is ready for use, you'll see a chip that says **Running** | ||
next to the name of your workspace. | ||
|
||
## Step 3: Add a sample project to your workspace | ||
|
||
Once you've created your workspace, you can start using Coder after adding a | ||
sample project to your workspace. | ||
|
||
1. Under **Browser applications**, click **Code Web** to open VS Code in your | ||
browser. | ||
|
||
1. When VS Code launches in your browser, click **Open folder...**. In the | ||
prompt, you'll see `/home/coder`. This directory is where you'll clone a | ||
sample React app project Git repository. Click **OK** to proceed. | ||
|
||
 | ||
|
||
1. Click the hamburger icon in the top right, and select **Terminal** > **New | ||
Terminal** to open a new terminal. | ||
|
||
1. Clone the `create-react-app` repository: | ||
|
||
```console | ||
git clone git@github.com:facebook/create-react-app.git | ||
``` | ||
|
||
Once you've cloned the repository, you can click the **Explorer** icon and | ||
expand the **create-react-app** folder in the left-have nav bar to see the | ||
contents of the repo. | ||
|
||
 | ||
|
||
You're now ready to make changes to the application. | ||
|
||
## Step 4: Preview your app and view changes live | ||
|
||
Dev URLs allow you to access the web services you're developing in your | ||
workspace. Once you've created a dev URL, Coder listens on the port you | ||
specified and renders a browser link you can use to view your application. | ||
|
||
1. Return to your workspace overview page, and find the **Dev URLs** section. | ||
|
||
1. Click **Add port**. | ||
|
||
1. Provide a **Name** for your port, and leave the remaining fields as-is. Click | ||
**Save**. | ||
|
||
 | ||
|
||
1. At this point, you can build and run the sample app by returning to your Code | ||
Web window and running the following in the terminal: | ||
|
||
```console | ||
npx create-react-app my-app | ||
cd my-app | ||
npm start | ||
``` | ||
|
||
1. From the workspace overview, launch your dev URL by clicking its name; Coder | ||
will open a new browser window and point you to the appropriate URL. | ||
|
||
 | ||
|
||
1. You can test preview by making changes to the `src/App.js` file; every time | ||
you save your changes to this file and refresh your browser window, your | ||
preview will update. | ||
|
||
 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.