Git Product home page Git Product logo

appengine-codiad's Introduction

Codiad Managed VMs Docker Image

Screenshot of Codiad running on MVMs

This repo defines a Docker Image that can be used to run Codiad on App Engine Managed VMs.

Codiad

The image is using a heavily customized version of Codiad (https://github.com/Codiad/Codiad) which resides in codiad/third_party/codiad directory.

IDE Proxy

In order to run the IDE instances for developers in a cloud project, there is an IDE proxy running on the managed VM which routes the requests to the individual Codiad containers for each developer based on their email. The IDE proxy is written in nodejs. It is responsible for creating a Codiad container for a user as soon as they connect to the IDE. Thereafter all of the request coming from that user will be forwarded to the respective container. The authentication is done through appengine. Proxy code can be found under ide-proxy directory.

Included extras

  • Kythe: used for source code indexing. Kythe is installed by downloading its .tar.gz image from the github repository. We try to keep up with latest release of Kythe from https://github.com/google/kythe/releases/.
  • Shipshape: for providing lint messages in IDE. Shipshape is installed by downloading its command line program from their public GCS bucket.
  • Web terminal: A customized version of term.js(https://github.com/chjj/term.js) is what we use in IDE to expose the underlying container. IDE is installed through a git submodule which resides in a Google cloud repository.
  • Git appraise: Integrated with git-appraise for sending code reviews. See https://github.com/google/git-appraise for more information. Here is a screenshot of integration of this IDE with git appraise: Screenshot of a review in Codiad

Required Google Cloud API

  • Google Compute Engine
  • Google Cloud Storage

Optional Google Cloud API

  • Cloud Debugger API

Building

Building a dev image to test your changes to IDE

In order to do so, please see the README.md file in codiad directory.

Deploying to a Google Cloud project

Please see the instructions in ide-proxy directory.

How does it work?

The IDE is deployed as a Managed VM (MVM) module into a cloud project. This module is responsible for handling requests coming from different users of the IDE and dispatching them to the right Codiad container. The general architecture of the system is as follows:

                       +      +----------------------------------+
                       |      |                                  |
User A +----------->   +----------------+      IDE Proxy         |
                       |      |         |                        |
                       |      |         |                        |
User B +----------->   +--------------------------------+        |
                       |      |         |               |        |
                       |      |         |               |        |
                       +      |         |               |        |
                      MVM     |         |               |        |
                      Auth    |         |               |        |
                              |         |               |        |
                              |    +----v------+  +-----v-----+  |
                              |    | User A    |  | User B    |  |
                              |    | Codiad    |  | Codiad    |  |
                              |    | Container |  | Container |  |
                              |    +-----------+  +-----------+  |
                              +----------------------------------+

IDE proxy manages the codiad containers. It is respobsible for creating(and recreating) them and routing requests to them based on user's email address which is registered with the cloud project.

Security

As can be seen in the above diagram, the authentication for each user is done by MVM. Users are authenticated with their cloud credential for the cloud project. The IDE is accessed by all users using the same secure URL, e.g. https://codiad-YOUR_CLOUD_PROJECT.appspot.com.

The Codiad containers are run by project's service account and not by user's credential. No user's credential is stored anywhere in the container by the system.

Codiad containers for all users are run in the same machine and there is no security boundary established for them. Hence a user A's container could potentially access user B's container.

Running Codiad Locally

It is possible to run Codiad locally on a machine without using the IDE proxy and MVM hosting. In order to do so, see the README.md file in codiad directory.

appengine-codiad's People

Contributors

amshali avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.