Oracle installation on windows?

I want to know the way of installing oracle 12c on windows with chef.

for now i am trying with response file but default file is not working how can use it or parameter should be added to run it successfully.

kindly help is any one already done this.

I would recommend leveraging the template resource to generate your response file:

template 'C:\Path\To\File` do
  source 'source.erb'
  user 'oracle'
  group 'oracle'
  action 'create'
  variables(
    key1:  'value1',
    key2:  'value2
  )
end

The source.erb file is a Ruby template file located in the cookbooks templates/default/ directory.

Then I would leverage an execute block or powershell block to run the command pointing to the generated response file.

please explain it more with execute block or powershell block

package ‘package_name’ do
source "#{setupexe}"
installer_type :custom
options "/q /response_file = "#{responsefile}"
action :install
end

can i use like that

That should work. You will still need to use the template resource to generate your response file.

No its not working can you try… It on your system… Its not able to read response. Rsp

solution provided by @donwlewis should work:

template 'C:\Path\To\File` do
  source 'source.erb'
  user 'oracle'
  group 'oracle'
  action 'create'
  variables(
    key1:  'value1',
    key2:  'value2
  )
end

package ‘Oracle’ do
  source "#{setupexe}"
  installer_type :custom
  options "/q /response_file = 'C:\\Path\\To\\File' "
 action :install
end

Thanks very much for you effort. But can you tell me one thing if i am using alreday generated response file contailing default varibles then should i use these varibles too in template resource

And what is this patb c:/patb/to/file

And i have one ore question can i pass attribute a response file directly. Eg. Path = <%=node[t1][path]>

The c:/patb/to/file was just an example of your response_file path

As you can see in the template resource there 2 variables declared. Those variables can be referred in the source.rb

<%= @key1 %>
<%= @key2 %>

The <%= node[t1][path] %> can also work as direct reference of node attributes in template files, but personally I think it is healthier to declare them as template variables, because then you have a centralized location of all attributes and you know what manipulates the generated template file
Some examples:
https://www.tutorialspoint.com/chef/chef_templates.htm

its not working its starting the exe and but able to read response file.

It would be nice if you could paste in your code and also the error message.
Please use syntax highlighting

package ‘package_name’ do
source "#{setupexe}"
installer_type :custom
options "/q /response_File=‘D:\database\response\db_install.rsp’"
action :install
end

response file :

oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v12.1.0
oracle.install.option=INSTALL_DB_SWONLY
ORACLE_HOSTNAME=poc.aa.aa.com
SELECTED_LANGUAGES=en
ORACLE_HOME=D:\oracle\product\root2
ORACLE_BASE=D:\oracle
oracle.install.db.InstallEdition=EE
oracle.install.db.rac.serverpoolCardinality=0
oracle.install.db.config.starterdb.type=GENERAL_PURPOSE
oracle.install.db.ConfigureAsContainerDB=false
oracle.install.db.config.starterdb.memoryOption=false
oracle.install.db.config.starterdb.installExampleSchemas=false
oracle.install.db.config.starterdb.managementOption=DEFAULT
oracle.install.db.config.starterdb.omsPort=0
oracle.install.db.config.starterdb.enableRecovery=false
oracle.install.IsBuiltInAccount=false
oracle.install.OracleHomeUserName=oraclebatch
oracle.install.OracleHomeUserPassword=
SECURITY_UPDATES_VIA_MYORACLESUPPORT=false
DECLINE_SECURITY_UPDATES=true

This ia not all your code is it? What about the #{setupexe} variable? Where is it declared?
Also you forgot to paste in the chef-client output
Please try to be precise.

setupexe = ‘d:\database\setup.exe’

  • windows_package[package_name] action install
    • install version latest of package package_name

it is showing install but not installing actually may be it is not revoking my response file