Apache StratOS Cartridges Introduction and Deployment methods

Source: Internet
Author: User

Cartridge

Brief introduction

Cartridge is an IaaS-based virtual machine (VM) that contains components that interact with Stratos PAAs. Stratos provides cartridge for out-of-the-box php,mysql and Tomcat on OpenStack and Amazon EC2. In addition, Strato supports any pluggable cartridge, including the following categories: data, Load balancers, application frameworks, and applications. CARTRIDG differs depending on the operating system (OS) and IaaS, so you need to create custom cartridge for each OS and IaaS. All the cartridge in Stratos provide a very secure, OS-level isolation environment for cloud applications. Cartridge can be run in two modes: single-tenant mode and multitenant mode. The cartridge type differs from the method that created it: Universal cartridge and fully configured cartridge. If you want, you can automate the cartridge creation process using configuration tools such as Puppet, Chef, and so on.

Cartridge instances

In a running Stratos environment, each virtual machine (VM) or Docker container is considered to be an cartridge instance.

Cartridge mode

You can create cartridge in a single-tenant or multi-tenancy way, and the cartridge types are described in the following subsections

Single tenant cartridge

In Apache Stratos, when a single-tenant application is deployed, it contains one or more single-tenant cartridge. Tenant users log on to the application, which creates separate cartridge instances for each cartridge in the application, providing user process-level isolation and providing user-specific instances. Single-tenant users can map to one or more cartridge instances

650) this.width=650; "Src=" Http://s4.51cto.com/wyfs02/M01/86/81/wKiom1fBOuLRaxerAAA4SKvAyxE169.jpg-wh_500x0-wm_3 -wmp_4-s_3650780123.jpg "title=" dan.jpg "alt=" Wkiom1fboulraxeraaa4skvayxe169.jpg-wh_50 "/>

Multi-tenant cartridge

In Stratos, a multi-tenant application contains one or more multitenant cartridge that allow multiple tenants to share a single cartridge instance. Even if a tenant user shares a single cartridge instance, the user's processing is handled separately by the isolated program code. Users must be registered with the application before they can use the application.

650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M00/86/80/wKioL1fBO0DQFhfZAAA2HQ6CQkE896.jpg-wh_500x0-wm_3 -wmp_4-s_4058209602.jpg "title=" duo.jpg "alt=" Wkiol1fbo0dqfhfzaaa2hq6cqke896.jpg-wh_50 "/>

Cartridge How to create

Apache Stratos allows DevOps to create cartridge using a fully configured cartridge or generic cartridge approach. The above mentioned cartridge creation method is explained and analyzed in the following subsections.

General cartridge

Universal cartridge is the installation of the required software in a cartridge instance after a cartridge instance is generated and running. The universal cartridge is a cartridge that contains only the underlying operating system (OS) image and the puppet agent (PA) with the installation script preinstalled. The specific steps involved in creating a cartridge depend on the IaaS being used. For more information about creating a cartridge, see Create a new cartridge chapter.


How does it work?

When the user registers with the app, the app has one or more generic cartridge, the cloud controller sends the underlying data that is loaded to the IaaS, and the IaaS uses and applies the corresponding generic cartridge snapshot to launch the cartridge instance. When the cartridge instance starts, the startup script (for example, init.sh) is automatically executed within cartridge, and the puppet agent is started, and the pupput agent interacts with the puppet master, and then Install the cartridge agent and the required software in cartridge. Thereafter, the cartridge agent interacts with the Stratos to perform the required operations.


Fully configured Cartridge

Fully configured cartridge can also be considered pre-configured cartridge, where all the software and configurations are prepared beforehand. Fully configured cartridge includes the underlying operating system (OS) image, installation scripts, required software, puppet agent (PA), and cartridge agent (CA). The puppet agent interacts with the puppet master node to obtain the required software updates when there is a difference between the software in the instance and the software on the puppet master node. The specific steps involved in creating a cartridge depend on the IaaS being used. For more information about creating a cartridge, see Create a new cartridge chapter.

650) this.width=650; "Src=" Http://s2.51cto.com/wyfs02/M00/86/80/wKioL1fBPSfgC8qzAAkLSsN_0VU263.jpg-wh_500x0-wm_3 -wmp_4-s_3562752129.jpg "title=" full.jpg "alt=" Wkiol1fbpsfgc8qzaaklssn_0vu263.jpg-wh_50 "/>

How does it work?

When the user registers to the app, the app has one or more preconfigured cartridge, the cloud controller sends the underlying data that is loaded to the IaaS, and the IaaS uses and applies the corresponding preconfigured cartridge snapshot to launch the cartridge instance. When the cartridge instance starts, the startup script (for example, init.sh) executes automatically within the cartridge, and initiates the cartridge agent, cartridge agent, and Stratos interaction to perform the desired action. The puppet agent interacts only with the puppet master node to obtain the required software updates.

Overall comparison

Apache Stratos provides two ways to create the cartridge, each with its pros and cons. Therefore, DevOps chooses the most appropriate CARTRIDG creation method based on the needs of its organization.

All applications and configurations are preconfigured in a fully configured cartridge way, and devops can generate cartridge instances faster than the generic cartridge approach. However, because generic cartridge does not have any specific applications and configurations, DevOps can use the same cartridge to generate different types of cartridge instances without creating a separate cartridge image for each cartridge type.

To learn how to create a cartridge on a virtual machine and Docker, see Create a new cartridge chapter.


Cartridge deployment

Initially, when adding a cartridge,devops, you must use Cartridge.json to define the cartridge through the CLI, the Web UI, or the REST API and send it to the Stratos manager. Thereafter, the Stratos Manager sends cartridge definitions to the cloud Controller (CC) requirements to add cartridge. The cloud controller is validated against the cartridge image ID (for example, EC2 the previous Amazon machine Image [AMI]). If cartridge already exists, the cloud controller deletes the existing cartridge and adds the new cartridge after the modified configuration. If cartridge is not present, the cloud controller begins to add the cartridge process, the cloud controller adds the cartridge definition to its in-memory data structure, and persists the record to its registry, after which the cloud controller updates the service definition of the topology and publishes the topology event to the message agent ( MB).


This article is from the "Wesley" blog, please be sure to keep this source http://szk5043.blog.51cto.com/8456440/1843249

Apache StratOS Cartridges Introduction and Deployment methods

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.