Please Help , facing issues while installing sqlplus using chef

Hi All,

I am very new to chef and trying to install sqlplus using it. My
requirement for installing sqlplus is basically updating .bashrc file
and then installing it from provided packages. i’ve written following
recipe for it.

cookbook_file “/root” do
source "/root/oracle-instantclient11.1-basic-11.1.0.7.0-1.x86_64.rpm"
mode “0644”
## used for transferring packages to
client nodes
end

cookbook_file “/root” do
source "/root/oracle-instantclient11.1-sqlplus-11.1.0.7.0-1.x86_64.rpm"
mode “0644”
## used for transferring packages to
client nodes
end

cookbook_file "/root/.bashrc " do
source "/root/.bashrc"
mode “0644”
## used for updating .bashrc files
end

package “rpm_package” do
## installing packages
action :install
source "/root/oracle-instantclient11.1-basic-11.1.0.7.0-1.x86_64.rpm"
provider Chef::Provider::package::Rpm
end

package “rpm_package” do
action :install
source “/root/oracle-instantclient11.1-sqlplus-11.1.0.7.0-1.x86_64.rpm”
## installing packages
provider Chef::Provider::package::Rpm
end

and after that i created sqlplus cookbook and uploaded it using “knife
cookbook upload sqlplus”

i’m not sure how to deploy it so that i can test it further . Please
suggest me how can deploy these recipe or i need to have modification
in the recipe as well.

Your help would be greatly appreciated.

Thanks,
Goutam

Hi Goutam,

You should consider testing your cookbooks locally against a virtual
machine using Vagrant:

http://wiki.opscode.com/display/chef/Vagrant

This will make your development and testing efforts much easier. There
are other tools (such as Librarian and Berkshelf) that will also make
things easier but for the sake of simplicity, I would recommend
starting off with Vagrant and the chef-solo provisioner:

http://vagrantup.com/v1/docs/provisioners/chef_solo.html

Then move on to chef-server. Hope this helps!

-K.

On Tue, Dec 18, 2012 at 12:26 PM, goutam goutamchiraniya@gmail.com wrote:

Hi All,

I am very new to chef and trying to install sqlplus using it. My
requirement for installing sqlplus is basically updating .bashrc file
and then installing it from provided packages. i've written following
recipe for it.

cookbook_file "/root" do
source "/root/oracle-instantclient11.1-basic-11.1.0.7.0-1.x86_64.rpm"
mode "0644"
## used for transferring packages to
client nodes
end

cookbook_file "/root" do
source "/root/oracle-instantclient11.1-sqlplus-11.1.0.7.0-1.x86_64.rpm"
mode "0644"
## used for transferring packages to
client nodes
end

cookbook_file "/root/.bashrc " do
source "/root/.bashrc"
mode "0644"
## used for updating .bashrc files
end

package "rpm_package" do
## installing packages
action :install
source "/root/oracle-instantclient11.1-basic-11.1.0.7.0-1.x86_64.rpm"
provider Chef::Provider::package::Rpm
end

package "rpm_package" do
action :install
source "/root/oracle-instantclient11.1-sqlplus-11.1.0.7.0-1.x86_64.rpm"
## installing packages
provider Chef::Provider::package::Rpm
end

and after that i created sqlplus cookbook and uploaded it using "knife
cookbook upload sqlplus"

i'm not sure how to deploy it so that i can test it further . Please
suggest me how can deploy these recipe or i need to have modification
in the recipe as well.

Your help would be greatly appreciated.

Thanks,
Goutam

--
Kevin Karwaski
Operations Engineer @ {Fiksu}