This documentation is for WSO2 Private PaaS 4.0.0. View documentation for the latest release.
Single Tenant Cartridge Subscription Workflow - WSO2 Private PaaS 4.0.0 - WSO2 Documentation
||
Skip to end of metadata
Go to start of metadata

The diagram above and the steps below illustrate the workflow of subscribing to a single tenant cartridge:

  1. Cartridge deployer will deploy an application in Private PaaS.
    The user with the cartridge deployer role will deploy a cartridge in WSO2 Private PaaS either via REST API, CLI or GUI.
  2. Cloud Controller will send the Service Created event to the Topology topic in Message Broker.
    Cloud Controller will send the Service Created event to the Topology in order to notify it that a new cartridge has been successfully deployed.
  3. The user will subscribe to a cartridge.
    When subscribing to a cartridge, the user will select a cartridge, auto-scaling policy and deployment policy, which will be used for the application, and also specify the repository for the application. Thereafter, based on the information provided by the user, Stratos Manager will generate a subscription key for the subscription and store it against the repository information.
  4. Stratos Manager will send the new subscription details to the Cloud Controller (CC).
    Stratos Manager will send the subscription details, which include the cartridges, policies and subscription key, to Cloud Controller via a service call. 
  5. Cloud Controller will publisher the Cluster Created event to the Topology topic in Message Broker (MB).
    Cloud Controller will create a payload for the subscription, which includes the subscription key and the subscription cluster ID. The subscription cluster ID refers to the cluster domain, which is unique for that particular subscription. Thereafter, Cloud Controller will publish the Cluster Created event, which includes the associated policy names, to the Topology topic.
  6. Auto-scaler will receive the Topology topic update from Message Broker.
    As Auto-scaler has already subscribed to the Topology topic, it will receive the Cluster Created event, which was published by Cloud Controller. 
  7. Auto-scaler will send its decision to Cloud Controller.
    When Auto-scaler receives the Cluster Created event message, it will update its in-memory Topology. Auto-scaler is responsible for making decisions, as to what instance to create and where (i.e., in which region or zone) to create the instance. Therefore, Auto-scaler will evaluate the corresponding subscription rules, which are within Auto-scaler for that specific subscription, and send its decision to Cloud Controller via a service call.
  8. Cloud Controller will publish the Instance Spawned event to the Topology topic in Message Broker.
    After receiving the message from Auto-scaler, Cloud Controller will update the payload with the following information: Member ID and Service endpoint of the Message Broker and Complex Event Processor (CEP). Thereafter, Cloud Controller will spawn an instance in the specified region using jclouds and pass the payload to that instance. Once the instance has been spawned Cloud Controller will update the Topology topic with the Member Created event.

    In the future, the Instance Spawned event will be renamed to "Member Created".

  9. Cartridge Agent will publish the Instance Started event to the Instance Status topic in Message Broker.
    A Cartridge Agent will be included in every instance and will start-up automatically. After the Cartridge Agent has started up, it will initially subscribe to the Instance Notifier topic. Thereafter, the Cartridge Agent will publish the Instance Started event to the Instance Status topic.
  10. Cloud Controller will receive the Instance Status topic update from Message Broker.
    After Cloud Controller gets the Instance Started event, Cloud Controller will publish the Member Started event  to the Topology topic in the Message Broker.
  11. Stratos Manager will receive the Instance Status topic update from Message Broker.
    After Stratos Manager receives the Instance Started event, Stratos Manager will send Artifact Update event to all the clusters created for the above 
    subscription. The Artifact Update event will contain the repository information and the encrypted repository password, which was encrypted using the subscription key.
  12. Cartridge Agent will receive the Artifact Update event.
    After receiving the Artifact Update event, Cartridge Agent will decrypt the repository information with the subscription key, get the artifact and store it in its memory. Thereafter, Cartridge Agent will use the latter information to get the Git clone or Git pull to update its artifacts. These artifacts will be deployed in the server, which is running in the cartridge instance. 
  13. Cartridge Agent will publish the Instance Activated event to the Instance Status topic in Message Broker.
    After the artifacts are deployed, Cartridge Agent will wait until the ports get active and the applications are started. Thereafter, Cartridge Agent will publish the Instance Activated event to the Instance Status topic, with member information. Furthermore, Cartridge Agent will also start the cartridge health publisher, which is used to publish periodical health statistics to the CEP via Thrift.
  14. Cloud Controller  will receive the Instance Status topic update from Message Broker.
    Cloud Controller will receive the Instance Activated event from Message Broker.
  15. Cloud Controller will publish the Member Activated event to the Topology topic in Message Broker.
    Cloud Controller will publish the Member Activated event to the Topology topic indicating that the cartridge is ready to be used.
  16. Load Balancer will receive the Topology topic update from Message Broker.
    Load Balancer will receive the Member Activated event from the Topology topic.
  17. Load Balancer will update its member list in each cluster.
    Load Balancer  will update its in-memory Topology of that relevant cluster and also update the relevant cluster member list of the load balancing endpoint.
  18. Cartridge Agent will periodically publish health statistics to CEP.
    Cartridge Agent will periodically publish health statistics,  which will include memory consumption and load average, to CEP.
  • No labels