janitortechnology / janitor Goto Github PK
View Code? Open in Web Editor NEWThe fastest development system in the world.
Home Page: https://janitor.technology
License: GNU Affero General Public License v3.0
The fastest development system in the world.
Home Page: https://janitor.technology
License: GNU Affero General Public License v3.0
I tried to install it on Debian 8, but I failed.
First I had to symlink /usr/bin/node
to /usr/bin/nodejs
Then I started a ubuntu container, leading to the same result.
I noticed in the error messages, service not found
so I am running a container with ubuntu:16.10
now.
However, am I assuming correctly the readme should state Debian 7 or Ubuntu 16.10?
Currently, the Janitor only supports Debian-based development environments.
However, some of the large software projects that the Janitor aims to support (e.g. Firefox) also need Windows-based environments for development and bug-fixing.
EDIT: Progress on Windows support is currently tracked in https://github.com/JanitorTechnology/janitor/projects/4
To guide and encourage new contributions to the supported projects, it would be helpful to 1) add IDE buttons to update, build and run projects, and 2) show instructions on how to access the contribution environments in different ways, with links to further documentation where useful.
Project-specific IDE buttons:
gclient sync -j18
, build with ninja -C out/Default chrome
, run with out/Default/chrome
.git pull --rebase origin master
, build with ./mach build
, run with ./mach run
.python client.py checkout
, build with ./mozilla/mach build
, run with ./mozilla/mach run
.Contribution-specific instructions:
ssh [email protected] -p XXX
to log in.Thanks to @beaufortfrancois for the suggestion!
Add TheFileTree project on Janitor, following the Dockerfile:
jankeromnes/dockerfiles#1
Implementing a service worker in the Janitor web app could significantly improve subsequent load times, and make it (somewhat) usable offline.
I have an old container (10 months ago) of Firefox, when I click on VNC i get a blank page so I wanted to delete.
On delete I get an alert with:
Error: (HTTP code 404) no such container - No such container: 293f90b839179175b8406684c2149992635cbfe86e9ef39dceea732d8985ece3
In any case I don't find a way to create a new one for firefox.
When using the Kresus container, for which one can spawn a web service running on port 9876, there's no way to discover that the Docker instance has bound the port 9876, and thus to navigate to the URL in the proxy. As a workaround, one can just click the VNC button and change the port in the URL. But things could be simpler: maybe a section with links/buttons (one for each hosted service), which redirects to the service once clicked?
It would be great if we could run a noVNC of an OSX machine.
We would like the Janitor web app to offer developers more visibility and control over their containers, so that they can do more with their containers, and troubleshoot common problems more easily.
Additionally, new container features should also be available in the upcoming Janitor API.
To improve the view and tools of Janitor containers, we should implement the following changes to Janitor's web app and server:
ssh
one-liner with the correct host, port, and a link to the Settings section where you can authorize personal SSH public keys) (done by @nt1m in fe6dd42)If you have ideas, suggestions or feedback related to the items above, or if you want to help, please comment below. Thanks! ๐
I was unsuccessful in running Servo on the VNC and in Cloud9. Please note, I tried downloading the packages from the Servo page.
Here are the errors:
error: XDG_RUNTIME_DIR not set in the environment.
thread 'main' panicked at 'Failed to create window.: NoBackendAvailable(XOpenDisplayFailed)', ../src/libcore/result.rs:785
stack backtrace:
1: 0x7f981b63eaaf - std::sys::backtrace::tracing::imp::write::h6528da8103c51ab9
2: 0x7f981b6466db - std::panicking::default_hook::$u7b$$u7b$closure$u7d$$u7d$::hbe741a5cc3c49508
3: 0x7f981b64633f - std::panicking::default_hook::he0146e6a74621cb4
4: 0x7f981a7f196a - util::panicking::initiate_panic_hook::
at /home/user/servo/components/util/panicking.rs:45
5: 0x7f981a7f1829 - <std..thread..local..LocalKey>::with::h813eaa2cabd28878
at ../src/libstd/thread/local.rs:211
6: 0x7f981a7f16a6 - util::panicking::initiate_panic_hook::
at /home/user/servo/components/util/panicking.rs:40
7: 0x7f981b62c3cc - std::panicking::rust_panic_with_hook::h983af77c1a2e581b
8: 0x7f981b646921 - std::panicking::begin_panic::he426e15a3766089a
9: 0x7f981b62dc3a - std::panicking::begin_panic_fmt::hdddb415186c241e7
10: 0x7f981b6468be - rust_begin_unwind
11: 0x7f981b67cebf - core::panicking::panic_fmt::hf4e16cb7f0d41a25
12: 0x7f981756bef1 - core::result::unwrap_failed::he361ed66efb41daa
at ../src/libcore/macros.rs:29
13: 0x7f9817568671 - _<core..result..Result<T, E>>::expect::h916c1c9ac8d3ac38
at ../src/libcore/result.rs:747
14: 0x7f98175650b0 - glutin_app::window::Window::new::h20f7c31a0a63b85b
at /home/user/servo/ports/glutin/window.rs:162
15: 0x7f9817564680 - glutin_app::create_window::hb54113b9ee251b02
at /home/user/servo/ports/glutin/lib.rs:48
16: 0x7f98174219fe - servo::main::h6924e5658370f6b5
at /home/user/servo/components/servo/main.rs:105
17: 0x7f981b645cb8 - std::panicking::try::call::h852b0d5f2eec25e4
18: 0x7f981b650b1b - __rust_try
19: 0x7f981b650abe - __rust_maybe_catch_panic
20: 0x7f981b64575e - std::rt::lang_start::hfe4efe1fc39e4a30
21: 0x7f98175505a9 - main
22: 0x7f98146ce82f - __libc_start_main
23: 0x7f981741f968 - _start
24: 0x0 -
Servo exited with return value 101
When I trying to rebase code for Servo, I had trouble rebasing (and squashing) my changes.
The solution is inconvenient but is using sudo
.
Solution:
To start sudo git rebase -i HEAD~yourNumberHere
** Rebase as usual here until about save **
To quit :wq!
Implement Push Notifications (using Push API) so that users can receive valuable information notifications all within Janitor, if they desire.
I am planning on working on this, I am open to comments and ideas.
A quick description on the projects page for each project and what's included in it would be useful to those preparing to set up a contribution.
Particularly the KDE project could use this, as it's very unclear what components of the KDE project are included.
A link to the version control or primary documentation resource of each project wouldn't hurt either.
If I want to use it locally there is a documentations?
I think as example for an event or hackaton.
Currently, all machines on the Janitor are keyed to my own Cloud9 SSH public key.
To support users other than myself, the Janitor needs to:
On both a Dell XPS 13 and a Chromebook Pixel, noVNC doesn't seem to propage mouse events (click, right click, drag) whereas keyboard strokes work fine. On a Thinkpad W540, both mouse and keyboard events work fine.
I suspect the touchscreens in both the Dell and the Chromebook. See also novnc/noVNC#510.
It would be very convenient to have the app restart automatically whenever some files change. I believe there's many different solutions that would do that out there.
Splitting this issue from #24 (comment) for tracking purposes. Please react with ๐ if you like the split or feel free to close as dupe if you prefer to track exclusively with that issue.
@jankeromnes I was trying to access one of my accounts today (about 5 minutes ago was my latest attempt - it took me all day to find the time to open the Spam folder... :( ). I went to the website and signed in, I provide my email, and found the link. When I followed it, the website looked fine, then when I came to click any of the tabs (eg, Settings, Projects or Contributions) my account would log out and look the way it did before providing my email. I also tried the Sign out
button, this one was working as expected bringing me back to the main page. Not sure what to make of this...
I asked @JeremiePat about a good documentation strategy for Janitor, and he sent me this fantastic email:
When documenting a product the question you should ask yourself is: Who will need that documentation and for what purpose?
Regarding your project, I can identified two type of people: Developers who want to use Janitor and developers who want to hack it.For those who want to use it, I think you already have a good starting point with the Janitor Web site and the readme file in the github repository. In that area my suggestion would be to:
- enhance the readme file and mirror it on the Janitor web site.
- add a FAQ on both the web site and github to answer common install troubleshooting issues.
- create tutorials to demonstrate each individual user facing feature of Janitor, and make them available on the web site.
For those who want to hack it, it is a little bit more complicated as it is necessary to provide different information at different level:
- Providing a high level architecture document will help new comers to get use to the organization of the code base
- Provide building and testing documentation (with solution to well known issues)
- Also providing a document with the "rules" to follow for contributing (code standard, test policy, review process, etc.) This can safely live on the github wiki or on wikimo as you wish. Such documentation is usually quite fluid as it changes along the life of the project so a Wiki is a good place for that.
- For people who will hack the code, I always recommend to document as close as possible from the source code to avoid having people looking everywhere for information (it's time consuming and inefficient). However, if, for example you have a good documentation inline with the code, I always suggest to use tools (like Sphinx, Doxygen, JSDoc, etc.) to extract and build a more human friendly documentation. Such documentation can be host on the Janitor web site. The big advantage is that by using such tools in addition to a review requirement for inline documentation you'll get up to date documentation at a low cost.
This is a start, I suggest to prioritize the documentation work by asking new comers what information they are missing. This will give you a good hint of what is important in the short term. I also suggest to make documentation part of the acceptance criteria for pull request, that way you'll reduce the documentation debt (only legacy stuff will require some effort) and you'll start create a culture of documentation for the future which will make things easier along the way.
Additionally, I think we should:
If you have another idea that could improve Janitor's documentation, please comment below. Thanks!
@jankeromnes I was thinking of having a page that has a list of solutions for issues that get encountered when using The Janitor, perhaps a wiki page?
Janitor is in English at the moment, which is nice, but some people would probably be more comfortable using their native language there. Moreover, it's easier to implement a translating framework at the beginning of a project than later; so even if it's used only for English at the moment, it'd be nice to have.
Internationalization would probably be minimal work: I've just seen a few dates printed out on the website.
Username on C9 is also notriddle.
The Janitor started out installing Shipyard as a dependency, to allow scaling the Janitor to multiple hosts in the future if needed.
In the meantime, Docker implemented native clustering with Docker Swarm, so we might not need to depend on a third party tool for scaling issues anymore.
Once https://github.com/JanitorTechnology/janitor/projects/2#card-3182746 is done, we should be able to replace the "Edit in Cloud9" button in the screenshot below with a "connect to your container" or something along those lines, and skip connecting to Cloud9.
The link has this form: https://moz1.janitor.technology/<container>/8089/ide.html
(the container is the same as the one in the VNC
button).
I think it would be important to be able to view a list of connected devices for an account and remove a device from using Janitor.
The Makefile
currently offers a way to generate self-signed HTTPS certificates with make https
, which is used in make install
. (It also offers a way to just generate a CSR with make https.csr
, in order to manually get it signed by a trusted CA.)
This should be deprecated in favour of automated Let's Encrypt renewal. The code for this is already in place, and just needs to be automated.
Today, for every new contribution on the Janitor, there are a number of repetitive steps you need to perform in order to configure your environment properly. It would be great to automate these steps, e.g. by letting users add their desired configurations once and for all to their Janitor account, and automatically apply them to all your contributions.
Here are the configurations we'll aim to support:
.gitconfig
(to preconfigure e.g. user.name
, user.email
, core.editor
and credentials like bz.username
and bz.apikey
).gitignore
(to make sure contribution internals are ignored, e.g. the .c9/
folder in your workspace).hgrc
(to preconfigure ui.username
, enable extensions like mq
, specify the desired patch format).config/hub
and .netrc
to auto-configure hub like this.gdbinit
(e.g. to ignore SIG38
and SIG39
by default, and add add-auto-load-safe-path /home/user/firefox/.gdbinit
or set auto-load safe-path /
).eslintrc
.vimrc
.emacs
.nanorc
.bashrc
(e.g. for aliases, completion behavior, and to set a custom PS1 prompt).zshrc
If you feel that something important for your work is missing, please comment below and I'll update the list.
At the moment, when you want to contribute to janitor (through janitor), the docker host proxy will get confused, and use the same cookie and thus break the auth. This means that no static file will be served.
The current solution is to edit lib/sessions.js
to change the cookie name on the following lines:
Doing this will allow you to run the janitor app using node app
in the container's terminal, and access it on https://moz1.janitor.technology/<container>/8080/
If we were to use a random cookie name in those two lines, and store that cookie name in the DB for future uses, that should solve the issue.
I'm working on Servo, so contributions are made using GitHub. Since Janitor doesn't link to GitHub in any way, running git push
with the intent of creating a pull request asks for my GH username and password. Normally, this would work...
But I have two-factor authentication turned on. You can do it with a personal access token, but that is a gigantic pain.
Could we have the Janitor request a token itself with oAuth?
At the moment, users can sign in by clicking a link sent by email.
Here are other ways a user might want to use in order to sign in.
As @jankeromnes pointed out, the list should be split.
The first list is for sign-in only methods:
The second list is for signing in with/authorising other services and automating some features in interaction with these external services:
In order to guarantee a consistent coding style, and prevent some types of coding errors to enter the code base, we should:
error
argument, and every possible promise rejectionconst
everywhere possible, or let
otherwise (only in ES6/server code)null, 2
for every JSON.stringify
call// Do stuff.
) and function declaratation (e.g. function doStuff (thing) {
or exports.doStuff = function (thing) {
)if/else
and try/catch
blockHere are a few guidelines that I think should be respected:
c
but chunk
, not req
but request
, not values
but durations
etc.)Here are a few tools we could use:
I would be OK to enforce standard
for Janitor, even if it removes all semicolons. @bnjbvr @nt1m @Coder206 @notriddle or @espadrine, do you have any thoughts or preferences about linting our code?
As I can see after the registration on c9.io is required a princing plan.
But I can see that is only a ssh connection so i think that is possible to use it without c9.io.
When using a service that's hosted in a container, e.g. a Web service, then the user can access the Web service, and all the requests get proxied through Janitor (which does a simple redirect). However, some methods aren't getting properly redirected: I have seen instances where POST
, PUT
, DELETE
methods wouldn't ever reach the web service in the Docker instance.
After building Chromium content_unittests
in Cloud9, I'm failing to run
$ xvfb-run -s "-screen 0 1024x768x24" ./out/Default/content_unittests --gtest_filter=BluetoothAllowedDevicesMapTest.*
xvfb-run: error: Xvfb failed to start
For info, it works great with noVNC.
Today, once you've created a contribution environment for a project (bootstrapping from scratch in less than 3 seconds), you're pretty much left on your own for the rest of the work to finish your contribution and get it merged into the project upstream.
It would be great to automate most of the contribution process, and let the Janitor take care of any repetitive or time-consuming workflow steps for you. This can be achieved by customizing Cloud9 IDE for any given project.
Here are the Cloud9 IDE plugins we would like to build for most Janitor projects:
ctags
and clang-tidy
to allow symbolic navigation in the project's source code and offer powerful one-click fixes / refactors from the editor's UI, idea from @sylvestre)gdb
and rr
)If you have another idea how the Janitor's IDE could be tuned to accelerate/empower your development on a project, please explain it below and I'll add it to the list.
EDIT: Here is a great video lecture by Harvard University on Cloud9 IDE and how to write plugins for it.
I deleted the container, added it back, and it still won't open.
https://janitor.technology/UNIQ_ID/9876
This should hit /
in the web app.
This returns a 404. The web app logs don't show any traffic to /
.
If I correct the URL to use https://janitor.technology/UNIQ_ID/9876/
, it works. I think it would be simpler for the users to allow the trailing slash or add it if it's not there. Jan tells me on IRC it might be an issue when the proxy and the web app are hosted on the same physical host.
I am working on a website with some teammates, it would be nice to have access to the services of The Janitor to enhance the experience for everyone :)
@jankeromnes Great initiative, love this idea! :)
Sometimes, a contribution environment can become stale and irrelevant, to the point where it's more convenient to create a brand new one than to update the old. In that case, it's easier to just delete the old.
Really want to see that open source project be supported on the Janitor? Please comment here, and it will be added to the list (if that makes sense).
TODO:
A page that explain how works the project, the requirements to use (cloud9 account as example).
That video is not enough https://www.youtube.com/watch?v=5sNDMIh-iVw
Add the MIT AppInventor project on Janitor, following the Dockerfile:
https://github.com/josmas/appinventor-env-docker/blob/master/Dockerfile
There are several issues with project Dockerfiles that need to be fixed before the beta
milestone, specifically:
chrome_sandbox
for Chromium https://github.com/jankeromnes/dockerfiles/issues/4When closing the original terminal tab and opening a new one, some functions (like doing an interactive rebase) will not work anymore, because git cannot find an editor. This is due to the EDITOR
environment variable being unset.
Currently, an active Janitor instance offers root access over a web remote desktop connection (using NoVNC) to anyone who knows the right link.
Instead, only the owner of an instance should be able to access it. This could be enforced by an authenticated proxy that only grants remote desktop access to the owner of an instance.
Thanks @FrancoisChastel for the suggestion!
"[Use] modern web capabilities to deliver an app-like user experience." - https://developers.google.com/web/progressive-web-apps
The Janitor should:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.