New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Contributing with Janitor #35

Closed
etiennewan opened this Issue Jan 16, 2018 · 5 comments

Comments

Projects
None yet
5 participants
@etiennewan

etiennewan commented Jan 16, 2018

Hello,
We are hosting a platform named Janitor (https://janitor.technology) to bootstrap development containers for open-source projects.
We are interested into hosting the project and help you contribute faster.
I looked at your build instructions and it seems relatively simple to create a Dockerfile for our platform to clone the project, install all dependencies and build yuzu.
We feature a cloud IDE (powered by our own instances of Cloud9 IDE), Ubuntu containers running on bare metal servers, a desktop preview with noVNC and debug tools working out-of-the-box.

If you are interested in this idea, let's continue the discussion here for specific needs for your Dockerfile or meta questions. If you are not, feel free to close this issue.

Happy coding,
EtienneWan

@j-selby

This comment has been minimized.

Contributor

j-selby commented Jan 17, 2018

Hi! Thanks for the generous offer!

I'll let some other devs chime in, but it looks like it would work quite well.

Getting a Dockerfile going is trivial - we already use Docker in our normal build pipeline for Linux, so that shouldn't be too hard of a hurdle. Here is one which gets us most of the way: https://gist.github.com/j-selby/ae15ac5dafca1d8d56971e5007912daf

@etiennewan

This comment has been minimized.

etiennewan commented Jan 18, 2018

Pretty straight forward dockerfile indeed.
I think you should add the dockerfile to your repository (or organisation), and then set up Docker Hub automated build.
Once this is done, we will pull the image on our server and you will be able to spawn containers for yuzu.

For the dockerfile, here are my edits :

FROM janx/ubuntu-dev
MAINTAINER Selby "jselby@jselby.net"

RUN sudo apt-get update -q \
 && sudo apt-get install -y libqt5opengl5-dev libsdl2-dev libssl-dev qtbase5-dev

# We use a newer version of CMake then is provided by Ubuntu
RUN wget https://cmake.org/files/v3.10/cmake-3.10.1-Linux-x86_64.sh \
 && mkdir /home/user/cmake \
 && sh cmake-3.10.1-Linux-x86_64.sh --exclude-subdir --prefix=/home/user/cmake --skip-license
ENV PATH="/home/user/cmake/bin:${PATH}"

RUN git clone https://github.com/yuzu-emu/yuzu /home/user/yuzu --recursive \
 && mkdir /home/user/yuzu/build
WORKDIR /home/user/yuzu/build

# Build
RUN cmake .. -DYUZU_BUILD_UNICORN=ON -DCMAKE_BUILD_TYPE=Release \
 && make -j4

# Configure Cloud9 to use yuzu source directory as workspace (-w).
RUN sudo sed -i "s/-w \/home\/user/-w \/home\/user\/yuzu/" /etc/supervisord.conf

Maybe we should add a janitor.json file, but we'd better ask @jankeromnes for that. 😉

EDIT: I just added yuzu with a temporary image (without building yuzu) to janitor to let you spawn and test containers.

@jankeromnes

This comment has been minimized.

jankeromnes commented Jan 19, 2018

Super cool initiative! I see that most of the work to add Yuzu to Janitor is already done. 😄

Having the Dockerfile somewhere in this repo, and hooking the repo up as a Docker Hub automated build (takes like 3-5 clicks), would allow Docker Hub to detect any new commits to https://github.com/yuzu-emu/yuzu/ and rebuild the developer image automatically, keeping it up-to-date with no effort from anyone.

Adding a janitor.json configuration file is pretty easy too, and helps to (1) expose web ports via Janitor (but if your project doesn't need to expose web servers to its developers you can skip this), and more importantly (2) populate the IDE's Run button with useful project commands.

Adding a janitor.json to this development Dockerfile can be done like so. We just need to know a few useful commands that Yuzu developers use all the time (e.g. build, run, test, send patch, etc).

@jankeromnes

This comment has been minimized.

jankeromnes commented Jan 19, 2018

P.S.

  • ENV PATH="/home/user/cmake/bin:${PATH}" this needs to be echo'd into .bashrc as well, because ENV instructions don't transpire into user SSH sessions once the image is built. See this example.
  • make -j4 I think you could bump this to -j18 (event though Docker Hub's current infra doesn't have this, I believe it's more future-proof, and shouldn't impact current automated build times too much)
@chris062689

This comment has been minimized.

Member

chris062689 commented Jan 19, 2018

Hello!

Thank you for reaching out to us. We'd love to schedule a phone call to discuss this further.

Let us know when you are available!
yuzu@yuzu-emu.org

@bunnei bunnei closed this Mar 1, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment