Upload
mariadb
View
62
Download
3
Embed Size (px)
Citation preview
SUSE Manager with SaltDeploy and Config Management for MariaDB
Torsten Hallmann
Sales Engineering Manager Central Europe
4
SUSE Software Catalog: MariaDB
● MariaDB is listed in SUSE's Software Catalogwww.suse.com/isvcatalog
● MariaDB 10 is certified for SLES 11 and 12
5
MariaDB on Open Build Service
● Find projects that already build newer versions of MariaDB for SLES 12
● Build bleeding edge versions for SLES
● OBS Packages are without support!
● build.opensuse.org
6
MariaDB on SUSE Studio
● Creating Software Appliances
● Use OBS repositories● Several Formats
available:● Preload (usb, iso)● Live CD● VM (vmdk, ovf, img, qcow2)● Cloud (ami, vhd)
9
Deploy & Manage MariaDB with SUSE Manager
● Provisioning new machines with autoinstallation● Centralize Packages Management incl. MariaDB● Build and Manage software stagings for controlled operations of
Development, Testing & Production landscapes● Rollout configuration of MariaDB settings● Monitor configuration changes
10
Provision New MachinesDifferent Levels of Automation
● Without PXE● Kickoff installation with boot iso● Select autoinstall profile● Answer individualization questions during installation● (Move new system after installation to MariaDB group)
● With PXE● Kickoff PXE boot● Select autoinstall● Answer individualization questions during installation● (Move new system after installation to MariaDB group)
11
Provision New MachinesDifferent Levels of Automation
● With PXE and SUSE Manager Discovery● Kickoff PXE boot● Select System in SUSE Manager for Deployment● Provide all required individualization by variables● Start Machine
12
Installation Example – Step 1
● Prerequisits:● Distribution● Installation Profile
● Task:● Boot via PXE● Select Profile to Install
13
Installation Example – Step 2
● Prerequisits● Ask Section in Autoprofile● Default values (script or listing)
● Task● Fill in or select required values
15
Installation Example – Finish
● Complete Automation● Keys, Roles, Grains,
States made your system ready to go
● Best Effort Automation● General OS deployed● Roles, Grains, States
manually assigned by moving system into a group
17
SUSE Manager 3
States
Description of how a system configuration• YAML
• Jinja2 Templating
• Uses Salt State Modules
Salt States Catalog• SUSE Manager provides an integrated, central store for own states definitions
– Assignable to SUSE Manager Organization, Group, Systems
• Optional you can store an own structure of states within /srv/salt forusing non-integrated Salt Features
19
SUSE Manager 3 – Salt Basics
Example State
install_mariadb: pkg.installed: - name: mariadb
service_mariadb: service.running: - name: mysql - enable: True
config_files_mycnf: file.managed: - name: /etc/my.cnf - source: salt://my.cnf - user: root - group: root - mode: 640
20
SUSE Manager 3 – Salt Basics
State Dependencies
Requisit declarations define dependency/order of single state statements:● Require● Watch● Onchanges● Prereq● Onfail● Use
21
SUSE Manager 3 – Salt Basics
Example State
[...]
service_mariadb: service.running: - name: mysql - enable: True - watch: - pkg: mariadb - file: /etc/my.cnf
[...]
24
SUSE Manager 3
Salt Elements Beyond States
Beacons• Monitor for changes/thresholds and send events in case
Reactors• Execute “run books” on specific events
Orchestration• Manage relations/actions between servers up to firing complete setups in private
or public clouds
Proxy• Use minioncontroller to manage devices that are not capable to host agent
(python etc.)
25
Use Case: Monitor Configfile for Changes
Change Event Received
salt/beacon/mymariadb.bo2go.home/inotify//etc/my.cnf {
"_stamp": "2016-11-28T19:37:15.317124",
"data": {
"change": "IN_IGNORED",
"id": "mymariadb.bo2go.home",
"path": "/etc/my.cnf"
},
"tag": "salt/beacon/mymariadb.bo2go.home/inotify//etc/my.cnf"
}
Restore /etc/my.cnf
salt/job/20161128203715445906/new {
"_stamp": "2016-11-28T19:37:15.446371",
"arg": [
"salt-call state.sls_id config_files_mycnf manager_org_1.server_role_mariadb"
],
"fun": "cmd.run",
"jid": "20161128203715445906",
"minions": [
"mymariadb.bo2go.home"
],
"tgt": "mymariadb.bo2go.home",
"tgt_type": "glob",
"user": "salt"
}
27
Deliver MariaDB in Docker Containers
SLES12 supports docker:● Images from trusted source (repository)● Full control over your data: on-premise registry,
authentication ● Pre-built SLES Docker images
SUSE provides built-in tools:● YaST interface● sle2docker, zypper-docker● Portus