Differences between revisions 1 and 17 (spanning 16 versions)
Revision 1 as of 2021-09-15 19:02:04
Size: 875
Editor: Praveen A
Comment: start initial page
Revision 17 as of 2021-10-12 20:51:09
Size: 3232
Editor: Praveen A
Comment: nginx now takes hostname via debconf prompt during installation
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
Pupilfirst (https://www.pupilfirst.com/) is a Free Software Learning Management system written in Ruby on Rails. Currently they only support delpying to heroku. This page will be used to keep track of packaging pupilfirst for Debian. Pupilfirst (https://www.pupilfirst.com/) is a Free Software Learning Management system written in Ruby on Rails. Currently they only support deploying to heroku. This page will be used to keep track of packaging pupilfirst for Debian.
Line 3: Line 3:
Work in progress Repo: https://salsa.debian.org/ruby-team/pupilfirst  * Work in progress package repo: https://people.debian.org/~praveen/pupilfirst/
 * Work in progress source package
: https://salsa.debian.org/ruby-team/pupilfirst
Line 5: Line 6:
Reference: [[Teams/Ruby/Packaging/RailsApps]]  * Packaging status : https://debian.fosscommunity.in/status/pupilfirst-8ad21ec3642415c0bbc40a432ed8abfddcf76471/

 * Reference: [[Teams/Ruby/Packaging/RailsApps]]

== Experimental ==

Add personal repo of pupilfirst maintainer following https://people.debian.org/~praveen/pupilfirst/README

{{{
$ sudo apt install ruby-rails/experimental ruby-actioncable/experimental \
ruby-actionmailbox/experimental ruby-actionmailer/experimental \
ruby-actionpack/experimental ruby-actiontext/experimental \
ruby-actionview/experimental ruby-activejob/experimental ruby-activemodel/experimental \
ruby-activerecord/experimental ruby-activestorage/experimental \
ruby-activesupport/experimental ruby-railties/experimental \
ruby-tzinfo/experimental pupilfirst
}}}

Currently fqdn is hard coded to 'pupilfirst' in puma (ASSET_HOME environment variable) configuration (nginx takes the value from debconf question but you should use 'pupilfirst' only till puma configuration is also fixed). So map your server ip address to 'pupilfirst' hostname in `/etc/hosts` file on your client.

{{{
# /etc/hosts on client machine
127.0.0.1 pupilfirst
}}}

Visit http://pupilfirst on your browser to see the default page.

TODO: This hardcoding should be replaced with a debconf question

Start rails console,
{{{
$ source /usr/lib/pupilfirst/scripts/env.sh
$ cd /usr/share/pupilfirst/
$ sudo -u pupilfirst -EH bundle exec rails console
}}}

and follow upstream documentation to configure your instance https://github.com/pupilfirst/pupilfirst/blob/master/docs/developers/docs/heroku.md#set-up-a-user-to-sign-in-with
Line 8: Line 45:
Upstream meta issue for tracking issues that need help from upstream - https://github.com/pupilfirst/pupilfirst/issues/797
Line 10: Line 49:
 1. Configure database - in progress (need to provide a working config/database.yml)
 1. Run database migrations - in progress (https://github.com/pupilfirst/pupilfirst/issues/797)
 1. Install node dependencies - not started
 1. Precompile assets - not started
 1. Configure puma - not started
 1. Configure nginx - not started
 1. Configure systemd units - not started
 1. Configure database - done (need to provide a working config/database.yml)
 1. Run database migrations - done
 1. Install node dependencies - done (needed some symlink magic)
 1. Precompile assets (includes webpacker) - done (needed to copy source tree to /var as symlinking some directories don't work)
 1. Start rails app - done (use local storage over amazon s3, create tmpfiles.d config for pids and sockets, need to disable https)
 1. Configure puma - done (needed to set PATH explicitly for execjs to detect nodejs)
 1. Configure systemd units - done (needed to set PATH explicitly for execjs to detect nodejs)
 1. Configure nginx - done (todo: switch to unix socket)
 1. Set admin password and add school - in progress (done manually, need upstream help to enable login via username)
 1. Properly generate keys and remove hard coding - not started
 1. Setup debconf for choosing hostname and https - not started

Pupilfirst (https://www.pupilfirst.com/) is a Free Software Learning Management system written in Ruby on Rails. Currently they only support deploying to heroku. This page will be used to keep track of packaging pupilfirst for Debian.

Experimental

Add personal repo of pupilfirst maintainer following https://people.debian.org/~praveen/pupilfirst/README

$ sudo apt install ruby-rails/experimental ruby-actioncable/experimental \
ruby-actionmailbox/experimental ruby-actionmailer/experimental \
ruby-actionpack/experimental ruby-actiontext/experimental \
ruby-actionview/experimental ruby-activejob/experimental ruby-activemodel/experimental \
ruby-activerecord/experimental ruby-activestorage/experimental \
ruby-activesupport/experimental ruby-railties/experimental \
ruby-tzinfo/experimental pupilfirst

Currently fqdn is hard coded to 'pupilfirst' in puma (ASSET_HOME environment variable) configuration (nginx takes the value from debconf question but you should use 'pupilfirst' only till puma configuration is also fixed). So map your server ip address to 'pupilfirst' hostname in /etc/hosts file on your client.

# /etc/hosts on client machine
127.0.0.1 pupilfirst

Visit http://pupilfirst on your browser to see the default page.

TODO: This hardcoding should be replaced with a debconf question

Start rails console,

$ source /usr/lib/pupilfirst/scripts/env.sh
$ cd /usr/share/pupilfirst/
$ sudo -u pupilfirst -EH bundle exec rails console

and follow upstream documentation to configure your instance https://github.com/pupilfirst/pupilfirst/blob/master/docs/developers/docs/heroku.md#set-up-a-user-to-sign-in-with

Current status

Upstream meta issue for tracking issues that need help from upstream - https://github.com/pupilfirst/pupilfirst/issues/797

  1. Basic package template - done
  2. Install rubygems dependencies (pull unpackaged gems from rubygems.org) - done
  3. Configure database - done (need to provide a working config/database.yml)
  4. Run database migrations - done
  5. Install node dependencies - done (needed some symlink magic)
  6. Precompile assets (includes webpacker) - done (needed to copy source tree to /var as symlinking some directories don't work)
  7. Start rails app - done (use local storage over amazon s3, create tmpfiles.d config for pids and sockets, need to disable https)
  8. Configure puma - done (needed to set PATH explicitly for execjs to detect nodejs)
  9. Configure systemd units - done (needed to set PATH explicitly for execjs to detect nodejs)
  10. Configure nginx - done (todo: switch to unix socket)
  11. Set admin password and add school - in progress (done manually, need upstream help to enable login via username)
  12. Properly generate keys and remove hard coding - not started
  13. Setup debconf for choosing hostname and https - not started