SlideShare a Scribd company logo
1 of 45
Download to read offline
Software-defined Datacenter
Maintenance
No more sleepless nights and long weekends when doing maintenance
CAS1172
Stephen Nemeth
Senior Architect
Stephen.nemeth@suse.com
SUSE
Raine Curtis
N America Core Services Team Lead, Consultant
rcurtis@suse.com
SUSE
1 Agenda
This session will present some best practices for datacenter manage-
ment and automation.
The technologies used in this discussion are:
• SUSE Manager
• Salt
1.1 SUSE Manager
• Patching lifecycle
• Configuration management
• API
1.2 Salt
• SUSE Manager/Salt Features
• Salt Command-line
• Salt REST API
2 SUSE Manager
2.1 Using SUSE Manager for Maintenance
• Patching lifecycle management
• Configuration management
• API
2.2 Patching Lifecycle Management
It is a best practice to have managed systems subscribe from a con-
trolled channel set.
• Typically this a point-in-time snapshot of the distribution channels
• There are two main best practices:
– Consolidated organizational base channel set
– Distributed organizational base channel set
Fig. 2.1: Consolidated Organizational Base Channel Set
Fig. 2.2: Distributed Organizational Base Channel Set
2.3 Configuration Management
• Use state channels
• Learn forms and formulas
• Leverage configuration scope
2.3.1 State Channels
Use Salt. . . your life will be easier, and you’ll have lots of friends!
State channels are Salt states managed in SUSE Manager
• Allows for UI for state management and editing
• Supports configuration file management
• Provides version control of states
Fig. 2.3: State channel
2.3.2 Forms and Formulas
Pillar management was never easier!
• Create your own forms from simple yaml
• Pillar data is automatically created
• Forms may be assigned to different systems with different values
(pillar)
Fig. 2.4: SUSE Manager Forms and Formulas
2.4 Configuration Scope
States - may be assigned at the following levels:
• Organization (all systems)
• System groups
• Individual system
Forms and Formulas - may be assigned at:
• System groups
• Individual system
2.5 Using the API (commandline)
There is a great deal of functionality outside the SUSE Manager UI.
Most APIs may be called with the spacecmd utility.
Manage all types of SUSE Manger objects:
• Software Channels
• Systems
• Activation keys
• Users
• System Set Manager
• . . .
2.6 API Example
The following example shows how to easily manage multiple systems
at once at the commandline using the System Set Manger(ssm) ob-
ject.
Add systems beginning with dev to ssm:
spacecmd ssm_add dev*
View the systems now in the ssm:
spacecmd ssm_list
dev01.example.com
dev02.example.com
dev03.example.com
Add a new apps channel to all systems in the ssm:
spacecmd system_addchildchannels ssm apps
Clean up the ssm:
spacecmd ssm_remove dev*
3 Salt
3.1 Using Salt for Maintenance
Working with Salt directly provides additional functionality and automa-
tion.
You can interact with Salt directly by:
• Working at the command-line
• Using the Salt API
3.2 Salt Commands
The following are common Salt commands:
Fig. 3.1: Salt commands
3.3 Location of Commands
Fig. 3.2: Salt commands
3.4 Salt Key Management
salt-key executes simple management of Salt server public keys used
for authentication.
View keys:
salt-key
# or..
salt-key -L
Note: In salt uppercase arguments mean more that one minion.
3.4.1 Accepting Multiple Keys at Once
Keys may be accepted in the following ways:
• in SUSE Manger, under Salt > Keys
• the salt-key command
• using a Salt reactor
• using the API
• setting the Salt master option auto_accept: True (not recom-
mended)
When migrating multiple hosts, accepting keys in bulk form is valuable:
# one system
salt-key -a minion01
# multiple systems at once
salt-key -y -A
3.5 Sending Commands to Minions
Instead of logging to to each system, a salt module may be run on
many systems simultaneously from the Salt master.
Remote execution in salt is performed with the salt command.
The syntax is:
salt [options] '<target>' <module.function> [arguments|keyword arguments]
An example of targeting minions:
salt '*' cmd.run 'cat /etc/resolv.conf'
3.5.1 Using Salt Grains
View system grains:
salt '*' grains.items
Target by system a grain:
salt -G 'oscodename:SUSE Linux Enterprise Server 12 SP3' grains.item num_
→cpus
server1.example.com:
----------
num_cpus:
1
build.example.com:
----------
num_cpus:
1
...
3.6 Salt Rest API
In this section you will gain an understanding of the Salt RESTful API.
The topics covered will be:
• Turning on the API
• Using the LocalClient through REST
• Using the RunnerClient through REST
3.7 Overview
The Salt API project is a modular interface on top of Salt that can pro-
vide a variety of entry points into a running Salt system.
It can start and manage multiple interfaces allowing a REST API to co-
exist with XMLRPC or even a Websocket API.
By default the Salt API was developed to act as the communication
layer for the Salt web UI, but it can also be used as a means to access
Salt from other remote apis as well.
Salt API is closely tied to the external authentication system and uses
TLS for all connections.
3.8 SUSE Manager and Salt API
SUSE Manager uses the Salt API.
The REST configuration shipped is:
# file: /etc/salt/master.d/susemanager.conf (fragment)
# Setup cherrypy
rest_cherrypy:
port: 9080
host: 127.0.0.1
collect_stats: false
disable_ssl: true
ssl_crt: /etc/pki/tls/certs/spacewalk.crt
ssl_key: /etc/pki/tls/private/spacewalk.key
3.8.1 External Authentication
The REST interface requires the external authentication system to be
defined.
The External Authentication configuration shipped is:
# Setup API authentication
external_auth:
auto:
admin:
- .*
- '@wheel'
- '@runner'
- '@jobs'
3.8.2 Managing Salt API
If ever needed, the Salt API may be restarted by executing:
systemctl salt-api restart
Warning: Be very careful changing any of these settings so that
SUSE Manager integration is not broken.
3.9 RESTful LocalClient Call
Both the curl command line and native programming languages can
be used to access this web service API.
Supports token passing or cookie storage for session management.
Logging into the API will return a token that must be referenced for all
subsequent calls
Perform a API RESTful login.
curl -sSk http://localhost:9080/login 
-H 'Accept: application/x-yaml' 
-d username=saltdev 
-d password=saltdev 
-d eauth=auto
return:
- eauth: auto
expire: 1437104145.631494
perms:
- '@runner'
- '@wheel'
- .*
start: 1437060945.6314919
token: 13279c452c51fbbf00c9f32d1e62c79be8db262c
user: saltdev
So to run a test.ping to all hosts using the token you would make the
call as:
curl -sSk http://localhost:9080 
-H 'X-Auth-Token:4d3f6b45da944946a92b7d1efee5a382cd0160f1' 
-d client=local 
-d tgt='*' 
-d fun=test.ping
Cookies can be used instead of passing the token each time:
curl -sSk http://localhost:9080/login 
-H 'Accept: application/x-yaml' 
-d username=saltdev 
-d password=saltdev 
-d eauth=auto 
-c cookies.txt
Now all subsequent calls can use cookies such as in this call to get the
grain information from
curl -sSk http://localhost:9080 
-b cookies.txt 
-H 'Accept: application/x-yaml' 
-d client=local 
-d tgt=websvr1 
-d fun=grains.items
3.9.1 State Runs through Salt API
A call can be made to run a state dry-run with state.sls for the apache
state:
curl -sSk http://localhost:9080 -b cookies.txt
-H 'Accept: application/x-yaml' -d client=local
-d tgt='minion01' -d fun=state.sls -d arg=httpd
-d arg='test=True'
A call can be made to run the state with state.sls:
curl -sSk http://localhost:9080 -b cookies.txt
-H 'Accept: application/x-yaml' -d client=local
-d tgt='minion01' -d fun=state.sls -d arg=httpd
3.10 Using API Registered URLs
The Salt API has registered URLs, or hooks to shortcut access to in-
formation.
The following shows examples of using registered URLs.
3.10.1 Listing Minions
Using the /minions hook:
# Show all minions and grains
curl -sSk http://localhost:9080/minions -b cookies.txt
-H 'Accept: application/x-yaml'
# Show a specific minion
curl -sSk http://localhost:9080/minions/minion01 -b cookies.txt
-H 'Accept: application/x-yaml'
3.10.2 Listing Keys
Using the /keys hook:
# List all keys
curl -sSk http://localhost:9080/keys -b cookies.txt
-H 'Accept: application/x-yaml'
# List a specific minion's keys
curl -sSk http://localhost:9080/keys/minion01 -b cookies.txt
-H 'Accept: application/x-yaml'
3.10.3 List Jobs
Using the jobs hook:
# List all jobs
curl -sSk http://localhost:9080/jobs -b cookies.txt
-H 'Accept: application/x-yaml'
3.10.4 Logging Out
Logging out:
curl -sSk http://localhost:9080/logout -H 'Accept: application/x-yaml'
-b cookies.txt
3.11 Registered URLS in the API
There are special registered URIs for accessing common data:
Fig. 3.3: Salt API Registered Hooks
4 Demo
• Demo of using SUSE Manager API
• Demo of using Salt API
5 Thanks

More Related Content

What's hot

How To Configure Apache VirtualHost on RHEL 7 on AWS
How To Configure Apache VirtualHost on RHEL 7 on AWSHow To Configure Apache VirtualHost on RHEL 7 on AWS
How To Configure Apache VirtualHost on RHEL 7 on AWSVCP Muthukrishna
 
How To Install OpenFire in CentOS 7
How To Install OpenFire in CentOS 7How To Install OpenFire in CentOS 7
How To Install OpenFire in CentOS 7VCP Muthukrishna
 
How to Upgrade Openfire on CentOS 7
How to Upgrade Openfire on CentOS 7How to Upgrade Openfire on CentOS 7
How to Upgrade Openfire on CentOS 7VCP Muthukrishna
 
How To Install and Configure SUDO on RHEL 7
How To Install and Configure SUDO on RHEL 7How To Install and Configure SUDO on RHEL 7
How To Install and Configure SUDO on RHEL 7VCP Muthukrishna
 
How To Protect SSH Access with Fail2Ban on RHEL 7
How To Protect SSH Access with Fail2Ban on RHEL 7How To Protect SSH Access with Fail2Ban on RHEL 7
How To Protect SSH Access with Fail2Ban on RHEL 7VCP Muthukrishna
 
How To Install and Configure VSFTPD on RHEL 7 or CentOS 7
How To Install and Configure VSFTPD on RHEL 7 or CentOS 7How To Install and Configure VSFTPD on RHEL 7 or CentOS 7
How To Install and Configure VSFTPD on RHEL 7 or CentOS 7VCP Muthukrishna
 
How to create a multi tenancy for an interactive data analysis with jupyter h...
How to create a multi tenancy for an interactive data analysis with jupyter h...How to create a multi tenancy for an interactive data analysis with jupyter h...
How to create a multi tenancy for an interactive data analysis with jupyter h...Tiago Simões
 
Pandora FMS: Cisco Remote inventory modules
Pandora FMS: Cisco Remote inventory modulesPandora FMS: Cisco Remote inventory modules
Pandora FMS: Cisco Remote inventory modulesPandora FMS
 
How To Configure Amazon EC2 Load Balancer
How To Configure Amazon EC2 Load BalancerHow To Configure Amazon EC2 Load Balancer
How To Configure Amazon EC2 Load BalancerVCP Muthukrishna
 
TFTP Installation Configuration Guide
TFTP Installation Configuration GuideTFTP Installation Configuration Guide
TFTP Installation Configuration GuideVCP Muthukrishna
 
How To Install and Configure Open SSH Server on Ubuntu
How To Install and Configure Open SSH Server on UbuntuHow To Install and Configure Open SSH Server on Ubuntu
How To Install and Configure Open SSH Server on UbuntuVCP Muthukrishna
 
Pandora FMS: Sun One webserver
Pandora FMS: Sun One webserverPandora FMS: Sun One webserver
Pandora FMS: Sun One webserverPandora FMS
 
How To Check IE Enhanced Security Is Enabled Windows PowerShell
How To Check IE Enhanced Security Is Enabled Windows PowerShellHow To Check IE Enhanced Security Is Enabled Windows PowerShell
How To Check IE Enhanced Security Is Enabled Windows PowerShellVCP Muthukrishna
 
Pandora FMS: Raven DB Plugin
Pandora FMS: Raven DB PluginPandora FMS: Raven DB Plugin
Pandora FMS: Raven DB PluginPandora FMS
 
How to Install MariaDB Server or MySQL Server on CentOS 7
How to Install MariaDB Server or MySQL Server on CentOS 7How to Install MariaDB Server or MySQL Server on CentOS 7
How to Install MariaDB Server or MySQL Server on CentOS 7VCP Muthukrishna
 
How To Install and Configure Screen on CentOS 7
How To Install and Configure Screen on CentOS 7How To Install and Configure Screen on CentOS 7
How To Install and Configure Screen on CentOS 7VCP Muthukrishna
 
EMC Networker installation Document
EMC Networker installation DocumentEMC Networker installation Document
EMC Networker installation Documentuzzal basak
 
How To Configure SNMP Logging on RHEL 7
How To Configure SNMP Logging on RHEL 7How To Configure SNMP Logging on RHEL 7
How To Configure SNMP Logging on RHEL 7VCP Muthukrishna
 
How To Check file exists and Delete PowerShell
How To Check file exists and Delete PowerShellHow To Check file exists and Delete PowerShell
How To Check file exists and Delete PowerShellVCP Muthukrishna
 

What's hot (20)

How To Configure Apache VirtualHost on RHEL 7 on AWS
How To Configure Apache VirtualHost on RHEL 7 on AWSHow To Configure Apache VirtualHost on RHEL 7 on AWS
How To Configure Apache VirtualHost on RHEL 7 on AWS
 
How To Install OpenFire in CentOS 7
How To Install OpenFire in CentOS 7How To Install OpenFire in CentOS 7
How To Install OpenFire in CentOS 7
 
How to Upgrade Openfire on CentOS 7
How to Upgrade Openfire on CentOS 7How to Upgrade Openfire on CentOS 7
How to Upgrade Openfire on CentOS 7
 
How To Install and Configure SUDO on RHEL 7
How To Install and Configure SUDO on RHEL 7How To Install and Configure SUDO on RHEL 7
How To Install and Configure SUDO on RHEL 7
 
How To Protect SSH Access with Fail2Ban on RHEL 7
How To Protect SSH Access with Fail2Ban on RHEL 7How To Protect SSH Access with Fail2Ban on RHEL 7
How To Protect SSH Access with Fail2Ban on RHEL 7
 
How To Install and Configure VSFTPD on RHEL 7 or CentOS 7
How To Install and Configure VSFTPD on RHEL 7 or CentOS 7How To Install and Configure VSFTPD on RHEL 7 or CentOS 7
How To Install and Configure VSFTPD on RHEL 7 or CentOS 7
 
How to create a multi tenancy for an interactive data analysis with jupyter h...
How to create a multi tenancy for an interactive data analysis with jupyter h...How to create a multi tenancy for an interactive data analysis with jupyter h...
How to create a multi tenancy for an interactive data analysis with jupyter h...
 
Pandora FMS: Cisco Remote inventory modules
Pandora FMS: Cisco Remote inventory modulesPandora FMS: Cisco Remote inventory modules
Pandora FMS: Cisco Remote inventory modules
 
How To Configure Amazon EC2 Load Balancer
How To Configure Amazon EC2 Load BalancerHow To Configure Amazon EC2 Load Balancer
How To Configure Amazon EC2 Load Balancer
 
TFTP Installation Configuration Guide
TFTP Installation Configuration GuideTFTP Installation Configuration Guide
TFTP Installation Configuration Guide
 
How To Install and Configure Open SSH Server on Ubuntu
How To Install and Configure Open SSH Server on UbuntuHow To Install and Configure Open SSH Server on Ubuntu
How To Install and Configure Open SSH Server on Ubuntu
 
SystemD Usage Guide
SystemD Usage GuideSystemD Usage Guide
SystemD Usage Guide
 
Pandora FMS: Sun One webserver
Pandora FMS: Sun One webserverPandora FMS: Sun One webserver
Pandora FMS: Sun One webserver
 
How To Check IE Enhanced Security Is Enabled Windows PowerShell
How To Check IE Enhanced Security Is Enabled Windows PowerShellHow To Check IE Enhanced Security Is Enabled Windows PowerShell
How To Check IE Enhanced Security Is Enabled Windows PowerShell
 
Pandora FMS: Raven DB Plugin
Pandora FMS: Raven DB PluginPandora FMS: Raven DB Plugin
Pandora FMS: Raven DB Plugin
 
How to Install MariaDB Server or MySQL Server on CentOS 7
How to Install MariaDB Server or MySQL Server on CentOS 7How to Install MariaDB Server or MySQL Server on CentOS 7
How to Install MariaDB Server or MySQL Server on CentOS 7
 
How To Install and Configure Screen on CentOS 7
How To Install and Configure Screen on CentOS 7How To Install and Configure Screen on CentOS 7
How To Install and Configure Screen on CentOS 7
 
EMC Networker installation Document
EMC Networker installation DocumentEMC Networker installation Document
EMC Networker installation Document
 
How To Configure SNMP Logging on RHEL 7
How To Configure SNMP Logging on RHEL 7How To Configure SNMP Logging on RHEL 7
How To Configure SNMP Logging on RHEL 7
 
How To Check file exists and Delete PowerShell
How To Check file exists and Delete PowerShellHow To Check file exists and Delete PowerShell
How To Check file exists and Delete PowerShell
 

Similar to Software-defined Datacenter Maintenance - No More Sleepless Nights and Long Weekends When Doing Maintenance

Couchbase Orchestration and Scaling a Caching Infrastructure At LinkedIn.
Couchbase Orchestration and Scaling a Caching Infrastructure At LinkedIn.Couchbase Orchestration and Scaling a Caching Infrastructure At LinkedIn.
Couchbase Orchestration and Scaling a Caching Infrastructure At LinkedIn.Issa Fattah
 
Salt conf 2014 - Using SaltStack in high availability environments
Salt conf 2014 - Using SaltStack in high availability environmentsSalt conf 2014 - Using SaltStack in high availability environments
Salt conf 2014 - Using SaltStack in high availability environmentsBenjamin Cane
 
Salt conf15 presentation-william-cannon
Salt conf15 presentation-william-cannonSalt conf15 presentation-william-cannon
Salt conf15 presentation-william-cannonWilliam Cannon
 
SQL Server Exploitation, Escalation, Pilfering - AppSec USA 2012
SQL Server Exploitation, Escalation, Pilfering - AppSec USA 2012SQL Server Exploitation, Escalation, Pilfering - AppSec USA 2012
SQL Server Exploitation, Escalation, Pilfering - AppSec USA 2012Scott Sutherland
 
Configuration management and orchestration with Salt
Configuration management and orchestration with SaltConfiguration management and orchestration with Salt
Configuration management and orchestration with SaltAnirban Saha
 
A user's perspective on SaltStack and other configuration management tools
A user's perspective on SaltStack and other configuration management toolsA user's perspective on SaltStack and other configuration management tools
A user's perspective on SaltStack and other configuration management toolsSaltStack
 
SaltConf14 - Ben Cane - Using SaltStack in High Availability Environments
SaltConf14 - Ben Cane - Using SaltStack in High Availability EnvironmentsSaltConf14 - Ben Cane - Using SaltStack in High Availability Environments
SaltConf14 - Ben Cane - Using SaltStack in High Availability EnvironmentsSaltStack
 
Saltcheck: a tool in the salt toolbox
Saltcheck: a tool in the salt toolboxSaltcheck: a tool in the salt toolbox
Saltcheck: a tool in the salt toolboxChristian McHugh
 
Systemd 간략하게 정리하기
Systemd 간략하게 정리하기Systemd 간략하게 정리하기
Systemd 간략하게 정리하기Seungha Son
 
AAI-3218 Production Deployment Best Practices for WebSphere Liberty Profile
AAI-3218 Production Deployment Best Practices for WebSphere Liberty ProfileAAI-3218 Production Deployment Best Practices for WebSphere Liberty Profile
AAI-3218 Production Deployment Best Practices for WebSphere Liberty ProfileWASdev Community
 
Quick-and-Easy Deployment of a Ceph Storage Cluster with SLES
Quick-and-Easy Deployment of a Ceph Storage Cluster with SLESQuick-and-Easy Deployment of a Ceph Storage Cluster with SLES
Quick-and-Easy Deployment of a Ceph Storage Cluster with SLESJan Kalcic
 
Event driven architecture with SaltStack
Event driven architecture with SaltStackEvent driven architecture with SaltStack
Event driven architecture with SaltStackBharatNailwal2
 
To Build My Own Cloud with Blackjack…
To Build My Own Cloud with Blackjack…To Build My Own Cloud with Blackjack…
To Build My Own Cloud with Blackjack…Sergey Dzyuban
 
Liberty Scalability and Elasticity Locally and in the IBM Cloud
Liberty Scalability and Elasticity Locally and in the IBM CloudLiberty Scalability and Elasticity Locally and in the IBM Cloud
Liberty Scalability and Elasticity Locally and in the IBM CloudBrian S. Paskin
 
Configuration Management in the Cloud - AWS Online Tech Talks
Configuration Management in the Cloud - AWS Online Tech TalksConfiguration Management in the Cloud - AWS Online Tech Talks
Configuration Management in the Cloud - AWS Online Tech TalksAmazon Web Services
 
Summit demystifying systemd1
Summit demystifying systemd1Summit demystifying systemd1
Summit demystifying systemd1Susant Sahani
 
Open shift deployment review getting ready for day 2 operations
Open shift deployment review   getting ready for day 2 operationsOpen shift deployment review   getting ready for day 2 operations
Open shift deployment review getting ready for day 2 operationsHendrik van Run
 
Getting Started with Consul
Getting Started with ConsulGetting Started with Consul
Getting Started with ConsulRamit Surana
 

Similar to Software-defined Datacenter Maintenance - No More Sleepless Nights and Long Weekends When Doing Maintenance (20)

Couchbase Orchestration and Scaling a Caching Infrastructure At LinkedIn.
Couchbase Orchestration and Scaling a Caching Infrastructure At LinkedIn.Couchbase Orchestration and Scaling a Caching Infrastructure At LinkedIn.
Couchbase Orchestration and Scaling a Caching Infrastructure At LinkedIn.
 
Salt conf 2014 - Using SaltStack in high availability environments
Salt conf 2014 - Using SaltStack in high availability environmentsSalt conf 2014 - Using SaltStack in high availability environments
Salt conf 2014 - Using SaltStack in high availability environments
 
Salt conf15 presentation-william-cannon
Salt conf15 presentation-william-cannonSalt conf15 presentation-william-cannon
Salt conf15 presentation-william-cannon
 
SQL Server Exploitation, Escalation, Pilfering - AppSec USA 2012
SQL Server Exploitation, Escalation, Pilfering - AppSec USA 2012SQL Server Exploitation, Escalation, Pilfering - AppSec USA 2012
SQL Server Exploitation, Escalation, Pilfering - AppSec USA 2012
 
Configuration management and orchestration with Salt
Configuration management and orchestration with SaltConfiguration management and orchestration with Salt
Configuration management and orchestration with Salt
 
A user's perspective on SaltStack and other configuration management tools
A user's perspective on SaltStack and other configuration management toolsA user's perspective on SaltStack and other configuration management tools
A user's perspective on SaltStack and other configuration management tools
 
SaltConf14 - Ben Cane - Using SaltStack in High Availability Environments
SaltConf14 - Ben Cane - Using SaltStack in High Availability EnvironmentsSaltConf14 - Ben Cane - Using SaltStack in High Availability Environments
SaltConf14 - Ben Cane - Using SaltStack in High Availability Environments
 
Saltcheck: a tool in the salt toolbox
Saltcheck: a tool in the salt toolboxSaltcheck: a tool in the salt toolbox
Saltcheck: a tool in the salt toolbox
 
Systemd 간략하게 정리하기
Systemd 간략하게 정리하기Systemd 간략하게 정리하기
Systemd 간략하게 정리하기
 
AAI-3218 Production Deployment Best Practices for WebSphere Liberty Profile
AAI-3218 Production Deployment Best Practices for WebSphere Liberty ProfileAAI-3218 Production Deployment Best Practices for WebSphere Liberty Profile
AAI-3218 Production Deployment Best Practices for WebSphere Liberty Profile
 
Quick-and-Easy Deployment of a Ceph Storage Cluster with SLES
Quick-and-Easy Deployment of a Ceph Storage Cluster with SLESQuick-and-Easy Deployment of a Ceph Storage Cluster with SLES
Quick-and-Easy Deployment of a Ceph Storage Cluster with SLES
 
Event driven architecture with SaltStack
Event driven architecture with SaltStackEvent driven architecture with SaltStack
Event driven architecture with SaltStack
 
To Build My Own Cloud with Blackjack…
To Build My Own Cloud with Blackjack…To Build My Own Cloud with Blackjack…
To Build My Own Cloud with Blackjack…
 
Liberty Scalability and Elasticity Locally and in the IBM Cloud
Liberty Scalability and Elasticity Locally and in the IBM CloudLiberty Scalability and Elasticity Locally and in the IBM Cloud
Liberty Scalability and Elasticity Locally and in the IBM Cloud
 
Installation
InstallationInstallation
Installation
 
Configuration Management in the Cloud - AWS Online Tech Talks
Configuration Management in the Cloud - AWS Online Tech TalksConfiguration Management in the Cloud - AWS Online Tech Talks
Configuration Management in the Cloud - AWS Online Tech Talks
 
Weblogic server cluster
Weblogic server clusterWeblogic server cluster
Weblogic server cluster
 
Summit demystifying systemd1
Summit demystifying systemd1Summit demystifying systemd1
Summit demystifying systemd1
 
Open shift deployment review getting ready for day 2 operations
Open shift deployment review   getting ready for day 2 operationsOpen shift deployment review   getting ready for day 2 operations
Open shift deployment review getting ready for day 2 operations
 
Getting Started with Consul
Getting Started with ConsulGetting Started with Consul
Getting Started with Consul
 

More from SUSE

Neuvector Rodeo 17 mars 20234
Neuvector Rodeo 17 mars 20234Neuvector Rodeo 17 mars 20234
Neuvector Rodeo 17 mars 20234SUSE
 
Coffee Break NeuVector
Coffee Break NeuVectorCoffee Break NeuVector
Coffee Break NeuVectorSUSE
 
Rancher Rodéo France
Rancher Rodéo FranceRancher Rodéo France
Rancher Rodéo FranceSUSE
 
Harvester
HarvesterHarvester
HarvesterSUSE
 
Presentation de NeuVector 5.0
Presentation de NeuVector 5.0Presentation de NeuVector 5.0
Presentation de NeuVector 5.0SUSE
 
Rancher Rodeo 13 mai 2022
Rancher Rodeo 13 mai 2022Rancher Rodeo 13 mai 2022
Rancher Rodeo 13 mai 2022SUSE
 
Code Factory avec GitLab CI et Rancher
Code Factory avec GitLab CI et RancherCode Factory avec GitLab CI et Rancher
Code Factory avec GitLab CI et RancherSUSE
 
L'affaire CentOS
L'affaire CentOSL'affaire CentOS
L'affaire CentOSSUSE
 
Rancher Rodeo
Rancher RodeoRancher Rodeo
Rancher RodeoSUSE
 
Harvester café
Harvester caféHarvester café
Harvester caféSUSE
 
Code Factory avec GitLab CI et Rancher
Code Factory avec GitLab CI et RancherCode Factory avec GitLab CI et Rancher
Code Factory avec GitLab CI et RancherSUSE
 
Lancement Harvester
Lancement HarvesterLancement Harvester
Lancement HarvesterSUSE
 
Innovate everywhere - SUSE edge
Innovate everywhere - SUSE edgeInnovate everywhere - SUSE edge
Innovate everywhere - SUSE edgeSUSE
 
Expert Day 2019 - HA et SAP : How QA is done
Expert Day 2019 - HA et SAP : How QA is doneExpert Day 2019 - HA et SAP : How QA is done
Expert Day 2019 - HA et SAP : How QA is doneSUSE
 
Expert Day 2019 - Automated SAP HANA deployments et Terraform
Expert Day 2019 - Automated SAP HANA deployments et TerraformExpert Day 2019 - Automated SAP HANA deployments et Terraform
Expert Day 2019 - Automated SAP HANA deployments et TerraformSUSE
 
Expert Day 2019 - CaaSP et CAP
Expert Day 2019 - CaaSP et CAPExpert Day 2019 - CaaSP et CAP
Expert Day 2019 - CaaSP et CAPSUSE
 
Expert Day 2019 - SUSE Enterrpise Storage et CEPH
Expert Day 2019 - SUSE Enterrpise Storage et CEPHExpert Day 2019 - SUSE Enterrpise Storage et CEPH
Expert Day 2019 - SUSE Enterrpise Storage et CEPHSUSE
 
Expert Day 2019 - SUSE OpenStack Cloud
Expert Day 2019 - SUSE OpenStack CloudExpert Day 2019 - SUSE OpenStack Cloud
Expert Day 2019 - SUSE OpenStack CloudSUSE
 
Expert Day 2019 - SUSE Manager
Expert Day 2019 - SUSE ManagerExpert Day 2019 - SUSE Manager
Expert Day 2019 - SUSE ManagerSUSE
 
Expert Day 2019 - SUSE public beta program
Expert Day 2019 - SUSE public beta programExpert Day 2019 - SUSE public beta program
Expert Day 2019 - SUSE public beta programSUSE
 

More from SUSE (20)

Neuvector Rodeo 17 mars 20234
Neuvector Rodeo 17 mars 20234Neuvector Rodeo 17 mars 20234
Neuvector Rodeo 17 mars 20234
 
Coffee Break NeuVector
Coffee Break NeuVectorCoffee Break NeuVector
Coffee Break NeuVector
 
Rancher Rodéo France
Rancher Rodéo FranceRancher Rodéo France
Rancher Rodéo France
 
Harvester
HarvesterHarvester
Harvester
 
Presentation de NeuVector 5.0
Presentation de NeuVector 5.0Presentation de NeuVector 5.0
Presentation de NeuVector 5.0
 
Rancher Rodeo 13 mai 2022
Rancher Rodeo 13 mai 2022Rancher Rodeo 13 mai 2022
Rancher Rodeo 13 mai 2022
 
Code Factory avec GitLab CI et Rancher
Code Factory avec GitLab CI et RancherCode Factory avec GitLab CI et Rancher
Code Factory avec GitLab CI et Rancher
 
L'affaire CentOS
L'affaire CentOSL'affaire CentOS
L'affaire CentOS
 
Rancher Rodeo
Rancher RodeoRancher Rodeo
Rancher Rodeo
 
Harvester café
Harvester caféHarvester café
Harvester café
 
Code Factory avec GitLab CI et Rancher
Code Factory avec GitLab CI et RancherCode Factory avec GitLab CI et Rancher
Code Factory avec GitLab CI et Rancher
 
Lancement Harvester
Lancement HarvesterLancement Harvester
Lancement Harvester
 
Innovate everywhere - SUSE edge
Innovate everywhere - SUSE edgeInnovate everywhere - SUSE edge
Innovate everywhere - SUSE edge
 
Expert Day 2019 - HA et SAP : How QA is done
Expert Day 2019 - HA et SAP : How QA is doneExpert Day 2019 - HA et SAP : How QA is done
Expert Day 2019 - HA et SAP : How QA is done
 
Expert Day 2019 - Automated SAP HANA deployments et Terraform
Expert Day 2019 - Automated SAP HANA deployments et TerraformExpert Day 2019 - Automated SAP HANA deployments et Terraform
Expert Day 2019 - Automated SAP HANA deployments et Terraform
 
Expert Day 2019 - CaaSP et CAP
Expert Day 2019 - CaaSP et CAPExpert Day 2019 - CaaSP et CAP
Expert Day 2019 - CaaSP et CAP
 
Expert Day 2019 - SUSE Enterrpise Storage et CEPH
Expert Day 2019 - SUSE Enterrpise Storage et CEPHExpert Day 2019 - SUSE Enterrpise Storage et CEPH
Expert Day 2019 - SUSE Enterrpise Storage et CEPH
 
Expert Day 2019 - SUSE OpenStack Cloud
Expert Day 2019 - SUSE OpenStack CloudExpert Day 2019 - SUSE OpenStack Cloud
Expert Day 2019 - SUSE OpenStack Cloud
 
Expert Day 2019 - SUSE Manager
Expert Day 2019 - SUSE ManagerExpert Day 2019 - SUSE Manager
Expert Day 2019 - SUSE Manager
 
Expert Day 2019 - SUSE public beta program
Expert Day 2019 - SUSE public beta programExpert Day 2019 - SUSE public beta program
Expert Day 2019 - SUSE public beta program
 

Recently uploaded

EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in NoidaBuds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in Noidabntitsolutionsrishis
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....kzayra69
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Hr365.us smith
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...Technogeeks
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...OnePlan Solutions
 
How to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdfHow to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdfLivetecs LLC
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)jennyeacort
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 
Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfStefano Stabellini
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfAlina Yurenko
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based projectAnoyGreter
 

Recently uploaded (20)

EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort ServiceHot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
 
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in NoidaBuds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
 
How to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdfHow to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdf
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 
Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdf
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based project
 

Software-defined Datacenter Maintenance - No More Sleepless Nights and Long Weekends When Doing Maintenance

  • 1. Software-defined Datacenter Maintenance No more sleepless nights and long weekends when doing maintenance CAS1172 Stephen Nemeth Senior Architect Stephen.nemeth@suse.com SUSE Raine Curtis N America Core Services Team Lead, Consultant rcurtis@suse.com SUSE
  • 2. 1 Agenda This session will present some best practices for datacenter manage- ment and automation. The technologies used in this discussion are: • SUSE Manager • Salt
  • 3. 1.1 SUSE Manager • Patching lifecycle • Configuration management • API
  • 4. 1.2 Salt • SUSE Manager/Salt Features • Salt Command-line • Salt REST API
  • 6. 2.1 Using SUSE Manager for Maintenance • Patching lifecycle management • Configuration management • API
  • 7. 2.2 Patching Lifecycle Management It is a best practice to have managed systems subscribe from a con- trolled channel set. • Typically this a point-in-time snapshot of the distribution channels • There are two main best practices: – Consolidated organizational base channel set – Distributed organizational base channel set
  • 8. Fig. 2.1: Consolidated Organizational Base Channel Set
  • 9. Fig. 2.2: Distributed Organizational Base Channel Set
  • 10. 2.3 Configuration Management • Use state channels • Learn forms and formulas • Leverage configuration scope
  • 11. 2.3.1 State Channels Use Salt. . . your life will be easier, and you’ll have lots of friends! State channels are Salt states managed in SUSE Manager • Allows for UI for state management and editing • Supports configuration file management • Provides version control of states
  • 12. Fig. 2.3: State channel
  • 13. 2.3.2 Forms and Formulas Pillar management was never easier! • Create your own forms from simple yaml • Pillar data is automatically created • Forms may be assigned to different systems with different values (pillar)
  • 14. Fig. 2.4: SUSE Manager Forms and Formulas
  • 15. 2.4 Configuration Scope States - may be assigned at the following levels: • Organization (all systems) • System groups • Individual system Forms and Formulas - may be assigned at: • System groups • Individual system
  • 16. 2.5 Using the API (commandline) There is a great deal of functionality outside the SUSE Manager UI. Most APIs may be called with the spacecmd utility. Manage all types of SUSE Manger objects: • Software Channels • Systems • Activation keys • Users • System Set Manager • . . .
  • 17. 2.6 API Example The following example shows how to easily manage multiple systems at once at the commandline using the System Set Manger(ssm) ob- ject. Add systems beginning with dev to ssm: spacecmd ssm_add dev*
  • 18. View the systems now in the ssm: spacecmd ssm_list dev01.example.com dev02.example.com dev03.example.com Add a new apps channel to all systems in the ssm: spacecmd system_addchildchannels ssm apps Clean up the ssm: spacecmd ssm_remove dev*
  • 20. 3.1 Using Salt for Maintenance Working with Salt directly provides additional functionality and automa- tion. You can interact with Salt directly by: • Working at the command-line • Using the Salt API
  • 21. 3.2 Salt Commands The following are common Salt commands: Fig. 3.1: Salt commands
  • 22. 3.3 Location of Commands Fig. 3.2: Salt commands
  • 23. 3.4 Salt Key Management salt-key executes simple management of Salt server public keys used for authentication. View keys: salt-key # or.. salt-key -L Note: In salt uppercase arguments mean more that one minion.
  • 24. 3.4.1 Accepting Multiple Keys at Once Keys may be accepted in the following ways: • in SUSE Manger, under Salt > Keys • the salt-key command • using a Salt reactor • using the API • setting the Salt master option auto_accept: True (not recom- mended) When migrating multiple hosts, accepting keys in bulk form is valuable: # one system salt-key -a minion01 # multiple systems at once salt-key -y -A
  • 25. 3.5 Sending Commands to Minions Instead of logging to to each system, a salt module may be run on many systems simultaneously from the Salt master. Remote execution in salt is performed with the salt command. The syntax is: salt [options] '<target>' <module.function> [arguments|keyword arguments] An example of targeting minions: salt '*' cmd.run 'cat /etc/resolv.conf'
  • 26. 3.5.1 Using Salt Grains View system grains: salt '*' grains.items Target by system a grain: salt -G 'oscodename:SUSE Linux Enterprise Server 12 SP3' grains.item num_ →cpus server1.example.com: ---------- num_cpus: 1 build.example.com: ---------- num_cpus: 1 ...
  • 27. 3.6 Salt Rest API In this section you will gain an understanding of the Salt RESTful API. The topics covered will be: • Turning on the API • Using the LocalClient through REST • Using the RunnerClient through REST
  • 28. 3.7 Overview The Salt API project is a modular interface on top of Salt that can pro- vide a variety of entry points into a running Salt system. It can start and manage multiple interfaces allowing a REST API to co- exist with XMLRPC or even a Websocket API. By default the Salt API was developed to act as the communication layer for the Salt web UI, but it can also be used as a means to access Salt from other remote apis as well. Salt API is closely tied to the external authentication system and uses TLS for all connections.
  • 29. 3.8 SUSE Manager and Salt API SUSE Manager uses the Salt API. The REST configuration shipped is: # file: /etc/salt/master.d/susemanager.conf (fragment) # Setup cherrypy rest_cherrypy: port: 9080 host: 127.0.0.1 collect_stats: false disable_ssl: true ssl_crt: /etc/pki/tls/certs/spacewalk.crt ssl_key: /etc/pki/tls/private/spacewalk.key
  • 30. 3.8.1 External Authentication The REST interface requires the external authentication system to be defined. The External Authentication configuration shipped is: # Setup API authentication external_auth: auto: admin: - .* - '@wheel' - '@runner' - '@jobs'
  • 31. 3.8.2 Managing Salt API If ever needed, the Salt API may be restarted by executing: systemctl salt-api restart Warning: Be very careful changing any of these settings so that SUSE Manager integration is not broken.
  • 32. 3.9 RESTful LocalClient Call Both the curl command line and native programming languages can be used to access this web service API. Supports token passing or cookie storage for session management. Logging into the API will return a token that must be referenced for all subsequent calls
  • 33. Perform a API RESTful login. curl -sSk http://localhost:9080/login -H 'Accept: application/x-yaml' -d username=saltdev -d password=saltdev -d eauth=auto return: - eauth: auto expire: 1437104145.631494 perms: - '@runner' - '@wheel' - .* start: 1437060945.6314919 token: 13279c452c51fbbf00c9f32d1e62c79be8db262c user: saltdev
  • 34. So to run a test.ping to all hosts using the token you would make the call as: curl -sSk http://localhost:9080 -H 'X-Auth-Token:4d3f6b45da944946a92b7d1efee5a382cd0160f1' -d client=local -d tgt='*' -d fun=test.ping
  • 35. Cookies can be used instead of passing the token each time: curl -sSk http://localhost:9080/login -H 'Accept: application/x-yaml' -d username=saltdev -d password=saltdev -d eauth=auto -c cookies.txt
  • 36. Now all subsequent calls can use cookies such as in this call to get the grain information from curl -sSk http://localhost:9080 -b cookies.txt -H 'Accept: application/x-yaml' -d client=local -d tgt=websvr1 -d fun=grains.items
  • 37. 3.9.1 State Runs through Salt API A call can be made to run a state dry-run with state.sls for the apache state: curl -sSk http://localhost:9080 -b cookies.txt -H 'Accept: application/x-yaml' -d client=local -d tgt='minion01' -d fun=state.sls -d arg=httpd -d arg='test=True' A call can be made to run the state with state.sls: curl -sSk http://localhost:9080 -b cookies.txt -H 'Accept: application/x-yaml' -d client=local -d tgt='minion01' -d fun=state.sls -d arg=httpd
  • 38. 3.10 Using API Registered URLs The Salt API has registered URLs, or hooks to shortcut access to in- formation. The following shows examples of using registered URLs.
  • 39. 3.10.1 Listing Minions Using the /minions hook: # Show all minions and grains curl -sSk http://localhost:9080/minions -b cookies.txt -H 'Accept: application/x-yaml' # Show a specific minion curl -sSk http://localhost:9080/minions/minion01 -b cookies.txt -H 'Accept: application/x-yaml'
  • 40. 3.10.2 Listing Keys Using the /keys hook: # List all keys curl -sSk http://localhost:9080/keys -b cookies.txt -H 'Accept: application/x-yaml' # List a specific minion's keys curl -sSk http://localhost:9080/keys/minion01 -b cookies.txt -H 'Accept: application/x-yaml'
  • 41. 3.10.3 List Jobs Using the jobs hook: # List all jobs curl -sSk http://localhost:9080/jobs -b cookies.txt -H 'Accept: application/x-yaml'
  • 42. 3.10.4 Logging Out Logging out: curl -sSk http://localhost:9080/logout -H 'Accept: application/x-yaml' -b cookies.txt
  • 43. 3.11 Registered URLS in the API There are special registered URIs for accessing common data: Fig. 3.3: Salt API Registered Hooks
  • 44. 4 Demo • Demo of using SUSE Manager API • Demo of using Salt API