Maximum Uptime
Cluster Orchestration
with Ansible
Ryan Ross, Senior Site Reliability Engineer
Ryan Ross
■ Senior Site Reliability Engineer at dbt Labs
■ Senior DevOps Engineer at Martin DSP/Pubmatic
■ DevOps Engineer at ConstructConnect
■ Senior Operations Engineer at Alveo Health
Your photo
goes here,
smile :)
Talk Objective:
Provide actionable tips and
patterns to build confidence
in orchestrating ScyllaDB in
Production with Ansible.
■ ScyllaDB Use Cases at a DSP
■ Define “Cluster Uptime”
■ Tips for Using Ansible with ScyllaDB
■ Demo
Presentation Agenda
ScyllaDB Use Cases
What is a Demand-Side Platform (DSP)?
A Demand-Side Platform is a system that allows buyers of
digital advertising inventory to manage multiple ad exchange
and data exchange accounts through one interface - Wikipedia
What is a Demand-Side Platform (DSP)?
A Demand-Side Platform is a system that allows buyers of
digital advertising inventory to manage multiple ad exchange
and data exchange accounts through one interface - Wikipedia
What is a Demand-Side Platform (DSP)?
A Demand-Side Platform is a system that allows buyers of
digital advertising inventory to manage multiple ad exchange
and data exchange accounts through one interface - Wikipedia
What is a Demand-Side Platform (DSP)?
A Demand-Side Platform is a system that allows buyers of
digital advertising inventory to manage multiple ad exchange
and data exchange accounts through one interface - Wikipedia
What is a Demand-Side Platform (DSP)?
A Demand-Side Platform is a system that allows buyers of
digital advertising inventory to manage multiple ad exchange
and data exchange accounts through one interface - Wikipedia
The DSP connected advertisers and agencies with audiences to
allow real-time bidding for and displaying of online-advertising.
Use Cases for ScyllaDB at a DSP
Use Cases for ScyllaDB at a DSP
Billions of requests per day
Use Cases for ScyllaDB at a DSP
Billions of requests per day
Equal read and write access patterns
Use Cases for ScyllaDB at a DSP
Billions of requests per day
Equal read and write access patterns
24 x 7 x 365 Uptime
Use Cases for ScyllaDB at a DSP
Billions of requests per day
Equal read and write access patterns
24 x 7 x 365 Uptime
Millisecond response times
Use Cases for ScyllaDB at a DSP
Billions of requests per day
Equal read and write access patterns
24 x 7 x 365 Uptime
Millisecond response times
Huge datasets
Use Cases for ScyllaDB at a DSP
Billions of requests per day
Equal read and write access patterns
24 x 7 x 365 Uptime
Millisecond response times
Huge datasets
Defining “Uptime”
Defining “Uptime”
Provide a cluster that is available for dependent applications.
Whole Cluster Uptime
Whole Cluster Uptime
Whole Cluster Uptime
Whole Cluster Uptime
Whole Cluster Uptime
Whole Cluster Uptime
Tips for Using Ansible
to Orchestrate
ScyllaDB with Whole
Cluster Maximum Uptime
* Use at your own risk. Always test in a non-customer facing environment first!
Inventory to Cluster Architecture
Structuring your Inventory will go a long
way in helping manage multiple clusters
and data centers. I saw success with:
Inventory to Cluster Architecture
Structuring your Inventory will go a long
way in helping manage multiple clusters
and data centers. I saw success with:
■ Inventory -> Cluster
Inventory to Cluster Architecture
Structuring your Inventory will go a long
way in helping manage multiple clusters
and data centers. I saw success with:
■ Inventory -> Cluster
■ Inventory Group -> Data Center
Inventory to Cluster Architecture
Ansible can have multiple Inventories
Dynamic Inventory Scripts
An underused superpower of your Cloud Provider is using them as your
asset management database. Ansible can tie into provider’s API to get
metadata information on instances with Dynamic Inventory Scripts.
Dynamic Inventory Scripts
Dynamic Inventory Scripts
Dynamic Inventory Scripts
Dynamic Inventory Scripts
Use Lineinfile Module Instead of Template
The ansible.builtin.lineinfile module should be
used instead of others such as copy or template.
Use Lineinfile Module Instead of Template
The ansible.builtin.lineinfile module should be
used instead of others such as copy or template.
■ Copy and Template assume Ansible has a valid
copy of the file
Use Lineinfile Module Instead of Template
The ansible.builtin.lineinfile module should be
used instead of others such as copy or template.
■ Copy and Template assume Ansible has a valid
copy of the file
Use Lineinfile Module Instead of Template
The ansible.builtin.lineinfile module should be
used instead of others such as copy or template.
■ Copy and Template assume Ansible has a valid
copy of the file
Use Lineinfile Module Instead of Template
The ansible.builtin.lineinfile module should be
used instead of others such as copy or template.
■ Copy and Template assume Ansible has a valid
copy of the file
■ This becomes problematic with files that are
changed by the project, such as config files
installed with the distribution’s installer
Use Lineinfile Module Instead of Template
The ansible.builtin.lineinfile module should be used instead
of others such as copy or template.
■ Copy and Template assume Ansible has a valid copy of
the file
■ This becomes problematic with files that are changed by
the project, such as config files installed with the
distribution’s installer
■ Use Lineinfile to ensure the most recent and valid file
settings are preserved and only change what’s needed.
Lineinfile Continued
Preserve project defaults and change only what
you’re sure of.
Lineinfile Continued
Preserve project defaults and change only what
you’re sure of.
Run Playbooks Serially When Needed
Run Playbooks Serially When Needed
By default, Ansible will try to run each
Task one at a time on all hosts in the
Inventory before moving onto the next
Task, like so:
Run Playbooks Serially When Needed
By default, Ansible will try to run each
Task one at a time on all hosts in the
Inventory before moving onto the next
Task, like so:
Run Playbooks Serially When Needed
Use the Serial argument at the Play to
run all Tasks on one host before
moving onto the next host in an
Inventory
Run Playbooks Serially When Needed
Use the Serial argument at the Play to
run all Tasks on one host before
moving onto the next host in an
Inventory
Run Playbooks Serially When Needed
Use the Serial argument at the Play to
run all Tasks on one host before
moving onto the next host in an
Inventory
Check Cluster Membership Before Making Changes
Cluster changes require all nodes to be Up and Normal (UN). I wrote a Role that was
prerequisite for all Plays that made cluster.
Check Cluster Membership Before Making Changes
Cluster changes require all nodes to be Up and Normal (UN). I wrote a Role that was
prerequisite for all Plays that made cluster.
Use Automation to Run Ansible
Ansible is an open source cli tool, but it should be
wrapped in another automation tool for Production
use. This has many benefits:
■ Run Playbooks on a schedule
■ Auditable output and outcomes
■ Improved security
■ Send alerts to teams
Use Automation to Run Ansible
There are lots of options when it comes to writing
automation around Ansible:
■ Your current C.I. tool
■ Jenkins
■ Github Actions
■ Ansible Automation Platform from RedHat (paid)
■ AWX (upstream F.O.S.S./Community version of Ansible
Automation Platform)
Ansible Ecosystem
Ansible has a thriving ecosystem of official and unofficial Collections to use.
Ansible Ecosystem
Ansible has a thriving ecosystem of official and unofficial Collections to use.
■ Collection Index
■ Galaxy
Ansible Ecosystem
Ansible has a thriving ecosystem of official and unofficial Collections to use.
Ansible Ecosystem
Ansible has a thriving ecosystem of official and unofficial Collections to use. To show
a few:
Demo Time
* Use at your own risk. Always test in a non-customer facing environment first!
Thank You
Stay in Touch
Ryan Ross
nazufel@protonmail.com
@nazufel
www.linkedin.com/in/rossryan1/
github.com/nazufel/scylla-summit-2023

Maximum Uptime Cluster Orchestration with Ansible

  • 1.
    Maximum Uptime Cluster Orchestration withAnsible Ryan Ross, Senior Site Reliability Engineer
  • 2.
    Ryan Ross ■ SeniorSite Reliability Engineer at dbt Labs ■ Senior DevOps Engineer at Martin DSP/Pubmatic ■ DevOps Engineer at ConstructConnect ■ Senior Operations Engineer at Alveo Health Your photo goes here, smile :)
  • 3.
    Talk Objective: Provide actionabletips and patterns to build confidence in orchestrating ScyllaDB in Production with Ansible.
  • 4.
    ■ ScyllaDB UseCases at a DSP ■ Define “Cluster Uptime” ■ Tips for Using Ansible with ScyllaDB ■ Demo Presentation Agenda
  • 5.
  • 6.
    What is aDemand-Side Platform (DSP)? A Demand-Side Platform is a system that allows buyers of digital advertising inventory to manage multiple ad exchange and data exchange accounts through one interface - Wikipedia
  • 7.
    What is aDemand-Side Platform (DSP)? A Demand-Side Platform is a system that allows buyers of digital advertising inventory to manage multiple ad exchange and data exchange accounts through one interface - Wikipedia
  • 8.
    What is aDemand-Side Platform (DSP)? A Demand-Side Platform is a system that allows buyers of digital advertising inventory to manage multiple ad exchange and data exchange accounts through one interface - Wikipedia
  • 9.
    What is aDemand-Side Platform (DSP)? A Demand-Side Platform is a system that allows buyers of digital advertising inventory to manage multiple ad exchange and data exchange accounts through one interface - Wikipedia
  • 10.
    What is aDemand-Side Platform (DSP)? A Demand-Side Platform is a system that allows buyers of digital advertising inventory to manage multiple ad exchange and data exchange accounts through one interface - Wikipedia The DSP connected advertisers and agencies with audiences to allow real-time bidding for and displaying of online-advertising.
  • 11.
    Use Cases forScyllaDB at a DSP
  • 12.
    Use Cases forScyllaDB at a DSP Billions of requests per day
  • 13.
    Use Cases forScyllaDB at a DSP Billions of requests per day Equal read and write access patterns
  • 14.
    Use Cases forScyllaDB at a DSP Billions of requests per day Equal read and write access patterns 24 x 7 x 365 Uptime
  • 15.
    Use Cases forScyllaDB at a DSP Billions of requests per day Equal read and write access patterns 24 x 7 x 365 Uptime Millisecond response times
  • 16.
    Use Cases forScyllaDB at a DSP Billions of requests per day Equal read and write access patterns 24 x 7 x 365 Uptime Millisecond response times Huge datasets
  • 17.
    Use Cases forScyllaDB at a DSP Billions of requests per day Equal read and write access patterns 24 x 7 x 365 Uptime Millisecond response times Huge datasets
  • 18.
  • 19.
    Defining “Uptime” Provide acluster that is available for dependent applications.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
    Tips for UsingAnsible to Orchestrate ScyllaDB with Whole Cluster Maximum Uptime * Use at your own risk. Always test in a non-customer facing environment first!
  • 27.
    Inventory to ClusterArchitecture Structuring your Inventory will go a long way in helping manage multiple clusters and data centers. I saw success with:
  • 28.
    Inventory to ClusterArchitecture Structuring your Inventory will go a long way in helping manage multiple clusters and data centers. I saw success with: ■ Inventory -> Cluster
  • 29.
    Inventory to ClusterArchitecture Structuring your Inventory will go a long way in helping manage multiple clusters and data centers. I saw success with: ■ Inventory -> Cluster ■ Inventory Group -> Data Center
  • 30.
    Inventory to ClusterArchitecture Ansible can have multiple Inventories
  • 31.
    Dynamic Inventory Scripts Anunderused superpower of your Cloud Provider is using them as your asset management database. Ansible can tie into provider’s API to get metadata information on instances with Dynamic Inventory Scripts.
  • 32.
  • 33.
  • 34.
  • 35.
  • 36.
    Use Lineinfile ModuleInstead of Template The ansible.builtin.lineinfile module should be used instead of others such as copy or template.
  • 37.
    Use Lineinfile ModuleInstead of Template The ansible.builtin.lineinfile module should be used instead of others such as copy or template. ■ Copy and Template assume Ansible has a valid copy of the file
  • 38.
    Use Lineinfile ModuleInstead of Template The ansible.builtin.lineinfile module should be used instead of others such as copy or template. ■ Copy and Template assume Ansible has a valid copy of the file
  • 39.
    Use Lineinfile ModuleInstead of Template The ansible.builtin.lineinfile module should be used instead of others such as copy or template. ■ Copy and Template assume Ansible has a valid copy of the file
  • 40.
    Use Lineinfile ModuleInstead of Template The ansible.builtin.lineinfile module should be used instead of others such as copy or template. ■ Copy and Template assume Ansible has a valid copy of the file ■ This becomes problematic with files that are changed by the project, such as config files installed with the distribution’s installer
  • 41.
    Use Lineinfile ModuleInstead of Template The ansible.builtin.lineinfile module should be used instead of others such as copy or template. ■ Copy and Template assume Ansible has a valid copy of the file ■ This becomes problematic with files that are changed by the project, such as config files installed with the distribution’s installer ■ Use Lineinfile to ensure the most recent and valid file settings are preserved and only change what’s needed.
  • 42.
    Lineinfile Continued Preserve projectdefaults and change only what you’re sure of.
  • 43.
    Lineinfile Continued Preserve projectdefaults and change only what you’re sure of.
  • 44.
  • 45.
    Run Playbooks SeriallyWhen Needed By default, Ansible will try to run each Task one at a time on all hosts in the Inventory before moving onto the next Task, like so:
  • 46.
    Run Playbooks SeriallyWhen Needed By default, Ansible will try to run each Task one at a time on all hosts in the Inventory before moving onto the next Task, like so:
  • 47.
    Run Playbooks SeriallyWhen Needed Use the Serial argument at the Play to run all Tasks on one host before moving onto the next host in an Inventory
  • 48.
    Run Playbooks SeriallyWhen Needed Use the Serial argument at the Play to run all Tasks on one host before moving onto the next host in an Inventory
  • 49.
    Run Playbooks SeriallyWhen Needed Use the Serial argument at the Play to run all Tasks on one host before moving onto the next host in an Inventory
  • 50.
    Check Cluster MembershipBefore Making Changes Cluster changes require all nodes to be Up and Normal (UN). I wrote a Role that was prerequisite for all Plays that made cluster.
  • 51.
    Check Cluster MembershipBefore Making Changes Cluster changes require all nodes to be Up and Normal (UN). I wrote a Role that was prerequisite for all Plays that made cluster.
  • 52.
    Use Automation toRun Ansible Ansible is an open source cli tool, but it should be wrapped in another automation tool for Production use. This has many benefits: ■ Run Playbooks on a schedule ■ Auditable output and outcomes ■ Improved security ■ Send alerts to teams
  • 53.
    Use Automation toRun Ansible There are lots of options when it comes to writing automation around Ansible: ■ Your current C.I. tool ■ Jenkins ■ Github Actions ■ Ansible Automation Platform from RedHat (paid) ■ AWX (upstream F.O.S.S./Community version of Ansible Automation Platform)
  • 54.
    Ansible Ecosystem Ansible hasa thriving ecosystem of official and unofficial Collections to use.
  • 55.
    Ansible Ecosystem Ansible hasa thriving ecosystem of official and unofficial Collections to use. ■ Collection Index ■ Galaxy
  • 56.
    Ansible Ecosystem Ansible hasa thriving ecosystem of official and unofficial Collections to use.
  • 57.
    Ansible Ecosystem Ansible hasa thriving ecosystem of official and unofficial Collections to use. To show a few:
  • 58.
    Demo Time * Useat your own risk. Always test in a non-customer facing environment first!
  • 59.
    Thank You Stay inTouch Ryan Ross [email protected] @nazufel www.linkedin.com/in/rossryan1/ github.com/nazufel/scylla-summit-2023