Skip to content

Instantly share code, notes, and snippets.

---
driver:
name: vagrant
driver_plugin: vsphere
driver_config:
driver_options:
host: 'xx.xx.xx.net'
user: '[email protected]'
password: 'xx'
not_if do
require 'json'
require 'net/http'
s = Net::HTTP.get_response(URI.parse('http://10.109.xx.xx:7001/console/login/LoginForm.jsp')).body
s =~ /.*Log in to work with the WebLogic Server domain.*/
end
knife bootstrap windows winrm -N xx.xx.xx.net 10.10.64.44 -x 'userxx'
INFO: Using configuration from /home/rreilly/chef-repo/.chef/knife.rb
Waiting for remote response before bootstrap.DEBUG: Adding xx.xx.64.44
DEBUG: :session => :init
DEBUG: :relay_to_servers => echo . & echo Response received.
DEBUG: :relayed => xx.xx.64.44
DEBUG: xx.xx.64.44 => :run_command
DEBUG: xx.xx.64.44[D5E14E88-379E-446A-92BB-48AABA4C8A12] => :shell_open
DEBUG: xx.xx.64.44[D5E14E88-379E-446A-92BB-48AABA4C8A12] => :run_command[echo . & echo Response received.]
chef_gem 'chef-provisioning-vsphere' do
action :install
compile_time true
end
require 'chef/provisioning/vsphere_driver'
with_vsphere_driver host: 'xx.xxx.com',
insecure: true,
user: 'admin',
[rreilly@wxxxrreilly chef-repo]$ knife bootstrap x.x.x.x -x root -P 'xxx'
Node exists, overwrite it? (Y/N) Y
ERROR: Method Not Allowed
Response: <html><head><title>405 Method Not Allowed</title></head><body><h1>Method Not Allowed</h1>Method Not Allowed<
p><hr><address>mochiweb+webmachine web server</address></body></html>
execute 'install-foundation-config' do
command "sudo -u epmsys #{node['xxx-essbase']['hyperion_home']}/configtool.sh --silent #{node['xxx-essbase']['install_dir']}/xxx/foundation-config.xml"
user 'epmsys'
group 'epmsys'
returns [0,5]
action :run
end
Result of checking assemblies: Ok
Checking environment variables...
EPMINS-01056: Could not set the environment variable TMP.
EPMINS-01056: Could not set the environment variable TMPDIR.
Environment variable /tmp would be used.
Ok
EPMINS-01087: Checking if the file exist and have read permissions: /root...
Failed!
EPMINS-01099: User home have to exist for successful installation.
EPMINS-01001: One or more preinstallation checks failed. Correct the errors before continuing with the installation.
#!/bin/bash
#
# consul Manage the consul agent
#
# chkconfig: 2345 95 95
# description: Consul is a tool for service discovery and configuration
# processname: consul
# config: /etc/consul.conf
# pidfile: /var/run/consul.pid
Chef Client failed. 0 resources updated in 24.000853 seconds
[2015-05-21T10:37:19-04:00] INFO: Sending resource update report (run-id: 11174cc4-3612-491c-876b-d62d97a0499b)
[2015-05-21T10:37:19-04:00] FATAL: OpenSSL::SSL::SSLError: windows_package[7z920-x64.msi] (xxx-tomcat::default line 13)
had an error: OpenSSL::SSL::SSLError: remote_file[c:/chef/cache/7z920-x64.msi] (dynamically defined) had an error: OpenS
SL::SSL::SSLError: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed
PS C:\opscode\chef\bin> cat c:/chef/cache/chef-stacktrace.out
Generated at 2015-05-21 10:37:19 -0400
OpenSSL::SSL::SSLError: windows_package[7z920-x64.msi] (xxx-tomcat::default line 13) had an error: OpenSSL::SSL::SSLErr
or: remote_file[c:/chef/cache/7z920-x64.msi] (dynamically defined) had an error: OpenSSL::SSL::SSLError: SSL_connect re
turned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed
require 'serverspec'
require 'winrm'
set :backend, :winrm
user = 'vagrant'
pass = 'vagrant'
endpoint = "http://#{ENV['TARGET_HOST']}:55985/wsman"
winrm = ::WinRM::WinRMWebService.new(endpoint, :ssl, :user => user, :pass => pass, :basic_auth_only => true)