Best practices for maintaining Joomla website - part 3

Manage testing / staging servers before Live Deployment

Shyam Sundar Verma , 21 November, 2014

This educational series is to manage your website professionally. With using word professionally we considered you as professional and if not, you become geek by the end of this series. After having a bunch of knowledge in the field of Hosting & Email Services and Site's Backup, Today blog is to focus on managing your web server workflow process from Test -> Live / Production.

Testing environments provide an easy and reliable way to test new releases of Joomla, components, plugins, templates, UI OR UX related changes, performance related tasks or even small html or css changes without breaking your live site.

These testing environments can be your localhost, a testing server, a staging server, or a live / production server. As there are plenty of ways to test your site but we recommend to clone your site and then play your shots. Practically, it's very important to do thorough testing before committing changes to your live site.

You can test everything using the live website itself. But it's not recommended, no matter how experienced you are. A simple misspelling can result in the site getting locked.We recommend our users to have both servers ie test server and stage server. Update all your changes to your test server.Once you are done and satisfied in test server then upload it to stage server.

Don’t think to directly move your site from test server to live/ production server. As it may happened that something things works at test server and not on your live server due to not having same configuration as of live server ?

Here Stage server comes into role which will help you to protect from various loss. It’s suggested to do experiments either at test site or stage site. Can easily create with backup of your live site.

Therefore you should always create 2 servers for testing changes.

  • Test Server : A testing server is a separate development server. Everything which you have developed on your development machine, should be uploaded to test server. If changes works as expected you can be sure of your changes will work. This server is also considered as development server where all the development tasks get reflected.

        <p><strong>Tasks performed at Test Server :- </strong></p>
        <ul><li>Publish new and changed content</li>
            <li>Test changes</li>
            <li>Approved contents move to staging server</li></ul><p>Once you have thoroughly tested your site, you can then roll out changes to your stage site.</p>
    </li>
    <li><p><strong>Stage Server</strong> : A staging site is generally a <strong>non-development area</strong> on your server (usually a sub-domain) with restricted access or a complete replica of your live site. </p>
        <p>Complete Replica not just means the clone of site, additionally it includes same services and software used in your live server like same OS/ Apache/ PHP/ MYSQL and other service like cloudflare, htaccess, Ip restrictions (only our static ip allowed to access these type of servers) etc. Overall it should be same or as much like as possible. So, the hardware and software are often mirrored for the staging and live/ production web servers. </p>
        <p><strong>In short, it's cloning of Server.</strong></p>
    </li>

Now you need to test the deployment of changes. Therefore on stage server.

  • Clone the live website into stage site.
  • Deploy changes.
  • Change Email Server (through auto scripts) to mailtrap.io.
  • Note-down the process of deploy (call it a checklist).
  • Final approvals are received and the entire site is pushed to the live server.

This is generally the last step of website process before moving it to live server.

Some Basic Terminology of Checklist :-

  1. Stage - Task performed in almost same replica of Live/ Production Server
  2. Live / Production - Deploy changes in your Live / Production Server
  3. Done - Task / changes done at respective server
  4. On Live - Things which can be done directly on Live / Production Server or after changes get deployed in Live / Production Server.
    <td> 
        <ul class="unstyled"><li>Done</li>
        </ul></td>
    <td>---</td>
</tr><tr><td>Kit Release
        <ol><li>Upload Latest kit</li>
            <li>Clean old kits</li>
            <li>Update Change Logs</li>
        </ol></td>
    <td> 
        <ul class="unstyled"><li>Done</li>
            <li>Done</li>
            <li>Done</li>
        </ul></td>
    <td> 
        <ul class="unstyled"><li>Done</li>
            <li>Done</li>
            <li>Done</li>
        </ul></td>
    <td>
    ---
    </td>
</tr><tr><td>Post- Live Tasks
        <ol><li>Home Page banner text update</li>
            <li>Update version at Download page</li>
            <li>Update supported versions at FAQ</li>
            <li>Update Broadcast Content</li>
        </ol></td>
    <td> 
        <ul class="unstyled"><li>Done</li>
            <li>Done</li>
            <li>Done</li>
            <li>On- Live</li>
        </ul></td>
    <td> 
        <ul class="unstyled"><li>Done</li>
            <li>Done</li>
            <li>Done</li>
            <li>Done</li>
        </ul></td>
    <td>
    ---
    </td>
</tr><tr><td>Update Version on JED</td>
    <td>On- Live</td>
    <td>Done</td>
    <td>Only when Release get Done</td>
</tr></table><p class="text-center"><em>Release Process Deployment Checklist</em></p>

Checklist prepared on stage server will guide you to deploy changes on live server. Such a process will ensure accurate and error-free deploy on live server.

VPS provider digital ocean, provides cloning of test and stage machines to help you.

Steps to Clone Server Using Snapshots :

  1. Before taking snapshot, Power Off your Machine.

    power off setting
    Power Off Setting
  2. Take a Snapshot of your server using Digital Ocean Snapshot Tool.

    snapshot-of-server
    Take a Snapshot of your server
  3. Create a New Server/Droplet

    create-new-droplet
    Create a New Server/Droplet
  4. Select Size and region of server you want to deploy

    select-size-and-region-of-server
    Select Size and region of server
  5. Select "My Snapshot" section and choose the droplet snapshot that you created

    power off settingchoose-the-droplet-snapshot
    Choose the droplet snapshot
  6. Destroy Your Test / Stage Server

    destroy-your-droplet
    Destroy Your Test / Stage Server

We hope that this blog helped you learn best practices of deploying changes to Test --> Stage --> Live / Production server.

If you need any additional information, please drop us comment here and we will respond you back with proper solutions.

blog comments powered by Disqus
TASK Stage Live/ Production Comment
Pre Live
  1. Update Docs of new / modified apps
 
  • Done