Table of Contents |
---|
Overview
Excerpt |
---|
A cartridge is a virtual machine (VM) on an IaaS that IaaSs, such as EC2, OpenStack and GCE, and a container on Kubernetes, which has software components to interact with Private PaaS. WSO2 Private PaaS provides cartridges for WSO2 products (e.g., API Manager, Enterprise Service Bus, Identity Server etc.) . Furthermore, WSO2 Private PaaS supports any pluggable cartridge, which comes under the following categories: data, load balancer, framework or application. Cartridges will vary based on the operating system (OS) and IaaS. Therefore, you need to create a custom cartridge for each OS and IaaS. All cartridges in WSO2 Private PaaS provide a very secure, OS level isolated environment for cloud applications. Cartridges can operate in two modes: single tenant and multi-tenant. The cartridge type differs based on the method that you used to to create it: generic cartridge and fully configured cartridge. If required, you can use an orchestration layer, i.e., Puppet, Chef etc., to automate the cartridge creation process. |
Cartridge instances
In a live Stratos environment, each virtual machine (VM) or a Docker container is known as a cartridge instance in Stratos terminology.
Cartridge types
Cartridges can be created as either a single tenant cartridge or as a multi-tenant cartridge. These cartridge types have been illustrated in the following sub-sections.
...
A fully configured cartridge, which is also known as a pre-configured cartridge, is a cartridge where all the software and configurations are pre-configured. Fully configured cartridges include the base image operating system (OS), setup scripts, required software, Puppet Agent (PA) and Cartridge Agent (CA). The Puppet Agent will communicate with the Puppet Master to retrieve the required software updates when there is a difference between existing software in the instance and the Puppet Master. The steps involved in creating a cartridge will vary based on the IaaS being used. For more information on creating a cartridge, see Creating a New Cartridge.
...
When a tenant user signs up to an application, which has one or more pre-configured cartridges, Cloud Controller sends a payload to the IaaS, and in turn the IaaS starts up cartridge instances based on the snapshot of the pre-configured cartridges, which correspond to the deployed application. When the cartridge instance starts, the startup script (e.g., init.sh)
within the cartridge gets automatically executed, and starts the Cartridge Agent, which communicates with Stratos to carryout the required operations. The Puppet Agent will only communicate with the Puppet Master to retrieve the required software updates, when there is a difference between existing software in the instance and the Puppet Master.
Overall comparison
The two cartridge creation approaches that Apache Stratos provide have their own advantages and disadvantages. Therefore, it is important that DevOps select the most suitable cartridge creation method based on the needs of their organizations.
...
Initially, when adding a cartridge, DevOps have to define the cartridge using a cartridge.json
via the CLI, Web UI or the REST API, and send it to Stratos Manager. Thereafter, Stratos Manager sends the cartridge definition to Cloud Controller (CC) to be added. Cloud Controller carries out a validation process based on the cartridge image ID (e.g., On EC2 an Amazon Machine Image [AMI]). If the cartridge already exists, Cloud Controller deletes the existing cartridge and adds the cartridge again using the modified configuration. If the cartridge does not exist, Cloud Controller proceeds with the process of adding the cartridge. Cloud Controller adds the cartridge definition to its in-memory data structure, and persist it in its registry. Thereafter, Cloud Controller updates the Topology with the service definition, and publishes the Topology event to Message Broker (MB).
...