By Administrator on November 18, 2023
Beginner

Installation

It consists of two zipped two packages. 

  1. pkg_spstgmng_vX.X.x.zip - SP Staging Manager
  2. pkg_spstgsrv_vX.X.x.zip - SP Staging Server

The first zip package is the manager and is installed on the Joomla! coordinator site. The second zip package is the server, which should be installed to any Joomla! site you want to control.

Note: After installing for the first time the component on the stages, you will be able to remote update in the future from the manager!

Setup

Download ID

When you go to the Download section of our website you can view your download id. Add this download id, in the manager options, and ping your stages. That way you will be able to remote updates your stages, and the manager in case of future releases.

Stage Setup

When you install the component on each stage, go to component's options and add the full manager link. For example if the manager link is www.kainotomo.com then in options you should write http://www.kainotomo.com/

Note: The last / is necessary.

Also make sure if you use any protection, or firewall software, to add exception between the stage and manager IP, as well as your browser IP.

For example if you use Akeeba Admin Tools Pro, at the stage where SP Staging Server is installed, go to the following settings of AdminTools Pro

- Configure WAF – tab "Exceptions from blocking" and set here the IP-address of the connection used for updating with SP Staging Manager, and your browser.


- Administrator IP Whitelist: add same IPs as at the WAF setting to this list

After setting the IPs at above settings at AdminTools Pro, SP Staging is not blocked anymore.

packages folder

In the AdminsTools "htaccess Maker" add an Exception like this:

Allow direct access, except .php files, to these directories:

components/com_spstgsrv/packages

.htaccess

It is also reported on some cases that Akeeba Admin Tools modify .htaccess file and causes problem.

wrong:

RewriteRule ^(components|modules|templates|images|plugins|media|libraries|media/jui/fonts)/ - [F]

 

right:

RewriteRule ^(modules|templates|images|plugins|media|libraries|media/jui/fonts)/ - [F]

 Uninstallation

You can uninstall the component just like any other Joomla! component. In your site's back-end, just go to Extensions Manager, click on Uninstall. In the Filter area type SP and click on Search. Several entries appear. Select the entry where the Type is Package. Do not select the other entries; they are removed automatically. Now click on Uninstall. This will completely remove extension including all related data.

Categories

Categories are used just like standard Joomla! categories to assist you group the stages. With categories you can control for each category the access level and user rules.

Monitoring Schedule

Alert Type:

  1. Always - You will receive a notification every time the script runs and a site is down, even if the site is down for hours.
  2. Offline - You will receive a notification when a server goes offline for the first time only. For example if your schedule runs every 15 minutes and your server goes down at 2:00am until 7:00am, you will only get one notification at 2:00am
  3. Status Change - You will receive a notification when the server has a change of status. Meaning from online -> offline, and offline ->online.

 Allow Monitor Schedule: In order to enable the monitoring schedule you have to choose yes.

Password: To secure that the monitoring is done by your scheduling, assign a password, that you will use in the monitoring scheduling tool.

How To Schedule Monitoring

There are several ways to schedule monitoring, given that you enabled it from options and assigned a password. You can schedule to run directly from your server, or from a public url.

Linux/Unix Cron Job

You can schedule a cron job to hit php file /joomla_path/components/com_spstgmng/helpers/monitor.php. If for example your joomla_path is /home/public_html/ and you defined in options a password, then you can schedule in cron the follow:

php -q /home/public_html/components/com_spstgmng/helpers/monitor.php password >/dev/null 2>&1

Windows Scheduler

In a similar way you can schedule in Windows scheduler. For example if your joomla_path is c:\webserver\htdocs\ then the command to schedule is:

php -q c:\webserver\htdocs\components\com_spstgmng\helpers\monitor.php password > nul

If php command is not recognized by windows, then either use the full path to php.exe, or include it's path in environment variables.

Public URL

By using any scheduler you might have, on any machine you may schedule a regular visit to url: 

http://your_domain/index.php?option=com_spstgmng&task=monitor.ping&pswd=password

Monitoring

 There are two different ways to monitor a server:

  1. Service
  2. A connection will be made to the selected Stage domain, on the given port. This way you can check if certain services on your machine are still running. To check your IMAP service for example, enter port 143, or MySQL on port 3306.
  3. Website
  4. It checks the HTTP status code (see http://en.wikipedia.org/wiki/List_of_HTTP_status_codes for details) for the selected code. If the HTTP status code is in the 4xx range, it means an error occurred and the website is not accessible to the public. 

Monitors View

In the main Monitors view, you can ping/view/create/edit all the monitors and their status. The online column indicates, the status. The green on indicates healthiness, instead the red off indicates a problem. To Ping, you can choose one or more, and press the green button ping.

Monitor Edit View

In the Monitor Edit View you can define the type of monitor, selected stage, and if view the uptime and error log.

Configuration

On this view you can define/select the follow:

  1. The stage where the monitor will apply.
  2. The type of monitor:
  3. website
  4. service
  5. The port. You can only define this if you select a service. It is not applicable for the website type of monitor.
  6. Choose whether an email will be sent in case of problem.
  7. The user to send the email.

Availability

On this tab you can view occurrences of the monitoring execution and the status at the specific time. The red indicator shows problem, and the green healthiness.

Log

This is the log view, where you can see the error message in case of unavailability.

Stages View

Screenshot

Stage Configuration

There are only four necessary attributes to define when creating a stage:

  1. Title - This is the name you will see the stage in the lists,
  2. Category - It's category, which can be useful when you have many stages. It can be used for filtering in the list views, and user access.
  3. URL - That is the stage site front end url. For example http://www.stage_domain.com/ (remember to add the last slash /)
  4. Password - This have to be the same as in the stage options. If not, it cannot connect.

Ping

After you setup for the first time each stage, then with ping, you can confirm the healthiness of the connection between manager and each stage. Also the ping operation 'push' your download id, from the manager's options to each stage options.

Synchronization

The synchronization operation updates the local database with the extensions found in the stages. If any extension is having a new update, with this operation it will be discovered.

Backups

There are two kind of backups supported by SP Staging.

  1. standard - utilize unix commands mysqldump and gzip,
  2. Akeeba - it is necessary for Akeeba Backup to be installed on the stage site.

Standard Backup

This type of backups is full site backup, including files and database. The backups are stored in stage site under folder /administrator/components/com_spstgsrv/backups

It is required to run this type of backup for your php to have enabled access to run mysqldump and gzip unix commands.

Akeeba Backup

To use this type of backup, you must first have Akeeba Backup installed on the stage site. You must also enable by Akeeba options the front end backup, and assign a secret word.

While editing a stage in manager, you have the ability to insert the secret word and the id of the Akeeba profile to use.

Installation extensions, and execute scripts

Same as with Joomla! core extensions manager, you can upload and install any extension on the stages. You can also have the extension archive file in your manager's server, or even to a remote server. The same way you can also execute on your stages any SQL query, or PHP script. They will be run under Joomla! environment, so you can take advantage the Joomla! framework.

Manage View

Screenshot

Email notification

You may choose to activate the email notification in case a stage is having a new update. You may do that for each stage options. You just activate and put the desired email.

Notes

For stages using Akeeba Admin Tools, keep the ordering of the corresponding plugin greater than SP Staging plugin.

Update View

Note: Only for nonumber extensions, you have to manually close pop-up browser window after the update.

Screenshot



More articles on Joomla! Extensions



More articles on Joomla! Extensions
Comments

No comments yet.

Add a comment
Ctrl+Enter to add comment