diff --git a/CHANGELOG.md b/CHANGELOG.md index da0a679c0..0472470b3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,8 +3,11 @@ - Improved display of the icons alerting about an outdated version - Improved mime-type checking (back & front) - Updated CarrierWave to 2.1.0 +- Updated redis to v6, with alpine image +- Updated Sidekiq to 6.0.7 - Fix a bug: managers do not see the name of the user who reserved a slot - [TODO DEPLOY] `rails fablab:setup:env_to_db` +- [TODO DEPLOY] `\curl -sSL https://raw.githubusercontent.com/sleede/fab-manager/master/scripts/redis-upgrade.sh | bash` ## v4.4.4 2020 May 25 diff --git a/Gemfile b/Gemfile index 6e81bccab..3c657889d 100644 --- a/Gemfile +++ b/Gemfile @@ -96,9 +96,7 @@ gem 'friendly_id', '~> 5.1.0' gem 'aasm' # Background job processing -gem 'redis-namespace' -gem 'sidekiq', '>= 3.4.2' -gem 'sinatra', require: false +gem 'sidekiq', '>= 6.0.7' # Recurring jobs for Sidekiq gem 'sidekiq-cron' diff --git a/Gemfile.lock b/Gemfile.lock index 4ad8799ae..fec4b3363 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -116,7 +116,7 @@ GEM sass-rails (< 5.1) sprockets (< 4.0) concurrent-ruby (1.1.6) - connection_pool (2.2.2) + connection_pool (2.2.3) coveralls (0.8.23) json (>= 1.8, < 3) simplecov (~> 0.16.1) @@ -250,8 +250,6 @@ GEM multi_json (1.14.1) multi_xml (0.6.0) multipart-post (2.1.1) - mustermann (1.1.1) - ruby2_keywords (~> 0.0.1) nio4r (2.5.2) nokogiri (1.10.9) mini_portile2 (~> 2.4.0) @@ -347,9 +345,7 @@ GEM recurrence (1.3.0) activesupport i18n - redis (4.1.3) - redis-namespace (1.6.0) - redis (>= 3.0.4) + redis (4.1.4) repost (0.3.2) responders (2.4.1) actionpack (>= 4.2.0, < 6.0) @@ -367,7 +363,6 @@ GEM ruby-rc4 (0.1.5) ruby-vips (2.0.17) ffi (~> 1.9) - ruby2_keywords (0.0.2) rubyzip (1.3.0) safe_yaml (1.0.5) sass (3.4.25) @@ -386,11 +381,11 @@ GEM activerecord (>= 4) activesupport (>= 4) sha3 (1.0.1) - sidekiq (5.2.7) - connection_pool (~> 2.2, >= 2.2.2) - rack (>= 1.5.0) - rack-protection (>= 1.5.0) - redis (>= 3.3.5, < 5) + sidekiq (6.0.7) + connection_pool (>= 2.2.2) + rack (~> 2.0) + rack-protection (>= 2.0.0) + redis (>= 4.1.0) sidekiq-cron (1.1.0) fugit (~> 1.1) sidekiq (>= 4.2.1) @@ -399,11 +394,6 @@ GEM json (>= 1.8, < 3) simplecov-html (~> 0.10.0) simplecov-html (0.10.2) - sinatra (2.0.8.1) - mustermann (~> 1.0) - rack (~> 2.0) - rack-protection (= 2.0.8.1) - tilt (~> 2.0) spring (2.0.2) activesupport (>= 4.2) spring-watcher-listen (2.0.1) @@ -516,7 +506,6 @@ DEPENDENCIES rails_12factor rb-readline recurrence - redis-namespace repost responders (~> 2.0) rolify @@ -526,9 +515,8 @@ DEPENDENCIES sdoc (~> 0.4.0) seed_dump sha3 - sidekiq (>= 3.4.2) + sidekiq (>= 6.0.7) sidekiq-cron - sinatra spring spring-watcher-listen (~> 2.0.0) stripe (= 5.1.1) diff --git a/README.md b/README.md index 85ca8fa94..41918d48e 100644 --- a/README.md +++ b/README.md @@ -28,8 +28,8 @@ Fab-manager is a Ruby on Rails / AngularJS web application that runs on the foll - Ubuntu LTS 14.04+ / Debian 8+ - Ruby 2.6 -- Redis 2.8.4+ -- Sidekiq 3.3.4+ +- Redis 6 +- Sidekiq 6 - Elasticsearch 5.6 - PostgreSQL 9.6 diff --git a/config/initializers/sidekiq.rb b/config/initializers/sidekiq.rb index dfb92c5d4..8c957c3a8 100644 --- a/config/initializers/sidekiq.rb +++ b/config/initializers/sidekiq.rb @@ -1,16 +1,10 @@ # frozen_string_literal: true -namespace = if Rails.env.staging? - 'fablab_staging' - else - 'fablab' - end - redis_host = ENV['REDIS_HOST'] || 'localhost' redis_url = "redis://#{redis_host}:6379" Sidekiq.configure_server do |config| - config.redis = { url: redis_url, namespace: namespace } + config.redis = { url: redis_url } # load sidekiq-cron schedule config schedule_file = 'config/schedule.yml' @@ -22,7 +16,7 @@ Sidekiq.configure_server do |config| end Sidekiq.configure_client do |config| - config.redis = { url: redis_url, namespace: namespace } + config.redis = { url: redis_url } end Sidekiq::Extensions.enable_delay! diff --git a/docker/development/docker-compose.yml b/docker/development/docker-compose.yml index 5397f7cd5..af5d4e3c5 100644 --- a/docker/development/docker-compose.yml +++ b/docker/development/docker-compose.yml @@ -52,7 +52,7 @@ services: # - "5601:5601" redis: - image: redis:5 + image: redis:6-alpine volumes: - ${PWD}/redis:/data restart: always diff --git a/scripts/redis-upgrade.sh b/scripts/redis-upgrade.sh new file mode 100755 index 000000000..b023a52b9 --- /dev/null +++ b/scripts/redis-upgrade.sh @@ -0,0 +1,86 @@ +#!/usr/bin/env bash + +config() +{ + if [ "$(whoami)" = "root" ] + then + echo "It is not recommended to run this script as root. As a normal user, elevation will be prompted if needed." + read -rp "Continue anyway? (Y/n) " confirm