Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automate TinyMCE Plugin Integration for WebTop with Active Subscriptions #7266

Open
Amygos opened this issue Jan 17, 2025 · 5 comments
Open
Assignees
Labels
verified All test cases were verified successfully

Comments

@Amygos
Copy link
Member

Amygos commented Jan 17, 2025

The advanced editing feature provided by the TinyMCE plugin enhances the user
experience in WebTop by offering more robust text editing capabilities.
However, the plugin is restricted to installations with an active subscription,
and its distribution is limited by licensing constraints. This feature request
aims to streamline the process of enabling the plugin for eligible
installations while adhering to licensing requirements.

Proposed Solution

Develop an automated mechanism within WebTop to detect and enable the TinyMCE
plugin for installations with an active subscription. The solution should:

  1. Verify the subscription status of the installation.
  2. Automatically download and install the webtop-tmceplugins.jar file from an
    authorized source.
  3. Configure the necessary system settings, such as permissions and service
    adjustments, to integrate the plugin seamlessly.
  4. Ensure the system reloads and restarts the required services to apply the
    changes without manual intervention.

This approach eliminates the need for manual steps, such as copying files,
modifying system configurations, and restarting services, thereby reducing the
risk of errors and improving user convenience.

Additional Context The current manual workaround involves the following
steps:

  1. Extracting the webtop-tmceplugins.jar file from an existing NS7 Enterprise
    installation.
  2. Copying the file to the appropriate directory and setting permissions.
  3. Modifying the systemd unit file to include the plugin.
  4. Reloading and restarting the WebTop service.

Example:

# Step 1: Extract the jar file from the installed package from an NS7
# Enterprise system
rpm -ql webtop-tmceplugins

# Step 2: Copy the jar file to the appropriate directory of the NS8 node and
# adjust permissions
mv webtop-tmceplugins.jar /home/webtop1/.config/state/
chown webtop1:webtop1 /home/webtop1/.config/state/webtop-tmceplugins.jar

# Step 3: Modify the systemd unit
runagent -m webtop1 vim /home/webtop1/.config/systemd/user/webapp.service
# Add the following line: --volume=./webtop-tmceplugins.jar:/usr/local/tomcat/webapps/webtop/WEB-INF/lib/webtop-tmceplugins.jar:z

# Step 4: Apply the changes and restart the webapp service
runagent -m webtop1 systemctl --user daemon-reload
runagent -m webtop1 systemctl --user restart webapp

This process is error-prone and requires technical expertise, which may not be
feasible for all users. Furthermore, any manual modifications made to these
settings can be lost when the module is updated, requiring users to reapply
their changes. Automating these steps would significantly enhance usability and
compliance.

@gsanchietti gsanchietti self-assigned this Jan 27, 2025
@gsanchietti gsanchietti moved this from ToDo to In Progress in NethServer Jan 27, 2025
@gsanchietti gsanchietti added this to the NethServer 8.4 milestone Jan 27, 2025
gsanchietti added a commit to NethServer/ns8-webtop that referenced this issue Jan 29, 2025
@gsanchietti
Copy link
Member

Testing version: 1.2.0-testing.1

Test case 1

  • Use a cluster without a subscription
  • Install the testing version on a clean machine or update an existing one
  • Verify the tmce plugin is not enabled

Test case 2

  • After test case 1
  • Add a subscription to the cluster
  • Verify the tmce plugin is automatically enabled

Test case 3

  • After test case 2
  • Remove the subscription from the cluster
  • Verify the tmce plugin is not enabled

@gsanchietti gsanchietti added the testing Packages are available from testing repositories label Jan 29, 2025
@gsanchietti gsanchietti removed their assignment Jan 29, 2025
@nethbot nethbot moved this from In Progress to Testing in NethServer Jan 29, 2025
@lucagasparini lucagasparini self-assigned this Jan 29, 2025
@Amygos
Copy link
Member Author

Amygos commented Jan 29, 2025

Testing release NethServer/ns8-webtop 1.2.0-testing.1

@lucagasparini
Copy link

Test cases 1,2 and 3 verified but only with new installation.

Fails with upgrade.

Updating with the module in testing does not start the webapp container reporting this in the log:

Jan 30 09:59:26 rl1 systemd[36732]: webapp.service: Failed to load environment files: No such file or directory
Jan 30 09:59:26 rl1 systemd[36732]: webapp.service: Failed to run 'start-pre' task: No such file or directory
Jan 30 09:59:26 rl1 systemd[36732]: webapp.service: Failed with result 'resources'.
Jan 30 09:59:26 rl1 systemd[36732]: Failed to start WebTop webapp.

@gsanchietti
Copy link
Member

Issue fixed in testing image: 1.2.0-testing.2

@lucagasparini
Copy link

I confirm that with this new image the problem with upgrade is solved 👍

VERIFIED

@lucagasparini lucagasparini added the verified All test cases were verified successfully label Jan 30, 2025
@github-actions github-actions bot removed the testing Packages are available from testing repositories label Jan 30, 2025
@nethbot nethbot moved this from Testing to Verified in NethServer Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
verified All test cases were verified successfully
Projects
Status: Verified
Development

No branches or pull requests

3 participants