ol-infrastructure
ol-infrastructure copied to clipboard
Provide cloud-based developer environments
User Story
- As a developer I want to be able to easily set up an environment for the application that I am working on
- As a code reviewer I want an easy way to execute the changes in a PR if I don't already have the application configured on my laptop
Description/Context
There are numerous cloud-based developer environments available. The most prominent ones that I am aware of are GitHub CodeSpaces and GitPod. There are a number of others, so don't treat these as the only options.
Note: 2023-11-15 Another utility that I recently found which may be worth considering is https://www.jetpack.io/devbox
Acceptance Criteria
- [ ] Requirements for a cloud-based developer environment are understood (add details to this issue)
- [ ] An RFC is written detailing the problem to be solved and how the cloud developer environment will address that problem
- [ ] A target application is configured to use the service
- [ ] A template is prepared to allow subsequent applications to be easily onboarded
Plan/Design
Requirements:
- Ability to allow developers to use their own tools (e.g. editors) of choice with the environment
- Ability to successfully set up and run our products (MITxOnline will be a test exemplar)
- Ability to offer pre-packaged already set up environments to users
Setting up two or three possible solutions will allow us to identify the ergonomics and usability of the different options. This will also give us insight into how well we are able to set up our applications in a cloud developer environment.
Spoke with Carey who suggested MITxOnline which has solid looking dev setup instructions in its README.
https://github.com/daytonaio/daytona
I did a fairly decent initial tire kick of Github Codespaces, and here is what I found:
Goal
Overall I think this will meet our needs very well for the goal of "Web acdessible easily utilized web development environment allowing custom builds of product we can then demo".
Non Goals For This Evaluation
I would need significant dev engineering assistance to actually set one of our products up in a code space, although I'd be delighted to do so were that time made available.
Requirements
The cloud development environment should provide easy to use web based editing but be POSSIBLE to use with your editor of choice. Github Codespaces does achieve this, with a few asterisks detailed below.
Findings
Basically what you get with Github Codespaces is an Ubuntu 20.04 VM of user definable size and contents. You can define custom templates which let you install whatever base software you require in order for your particular product to run.
You can easily set various ports to be forwarded to your desktop with VSCode, as well as forwarding 'localhost' so you can test your running applications.
I loaded the ol-infrastrucutre Python repository into a code space. Editing via the VS Code Web UI was fast and intuitive provided you're a VS Code user. Code completion worked great as does Github Copilot.
You can ssh into your codespace and do all the usual UNIX command line things, with a few limintations detailed below. You use the Github CLI to do this however, so things like using your editor's built in ssh support probably isn't going to fly without some further digging.
What Works WELL and What Doesn't
While it is totally possible to install your own full development environment on your Github codespace, I question whether or not it's worth it if you have or need your fully customized environment.
It seems to me that the primary use case here is to provide an easy way for devs to showcase their work, and a not perfectly customized but VERY accessible development environment for when your usual setup isn't available.
I was able to load my highly customized Oh My Zsh based dot files and even run my fully featured Neovim, although there were various rough edges around native module compilation which means that some of the Python integrations probably won't be perfect.
To answer the questions from the folks who have very highly customized local environments, if you want to work offline, or if you have a carefully construed local setup to meet very specific use cases, then Github codespaces probably isn't for you, and I'll go out on a limb and say that even this KIND of environment may not be a good fit for your needs. Keep on doing your thing :)
I'm going to close this issue for now because I feel like the larger effort outlined here needs to be done as aa cross discipline effort between PE and engineering, which isn't how this issue is currently written.