This strips leading "development-" from the generated version string.
Version strings are derived from tags, which are usually just the bare
version number. However, in order to get development versions to
interact properly with release branches, we sometimes need to apply
version tags with a "development-" prefix to the main branch.
no issue #
Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz@curii.com>
Stephen Smith [Tue, 3 Dec 2024 15:11:01 +0000 (10:11 -0500)]
22116: Convert WebSocketService to singleton
Allows easier status checking without involving the store
Moves connection parameter initialization to connect() so that
consumers checking connection status need not pass config params
on the constructor / getInstance
Arvados-DCO-1.1-Signed-off-by: Stephen Smith <stephen@curii.com>
Brett Smith [Mon, 2 Dec 2024 22:02:53 +0000 (17:02 -0500)]
22364: Improve gem version construction
* Consider dependencies when constructing a development timestamp,
including version-at-commit.sh.
* For internal dependencies, use ~> for development dependencies,
== otherwise.
This ports the arvados_version.py logic from #21601 into Ruby.
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>