Brett Smith [Sat, 7 Dec 2024 14:58:41 +0000 (09:58 -0500)]
22349: Refine Passenger agent install
* Don't call `install-agent` because `install-standalone-runtime` does
that anyway.
* Pass options to `install-standalone-runtime` more appropriate for a
postinst script that should either work or not.
Arvados-DCO-1.1-Signed-off-by: Brett Smith <brett.smith@curii.com>
Brett Smith [Sat, 30 Nov 2024 19:01:26 +0000 (14:01 -0500)]
22349: Run RailsAPI as a standalone Passenger service
The primary motivation for this is to be able to run Passenger with the
same version of Ruby that RailsAPI depends on. On RHEL8, the official
Passenger packages depend on the system Ruby 2.5, which is too old for
us to use.
A secondary benefit is that this simplifies installation for everyone by
eliminating the need for a separate Passenger install and nginx
integration.
A tertiary benefit is that the systemd service definition can better
handle some preparation work that we were previously doing in the
postinst script.
Arvados-DCO-1.1-Signed-off-by: Brett Smith <brett.smith@curii.com>
Brett Smith [Mon, 2 Dec 2024 17:16:10 +0000 (12:16 -0500)]
22349: Only remove arvados-api-server RPM files after final erasure
Without this, during `dnf reinstall arvados-api-server`, the %preun
scriptlet is called with an argument >0. The scriptlet removes
`/var/www/arvados-api/current/.bundle`, which causes `bundle` commands
in `postinst.sh` to fail.
Arvados-DCO-1.1-Signed-off-by: Brett Smith <brett.smith@curii.com>
Brett Smith [Wed, 27 Nov 2024 20:27:02 +0000 (15:27 -0500)]
22349: Streamline Rails build scripts
Mostly get rid of step2.sh, which was primarily there to add functions
to support upstart and systemd simultaneously. Now that upstart is out
of the picture, it's easy to ditch the whole file.
Similarly removed httpd detection code. That hasn't been tested for a
while either.
Arvados-DCO-1.1-Signed-off-by: Brett Smith <brett.smith@curii.com>
Brett Smith [Wed, 27 Nov 2024 19:49:11 +0000 (14:49 -0500)]
22349: Update RailsAPI package dependencies
This includes:
* Ruby dependencies that should declare that we no longer support RVM.
* Undeclared dependencies of the dependent gems and the postinst script.
* Dependencies of Passenger so we can run it standalone.
Arvados-DCO-1.1-Signed-off-by: Brett Smith <brett.smith@curii.com>
Brett Smith [Tue, 26 Nov 2024 22:07:08 +0000 (17:07 -0500)]
22349: Add RailsAPI Passengerfile
These are settings that we're willing to use across both development and
production. The hope is this can be a baseline for building a standalone
Passenger systemd service for deployment.
Arvados-DCO-1.1-Signed-off-by: Brett Smith <brett.smith@curii.com>
Brett Smith [Mon, 25 Nov 2024 16:45:11 +0000 (11:45 -0500)]
22317: Authorize additional keys from `compute_authorized_keys`
This serves two purposes. One, it gives the administrator a way to build
a compute node without having the dispatcher's private key. Two, it
simplifies development testing: you can just point this at your public
SSH key to build a node.
Arvados-DCO-1.1-Signed-off-by: Brett Smith <brett.smith@curii.com>
Brett Smith [Thu, 21 Nov 2024 20:20:52 +0000 (15:20 -0500)]
22317: Remove compute node image build.sh
It is replaced by a process where the user edits Ansible and Packer
configuration files in place, then runs the appropriate tool directly.
While it was nice that build.sh saved you from knowing the details of
how tools were configured, it was becoming more difficult to maintain as
we grew more options. It also requires the user to remember the full
build.sh command they used if they want to build a new version for a new
base AMI, new Arvados release, etc. This improves that situation by
letting the user keep configuration files they can keep and update as
needed.
Arvados-DCO-1.1-Signed-off-by: Brett Smith <brett.smith@curii.com>
Brett Smith [Tue, 19 Nov 2024 14:25:18 +0000 (09:25 -0500)]
22317: Replace compute image base.sh with an Ansible playbook
The hope is that this will be more maintainable and extendable, and
allow us to start building towards a general Ansible installer.
This Ansible playbook was written and tested against Ansible 8.7.0,
because Ansible 8.x seems to be the version that supports most of the
Pythons we care about. This might need refinement in the future.
The Ansible playbook supports all the same deployment configurations as
base.sh, but there are some differences in the way it goes about things:
* It no longer configures GRUB for cgroups v1 because Arvados supports
cgroups v2 now.
* It installs software to /opt instead of /var/lib/arvados, because
software doesn't belong in /var and none of this is Arvados software
specifically looking for that path.
* It only installs either Docker or Singularity as required, not both.
* It builds Singularity in a temporary directory that it cleans up
afterwards to save space in the AMI.
* It sets up the encrypted partition script as a systemd service rather
than a cloud-init script so we can be more explicit about the ordering
requirements. The service orders itself before SSH so it has a chance to
finish before the Crunch dispatcher is able to SSH in. If it fails, that
will be reflected in systemctl's system state, and therefore our default
BootProbeCommand as well.
Arvados-DCO-1.1-Signed-off-by: Brett Smith <brett.smith@curii.com>
Brett Smith [Mon, 11 Nov 2024 16:29:11 +0000 (11:29 -0500)]
22217: Pin cuda package version
Recent versions depend on more recent versions of the NVIDIA driver than
we want to install. This basically keeps the cuda version in sync with
the driver version we've already pinned.
Arvados-DCO-1.1-Signed-off-by: Brett Smith <brett.smith@curii.com>
Brett Smith [Fri, 8 Nov 2024 21:53:59 +0000 (16:53 -0500)]
22217: Modernize NVIDIA repository setup
The main functional thing this accomplishes is using the CUDA keyring
package instead of the old individual key files. It also uses new
source setup patterns.
Arvados-DCO-1.1-Signed-off-by: Brett Smith <brett.smith@curii.com>
Brett Smith [Fri, 8 Nov 2024 21:31:06 +0000 (16:31 -0500)]
22217: Consolidate apt configuration and installation
Rather than having all this scattered across the build script, first
configure apt as much as possible, then install packages, then configure
those packages.
This makes it easier to see what the entire apt configuration is. It
also makes the compute script run faster since it reduces the number of
times apt has to load the package database.
Arvados-DCO-1.1-Signed-off-by: Brett Smith <brett.smith@curii.com>