No project description provided
Project description
r-shepard
Simple, self-hosted solution for collaborative (not real-time) R computing leveraging podman, RStudio, and Tailscale.
Built with Django and HTMX.
Develop
First start the development environment:
devenv up # starts redis, celery worker and celery beat
run-tests # runs the tests
Then start the Django development server:
python manage.py runserver # This could also be done from your IDE / debugging environment
Installation instructions (Ubuntu 22.04).
Requirements
- Install podman (used for running RStudio containers), git (needed for auto-commit functionality), and redis-server (needed for celery which is used for scheduling the auto-commit tasks).
sudo apt install podman git redis-server
Prepare the environment
First, it's advised to create a new system user for the application:
sudo adduser -r -M r-shepard
This user should be able to run podman
without sudo
. To do this, assign
subordinate group and user ID ranges to the user:
echo "r-shepard:100000:65536" | sudo tee -a /etc/subuid
echo "r-shepard:100000:65536" | sudo tee -a /etc/subgid
The user should also be able to run tailscale
without sudo
. To do this,
start tailscale with the --operator=<user>
flag:
sudo tailscale up --operator=r-shepard
Then, switch to your new system user and install the application:
pip install r-shepard
Then, apply the migrations:
DB_PATH=/home/r-shepard/db.sqlite r-shepard migrate
Next, generate the static files
Then, you're ready to run the application:
daphne -b 0.0.0.0 -p 8000 r_shepard.asgi:application
Now add a systemd service file for the application:
r-shepard systemd # Not implemented yet
cp services/* /etc/systemd/system/
sudo systemctl daemon-reload
Open ports
If you want to access application from inside the university network, you need to open the ports 40000 to 41000.
sudo ufw allow 40000:41000/tcp # This could be improved by allowing traffic only from the OSI network (or using something like Nebula)
Minimum Viable Product
- Create admin command for creating systemd services
- Add installation instructions for Ubuntu 22.04
-
gitwatch integrationRolled my own solution. Need to document and integrate it into the UI. - Remove tailscale as
tailscale serve/funnel
does not work (see this issue). - Publish on PyPi
-
Add views for project creationDjango admin is enough for now. - Test R Project/Package management inside the container (e.g.
renv
) - Add Volume management
- Setup Frontend framework (e.g.
Bootstrap, PicoCSS) - Setup 2FA
- Add Tailscale Serve integration
- Add basic container management via podman
- Add basic views for projects and container management
-
Add Tailscale Funnel integrationNot needed right now -
Make it possible to assign users to projects (only superusers should be able to create projects and assign users to them)Not needed right now
Potential Future Features
- LDAP integration
- container-specific and user-specific auto-commits
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for r_shepard-0.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a482e792f81babe94542b323a266336d20f37cac56552a72ee97304e8afc727e |
|
MD5 | 67e5630358ef9925c188248639c93e68 |
|
BLAKE2b-256 | 87a87e2d726796ed0a1fa5e3a37bb1b0104fd4aac6553146c4e148e0c5e5b20c |