PhDLeToanThang / ucs

UCs include: Big Blue Button - bbb [2x], Red5, Webinar in Education and Enterprise Healthcare Control IoT
MIT License
1 stars 0 forks source link

Tích hợp Validating mod_bigbluebuttonbn với Moodle 4.02 #2

Closed PhDLeToanThang closed 2 weeks ago

PhDLeToanThang commented 3 weeks ago

Validating mod_bigbluebuttonbn ... Error [Error] A higher version of this plugin is already installed [2022041901] Installation aborted due to validation failure.

Link bbb plugin: https://moodle.org/plugins/mod_bigbluebuttonbn?_gl=1*1g4b6rs*_ga*MjEzMTI0ODgwMi4xNzIzODU4MzA0*_ga_QWYJYEY9P5*MTcyMzg1ODMwNC4xLjAuMTcyMzg1ODMwNC4wLjAuMA..

This GitHub repository at: https://github.com/blindsidenetworks/moodle-mod_bigbluebuttonbn/

PhDLeToanThang commented 3 weeks ago

Chúng ta cần thực hiện một số Check list step by step:

bbb 2.7.11

terminal: free -h

image

$cat /etc/lsb-release

image

$ uname -m

image

$ ip addr | grep inet6

inet6 ::1/128 scope host

image

$ uname -r

image

$ grep -c ^processor /proc/cpuinfo

8

Next check that your server has the port 80 and 443 open

$sudo ufw status

image

If you don't see these lines, you need to open them by

sudo ufw allow 80 sudo ufw allow 443

Sau khi cài chạy xong BBB 2.7.x thành công, check list tiếp tục:

$sudo bbb-conf --check

BigBlueButton Server 2.7.0-alpha.1 (114) Kernel version: 5.4.0-122-generic Distribution: Ubuntu 20.04.6 LTS (64-bit) Memory: 8148 MB CPU cores: 8

/etc/bigbluebutton/bbb-web.properties (override for bbb-web) /usr/share/bbb-web/WEB-INF/classes/bigbluebutton.properties (bbb-web) bigbluebutton.web.serverURL: https://test27.bigbluebutton.org defaultGuestPolicy: ALWAYS_ACCEPT defaultMeetingLayout: CUSTOM_LAYOUT

/etc/nginx/sites-available/bigbluebutton (nginx) server_name: test27.bigbluebutton.org , [::1]:82 http2 127.0.0.1:81 proxy_protocol, [::1]:81

/opt/freeswitch/etc/freeswitch/vars.xml (FreeSWITCH) local_ip_v4: 192.168.0.13 external_rtp_ip: 143.198.37.212 external_sip_ip: 143.198.37.212

/opt/freeswitch/etc/freeswitch/sip_profiles/external.xml (FreeSWITCH) ext-rtp-ip: $${local_ip_v4} ext-sip-ip: $${local_ip_v4} ws-binding: 143.198.37.212:5066 wss-binding: 143.198.37.212:7443

UDP port ranges

                    FreeSWITCH: 16384-24576
                       kurento: 24577-32768
                bbb-webrtc-sfu: 24577-32768
                bbb-webrtc-recorder: 24577-32768

/usr/local/bigbluebutton/core/scripts/bigbluebutton.yml (record and playback) playback_host: test27.bigbluebutton.org playback_protocol: https ffmpeg: 4.2.7-0ubuntu0.1

/usr/share/bigbluebutton/nginx/sip.nginx (sip.nginx) proxy_pass: 143.198.37.212 protocol: http

/usr/local/bigbluebutton/bbb-webrtc-sfu/config/default.yml (bbb-webrtc-sfu) /etc/bigbluebutton/bbb-webrtc-sfu/production.yml (bbb-webrtc-sfu - override) mediasoup.webrtc..announcedIp: 143.198.37.212 mediasoup.plainRtp..announcedIp: 143.198.37.212 kurento.ip: 143.198.37.212 kurento.url: ws://127.0.0.1:8888/kurento freeswitch.sip_ip: 143.198.37.212 recordingAdapter: Kurento recordScreenSharing: true recordWebcams: true codec_video_main: VP8 codec_video_content: VP8

/etc/bbb-webrtc-recorder/bbb-webrtc-recorder.yml (bbb-webrtc-recorder) /etc/bigbluebutton/bbb-webrtc-recorder.yml (bbb-webrtc-recorder - override) debug: false recorder.directory: /var/lib/bbb-webrtc-recorder

/usr/share/meteor/bundle/programs/server/assets/app/config/settings.yml (HTML5 client) /etc/bigbluebutton/bbb-html5.yml (HTML5 client config override) build: 323 kurentoUrl: wss://test27.bigbluebutton.org/bbb-webrtc-sfu defaultFullAudioBridge: fullaudio defaultListenOnlyBridge: fullaudio sipjsHackViaWs: true

Potential problems described below

Any output that followed Potential problems may indicate configuration errors or installation errors. In many cases, the messages will give you recommendations on how to resolve the issue.

$ sudo bbb-conf --status

nginx —————————————————► [✔ - active] freeswitch ————————————► [✔ - active] redis-server ——————————► [✔ - active] bbb-apps-akka —————————► [✔ - active] bbb-fsesl-akka ————————► [✔ - active] mongod ————————————————► [✔ - active] bbb-html5 —————————————► [✔ - active] bbb-html5-backend@1 ———► [✔ - active] bbb-html5-backend@2 ———► [✔ - active] bbb-html5-frontend@1 ——► [✔ - active] bbb-html5-frontend@2 ——► [✔ - active] bbb-webrtc-sfu ————————► [✔ - active] bbb-webrtc-recorder ———► [✔ - active] kurento-media-server ——► [✔ - active] etherpad ——————————————► [✔ - active] bbb-web ———————————————► [✔ - active] bbb-pads ——————————————► [✔ - active] bbb-export-annotations ► [✔ - active] bbb-rap-caption-inbox —► [✔ - active] bbb-rap-resque-worker —► [✔ - active] bbb-rap-starter ———————► [✔ - active]

$sudo dpkg -l | grep bbb-

ii  bbb-apps-akka                        1:2.7-10      all          BigBlueButton Apps (Akka)
ii  bbb-config                           1:2.7-14      amd64        BigBlueButton configuration utilities
ii  bbb-etherpad                         1:2.7-4       amd64        The EtherPad Lite components for BigBlueButton
ii  bbb-export-annotations               1:2.7-7       amd64        BigBlueButton Export Annotations
ii  bbb-freeswitch-core                  2:2.7-3       amd64        BigBlueButton build of FreeSWITCH
ii  bbb-freeswitch-sounds                1:2.7-3       amd64        FreeSWITCH Sounds
ii  bbb-fsesl-akka                       1:2.7-7       all          BigBlueButton FS-ESL (Akka)
ii  bbb-html5                            1:2.7-13      amd64        The HTML5 components for BigBlueButton
ii  bbb-html5-nodejs                     1:2.7-4       amd64        Include a specific NodeJS version for bbb-html5
ii  bbb-learning-dashboard               1:2.7-5       amd64        BigBlueButton bbb-learning-dashboard
ii  bbb-libreoffice-docker               1:2.7-2       amd64        BigBlueButton setup for LibreOffice running in docker
ii  bbb-mkclean                          1:2.7-3       amd64        Clean and optimize Matroska and WebM files
ii  bbb-pads                             1:2.7-6       amd64        BigBlueButton Pads
ii  bbb-playback                         1:2.7-4       amd64        BigBlueButton playback
ii  bbb-playback-presentation            1:2.7-3       amd64        BigBluebutton playback of presentation
ii  bbb-record-core                      1:2.7-4       amd64        BigBlueButton record and playback
ii  bbb-web                              1:2.7-8       amd64        BigBlueButton API
ii  bbb-webrtc-recorder                  1:2.7-2       amd64        BigBlueButton WebRTC Recorder
ii  bbb-webrtc-sfu                       1:2.7-9       amd64        BigBlueButton WebRTC SFU

Đối chiếu gedit trong máy chủ BBB đã đủ các gói dpkg cài:

image

Sau khi cài đặt Greenlight (đó là tùy chọn -g), bạn có thể mở https:// trong trình duyệt (trong đó là tên máy chủ mà bạn đã chỉ định trong lệnh bbb-install.sh), tạo tài khoản cục bộ, tạo phòng và tham gia phòng đó.

Tham khảo: https://docs.bigbluebutton.org/greenlight/v3/install/

Tiếp thoe check list Security:

Bạn có thể tích hợp BigBlueButton với một trong các tích hợp của bên thứ 3 bằng cách cung cấp tích hợp địa chỉ máy chủ và bí mật được chia sẻ. Bạn có thể sử dụng bbb-conf để hiển thị thông tin này bằng bbb-conf --secret.

$ sudo bbb-conf --secret

       URL: https://bbb.example.com/bigbluebutton/
    Secret: 330a8b08c3b4c61533e1d0c334

      Link to the API-Mate:
      https://mconf.github.io/api-mate/#server=https://bbb.example.com/bigbluebutton/&sharedSecret=330a8b08c3b4c61533e1d0c334

Nâng cấp từ BigBlueButton 2.5 hoặc 2.6

Bạn có thể nâng cấp theo một vài bước:

Đảm bảo bạn không cài đặt bbb-demo

$sudo apt purge bbb-demo

Sau đó chạy tập lệnh bbb-install.sh -- nó sẽ tải xuống và cài đặt bản phát hành mới nhất của BigBlueButton 2.7 trên phiên bản 2.5 cũ của bạn.

Nâng cấp từ BigBlueButton 2.4:

Nếu bạn đang nâng cấp BigBlueButton 2.4 hoặc 2.3, chúng tôi khuyên bạn nên thiết lập máy chủ Ubuntu 20.04 mới với BigBlueButton 2.7 rồi sao chép các bản ghi hiện có từ máy chủ cũ.

Tham khảo: https://docs.bigbluebutton.org/administration/customize/#transfer-published-recordings-from-another-server

Khởi động lại máy chủ Bạn có thể khởi động lại và kiểm tra máy chủ BigBlueButton của mình bất kỳ lúc nào bằng lệnh

sudo bbb-conf --restart sudo bbb-conf --check

PhDLeToanThang commented 3 weeks ago

Khi phiên bản được đưa vào như một phần của lõi Moodle 4.0 đang phát triển, sẽ rất khó để duy trì khả năng tương thích hoàn toàn với các phiên bản trước của plugin này. Vì lý do này, bản phát hành chính cuối cùng sẽ là v3.0, được viết cho Moodle 3.11 và 4.0.

Phiên bản cuối cùng này sẽ được duy trì và giữ nguyên cùng với phiên bản lõi Moodle 4.0 sau khi được phát hành dưới dạng ổn định và sẽ được điều chỉnh theo lịch trình dự án Moodle để bảo trì và hỗ trợ. Nhưng có khả năng chúng ta sẽ không thấy thêm nhiều tính năng mới nữa.

Đối với những người đang chạy các phiên bản Moodle trước đó, chúng tôi sẽ tiếp tục hỗ trợ các phiên bản trước đó bằng các bản vá bảo mật lên đến v2.2-stable và sửa lỗi lên đến v2.4-stable.

Chúng tôi khuyến khích cập nhật lên phiên bản Moodle mới nhất càng sớm càng tốt.

Tham khảo: https://github.com/blindsidenetworks-ps/moodle-mod_bigbluebuttonbn

PhDLeToanThang commented 3 weeks ago

Customize Greenlight

Greenlight v3 can be customized to suit your needs. By default, the applications has a default set of features and settings that can be customized through the Administrator Panel. If you need even more customizations, please follow the steps below.

IMPORTANT NOTE: While customizing Greenlight v3 can be a great way to tailor the platform to your organization's specific needs, there are also some potential dangers to making custom changes. It's important to be aware of these risks before making any customizations to the platform.

Security risks: Custom changes to the platform may inadvertently introduce security vulnerabilities.

Compatibility issues: Custom changes may not always be fully compatible with future updates to the platform. This could cause conflicts and errors that could affect the platform's functionality and stability.

Support limitations: Making custom changes to the platform may limit the support you can receive from the platform's developers.

Maintenance overhead: Custom changes require ongoing maintenance and upkeep.

Text Changes Greenlight v3 provides the ability to customize all of the strings used in the platform's user interface. This means that you can change any text string, including labels, messages, and notifications, to match your organization's preferred terminology or language.

First, find the file that contains the string you would like to change. Language files can be found in 2 places:

app/assets/locales config/locales For this example, we will be using en.json from app/assets/locales/, but you can make the changes to any file.

Once you have located the file containing the string you want to modify, copy it into your greenlight-v3 directory and edit it as needed.

Then, edit the docker compose file so that your new file is loaded into the container. To do that, add a line in the volumes section.

volumes:

OR

volumes:

Finally, restart Greenlight v3 and your new changes should be displayed in Greenlight.

Code Changes Customizing the code in Greenlight v3 can provide even greater flexibility and control over the platform's behavior. However, modifying the code can also be complex, and it carries a greater risk of introducing errors or compatibility issues.

If you decide to customize the code, it's important to have a solid understanding of Ruby on Rails and React, the frameworks used to build Greenlight v3. You should also be familiar with the structure of the Greenlight v3 codebase and its dependencies.

First, find the file that you would like to change by searching through the Greenlight repository.

Once you have located the file that you want to modify, copy it into your greenlight-v3 directory and edit it as needed.

For this example, we will be using rooms_controller.rb from app/controllers/api/v1/, but you can make the changes to any file.

Then, edit the docker compose file so that your new file is loaded into the container. To do that, add a line in the volumes section.

volumes:

Finally, restart Greenlight v3 and your new changes should be displayed in Greenlight.

Ref: https://docs.bigbluebutton.org/greenlight/v3/customize/

PhDLeToanThang commented 3 weeks ago

Tùy chỉnh Greenlight

Greenlight v3 có thể được tùy chỉnh để phù hợp với nhu cầu của bạn. Theo mặc định, ứng dụng có một bộ tính năng và cài đặt mặc định có thể được tùy chỉnh thông qua Bảng điều khiển quản trị viên. Nếu bạn cần tùy chỉnh nhiều hơn nữa, vui lòng làm theo các bước dưới đây.

LƯU Ý QUAN TRỌNG: Mặc dù tùy chỉnh Greenlight v3 có thể là một cách tuyệt vời để điều chỉnh nền tảng theo nhu cầu cụ thể của tổ chức bạn, nhưng cũng có một số nguy cơ tiềm ẩn khi thực hiện các thay đổi tùy chỉnh. Điều quan trọng là phải nhận thức được những rủi ro này trước khi thực hiện bất kỳ tùy chỉnh nào cho nền tảng.

Rủi ro bảo mật: Các thay đổi tùy chỉnh cho nền tảng có thể vô tình gây ra lỗ hổng bảo mật.

Các vấn đề về khả năng tương thích: Các thay đổi tùy chỉnh không phải lúc nào cũng hoàn toàn tương thích với các bản cập nhật trong tương lai cho nền tảng. Điều này có thể gây ra xung đột và lỗi có thể ảnh hưởng đến chức năng và tính ổn định của nền tảng.

Giới hạn hỗ trợ: Việc thực hiện các thay đổi tùy chỉnh cho nền tảng có thể hạn chế sự hỗ trợ mà bạn có thể nhận được từ các nhà phát triển nền tảng.

Chi phí bảo trì: Các thay đổi tùy chỉnh yêu cầu bảo trì và bảo dưỡng liên tục.

Thay đổi văn bản Greenlight v3 cung cấp khả năng tùy chỉnh tất cả các chuỗi được sử dụng trong giao diện người dùng của nền tảng. Điều này có nghĩa là bạn có thể thay đổi bất kỳ chuỗi văn bản nào, bao gồm nhãn, tin nhắn và thông báo, để phù hợp với thuật ngữ hoặc ngôn ngữ mà tổ chức của bạn ưa thích.

Trước tiên, hãy tìm tệp chứa chuỗi mà bạn muốn thay đổi. Có thể tìm thấy tệp ngôn ngữ ở 2 nơi:

app/assets/locales config/locales Đối với ví dụ này, chúng tôi sẽ sử dụng en.json từ app/assets/locales/, nhưng bạn có thể thực hiện thay đổi đối với bất kỳ tệp nào.

Sau khi tìm thấy tệp chứa chuỗi mà bạn muốn sửa đổi, hãy sao chép tệp đó vào thư mục greenlight-v3 của bạn và chỉnh sửa khi cần.

Sau đó, hãy chỉnh sửa tệp docker compose để tệp mới của bạn được tải vào vùng chứa. Để thực hiện việc đó, hãy thêm một dòng vào phần volumes.

volumes:

HOẶC

volumes:

Cuối cùng, khởi động lại Greenlight v3 và những thay đổi mới của bạn sẽ được hiển thị trong Greenlight.

Thay đổi mã Việc tùy chỉnh mã trong Greenlight v3 có thể cung cấp tính linh hoạt và khả năng kiểm soát lớn hơn đối với hành vi của nền tảng. Tuy nhiên, việc sửa đổi mã cũng có thể phức tạp và có nguy cơ gây ra lỗi hoặc sự cố tương thích cao hơn.

Nếu bạn quyết định tùy chỉnh mã, điều quan trọng là phải hiểu rõ về Ruby on Rails và React, các khuôn khổ được sử dụng để xây dựng Greenlight v3. Bạn cũng nên quen thuộc với cấu trúc của cơ sở mã Greenlight v3 và các phụ thuộc của nó.

Trước tiên, hãy tìm tệp mà bạn muốn thay đổi bằng cách tìm kiếm trong kho lưu trữ Greenlight.

Sau khi tìm thấy tệp mà bạn muốn sửa đổi, hãy sao chép tệp đó vào thư mục greenlight-v3 của bạn và chỉnh sửa khi cần.

Đối với ví dụ này, chúng tôi sẽ sử dụng rooms_controller.rb từ app/controllers/api/v1/, nhưng bạn có thể thực hiện thay đổi đối với bất kỳ tệp nào.

Sau đó, hãy chỉnh sửa tệp docker compose để tệp mới của bạn được tải vào vùng chứa. Để thực hiện việc đó, hãy thêm một dòng vào phần volumes.

volumes:

Cuối cùng, hãy khởi động lại Greenlight v3 và những thay đổi mới của bạn sẽ được hiển thị trong Greenlight.

PhDLeToanThang commented 3 weeks ago

Bước 1. Download BigBlueButtonBN 3.0.9 từ link: https://moodle.org/plugins/mod_bigbluebuttonbn/versions

Bước 2. Copy thành 1 file mới và đổi tên file: mod_bigbluebuttonbn_moodle4_20241708-14.zip

Bước 3. Dùng 7.zip > FM open file .zip:

Bước 4. edit đoạn văn bản có trong file bigbluebuttonbn\version.php: ví dụ: D:\Documents\PrivateCloud\ucs\mod_bigbluebuttonbn_moodle4_20241708-14.zip\bigbluebuttonbn\version.php

Thay đổi đoạn số: defined('MOODLE_INTERNAL') || die;

$plugin->version = 2021101017; $plugin->requires = 2020061500; $plugin->cron = 0; $plugin->component = 'mod_bigbluebuttonbn'; $plugin->maturity = MATURITY_STABLE; $plugin->release = '3.0.9';

Thành đoạn số liệu version sau: --> change content numbers: defined('MOODLE_INTERNAL') || die;

$plugin->version = 2024081717; $plugin->requires = 2020061500; $plugin->cron = 0; $plugin->component = 'mod_bigbluebuttonbn'; $plugin->maturity = MATURITY_STABLE; $plugin->release = '4.0.2'; ----------> Save lại file đã sửa, sau đó đóng và save cả file .zip nếu 7.zip hoặc Windows Explorer hỏi.

Bước 5. Dùng lại 7.zip và mở lại file .zip để kiểm tra lại việc lưu, sửa file Version.php có tác dụng (đã lưu thay đổi ?), Nếu đã thay đổi thì đóng lại.

Bước 6. Vào Moodle 4.0.2 bằng quyền Admin và mở mục : https://yourschool.edu.vn/admin/search.php#linkmodules

Chọn mục Plugins > https://yourschool.edu.vn/admin/tool/installaddon/index.php và Import .zip

Chạy các bước hướng dẫn "Continues" bấm nút tiếp tục để update vào DB moodle.

Bước 7. Vào mục https://yourschool.edu.vn/admin/modules.php bằng quyền Admin , Activities:

Tìm thấy BigBlueButton

image

image

image

$ sudo bbb-conf --secret

ví dụ: https://test-moodle.blindsidenetworks.com/bigbluebutton/ 0b21fcaf34673a8c3ec8ed877d76ae34

image

(lưu ý: dùng sha256)

image

ví dụ: giới hạn lượng người học

image

image

image

Bước 8: Cuối cùng thì chúng ta quay về 1 lớp học và bật chế độ chỉnh sửa:

image

PhDLeToanThang commented 3 weeks ago

Khi thêm Plugin vào và chọn chủ đề mới thì bị báo lỗi:

image

Đây là do lỗi cấu hình Network DNS local giữa moodle VM với bigbluebutton UCS VM mạng nội bộ đang không phân dải được.

Cách kiểm tra để sửa DNS local:

image

Là chuẩn,

Nếu báo lỗi: Hãy kiểm tra lại và cấu hình lại phần DNS Local network của VM Moodle để chỉnh lại DNS, GW cho cùng với lớp cấu hình DNS của VM BBB rồi quay lại test như trên.

ví dụ: trong cấu hình netplan, tôi hay cấu hình /etc/netplan/00-installer-config.yaml

nameservers:

Cần phải thay về địa chỉ DNS local server có thông tin bản ghi A (host) hoặc và CNAME để 2 VM có ipv4 thuộc dải ip thông nhau.