Skip to content

Commit

Permalink
add Gitpod doc (Seneca-CDOT#2474)
Browse files Browse the repository at this point in the history
* add  Gitpod doc

* Fix gitpod doc #1
  • Loading branch information
DukeManh authored Nov 18, 2021
1 parent 2406963 commit 3e9b66e
Show file tree
Hide file tree
Showing 5 changed files with 87 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .gitpod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ github:
# add a "Review in Gitpod" button as a comment to pull requests (defaults to false)
addComment: true
# add a "Review in Gitpod" button to the pull request's description (defaults to false)
addBadge: true
addBadge: false

# Install recommended extension, only installed once each user
vscode:
Expand Down
10 changes: 9 additions & 1 deletion docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,20 @@ Before creating an issue:
- If they are, reach out and try to help.
- Use [our Labels](https://github.com/Seneca-CDOT/telescope/labels) to help others quickly understand what an issue is all about.

## Environment Setup
## Local Environment Setup

Telescope has many parts, and setup requires you to install a number of tools
and dependencies. For instructions on how to setup your Telescope environment, please see
the [Environment Setup documentation](https://github.com/Seneca-CDOT/telescope/blob/master/docs/environment-setup.md).

## Browser-based Setup using Gitpod

If you are just getting started, we recommend setting up Telescope locally first
to familiarize yourself with the workflows of a typical project.

However, you can also start an automated development environment and access it
through your browser, please refer to [Develop on Gitpod](https://github.com/Seneca-CDOT/telescope/blob/master/docs/gitpod.md)

## Technologies

Telescope uses quite a few different technologies, and we have some project specific
Expand Down
77 changes: 77 additions & 0 deletions docs/gitpod.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# Development on Gitpod

You can start an automated development environment in the cloud and access it
through your browser.

We have described the environment setup steps to Gitpod in [gitpod.yml](https://github.com/Seneca-CDOT/telescope/blob/master/.gitpod.yml)
which takes care of installing dependencies, building, starting micro-services and
starting the frontend development server for you.

> Gitpod is a container-based development platform that puts developer experience first.
> Gitpod provisions ready-to-code developer environments in the cloud accessible through your browser
[Learn more about Gitpod](https://www.gitpod.io/docs)

## Gitpod Pricing

Gitpod gives each account 50 hours for free per month. When free hours run out, you can
still keep working on your open workspaces but new workspaces can't be created.

If you enjoy the experience, you can upgrade to Gitpod student plan without needing a credit card.

| | Free | Student Unleashed |
| ------------------- | ----------------- | ----------------- |
| Repository | Public && Private | Public && Private |
| Workspaces hours | 50 | Unlimited |
| Workspace timeout | 30 minutes | 1 + 3 boost hours |
| Parallel workspaces | 4 | 16 |
| Team collaboration | No | Yes |
| Monthly cost | Free | $9 |

Learn more about [Gitpod pricing](https://www.gitpod.io/pricing)

## Open a Gitpod workspace

A Gitpod workspace includes everything developers need to be productive: source code, a
Linux shell with root/sudo, a file system, the full VS Code editing experience including
extensions, language support and all other tools and binaries that run on Linux.

1. In a browser, navigate to a Telescope's Github branch, commit, Issue, or PR page.

2. Open in Gitpod:

- Option 1: [Install the Gitpod extension](https://www.gitpod.io/docs/browser-extension) to open the page in Gitpod with a click of a button.
![Open in Gitpod](./images/openInGitpod.png)
- Option 2: In the address bar, prefix the entire URL with `gitpod.io/#` and press Enter,
E.g, [gitpod.io/#https://github.com/Seneca-CDOT/telescope](https://gitpod.io/#https://github.com/Seneca-CDOT/telescope)

3. To use GitPod, you need to have a Git hosting account such as Github, GitLab or BitBucket.

4. You will see the familiar VSCode in the browser serving Telescope source code:

![Browser-base vscode](./images/gitpodVSCode.png)

- If you open an Issue, Gitpod automatically checks out a new git branch for you to work on.
- On the first tab of the VScode terminal, the left half is for building and starting
services, the second half waits for services to start and spins up the Next frontend dev server.
Switch to the second tab for running terminal commands.
- Each workspace is assigned a unique URL, however, it's not stable because a workspace is considered to be short-lived.

## Gitpod pre-builds

Gitpod continuously builds all Telescope Git branches like a CI server. Whenever the code changes
(e.g. when new commits are pushed to your repository), Gitpod can prebuild workspaces,
i.e. run the init commands in your .gitpod.yml configuration file before you even start a workspace.

## Shut down your workspaces

Within 3 minutes after closing your workspace browser tab, it will be stopped.

Unused workspaces are automatically deleted after 14 days of inactivity.
To prevent a workspace from being deleted, you can pin it in your list of workspaces.
Pinned workspaces are kept forever.

## Resuming workspaces

Navigate to [Gitpod Dashboard](https://gitpod.io/workspaces) to select a workspace to continue
working on.
Binary file added docs/images/gitpodVSCode.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 docs/images/openInGitpod.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 3e9b66e

Please sign in to comment.