Peter has prepared a lab where participants can perform a scripted installation and configuration of Oracle WebLogic Server 12c. I've prepared a follow-up lab in which we will do a similar installation and configuration, only this time fully automated using Puppet.
Puppet is a tool to automate configuration management. Together with Chef it's one of the more popular configuration management tools at the moment. Puppet allows you to describe the desired (to-be) state of your servers by declaring resources. These declarations can describe user accounts, security settings, packages, directories, files, executable statements, services, and so on. Manifests are the files in which resource declarations are listed. Puppet periodically applies manifests by translating manifests into specific commands (catalogs) and executes those on the managed servers. Puppet is capable of inspecting the machines so it only applies those changes that are necessary. If a machine is already in the desired state Puppet will apply no changes.
The following example shows a simple manifest that can be used to install and configure the Network Time Protocol (NTP) service. The manifest declares that the "ntp" package needs to be present, that the ntp configuration file is copied to the right location, and that the ntp service is running. A change in the configuration file will restart the service.
package { "ntp":
ensure => present
}
file { "/etc/ntp.conf":
owner => root,
group => root,
mode => 444,
source => "puppet:///files/etc/ntp.conf",
require => Package["ntp"],
}
service { "ntpd":
enable => true ,
ensure => running,
subscribe => File["/etc/ntp.conf"],
}
Using a configuration management tool to automate server management compared to manual installation and configuration (artisan server crafting) has the following benefits:
- You eliminate tedious and repetitive work since you only need to write a manifest once and can apply it to as many servers as you want;
- Puppet manifests are defined in a machine- and OS-independent domain language so the manifests are portable and can be reused;
- You can keep servers in synch and you know what is running on what server;
- Manifests can be used as documentation: since manifests are applied by Puppet the documentation is always up-to-date;
- Manifests can be version controlled and managed the same way you manage other code.
Puppet can be configured to run in a Master/Agent mode, meaning that there is a central Puppet instance (Master) that coordinates the server management. Servers on which a Puppet Agent runs pull the catalog from the Master. The Puppet Master decides what goes into the catalogs. Participants of the WebLogic Hackathon event will be divided in groups of three in which one will act as Puppet Master and two act as Agent. This setup is shown in the following figure:
So, sign-up for the WebLogic Hackathon at UKOUG 2013 Tech and join us for this cool hands-on-lab !!!
If you want to know more about Oracle WebLogic Server please visit Oracle Technology Network. If you want to know more about Puppet I strongly recommend the Puppet 3 Beginner's Guide by John Arundel. Also see Edwin Biemond's Oracle Puppet modules on Puppet Forge.
No comments:
Post a Comment