Glossary
The WPCS platform introduces a few concepts that help you run your WaaS and enables you to manage and develop your products. In this overview we will go over the main concepts that you will be working with, using the WPCS platform.
Products
A product is the starting point of all your endeavours on the WPCS platform. In the most crude sense, it constitutes your WaaS, or one of them. Your product contains all the other objects in the platform: versions, tenants, snapshots and backups. When you are at the point you start automating utilizing our API, you will do so in the context of a product.
Versions
Where the product is and contains all of your WaaS, the version is, like it says, a specific version of it. The main purpose of the version is to allow you to continue working on your WaaS without risking errors in live sites. It also helps you to test when you are upgrading your WaaS. Your tenants, the actual live sites you are running, always live in the context of a version. Which plugins, themes and language files are available on your tenant depends fully on what is available in the version they live on and its deployed snapshot. Besides that, the version your tenants run on also determines the WordPress and PHP version. When you want to upgrade WordPress core or use a newer PHP version, you'll do so using a new version.
Snapshots
Not all changes you do on your version will immediately be pushed to your tenants. For example when you install a new plugin to your version, you will see that this plugin will not be available for your tenants. This is where snapshots come in. Snapshots contitute the evolution of your version. When you edit your version and are satisfied with the result, you can push your new plugins, themes and language files to the tenants in that version by deploying the current snapshot in the WPCS Console. This way you are in control when tenants get updated. Snapshots also contitute the start of your tenant. When creating a tenant in the console you have to select a snapshot. The tenant will be made available with all the images, database settings (including posts etc.), and all of the afore mentioned parts of the version. Tenants created with the API will be created with the latest snapshot of the version they are created on unless you provide a specific snapshot to the API.
When deploying a new snapshot to a version that has tenants, the plugins, themes and language files for existing tenants will be updated, but their database will stay in tact. So in order to utilize a new plugin you will need to manually turn it on in the existing tenants. The same holds for content. You can add new pages or posts in your snapshot, but these will not be automatically added to existing tenants. New tenants based on that snapshot will have the updated content.
Tenant snapshots
Not all tenants are created equal. In your WaaS product you might want tenants to have a different starting point, different layouts or even different plans. These tenants might have different configurations for plugins or other default content, for example. When you have to create these tenants based on the same snapshot, you have to do a lot of manual work to set these tenants up the right way. This manual work hinders the scalability of your product. That is why you can create tenant snapshots in the WPCS Platform. Tenant snapshots are, like normal snapshots, the starting point for new tenants. But instead of going into the snapshot editor to create a new snapshot for your version, you can base these snapshots on tenants. After creating a tenant snapshot, you can create new tenants based on this snapshot, allowing you to diversify configurations within your otherwise uniform product. Apart from a different creation process, there is another small difference between tenant snapshots and normal snapshots. You can assign a groupname to your tenant snapshots. This groupname can be used in the API when creating a tenant to say which "flavor" of tenant should be created. When a tenant gets created through our API with a groupname, the last snapshot with that groupname will be used as a base for the new tenant. This allows you to do updates for specific plans.
Tenants
Tenants are the sites that we're doing all this for: the actual live sites. You can edit these sites, add a domain to them and expose them to the world. They are always based on a specific snapshot (be it a normal snapshot or a tenant snapshot) and always live in a version (defining their plugins, themes and language files). You are able to move these tenants from one version to another version. This allows you to create some test tenants on one version and see if certain updates don't break anything, before actually moving your live tenants. All tenants have their own backups and their own databases.
Note that since plugins, themes and language files are based on the version, you are not able to install or modify these for individual tenants.