This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| get-item C:\chef\cache\cookbooks\**\metadata.rb | % { | |
| $_.fullName | |
| cat $_.fullname } | |
| for f in /var/chef/cache/cookbooks/**/metadata.rb; do sudo cat $f; done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo docker rm -f $(sudo docker ps -a -q) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| try { | |
| cinst DotNet4.5 | |
| #Enable Web Services | |
| cinst IIS-WebServerRole -source WindowsFeatures | |
| cinst IIS-ISAPIFilter -source WindowsFeatures | |
| cinst IIS-ISAPIExtensions -source WindowsFeatures | |
| #Enable ASP.NET on win 2012/8 | |
| cinst IIS-NetFxExtensibility45 -source WindowsFeatures |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if ( Get-UAC ) | |
| { | |
| Disable-UAC | |
| Invoke-Reboot | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # -*- mode: ruby -*- | |
| # vi: set ft=ruby : | |
| VAGRANTFILE_API_VERSION = "2" | |
| Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
| config.vm.box = "mwrock/Windows2012R2" | |
| config.vm.box_url = "https://vagrantcloud.com/mwrock/Windows2012R2/version/1/provider/hyperv.box" | |
| # Change "." to a local folder you want to sync | |
| config.vm.synced_folder ".", "/chocolateypackages", disabled: true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Update-ExecutionPolicy Unrestricted | |
| Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions | |
| Enable-RemoteDesktop | |
| cinst console2 | |
| cinst sublimetext3 | |
| $sublimeDir = "$env:programfiles\Sublime Text 3" | |
| Get-ChildItem $env:programdata\Chocolatey\lib\console* | % {$consoleDir = $_} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'kitchen' | |
| require 'chef_metal_vsphere/vsphere_driver' | |
| require 'chef_metal/chef_machine_spec' | |
| module Kitchen | |
| module Driver | |
| class Vsphere < Kitchen::Driver::SSHBase | |
| def create(state) | |
| config[:server_name] ||= "kitchen-#{SecureRandom.hex}-#{instance.name}" | |
| state[:username] = config[:machine_options][:bootstrap_options][:ssh][:user] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| mwrock@mwrock:~/dev/chef-metal-vsphere (master *%)$ rspec specs/unit_tests/VsphereDriver_spec.rb | |
| from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/rspec-core-2.14.8/lib/rspec/core/runner.rb:17:in `block in autorun' | |
| from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/rspec-core-2.14.8/lib/rspec/core/runner.rb:80:in `run' | |
| from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/rspec-core-2.14.8/lib/rspec/core/command_line.rb:22:in `run' | |
| from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/rspec-core-2.14.8/lib/rspec/core/configuration.rb:896:in `load_spec_files' | |
| from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/rspec-core-2.14.8/lib/rspec/core/configuration.rb:896:in `each' | |
| from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/rspec-core-2.14.8/lib/rspec/core/configuration.rb:896:in `block in load_spec_files' | |
| from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/rspec-core-2.14.8/lib/rspec/core/configuration.rb:896:in `load' | |
| from /home/mwrock/dev/chef-metal-vsphere/specs/unit_tests/VsphereDriver_spec.rb:1:in `<top |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| driver: | |
| name: vagrant | |
| provider: hyperv | |
| provisioner: | |
| name: chef_solo | |
| platforms: | |
| - name: precise-64 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| try { | |
| if(Test-Path "HKLM:\Software\Microsoft\MSSQLServer\MSSQLServer\CurrentVersion"){ | |
| if((Get-ItemProperty -Path HKLM:\Software\Microsoft\MSSQLServer\MSSQLServer\CurrentVersion).CurrentVersion -ge "11.0.3000.0") { | |
| Write-Host "Sql 2012 SP1 already installed" | |
| } | |
| } | |
| else { | |
| $adminsGroupName = (New-Object Security.Principal.SecurityIdentifier 'S-1-5-32-544').Translate([Security.Principal.NTAccount]).Value | |
| $currentUser = Get-CurrentUser | |
| Install-ChocolateyInstallPackage 'Sql2012' 'exe' "/q /INDICATEPROGRESS /ACTION=Install /FEATURES=SQLEngine,FullText,ADV_SSMS /TCPENABLED=1 /INSTANCENAME=MSSQLSERVER /SQLSVCACCOUNT=`"NT AUTHORITY\Network Service`" /SQLSYSADMINACCOUNTS=`"$adminsGroupName`" `"$($currentUser.Domain)\$($currentUser.Name)`" /AGTSVCACCOUNT=`"NT AUTHORITY\Network Service`" /IACCEPTSQLSERVERLICENSETERMS " '\\server\share\SQL Server 2012 SP1\Developer\X64\setup.exe' @(0,3010) |