For those who are interested in the Chef and Puppet sample code we published on github, please enjoy this video:
For those who are interested in the Chef and Puppet sample code we published on github, please enjoy this video:
In case you missed the public announcement made on Stackoverflow, OTN and on JDBC Forum – Oracle is now making JDBC and UCP drivers available in our Maven repository (https://maven.oracle.com).
You can learn more in this blog.
With Edwin Biemond
Oracle official sample Chef cookbooks and Puppet modules are now available on Oracle’s official GitHub page at https://github.com/oracle/chef-samples and https://github.com/oracle/puppet-samples for Java, WebLogic and Fusion Middleware.
Chef and Puppet are arguably the most popular provisioning frameworks and we would like to help you with your WebLogic and Fusion Middleware provisioning by publishing samples for Chef and Puppet. The Chef and Puppet sample modules and cookbooks are almost the same and are using the same development frameworks.
We start this series of posts with an introduction what these cookbooks and modules can do and provide a simple quickstart how to create a WebLogic domain in Chef or Puppet on a Windows, Linux or Solaris host. In the following posts we will install FMW software, patch and extend a domain with FMW software.
These Chef cookbooks and Puppet modules allow you install WebLogic together with Fusion Middleware on any Linux, Solaris or Windows host. The cookbooks should work in Chef 11 & 12 and can be used with Chef server or with Chef Solo. The modules should work on Puppet 3 & 4 and it should not matter if you use Puppet Enterprise, an agent or just use puppet apply.
The first release on github will contain the following cookbooks and modules:
A couple of important notes about these cookbooks and modules:
These cookbooks and modules contains recipes and manifests with resource/providers in Chef and type/providers for Puppet. The recipes and manifest are a quick way to get you started and these minimal recipes are just calling the matching resource/type providers. You can call these yourself in one of your own cookbooks.
In these examples I added all the recipes to the run list even the required recipes are automatically included but this is makes it easier to explain these examples.
fmw is the namespace for all the FMW global attributes, like java_home_dir or middleware_home_dir.
We start by installing JDK 8 with WebLogic 12.1.3 on a Windows host. To do so we need to add the install recipe of the fmw_jdk and fmw_wls cookbook. Set some global fmw parameters like java_home_dir and weblogic_home_dir after this we need to define the source attributes of fmw_jdk and fmw_wls cookbooks.
{ "run_list": ["recipe[fmw_jdk::install]", "recipe[fmw_wls::install]" ], "fmw": { "java_home_dir": "c:\\java\\jdk1.8.0_74", "middleware_home_dir": "c:\\oracle\\middleware_1213" }, "fmw_jdk": { "source_file": "c:\\software\\jdk-8u74-windows-x64.exe" }, "fmw_wls": { "source_file": "c:\\software\\fmw_12.1.3.0.0_wls.jar" } }
We can do the same on a Linux host but in this case I want to make sure that the jdk cookbook also configures the rngd service so I don’t ran out of entropy and the wls cookbook creates the Linux Oracle user and it’s group. In this example I will use JDK7 (on RedHat systems like OEL, CentOS you can also use the rpm as source_file) and install the WebLogic 12.1.3 Infrastructure edition.
{ "run_list": ["recipe[fmw_jdk::install]", "recipe[fmw_jdk::rng_service]", "recipe[fmw_wls::setup]", "recipe[fmw_wls::install]", ], "fmw": { "java_home_dir": "/usr/java/jdk1.7.0_79", "middleware_home_dir": "/opt/oracle/middleware_1213", "weblogic_home_dir": "/opt/oracle/middleware_1213/wlserver", "version": "12.1.3" }, "fmw_jdk": { "source_file": "/software/jdk-7u79-linux-x64.tar.gz" }, "fmw_wls": { "source_file": "/software/fmw_12.1.3.0.0_infrastructure.jar", "install_type": "infra" } }
In the cookbook we defined the following attributes with its defaults. You can always override these attributes or remove it from the attributes file when you are happy with the defaults.
default['fmw']['version'] = '12.1.3' # 10.3.6|12.1.1|12.1.2|12.1.3|12.2.1 default['fmw_wls']['install_type'] = 'wls' # infra or wls if platform_family?('windows') default['fmw']['middleware_home_dir'] = 'C:/oracle/middleware' default['fmw']['ora_inventory_dir'] = 'C:\\Program Files\\Oracle\\Inventory' default['fmw']['tmp_dir'] = 'C:/temp' else default['fmw']['middleware_home_dir'] = '/opt/oracle/middleware' default['fmw']['os_user'] = 'oracle' default['fmw']['os_group'] = 'oinstall' default['fmw']['os_shell'] = '/bin/bash' end case platform_family when 'debian', 'rhel' default['fmw']['orainst_dir'] = '/etc' default['fmw']['user_home_dir'] = '/home' default['fmw']['ora_inventory_dir'] = '/home/oracle/oraInventory' default['fmw']['tmp_dir'] = '/tmp' when 'solaris2' default['fmw']['orainst_dir'] = '/var/opt/oracle' default['fmw']['user_home_dir'] = '/export/home' default['fmw']['ora_inventory_dir'] = '/export/home/oracle/oraInventory' default['fmw']['tmp_dir'] = '/var/tmp' end
Next example is to create a simple WebLogic domain. In this case we need to add the domain, nodemanager and adminserver recipes to the run list. This will create the WebLogic domain and after this we can configure/start the node manager service and startup the WebLogic admin server.
{ "run_list": ["recipe[fmw_jdk::install]", "recipe[fmw_jdk::rng_service]", "recipe[fmw_wls::setup]", "recipe[fmw_wls::install]", "recipe[fmw_domain::domain]", "recipe[fmw_domain::nodemanager]", "recipe[fmw_domain::adminserver]" ], "fmw": { "java_home_dir": "/usr/java/jdk1.8.0_74", "middleware_home_dir": "/opt/oracle/middleware_1213", "weblogic_home_dir": "/opt/oracle/middleware_1213/wlserver", "version": "12.1.3" }, "fmw_jdk": { "source_file": "/software/jdk-8u74-linux-x64.tar.gz" }, "fmw_wls": { "source_file": "/software/fmw_12.1.3.0.0_wls.jar" }, "fmw_domain": { "databag_key": "DEV_WLS1", "domains_dir": "/opt/oracle/middleware_1213/user_projects/domains", "apps_dir": "/opt/oracle/middleware_1213/user_projects/applications", "nodemanager_listen_address": "10.10.10.81", "nodemanager_port": 5556 } }
Before you can run this we need to define a fmw_domains databag entry like this. It should be under fmw_domains and named dev_wls1.json
{ "id": "DEV_WLS1", "domain_name": "base", "weblogic_user": "weblogic", "weblogic_password": "welcome1", "adminserver_name": "AdminServer", "adminserver_listen_address": "10.10.10.81", "adminserver_listen_port": "7001" }
This domain databag entry can be used for multi-node provisioning or to encrypt your passwords.
In the last part we can do the same for Solaris but this time we will use WebLogic 10.3.6/11g and extend the domain with some machines, servers and clusters.
For Solaris the JDK7 installation is a bit different in this case we need to provide 2 JDK source files.
{ "run_list": ["recipe[fmw_jdk::install]", "recipe[fmw_wls::setup]", "recipe[fmw_wls::install]", "recipe[fmw_domain::domain]", "recipe[fmw_domain::nodemanager]", "recipe[fmw_domain::adminserver]" ], "fmw": { "java_home_dir": "/usr/jdk/instances/jdk1.7.0_79", "middleware_home_dir": "/opt/oracle/middleware_11g", "weblogic_home_dir": "/opt/oracle/middleware_11g/wlserver_10.3", "version": "10.3.6" }, "fmw_jdk": { "source_file": "/software/jdk-7u79-solaris-i586.tar.gz", "source_x64_file": "/software/jdk-7u79-solaris-x64.tar.gz" }, "fmw_wls": { "source_file": "/software/wls1036_generic.jar" }, "fmw_domain": { "databag_key": "DEV_WLS1", "domains_dir": "/opt/oracle/middleware_11g/user_projects/domains", "apps_dir": "/opt/oracle/middleware_11g/user_projects/applications", "nodemanager_listen_address": "10.10.10.81", "nodemanagers": [ { "id": "node1", "listen_address": "10.10.10.81" }, { "id": "node2", "listen_address": "10.10.10.81" } ], "servers": [ { "id": "server1", "nodemanager": "node1", "listen_address": "10.10.10.81", "listen_port": 8001, "arguments": "-XX:PermSize=256m -XX:MaxPermSize=512m -Xms1024m -Xmx1024m" }, { "id": "server2", "nodemanager": "node2", "listen_address": "10.10.10.81", "listen_port": 8002, "arguments": "-XX:PermSize=256m -XX:MaxPermSize=512m -Xms1024m -Xmx1024m" }, { "id": "server3", "nodemanager": "node1", "listen_address": "10.10.10.81", "listen_port": 9001, "arguments": "-XX:PermSize=256m -XX:MaxPermSize=512m -Xms1024m -Xmx1024m" } ], "clusters": [ { "id": "cluster1", "members": ["server1", "server2"] }, { "id": "cluster2", "members": ["server3"] } ] } }
We start by installing JDK 8 with WebLogic 12.1.3 on a Windows host. To do so we need to add the execute the install manifests of the fmw_jdk and fmw_wls modules. Also we override the middleware_home_dir attribute of the fmw_wls module.
node default { $java_home_dir = 'c:\\java\\jdk1.8.0_74' $middleware_home_dir = 'c:\\oracle\\middleware_1213' class { 'fmw_jdk::install': java_home_dir => $java_home_dir, source_file => 'c:\\software\\jdk-8u74-windows-x64.exe' } class { 'fmw_wls': middleware_home_dir => $middleware_home_dir } class { 'fmw_wls::install': java_home_dir => $java_home_dir, source_file => 'c:\\software\\fmw_12.1.3.0.0_wls.jar' } }
We can do the same with hiera in combination with a simple puppet manifest:
node default { hiera_include('classes') } --- # executed manifest classes classes: - fmw_jdk::install - fmw_wls::install # general variables java_home_dir: &java_home_dir 'c:\\java\\jdk1.8.0_74' middleware_home_dir: &middleware_home_dir 'c:\\oracle\\middleware_1213' # class parameters fmw_jdk::install::java_home_dir: *java_home_dir fmw_jdk::install::source_file: 'c:\\software\\jdk-8u74-windows-x64.exe' fmw_wls::middleware_home_dir: *middleware_home_dir fmw_wls::install::java_home_dir: *java_home_dir fmw_wls::install::source_file: 'c:\\software\\fmw_12.1.3.0.0_wls.jar'
We can do the same on a Linux host but in this case I want to make sure that the jdk module also configures the rngd service so I don’t ran out of entropy and the wls module creates the Linux Oracle user and it’s group. In this example I will use JDK7 (on RedHat systems like OEL, CentOS you can also use the rpm as source_file) and install the WebLogic 12.1.3 Infrastructure edition.
On class{ ‘fmw_wls’ } I can set the wls module defaults which will be used by the fmw_wls::install manifest. Also with Class[‘fmw_wls::setup’] -> Class[‘fmw_wls::install’]. I will make sure that the setup manifest is executed before the wls install manifest.
node default { include fmw_jdk::rng_service $java_home_dir = '/usr/java/jdk1.7.0_79' $version = '12.1.3' $middleware_home_dir = '/opt/oracle/middleware_1213' Class['fmw_wls::setup'] -> Class['fmw_wls::install'] class { 'fmw_jdk::install': java_home_dir => $java_home_dir, source_file => '/software/jdk-7u79-linux-x64.tar.gz' } class { 'fmw_wls': version => $version, middleware_home_dir => $middleware_home_dir } include fmw_wls::setup class { 'fmw_wls::install': java_home_dir => $java_home_dir, source_file => '/software/fmw_12.1.3.0.0_infrastructure.jar', install_type => 'infra' } }
In the wls module we have the following params manifest which contains the defaults values. You can always override these attributes on the fmw_wls class or remove it from the class when you are happy with the defaults.
# # fmw_wls::params # # Copyright 2015 Oracle. All Rights Reserved # class fmw_wls::params() { $version = '12.1.3' # 10.3.6|12.1.1|12.1.2|12.1.3|12.2.1 $install_type = 'wls' # infra or wls $os_user = 'oracle' $os_user_uid = '500' $os_group = 'oinstall' $os_shell = '/bin/bash' $user_home_dir = $::kernel? { 'Linux' => '/home', 'SunOS' => '/export/home', default => '/home', } $middleware_home_dir = $::kernel? { 'windows' => 'C:/oracle/middleware', default => '/opt/oracle/middleware', } $ora_inventory_dir = $::kernel? { 'windows' => 'C:\\Program Files\\Oracle\\Inventory', 'SunOS' => '/export/home/oracle/oraInventory', default => '/home/oracle/oraInventory', } $tmp_dir = $::kernel? { 'windows' => 'C:/temp', 'SunOS' => '/var/tmp', default => '/tmp', } $orainst_dir = $::kernel? { 'SunOS' => '/var/opt/oracle', default => '/etc', } }
Next example is to create a simple WebLogic domain. In this case we need to invoke the domain, nodemanager and adminserver manifests. This will create the WebLogic domain and after this we can configure/start the node manager service and startup the WebLogic admin server.
node default { include fmw_jdk::rng_service $java_home_dir = '/usr/java/jdk1.8.0_74' $version = '12.1.3' $middleware_home_dir = '/opt/oracle/middleware_1213' $weblogic_home_dir = '/opt/oracle/middleware_1213/wlserver' Class['fmw_wls::setup'] -> Class['fmw_wls::install'] class { 'fmw_jdk::install': java_home_dir => $java_home_dir, source_file => '/software/jdk-8u74-linux-x64.tar.gz' } class { 'fmw_wls': version => $version, middleware_home_dir => $middleware_home_dir, } include fmw_wls::setup class { 'fmw_wls::install': java_home_dir => $java_home_dir, source_file => '/software/fmw_12.1.3.0.0_wls.jar' } class { 'fmw_domain': version => $version, java_home_dir => $java_home_dir, middleware_home_dir => $middleware_home_dir, weblogic_home_dir => $weblogic_home_dir, domains_dir => '/opt/oracle/middleware_1213/user_projects/domains', apps_dir => '/opt/oracle/middleware_1213/user_projects/applications', domain_name => 'base', weblogic_password => 'welcome1', adminserver_listen_address => '10.10.10.81', adminserver_listen_port => 7001, nodemanager_listen_address => '10.10.10.81', nodemanager_port => 5556 } include fmw_domain::domain include fmw_domain::nodemanager include fmw_domain::adminserver }
In the last part we can do the same for Solaris but this time we will use WebLogic 10.3.6/11g and extend the domain with some machines, servers and clusters.
For Solaris the JDK7 installation is a bit different in this case we need to provide 2 JDK source files. node default { $java_home_dir = '/usr/jdk/instances/jdk1.7.0_79' $version = '10.3.6' $middleware_home_dir = '/opt/oracle/middleware_11g' $weblogic_home_dir = '/opt/oracle/middleware_11g/wlserver_10.3' Class['fmw_wls::setup'] -> Class['fmw_wls::install'] class { 'fmw_jdk::install': java_home_dir => $java_home_dir, source_file => '/software/jdk-7u79-solaris-i586.tar.gz', source_x64_file => '/software/jdk-7u79-solaris-x64.tar.gz' } class { 'fmw_wls': version => $version, middleware_home_dir => $middleware_home_dir } include fmw_wls::setup class { 'fmw_wls::install': java_home_dir => $java_home_dir, source_file => '/software/wls1036_generic.jar' } class { 'fmw_domain': version => $version, java_home_dir => $java_home_dir, middleware_home_dir => $middleware_home_dir, weblogic_home_dir => $weblogic_home_dir, domains_dir => '/opt/oracle/middleware_11g/user_projects/domains', apps_dir => '/opt/oracle/middleware_11g/user_projects/applications', domain_name => 'base', weblogic_password => 'welcome1', adminserver_listen_address => '10.10.10.81', adminserver_listen_port => 7001, nodemanager_listen_address => '10.10.10.81', nodemanager_port => 5556 } class { 'fmw_domain::domain': nodemanagers => [ { "id" => "node1", "listen_address" => "10.10.10.81" }, { "id" => "node2", "listen_address" => "10.10.10.81" }], servers => [ { "id" => "server1", "nodemanager" => "node1", "listen_address" => "10.10.10.81", "listen_port" => 8001, "arguments" => "-XX:PermSize=256m -XX:MaxPermSize=512m -Xms1024m -Xmx1024m" }, { "id" => "server2", "nodemanager" => "node2", "listen_address" => "10.10.10.81", "listen_port" => 8002, "arguments" => "-XX:PermSize=256m -XX:MaxPermSize=512m -Xms1024m -Xmx1024m" }, { "id" => "server3", "nodemanager" => "node1", "listen_address" => "10.10.10.81", "listen_port" => 9001, "arguments" => "-XX:PermSize=256m -XX:MaxPermSize=512m -Xms1024m -Xmx1024m" }], clusters => [ { "id" => "cluster1", "members" => ["server1","server2"] }, { "id" => "cluster2", "members" => ["server3"] }] } include fmw_domain::nodemanager include fmw_domain::adminserver }
Recently, I participated in an OTN ArchBeat panel discussion on Docker with Edwin Biemond, Lucas Jellema, Jim Clark and Matt Wright. We chatted about topics like Docker’s readiness for production use, how Docker and containerization in general impact our views on provisioning tools like Chef and Puppet, how Docker fits in with Continuous Delivery, and the importance of the ecosystem that is needed around Docker to make the whole thing work.
You can find details of the podcast here.
Whew! The third and final broadcast of the Oracle Technology Network Virtual Technology Summit just finished with the APAC broadcast a few minutes ago. If you missed it – I had a session called “Getting Started with the Oracle Maven Repository” which shows you how to use our new repository. The video is available for replay on OTN – just go here.
And the accompanying lab guide is available here.
Don’t forget that Nexus and Artifactory also both have support for proxying the Oracle Maven Repository now!
More good news, Nexus 2.11.2 is now available and supports proxying the Oracle Maven Repository, in both the OSS and Pro versions. You can find all the details here including a video demonstration.
The Sonatype guys, especially Manfred Moser (@simpligility) have been great to work with, and if you are not sure which repository to use, I would certainly encourage you to look at Nexus. They certainly seem to be easy to work with, listen to their users, are willing to collaborate and support the community.
Good news for folks using their own Maven Repository Manager, as the two major players both add support to their products to allow proxying of the Oracle Maven Repository.
Nexus 2.11.2 (to be released soon) will have the necessary support included, and Artifactory 3.5.1 (available now) supports the Oracle Maven Repository.
In Artifactory, you just define the Oracle Maven Repository as a new remote repository, and provide the URL as shown below:
Then click on the Advanced Settings tab, provide a HTTP/SOCKS proxy if you need one to access the Internet, and enter your OTN credentials for the repository. Then, make sure you select the two options Lenient host authentication and Enable cookie management as shown below:
With these settings, Artifactory will happily proxy the Oracle Maven Repository for you.
I will post details of the configuration for Nexus when their new release becomes available.
For those interested in Docker – you might like to check out the new WebLogic Docker images in Oracle’s github repo:
I am happy to announce that we now have an index available for the Oracle Maven Repository. This is a standard Maven index, built with the Maven Core Indexer code (donated by Sonatype to Maven – thanks!) and is available at https://maven.oracle.com/.index/nexus-maven-repository-index.properties and https://maven.oracle.com/.index/nexus-maven-repository-index.gz.
The easiest way to view it is to use an IDE like NetBeans, as shown below:
We are actively working with Maven Repository Manager and IDE teams to make this work for you across a variety of common tools you may use.