Skip to content
GigaSpaces Logo GigaSpaces Logo
  • Products, Solutions & Roles
    • Products
      • InsightEdge Portfolio
        • Smart Cache
        • Smart ODS
        • Smart Augmented Transactions
        • Compare InsightEdge Products
      • GigaSpaces Cloud
    • Solutions
      • Industry
        • Financial Services
        • Insurance
        • Retail and eCommerce
        • Telecommunications
        • Transportations
      • Technical
        • Operational BI
        • Mainframe & AS/400 Modernization
        • In Memory Data Grid
        • Transactional and Analytical Processing (HTAP)
        • Hybrid Cloud Data Fabric
        • Multi-Tiered Storage
        • Kubernetes Deployment
        • Streaming Analytics for Stateful Apps
    • Roles
      • Architects
      • CXOs
      • Product Team
    • Building a Successful Hybrid and Multicloud Strategy
      vid-icon Guide

      Learn how to build and deploy a successful hybrid and multicloud strategy to achieve: agility and scalability, faster go-to-market, application acceleration, legacy modernization, and more.

      DOWNLOAD
    • Contact us
    • Try Free
  • Resources
    • Resource Hub
      • Webinars
      • Demos
      • Solution Briefs & Whitepapers
      • Case Studies
      • Benchmarks
      • Cost Reduction Calculators
      • Analyst Reports
      • eBooks
    • col2
      • Featured Case Studies
        • Mainframe Offload with Groupe PSA
        • Digital Transformation with Avanza Bank
        • High Peak Handling with PriceRunner
        • Optimizing Business Communications with Avaya
    • col3
      • Blog
      • Technical Documentation
    • How a Smart Operational Data Store (ODS) Drives Digital Transformation
      vid-icon Blog

      Learn how a Smart Operational Data Store has become one of the main drivers of digital transformation initatives in enterprises in several major industries.

      LEARN MORE
    • Contact Us
    • Try Free
  • Company
    • Col1
      • About
      • Customers
      • Management
      • Board Members
      • Investors
      • Events
      • News
      • Careers
    • col2
      • Partners
      • OEM Partners
      • System Integrators
      • Technology Partners
      • Value Added Resellers
    • col3
      • Support & Services
      • University
      • Services
      • Support
    • GigaSpaces is Headed to Database Management Today
      calendar-icon Event | April 22

      Join us at Database Management Today: New Strategies and Technologies, a special DBTA rountable webinar. Dive into the latest technologies and strategies every database professional needs to know about today and for the future.

      REGISTER NOW
    • Contact Us
    • Try Free
  • Contact Us
  • Try Free
  • Products, Solutions & Roles
    • Products
      • InsightEdge Portfolio
        • Smart Cache
        • Smart ODS
        • Smart Augmented Transactions
        • Compare InsightEdge Products
      • GigaSpaces Cloud
    • Solutions
      • Industry
        • Financial Services
        • Insurance
        • Retail and eCommerce
        • Telecommunications
        • Transportations
      • Technical
        • Operational BI
        • Mainframe & AS/400 Modernization
        • In Memory Data Grid
        • Transactional and Analytical Processing (HTAP)
        • Hybrid Cloud Data Fabric
        • Multi-Tiered Storage
        • Kubernetes Deployment
        • Streaming Analytics for Stateful Apps
    • Roles
      • Architects
      • CXOs
      • Product Teams
    • Contact Us
    • Try Free
  • Resources
    • Resource Hub
      • Webinars
      • Demos
      • Solution Briefs & Whitepapers
      • Case Studies
      • Benchmarks
      • Cost Reduction Calculators
      • Analyst Reports
      • eBooks
    • Featured Case Studies
      • Mainframe Offload with Groupe PSA
      • Digital Transformation with Avanza Bank
      • High Peak Handling with PriceRunner
      • Optimizing Business Communications with Avaya
    • Blog
    • Technical Documentation
    • Contact Us
    • Try Free
  • Company
    • About
    • Management
    • Customers
    • Board Members
    • Investors
    • Events
    • News
    • Careers
    • Partners
      • OEM Partners
      • System Integrators
      • Technology Partners
      • Value Added Resellers
    • Support & Services
      • University
      • Services
      • Support
  • Contact Us
  • Try Free

XAP on Cloudify Part 1

Subscribe to our blog!

Subscribe for Updates
Close
Back

XAP on Cloudify Part 1

GigaSpaces October 11, 2013
12 minutes read

Introduction

GigaSpaces XAP has lacked an official Cloudify recipe for some time now, and this series of posts will address my efforts to create one. The task of automating the deployment and management of the potentially complex suite of services that XAP represents is a challenge in and of itself, and marrying that with the sometimes overlapping constructs of Cloudify is even more challenging. This post will address the rationale for the effort, a bit of history of the effort, and a description of the recipes as they exist today. This is a work in progress, and all interested in contributing are encouraged to contribute.

Rationale
From the highest level, the big wins for XAP as a Cloudify recipe is consistent management across a deployed stack, and greater scaling flexibility.  Consistent management in the sense that as a member of a Cloudify managed stack, you have one tool and API for managing the entire stack, and the KPIs exposed in the view are at your discretion.  Greater scaling flexibility because Cloudify scaling logic is open ended, and can consider holistic scaling stategies, not just tier-based, reactionary strategies. Some other benefits of the XAP/Cloudify combination:

 

  • Repeatable deployments. This is one of the standard Cloudify (and devops) virtues. Repeatable, automated deployments are less error prone and convenient.
  • Platform independence. A Cloudify recipe serves as platform (in the infrastructure sense) independent description of deployment and configuration steps. A XAP recipe for Cloudify provides repeatable deployment on any Cloud and on non-virtual (or statically created virtual) hardware.
  • Composition. While it is conceivable to have a complete solution implemented entirely in XAP, in reality this is rare. XAP is generally married at least to a database, and almost always part of a stack where it takes the position of traditional middleware. With a Cloudify recipe, the deployment and management of an entire stack which includes XAP, can be automated.
  • Continuous Delivery. A stack including XAP that is automated via Cloudify can expose CI/CD meaningful remote commands that can provide stack-wide delivery functionality by integrating with popular CI build tools via a common interface.
  • Custom scaling behavior. By scaling using Cloudify rather than the XAP ESM, XAP scaling and rebalancing can be fully customized.
  • Improved dynamism. By describing a complete stack that includes XAP, the ability to scale dynamically in a holistic fashion is greatly increased. A classic example is exploiting public cloud capacity during volume spikes. With a XAP recipe, entire XAP-centric stacks can be spun up on demand, or in anticipation of demand.
  • Derived works. By descriping XAP in a recipe, the door is opened a bit to create derived cloud services based on XAP, such as Grid as a Service, and Replication as a Service, among others.  The recipes are designed to be easily inherited from to support such development.

 

Example #1 – Basic XAP Cloud Install

For the basic scenario of installing a mimimal XAP cluster, perhaps for development or testing, the process couldn’t be much simpler. Run the application recipe xap9x-tiny with XAP pointed at a Cloud or BYON provider of choice, and a small single container cluster will be downloaded, configured, and started for you.

 

Example #2 – Production XAP On A Public Or Private Cloud

 

For a production installation, there are a few planning and configuration steps that are required.  The involvement of Cloudify in the picture doesn’t eliminate the need to plan the cluster.  As is typical with XAP, you’ll need to estimate the total amount of data you will store in memory,  which will lead to a minimum number of containers that must be deployed and their sizes.  For production, you’ll want to deploy 2 instances of the xap-container recipe. If you’ll only need a single zone for your containers, you’ll need to start with however many instances your calculations resulted in. To set the container size, override or replace the gsc_jvm_options with the jvm options required (example: -Xms4g -Xmx4g). Note that you can’t configure a container larger than your machine template, in which case you’ll need to modify or add a template to request a larger machine for your containers. If you need multiple container zones, you can extend the base recipe, and pass the zones system property to the GSC JVM (i.e. -Dcom.gs.zones=xxx). You’ll also need to override the license property with your XAP license string.
That’s pretty much it. “Instant” (relatively) XAP, or “XAP on tap” if you will. New containers can be added dynamically to the running XAP cluster simply by using the CLI (or REST) command set-instances. PUs can be deployed via a custom command, described later. At this point, rebalancing of space instances is a manual process either via the XAP Admin API or the XAP Swing UI.

 

Example #3 – Production XAP On Non-virtual Infrastructure (“bare metal”)

 

If you haven’t read the paragraph above regarding XAP on Cloud infrastructure, you need to as it applies directly to deploying XAP on non-virtualized operating systems. Cloudify ships with a Cloud Driver for non-virtualized Os’s (or more accurately OS’s without a IAAS Cloud API). In other words, you can deploy XAP onto both non-virtualized operating systems, and virtualized operating systems not provided as a “Cloud”. The Cloud driver is called the BYON (Bring You Own Node Driver). Basically, the nodes only need ssh (or sftp) running for Cloudify to bootstrap on them, and deploy to them as though they were a Cloud. Once that step is complete, you can deploy XAP using the supplied recipes as though they were on an actual cloud.  Of course, now you can’t simply request a bigger machine from the Cloud, you have to go find one somewhere.

Using The Recipes

Currently, you can grab the recipes from my fork of the cloudify-recipes repo here. The service recipes are under services/xap9x. A simple application recipe is also available that starts a single container at apps/xap9x-tiny. The xap9x-tiny application will run without modification or reconfiguration. It uses a XAP 9.6 b9500 distribution and only deploys a single container, so no license is required (at least as currently configured). If you want to experiment with more nodes, or larger containers, you’ll have to provide a license key. This key will need to be set to the license property in both management and container recipes properties files. If you have your own XAP distribution you want to use, you’ll need to put it an HTTP server in a place accessible from your target infrastructure. Then you’ll need to modify the related properties in both management and container recipes.

Besides the license key, there are settings that may need to be tweaked to run a larger grid. For larger containers, you’ll possibly need to use a different machine template (perhaps 8GB or beyond system memory). To do this, you’ll need to create a machine template that refers to the proper cloud machine id, or ip address in the case of BYON. The easiest way to do this is to copy the default “SMALL_LINUX” or “SMALL_UBUNTU” into a separate file, modify the hardwardId to use the larger machine, and then add this to Cloudify via the “add-templates” CLI command. Of course you can simply add this template permanently to your *-cloud.groovy script. Once you have your larger machine, you’ll need to utilize it. The container recipe has a property setting named gsc_jvm_options, which are passed to the container when it starts. These settings are simply passed to the associated GSC in the GSC_JAVA_OPTIONS environment variable (described here). When a cluster becomes large enough, the management machine may also need to be beefed up.  The management recipe has three settings for tailoring the various JVMs, and their function is equivalent to the gsc_jvm_options. They are:

  • gsm_jvm_options
  • lus_jvm_options
  • webui_jvm_options

To access the XAP Web UI after launching, the management service has a link to it in the “Details” area.
Custom Commands
Some basic custom commands are included:

deploy-pu – deploy a processing unit
Parameters:

  • name – the displayed name of the processing unit
  • url – the URL where the pu can be downloaded from (recipe uses http GET)
  • schema – the space schema for the pu. Defaults to partitioned-sync2backup.
  • partitions – primary partition count
  • backups – number of backups per partition. Can be 0.
  • maxpervm – maximum instances per container VM (not Cloud VM).
  • maxpermachine – maximum instances per physical machine or Cloud VM.
deploy-grid – deploy a space
Parameters:

  • name – the name of the space
  • schema – the space schema. Defaults to partitioned-sync2backup.
  • partitions – primary partition count
  • backups – number of backups per partition. Can be 0.
  • maxpervm – maximum instances per container VM (not Cloud VM).
  • maxpermachine – maximum instances per physical machine or Cloud VM.
undeploy-grid – undeploy a space
Parameters:

  • name – the name of the space
NOTE: This command can be used to undeploy an arbitrary pu.

A Little History

In my previous work on Storm integration, I developed a simple recipe based on a single node XAP deployment. This was largely to avoid the potential complexities of a full blown XAP recipe, and a basic Storm integration doesn’t really require more than a single node anyway. Nevertheless, much of that initial recipe was useful as a starting point for the full recipe. Initially, I wanted a single service recipe to represent XAP in Cloudify. This approach would be the simplest from the user perspective, but in the end wasn’t doable in an elegant way. In the end, I chose a two recipe approach: a xap-management recipe, and a xap-container recipe. xap-management orchestrates the management services (gsm, lus, and web ui), and xap-management manages GSCs (containers). The management recipe serves as the hub for custom commands to perform cluster-wide operations such as deployment.

The Recipes: Design

Since a XAP cluster (excluding GSAs) consists of a few management processes, and many containers, it is logical to have (at least) two recipes: one for management and one for containers. One approach might be to simply create a recipe for every type of grid process: ESM, GSM, GSA, LUS, and GSC. This would supply some additional flexibility, but since only two of each at the most is recommended in grids of any size, the amount of flexibility gained from having many recipes is minimal. Also, since Cloudify itself provides GSA (process watchdog) and ESM (dynamic scaling) functionality, there is no need to start additional instances of these. This leaves the GSM (grid management/deployment) and the LUS (lookup service). For the container part, the recipe only needs to start a GSC. At this point in the development process, dynamic rebalancing after an autoscaling event is not addressed.

The Recipes: xap-management
xap-managementstarts the management services of XAP, the GSM and LUS. It also starts the Web UI. Currently it simply starts the gsm.sh script and uses the embedded LUS. One enhancement target would be to make the starting of a separate LUS a configuration option. The recipe is elastic with a maximum of two instances. Critical configuration items (in the xap-management-service.properties files):

  • template – the cloud template name for the recipe to use.
  • gsm_jvm_options – java options passed to the GSM JVM
  • lus_jvm_options – java options passed to the LUS JVM
  • webui_jvm_options – java options passed to the LUS JVM
  • uiport – the HTTP port for the Web UI to listen on.
  • lusport – the LUS port. This port essential defines and separates grid from each other and Cloudify itself. This port must be the same in both management and container recipes, and different from the LUS port that Cloudify uses.
  • license – if running more than the free license allows, this property must be set to a valid XAP license string.

The Recipes: xap-container
xap-container start GSCs in the cluster.  The recipe is elastic and doesn’t practically limit the number of containers that can be started.  This recipe is much simple than the management recipe, and has no custom commands for public consumption.  It does have a custom command for editing the node hosts file.  This is used for providing a symbolic name for the lookup service, and reacting to management services relocations.   Except for the jvm options above, the configuration parameters are the same.  Since only a single process is started (a GSC), there is only one property to hold JVM options: gsc_jvm_options (which maps to the standard GSC_JAVA_OPTIONS environment variable).

What’s Missing and What’s Next

There are significant omissions and plans for these recipes.  An obvious omission is partition rebalancing on a scaling event.  Another is the need for far more metrics, and a replication gateway recipe.  But this is a start. In future posts, I’ll describe in more detail what’s missing and why, some of the implementation war stories, and future plans.

Conclusion

In my opinion, XAP has needed a general purpose Cloudify recipe, and this is a start in that direction. This is a work in progress. It has been tested on EC2, HPCS, and a BYON cluster. Comments and contributions are welcome, as this will be an ongoing effort. Again, the code is here, at least for now.

CATEGORIES

  • Cloud
  • Cloudify
  • EC2
  • GigaSpaces
  • OpenStack
  • Web UI
  • XAP
GigaSpaces

All Posts (23)

YOU MAY ALSO LIKE

November 16, 2010

mea culpa: “Offheap access is…
3 minutes read

April 13, 2010

GigaSpaces XAP 7.1 being released…
5 minutes read

October 7, 2008

Memory Capacity Planning – The…
2 minutes read
  • Copied to clipboard

PRODUCTS, SOLUTIONS & ROLES

  • Products
  • InsightEdge Portfolio
    • Smart Cache
    • Smart ODS
    • Smart Augmented Transactions
    • Compare InsightEdge Products
  • GigaSpaces Cloud
  • Roles
  • Architects
  • CXOs
  • Product Teams
  • Solutions
  • Industry
    • Financial Services
    • Insurance
    • Retail and eCommerce
    • Telecommunications
    • Transportation
  • Technical
    • Operational BI
    • Mainframe & AS/400 Modernization
    • In Memory Data Grid
    • HTAP
    • Hybrid Cloud Data Fabric
    • Multi-Tiered Storage
    • Kubernetes Deployment
    • Streaming Analytics for Stateful Apps

RESOURCES

  • Resource Hub
  • Webinars
  • Blogs
  • Demos
  • Solution Briefs & Whitepapers
  • Case Studies
  • Benchmarks
  • Cost Reduction Calculators
  • Analyst Reports
  • eBooks
  • Technical Documentation
  • Featured Case Studies
  • Mainframe Offload with Groupe PSA
  • Digital Transformation with Avanza Bank
  • High Peak Handling with PriceRunner
  • Optimizing Business Communications with Avaya

COMPANY

  • About
  • Customers
  • Management
  • Board Members
  • Investors
  • News
  • Events
  • Careers
  • Contact Us
  • Book A Demo
  • Try GigaSpaces For Free
  • Partners
  • OEM Partners
  • System Integrators
  • Value Added Resellers
  • Technology Partners
  • Support & Services
  • University
  • Services
  • Support
Copyright © GigaSpaces 2021 All rights reserved | Privacy Policy
LinkedInTwitterFacebookYouTube

Contact Us