Coder Social home page Coder Social logo

inakianduaga / cloud-development Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 1.0 83 KB

Tools to setup a dockerized multi-user environment to edit/preview server-based applications

License: MIT License

Shell 83.53% JavaScript 1.62% PHP 0.10% Nginx 14.74%
cloud-development docker

cloud-development's People

Stargazers

 avatar

Forkers

tadodotcom

cloud-development's Issues

Add bash configuration "class"

Move all the config related functions to a single bash script that we can source from anywhere else so we can query the config easily

Add frontend proxy extra docker commands on main configuration

We need to be able to append the extra config to the frontend proxy command, so need to provide extra docker command param just as the usual editor/webserver containers

  • Add option in config file
  • Pass option on the upstart launchContainer scripts to the cloud_frontend_proxy service

Move entire configuration / logic to be based on docker compose

Config / logic could be greatly simplified by leveraging docker compose, and using linking between containers, since most of the logic would be taken care of by docker-compose.

  • Whatever variables are external can be provided to docker compose through env files
  • No upstart logic for each of the services needed, just fire docker-compose
  • frontend proxy gets linked to each of the containers through docker compose, so no need to find/set ports manually

Add method to relaunch container for single user based on current config

Right now, changes to the user config can only take effect by restarting the entire sandbox environment, which is not ideal. We need a method to relaunch the main docker container (excluding the auth container), without killing the frontend cloud proxy. Since the docker container names are linked to users by convention this should be relatively straightforward

TODO

  • Check upstart/launch_containers logic to see how containers get launched for each of the users. The methods launchWebserver && launchAuthentication are useful. The current loop logic could be extracted out to a per user method, then the logic is not duplicate and we can reuse the method for individual relaunching. We also need a stop method to stop the previous containers.

Feature: Github per branch deployment

Idea is to have github-repo.ISSUE/tag

Github Webhooks:

  • Hooks on pull request open/close to talk to the cloud-development server (in addition to a preconfigured tag).
  • Hooks on pull request updates (so we can reupdate the deployment when a commit comes)
  • Pushes to the github issue for posting update comments (so we can eventually display the deployed server url)

Nodejs Webhook Server

Nodejs webhook listener server

  • Runs an nodejs docker container server that listens to the git webhooks (needs secret key)

New user creation / deletion

Folders:

  • For creation: Clones from a preconfigured base user to a new folder for the new user (user will go by pull-request number)
    • we might have to use github authentication or password since google auth callback subdomains don't accept callbacks
    • Runs a preconfigured script on the repo folder that needs to be provided (on the base folder) that takes the git commit and will bring the repo folder to a working state. We need to provide a placeholder <PR_NUMBER> that will be substituted in the script
  • For deletion it'll simply remove the folder and that's it.

User:

Need to create/remove the new user list based on the github repo/issue and map to the correct folders.

  • Reads configuration from predefined github "users" (so container commands can be added)
  • Dynamically maps folder to the new folder

Initialization

  • Launch the webserver/auth combo for a single user (or destroy it if it's the delete command). We can reuse code from the launchContainers script
  • Reinitialize the cloud-frontend-proxy from within the server, and it should work since the configuration will be rebuilt using the list of users.

Update: Easier for now

Otherwise for now we can use the cloudDevelopment stop/start service for reinitializing the whole stack

Add user config setter methods in user_config.sh

We need methods to easily modify the configuration programatically. The current getters are

getUserWebserver
getUserWebserverPort
getUserWebserverVolume
getUserWebserverDockerCMDExtras

so we need

  • setUserWebserver
  • setUserWebserverPort
  • setUserWebserverVolume
  • setUserWebserverDockerCMDExtras

all methods take the as first parameter and as second

Enhance Documentation

Please add some screenshots of codeboxIDE to get a better idea what this is about.

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.