Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Mastering Ceph

You're reading from   Mastering Ceph Infrastructure storage solutions with the latest Ceph release

Arrow left icon
Product type Paperback
Published in Mar 2019
Publisher Packt
ISBN-13 9781789610703
Length 356 pages
Edition 2nd Edition
Tools
Arrow right icon
Author (1):
Arrow left icon
Nick Fisk Nick Fisk
Author Profile Icon Nick Fisk
Nick Fisk
Arrow right icon
View More author details
Toc

Table of Contents (18) Chapters Close

Preface 1. Section 1: Planning And Deployment
2. Planning for Ceph FREE CHAPTER 3. Deploying Ceph with Containers 4. BlueStore 5. Ceph and Non-Native Protocols 6. Section 2: Operating and Tuning
7. RADOS Pools and Client Access 8. Developing with Librados 9. Distributed Computation with Ceph RADOS Classes 10. Monitoring Ceph 11. Tuning Ceph 12. Tiering with Ceph 13. Section 3: Troubleshooting and Recovery
14. Troubleshooting 15. Disaster Recovery 16. Assessments 17. Other Books You May Enjoy

Writing a simple RADOS class in Lua

One of the default RADOS classes in Ceph from the Kraken release onward is one that can run Lua scripts. The Lua script is dynamically passed to the Lua RADOS object class, which then executes the contents of the script. The scripts are typically passed in a JSON-formatted string to the object class. Although this brings advantages over the traditional RADOS object classes, which need to be compiled before they can be used, it also limits the complexity of what the Lua scripts can accomplish. As such, thought should be given as to what method is appropriate for the task you wish to accomplish.

The following Python code example demonstrates how to create and pass a Lua script to be executed on an OSD. The Lua script reads the contents of the specified object and returns the string of text back in uppercase—all processing is done on the...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime