Hyper Open Edge Cloud

Make Wordpress available on SlapOS Node

A step by step guide to bootstrap and configue a SlapOS Slave Node.
  • Last Update:2013-05-13
  • Version:002
  • Language:en

Make Wordpress available on a SlapOS Node

The goal of this tutorial is to teach how to install what we call Software Release, here Wordpress Software Release. In SlapOS, it will allow you to make deployment of Wordpress instances available.

Basic software concepts of SlapOS

In SlapOS, software is divided in two parts. Those concepts will be used during all the SlapOS tutorials, so be sure to read them carefully.

First is the Software Release. It represents the entire installation of a software, but without configuration files. At this point, software is not usable, because there is no configuration file, i.e Wordpress and dependencies is installed but no disk image or specific configuration exists yet.

Then comes the Software Instance. It will reuse installed Software Release by creating wrappers, configuration files and anything specific to an instance. In the case of Wordpress, it will create a disk image with possibly data in it, and some configuration files.

When a Software Release is installed on a machine, SlapOS can then create Software Instances using the Software Release and only creating what is needed : configuration file, and disk image.

This way, you will have one Wordpress installation (the Wordpress Software Release), and multiple running instances of Wordpress (Wordpress Software Instances) using the same Wordpress installation, allowing you to save space and not reinstalling Wordpress each time a new instance gets deployed.

In the previous tutorial, you set up a SlapOS node, also known internally as Computer. A Computer is divided into Computer Partitions. You set up the number of those partitions in the slapos.cfg configuration file, remember? 20 partitions means that 20 different Software Instance can be deployed on your node. If you installed the Wordpress Software Release on your node, it means that 20 Wordpress Software Instances can be installed on your node. If you installed the Wordpress Software Release AND the MySQL Software Release on your node, it means that 20 Software Instance of Wordpress or MySQL can be installed on your node.

Workflow of a Software Instance

Currently, when you request a Software Instance, the SlapOS Master will redirect you to the order page. After a few seconds, the instance document will appear. It will be by default in "Looking for free partition" state. When the SlapOS Master finds a suitable computer to host the instance, status will change to "Waiting for partition instantiation". When the computer is actually deploying the instance, it will change to "Start in progress", then "Started" when it has finished and checked that service is up.

You can stop your instance, changing instance state to "Stop in progress", then "Stopped". You can also destroy it (forever!), changing state to "Destroy in progress", then "Destroyed".

Why my new Software Instance keeps being in "Looking for free partition" state?

A newly requested instance staying in "Looking for free partition" state too long means that no suitable computer has been found by the SlapOS Master. If you specified your computer as a target, it means that either there is no more free Computer Partition (all are already taken), or that the linked Software Release is not correctly installed.

Conventions

As a general convention, commands prepended with $ might be run as ordinary user whereas commands prepended by # require superuser privileges.

Add Software

You can register you server to slapos.org to accept the allocation of certain software. Login, go to "My Servers", select you server and click on "Install New Software" button.

Select Wordpress

This brings you to list of all software which can be installed on SlapOS Slave Nodes. Select the one which you wish to add (here : Wordpress) and click on "Add Software".

Confirm

You must now specify which release of the software you accept. Multiple releases may exist for the same software, some of which could be experimental and others quite reliable. Select the latest stable release. It should be slapos-0.xx where xx is the highest number available. Once the release is selected, click on the "Order" button.

Read logs

# tail -f /opt/slapos/log/slapos-node-software.log
  

In your SlapOS Node, You should see after a few seconds messages which explain that a given software release needs to be installed. If everything is fine, a message to notify the end of the build process will appear in the terminal. Your software is now ready to receive allocation request, something which we are going to study in another lesson.

If the Software Release to install is not yet available to your distribution, it will be automatically compiled, so it may require a lot of time to finish - from 20 minutes to several hours.