Introduction

This is the manual for Joomla tool SP Staging. The small size of the documentation, indicates the simple use of the extension!

With SP Staging you can maintain and control all your Joomla! sites extensions from one place. SP Staging consists of two components:

  • SP Staging Manager (the central coordinator), and
  • SP Staging Server (the stages)

Concepts

Stage

Stage refers to any Joomla! site that is controlled by SP Staging Manager (the central coordinator). You must install component SP Staging Server to any site you want to control, and define to its options the follow:

  • Coordinator URL - That is the front end domain of the manager. For example http://www.manager_domain.com/ (note to add the last slash / on the url)
  • Password - A unique word identifier known to coordinator.
Password is used to 256 bit encrypt all data exchanged between coordinator and stage. Stage cannot accept any instruction from a different domain.
Package

Package refers to a unique Joomla package. It can be identified by its element (name) and type. Joomla! itself is a package!


Installation

It is installed as any other Joomla software via Extensions Manager. It consists of two zipped two packages. 

  • pkg_spstgmng_vX.X.x.zip - SP Staging Manager
  • 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.


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.


Stages View

Description

The SP Staging Manager is the place in the back-end where you can add and manage all of the stages you want to control. From the stages view you can do the follow tasks:

  • Add/Edit/Remove stages,
  • Ping a stage to check connection healthiness,
  • Install any zip package file to the selected stages.

Screenshot

 Stages View

Stage Configuration

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

  • Title - This is the name you will see the stage in the lists,
  • 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.
  • URL - That is the stage site front end url. For example http://www.stage_domain.com/ (remember to add the last slash /)
  • Password - This have to be the same as in the stage options. If not, it cannot connect.

Synchronization

The synchronization operation updates the local database with the extensions found in the stages. There are two kind of synchronization:

  • Normal - which is quick, and update database with new, or with changed release extensions.
  • Force Full - which as per the name it forces all the extensions.

To Force Full synchronization is only necessary when you update an extensions outside SP Staging. If you do any operation within SP Staging itself then there is no need to synchronize since it is automatically done. Normally if you do not update any of your extensions outside SP Staging you should only need to synchronize once.

Find Updates

As per the name with this operation you can find whether any of your extensions need an update!!!

Backups

There are two kind of backups supported by SP Staging.

  • standard - utilize unix commands mysqldump and gzip,
  • 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.


Update View

Description

This view is like the well known core Extensions Update view, with the big difference that you can see find updates for all the stages, and update all at once.

From this view you can do the follow:

  • Find updates on the stages,
  • update all or selected updates on all or selected stages.

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

Screenshot

 Update View


Manave View

Description

This view is like the core Extensions Manage view, again with the big difference that you can manage your extensions to all your stages at the same time.

From this view you can do the follow:

  • enable/disable any extension,
  • uninstall any extension.

Screenshot

SP Staging manage view

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.


Monitoring

SP Staging comes with the functionality of monitoring your websites healthiness. You can check whether your websites and server's services are up and running. You can schedule the monitoring to run on specified time intervals from your server (Linux/Windows), or any other scheduling tool that can hit a URL. In case a website/service is down a selected user can be notified via email.

There are two different ways to monitor a server:

  • Service

    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.

  • Website

    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

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

Edit Monitor View Configuration

On this view you can define/select the follow:

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

Edit Monitor View 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

Edit Monitor View Log

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


Monitoring Schedule

Options

To allow monitoring schedule you must first go to SP Staging -> Options.

Edit Monitor View Options

Alert Type:

  • Always - You will receive a notification every time the script runs and a site is down, even if the site is down for hours.
  • 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
  • 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