From ddf811e098b80ab1c5625b74add8b23a57886cab Mon Sep 17 00:00:00 2001 From: Brett Smith Date: Thu, 10 Oct 2024 16:33:26 -0400 Subject: [PATCH] 21905: Remove RVM support hooks from Salt installer All this code is doubly obsolete: * The Arvados API server package no longer supports RVM. * All these RVM branches are only here to support distributions that we no longer support. Arvados-DCO-1.1-Signed-off-by: Brett Smith --- .../aws/pillars/nginx_passenger.sls | 4 ---- .../multi_host/aws/states/passenger_rvm.sls | 24 ------------------- .../pillars/nginx_passenger.sls | 7 ------ .../states/passenger_rvm.sls | 24 ------------------- .../pillars/nginx_passenger.sls | 7 ------ .../single_hostname/states/passenger_rvm.sls | 24 ------------------- 6 files changed, 90 deletions(-) diff --git a/tools/salt-install/config_examples/multi_host/aws/pillars/nginx_passenger.sls b/tools/salt-install/config_examples/multi_host/aws/pillars/nginx_passenger.sls index 0c9ef1c36e..090c4290c4 100644 --- a/tools/salt-install/config_examples/multi_host/aws/pillars/nginx_passenger.sls +++ b/tools/salt-install/config_examples/multi_host/aws/pillars/nginx_passenger.sls @@ -9,9 +9,6 @@ {%- set passenger_mod = '/usr/lib64/nginx/modules/ngx_http_passenger_module.so' if grains.osfinger in ('CentOS Linux-7',) else '/usr/lib/nginx/modules/ngx_http_passenger_module.so' %} -{%- set passenger_ruby = '/usr/local/rvm/wrappers/default/ruby' - if grains.osfinger in ('CentOS Linux-7', 'Ubuntu-18.04', 'Debian-10') else - '/usr/bin/ruby' %} {%- set _workers = ("__CONTROLLER_MAX_WORKERS__" or grains['num_cpus']*2)|int %} {%- set max_workers = [_workers, 8]|max %} {%- set max_reqs = ("__CONTROLLER_MAX_QUEUED_REQUESTS__" or 128)|int %} @@ -24,7 +21,6 @@ nginx: passenger_package: {{ passenger_pkg }} ### PASSENGER passenger: - passenger_ruby: {{ passenger_ruby }} passenger_max_pool_size: {{ max_workers }} # Make the passenger queue small (twice the concurrency, so diff --git a/tools/salt-install/config_examples/multi_host/aws/states/passenger_rvm.sls b/tools/salt-install/config_examples/multi_host/aws/states/passenger_rvm.sls index cb4bc1a1f9..32e872060b 100644 --- a/tools/salt-install/config_examples/multi_host/aws/states/passenger_rvm.sls +++ b/tools/salt-install/config_examples/multi_host/aws/states/passenger_rvm.sls @@ -17,27 +17,3 @@ extra_var_www_passenger: - group: {{ group }} - mode: '0755' - makedirs: True - -{%- if grains.osfinger in ('CentOS Linux-7', 'Ubuntu-18.04', 'Debian-10') %} -# Work around passenger issue when RVM is in use, cf -# https://dev.arvados.org/issues/19015 -extra_nginx_set_gem_home: - file.managed: - - name: /etc/systemd/system/nginx.service.d/override.conf - - mode: '0644' - - user: root - - group: root - - makedirs: True - - replace: False - - contents: | - [Service] - ExecStart= - ExecStart=/bin/bash -a -c "GEM_HOME=`[ -x /usr/local/rvm/bin/rvm-exec ] && /usr/local/rvm/bin/rvm-exec default env |grep GEM_HOME=|cut -f2 -d= || true` && /usr/sbin/nginx -g 'daemon on; master_process on;'" - cmd.run: - - name: systemctl daemon-reload - - require: - - file: extra_nginx_set_gem_home - - file: extra_var_www_passenger - - onchanges: - - file: extra_nginx_set_gem_home -{%- endif -%} diff --git a/tools/salt-install/config_examples/single_host/multiple_hostnames/pillars/nginx_passenger.sls b/tools/salt-install/config_examples/single_host/multiple_hostnames/pillars/nginx_passenger.sls index cf08779715..4c1f20bee3 100644 --- a/tools/salt-install/config_examples/single_host/multiple_hostnames/pillars/nginx_passenger.sls +++ b/tools/salt-install/config_examples/single_host/multiple_hostnames/pillars/nginx_passenger.sls @@ -9,23 +9,16 @@ {%- set passenger_mod = '/usr/lib64/nginx/modules/ngx_http_passenger_module.so' if grains.osfinger in ('CentOS Linux-7',) else '/usr/lib/nginx/modules/ngx_http_passenger_module.so' %} -{%- set passenger_ruby = '/usr/local/rvm/wrappers/default/ruby' - if grains.osfinger in ('CentOS Linux-7', 'Ubuntu-18.04', 'Debian-10') else - '/usr/bin/ruby' %} ### NGINX nginx: __NGINX_INSTALL_SOURCE__: true lookup: passenger_package: {{ passenger_pkg }} - ### PASSENGER - passenger: - passenger_ruby: {{ passenger_ruby }} ### SERVER server: config: - # Needed for RVM, harmless otherwise. Cf. https://dev.arvados.org/issues/19015 env: GEM_HOME # As we now differentiate where passenger is required or not, we need to # load this module conditionally, so we add this conditional just to use diff --git a/tools/salt-install/config_examples/single_host/multiple_hostnames/states/passenger_rvm.sls b/tools/salt-install/config_examples/single_host/multiple_hostnames/states/passenger_rvm.sls index cb4bc1a1f9..32e872060b 100644 --- a/tools/salt-install/config_examples/single_host/multiple_hostnames/states/passenger_rvm.sls +++ b/tools/salt-install/config_examples/single_host/multiple_hostnames/states/passenger_rvm.sls @@ -17,27 +17,3 @@ extra_var_www_passenger: - group: {{ group }} - mode: '0755' - makedirs: True - -{%- if grains.osfinger in ('CentOS Linux-7', 'Ubuntu-18.04', 'Debian-10') %} -# Work around passenger issue when RVM is in use, cf -# https://dev.arvados.org/issues/19015 -extra_nginx_set_gem_home: - file.managed: - - name: /etc/systemd/system/nginx.service.d/override.conf - - mode: '0644' - - user: root - - group: root - - makedirs: True - - replace: False - - contents: | - [Service] - ExecStart= - ExecStart=/bin/bash -a -c "GEM_HOME=`[ -x /usr/local/rvm/bin/rvm-exec ] && /usr/local/rvm/bin/rvm-exec default env |grep GEM_HOME=|cut -f2 -d= || true` && /usr/sbin/nginx -g 'daemon on; master_process on;'" - cmd.run: - - name: systemctl daemon-reload - - require: - - file: extra_nginx_set_gem_home - - file: extra_var_www_passenger - - onchanges: - - file: extra_nginx_set_gem_home -{%- endif -%} diff --git a/tools/salt-install/config_examples/single_host/single_hostname/pillars/nginx_passenger.sls b/tools/salt-install/config_examples/single_host/single_hostname/pillars/nginx_passenger.sls index 26e2baf044..dc804dd1b4 100644 --- a/tools/salt-install/config_examples/single_host/single_hostname/pillars/nginx_passenger.sls +++ b/tools/salt-install/config_examples/single_host/single_hostname/pillars/nginx_passenger.sls @@ -9,23 +9,16 @@ {%- set passenger_mod = '/usr/lib64/nginx/modules/ngx_http_passenger_module.so' if grains.osfinger in ('CentOS Linux-7',) else '/usr/lib/nginx/modules/ngx_http_passenger_module.so' %} -{%- set passenger_ruby = '/usr/local/rvm/wrappers/default/ruby' - if grains.osfinger in ('CentOS Linux-7', 'Ubuntu-18.04', 'Debian-10') else - '/usr/bin/ruby' %} ### NGINX nginx: __NGINX_INSTALL_SOURCE__: true lookup: passenger_package: {{ passenger_pkg }} - ### PASSENGER - passenger: - passenger_ruby: {{ passenger_ruby }} ### SERVER server: config: - # Needed for RVM, harmless otherwise. Cf. https://dev.arvados.org/issues/19015 env: GEM_HOME # As we now differentiate where passenger is required or not, we need to # load this module conditionally, so we add this conditional just to use diff --git a/tools/salt-install/config_examples/single_host/single_hostname/states/passenger_rvm.sls b/tools/salt-install/config_examples/single_host/single_hostname/states/passenger_rvm.sls index cb4bc1a1f9..32e872060b 100644 --- a/tools/salt-install/config_examples/single_host/single_hostname/states/passenger_rvm.sls +++ b/tools/salt-install/config_examples/single_host/single_hostname/states/passenger_rvm.sls @@ -17,27 +17,3 @@ extra_var_www_passenger: - group: {{ group }} - mode: '0755' - makedirs: True - -{%- if grains.osfinger in ('CentOS Linux-7', 'Ubuntu-18.04', 'Debian-10') %} -# Work around passenger issue when RVM is in use, cf -# https://dev.arvados.org/issues/19015 -extra_nginx_set_gem_home: - file.managed: - - name: /etc/systemd/system/nginx.service.d/override.conf - - mode: '0644' - - user: root - - group: root - - makedirs: True - - replace: False - - contents: | - [Service] - ExecStart= - ExecStart=/bin/bash -a -c "GEM_HOME=`[ -x /usr/local/rvm/bin/rvm-exec ] && /usr/local/rvm/bin/rvm-exec default env |grep GEM_HOME=|cut -f2 -d= || true` && /usr/sbin/nginx -g 'daemon on; master_process on;'" - cmd.run: - - name: systemctl daemon-reload - - require: - - file: extra_nginx_set_gem_home - - file: extra_var_www_passenger - - onchanges: - - file: extra_nginx_set_gem_home -{%- endif -%} -- 2.30.2