diff options
author | Gokmen Goksel <gokmen@goksel.me> | 2016-07-25 20:59:39 -0700 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2016-08-19 12:10:58 -0700 |
commit | a927a9bf6baa99be94181c3ab980947621ae2fe0 (patch) | |
tree | ad2947fc8e241f62960e603a65b0b3752023a4a3 /doc/integration/koding-usage.md | |
parent | 66eb01853a15cf517341e91fdd10f6384fec80de (diff) | |
download | gitlab-ce-a927a9bf6baa99be94181c3ab980947621ae2fe0.tar.gz |
Support integration with Koding (online IDE)
Koding: #index: landing page for Koding integration
If enabled it will provide a link to open remote Koding instance url
for now we are also providing the sneak preview video for how
integration works in detail.
Repository: check whether .koding.yml file exists on repository
Projects: landing page: show Run in IDE (Koding) button if repo has stack file
Projects: MR: show Run in IDE Koding button if repo has stack file on active branch
ProjectHelpers: add_koding_stack: stack generator for provided project
With this helper we will auto-generate the required stack template
for a given project. For the feature we can request this base template
from the running Koding instance on integration.
Currently this will provide users to create a t2.nano instance on aws
and it'll automatically configures the instance for basic requirements.
Projects: empty state and landing page provide shortcuts to create stack
projects_helper: use branch on checkout and provide an entry point
This ${var.koding_queryString_branch} will be replaced with the branch
provided in query string which will allow us to use same stack template
for different branches of the same repository.
ref: https://github.com/koding/koding/pull/8597/commits/b8c0e43c4c24bf132670aa8a3cfb0d634acfd09b
projects_helper: provide sha info in query string to use existing vms
With this change we'll be able to query existing vms on Koding side
based on the commit id that they've created.
ref: https://github.com/koding/koding/pull/8597/commits/1d630fadf31963fa6ccd3bed92e526761a30a343
Integration: Docs: Koding documentation added
Disable /koding route if integration is disabled
Use application settings to enable Koding
Projects_helper: better indentation with strip_heredoc usage
Projects_helper: return koding_url as is if there is no project provided
current_settings: set koding_enabled: false by default
Koding_Controller: to render not_found once integration is disabled
Dashboard_specs: update spec for Koding enabled case
Projects_Helper: make repo dynamic
ref: https://github.com/koding/koding/pull/8597/commits/4d615242f45aaea4c4986be84ecc612b0bb1514c
Updated documentation to have right format
Diffstat (limited to 'doc/integration/koding-usage.md')
-rw-r--r-- | doc/integration/koding-usage.md | 122 |
1 files changed, 122 insertions, 0 deletions
diff --git a/doc/integration/koding-usage.md b/doc/integration/koding-usage.md new file mode 100644 index 00000000000..bb74badce66 --- /dev/null +++ b/doc/integration/koding-usage.md @@ -0,0 +1,122 @@ +# Koding & GitLab + +This document will guide you through using Koding integration on GitLab in +detail. For configuring and installing please follow [this](koding.md) guide. + +You can use Koding integration to run and develop your projects on GitLab. This +will allow you and the users to test your project without leaving the browser. +Koding handles projects as stacks which are basic recipes to define your +environment for your project. With this integration you can automatically +create a proper stack template for your projects. Currently auto-generated +stack templates are designed to work with AWS which requires a valid AWS +credential to be able to use these stacks. You can find more information about +stacks and the other providers that you can use on Koding from +[here](https://www.koding.com/docs). + + +# Enable Integration + +You can enable Koding integration by providing the running Koding instance URL +in Application Settings; + + - Open **Admin area > Settings** (`/admin/application_settings`). + + + +Once enabled you will see `Koding` link on your sidebar which leads you to +Koding Landing page + + + +You can navigate to running Koding instance from here. For more information and +details about configuring integration please follow [this](koding.md) guide. + + +# Set up Koding on Projects + +Once it's enabled, you will see some integration buttons on Project pages, +Merge Requests etc. To get started working on a specific project you first need +to create a `.koding.yml` file under your project root. You can easily do that +by using `Set Up Koding` button which will be visible on every project's +landing page; + + + +Once you click this will open a New File page on GitLab with auto-generated +`.koding.yml` content based on your server and repository configuration. + + + + +# Run a project on Koding + +If there is `.koding.yml` exists in your project root, you will see +`Run in IDE (Koding)` button in your project landing page. You can initiate the +process from here. + + + +This will open Koding defined in the settings in a new window and will start +importing the project's stack file; + + + +You should see the details of your repository imported into your Koding +instance. Once it's completed it will lead you to the Stack Editor and from +there you can start using your new stack integrated with your project on your +GitLab instance. For details about what's next you can follow +[this](https://www.koding.com/docs/creating-an-aws-stack) guide from 8. step. + +Once stack initialized you will see the `README.md` content from your project +in `Stack Build` wizard, this wizard will let you to build the stack and import +your project into it. **Once it's completed it will automatically open the +related vm instead of importing from scratch** + + + +This will take time depending on the required environment. + + + +It usually takes ~4 min. to make it ready with a `t2.nano` instance on given +AWS region. (`t2.nano` is default vm type on auto-generated stack template +which can be manually changed) + + + +You can check out the `Build Logs` from this success modal as well; + + + +You can now `Start Coding`! + + + + +# Try a Merge Request on IDE + +It's also possible to try a change on IDE before merging it. This flow only +enabled if the target project has `.koding.yml` in it's target branch. You +should see the alternative version of `Run in IDE (Koding)` button in merge +request pages as well; + + + +This will again take you to Koding with proper arguments passed, which will +allow Koding to modify the stack template provided by target branch. You can +see the difference; + + + +The flow for the branch stack is also same with the regular project flow. + + +# Open GitLab from Koding + +Since stacks generated with import flow defined in previous steps, they have +information about the repository they are belonging to. By using this +information you can access to related GitLab page from stacks on your sidebar +on Koding. + + + |