Skip to content
This repository has been archived by the owner on May 6, 2024. It is now read-only.

Commit

Permalink
feat: update Ruby version from 2.5.7 to 3.0.4 for cs_comment_service
Browse files Browse the repository at this point in the history
  • Loading branch information
SaadYousaf authored and saadyousafarbi committed Jul 25, 2023
1 parent 921bd4c commit 420bebd
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 5 deletions.
4 changes: 3 additions & 1 deletion playbooks/roles/forum/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ forum_rbenv_dir: "{{ forum_app_dir }}"
forum_rbenv_root: "{{ forum_app_dir }}/.rbenv"
forum_rbenv_shims: "{{ forum_rbenv_root }}/shims"
forum_rbenv_bin: "{{ forum_rbenv_root }}/bin"
forum_gemfile: 'Gemfile3'
forum_supervisor_wrapper: "{{ forum_app_dir }}/forum-supervisor.sh"
forum_gem_root: "{{ forum_rbenv_dir }}/.gem"
forum_gem_bin: "{{ forum_gem_root }}/bin"
Expand Down Expand Up @@ -63,6 +64,7 @@ FORUM_REBUILD_INDEX: false
FORUM_ENABLE_MONGODB_INDEXES: false

forum_base_env: &forum_base_env
BUNDLE_GEMFILE: "{{ forum_gemfile }}"
RBENV_ROOT: "{{ forum_rbenv_root }}"
GEM_HOME: "{{ forum_gem_root }}"
GEM_PATH: "{{ forum_gem_root }}"
Expand Down Expand Up @@ -100,7 +102,7 @@ devstack_forum_env:
MONGOID_AUTH_MECH: "{{ FORUM_MONGO_AUTH_MECH }}"

forum_user: "forum"
FORUM_RUBY_VERSION: "2.5.7"
FORUM_RUBY_VERSION: "3.0.4"
forum_source_repo: "https://github.com/openedx/cs_comments_service.git"
FORUM_VERSION: "master"

Expand Down
11 changes: 10 additions & 1 deletion playbooks/roles/forum/tasks/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,17 @@
- install
- install:code

- name: configure comments service bundle
shell: "bundle config set --local deployment 'true' chdir={{ forum_code_dir }}"
become_user: "{{ forum_user }}"
environment: "{{ forum_base_env }}"
notify: restart the forum service
tags:
- install
- install:app-requirements

- name: install comments service bundle
shell: "bundle install --deployment --path {{ forum_gem_root }} chdir={{ forum_code_dir }}"
shell: "bundle install chdir={{ forum_code_dir }}"
become_user: "{{ forum_user }}"
environment: "{{ forum_base_env }}"
notify: restart the forum service
Expand Down
8 changes: 5 additions & 3 deletions playbooks/roles/rbenv/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
---

RBENV_VERSION: 'v1.0.0'
RBENV_BUNDLER_VERSION: '1.11.2'
RBENV_RAKE_VERSION: '10.4.2'
RBENV_BUNDLER_VERSION: '2.3.4'
RBENV_RAKE_VERSION: '13.0.6'
rbenv_root: "{{ rbenv_dir }}/.rbenv"
rbenv_gem_root: "{{ rbenv_dir }}/.gem"
rbenv_gem_bin: "{{ rbenv_gem_root }}/bin"
RBENV_RUBYGEMS_VERSION: '2.7.8'
rbenv_gemfile: 'Gemfile3'
RBENV_RUBYGEMS_VERSION: '3.2.33'
rbenv_bin: "{{ rbenv_dir }}/.rbenv/bin"
rbenv_shims: "{{ rbenv_root }}/shims"
rbenv_path: "{{ rbenv_bin }}:{{ rbenv_shims }}:{{ rbenv_gem_bin }}:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
Expand All @@ -20,6 +21,7 @@ rbenv_debian_pkgs:
- libxslt1-dev
- zlib1g-dev
rbenv_environment:
BUNDLE_GEMFILE: "{{ rbenv_gemfile }}"
RBENV_ROOT: "{{ rbenv_root }}"
GEM_ROOT: "{{ rbenv_gem_root }}"
GEM_HOME: "{{ rbenv_gem_root }}"
Expand Down

0 comments on commit 420bebd

Please sign in to comment.