Skip to content

Instantly share code, notes, and snippets.

View roberto-mardeni's full-sized avatar

Roberto Mardeni roberto-mardeni

View GitHub Profile
[2016-08-05T14:59:16.469241 #8171] INFO -- : ------- Attempting to configure build-rhel-01.eastus2.cloudapp.azure.com as rmardeni
W, [2016-08-05T14:59:16.469488 #8171] WARN -- : [SSH] PTY requested: stderr will be merged into stdout
D, [2016-08-05T14:59:16.476631 #8171] DEBUG -- : [SSH] [email protected]<{:user_known_hosts_file=>"/dev/null", :paranoid=>false, :port=>22, :compression=>false, :compression_level=>0, :keepalive=>true, :keepalive_interval=>60, :timeout=>15, :auth_methods=>["none", "password", "keyboard-interactive"], :keys_only=>nil, :keys=>nil, :password=>"<hidden>", :forward_agent=>nil}> (/usr/bin/sw_vers)
D, [2016-08-05T14:59:16.476745 #8171] DEBUG -- : [SSH] opening connection to [email protected]<{:user_known_hosts_file=>"/dev/null", :paranoid=>false, :port=>22, :compression=>false, :compression_level=>0, :keepalive=>true, :keepalive_interval=>60, :timeout=>15, :auth_methods=>["none", "password", "keyboard-interactive"], :keys_
* runit_service[nginx] action restart
================================================================================
Error executing action `restart` on resource 'runit_service[nginx]'
================================================================================
Mixlib::ShellOut::ShellCommandFailed
------------------------------------
Expected process to exit with [0], but received '1'
---- Begin output of /opt/opscode/embedded/bin/sv restart /opt/opscode/service/nginx ----
* ruby_block[bootstrap-chef-server-data] action run
================================================================================
Error executing action `run` on resource 'ruby_block[bootstrap-chef-server-data]'
================================================================================
PG::UniqueViolation
-------------------
ERROR: duplicate key value violates unique constraint "users_username_key"
DETAIL: Key (username)=(pivotal) already exists.
INFO: Using configuration from /Users/rmardeni/.chef/knife.rb
DEBUG: Chef::HTTP calling Chef::HTTP::JSONInput#handle_request
DEBUG: Chef::HTTP calling Chef::HTTP::JSONOutput#handle_request
DEBUG: Chef::HTTP calling Chef::HTTP::CookieManager#handle_request
DEBUG: Chef::HTTP calling Chef::HTTP::Decompressor#handle_request
DEBUG: Chef::HTTP calling Chef::HTTP::Authenticator#handle_request
DEBUG: Signing the request as rmardeni
DEBUG: Chef::HTTP calling Chef::HTTP::RemoteRequestID#handle_request
DEBUG: Chef::HTTP calling Chef::HTTP::ValidateContentLength#handle_request
DEBUG: Initiating GET to https://ccl-chef.eastus.cloudapp.azure.com/organizations/Carnival/clients
INFO: Using configuration from /Users/rmardeni/.chef/knife.rb
DEBUG: Chef::HTTP calling Chef::HTTP::JSONInput#handle_request
DEBUG: Chef::HTTP calling Chef::HTTP::JSONOutput#handle_request
DEBUG: Chef::HTTP calling Chef::HTTP::CookieManager#handle_request
DEBUG: Chef::HTTP calling Chef::HTTP::Decompressor#handle_request
DEBUG: Chef::HTTP calling Chef::HTTP::Authenticator#handle_request
DEBUG: Signing the request as rmardeni
DEBUG: Chef::HTTP calling Chef::HTTP::RemoteRequestID#handle_request
DEBUG: Chef::HTTP calling Chef::HTTP::ValidateContentLength#handle_request
DEBUG: Initiating GET to https://ccl-chef.eastus.cloudapp.azure.com/clients
[rmardeni@chef-server-01 ~]$ sudo chef-backend-ctl status elasticsearch
Role: Follower, leader is '10.0.0.4'
Local Status: running (pid 677)
Logging: running (pid 673)
Time up: 0d 0h 7m 47s
Cluster Status: green
Active Shards: 100.0%
** Nodes **
Healthy: 10.0.0.4
10.0.0.5
@roberto-mardeni
roberto-mardeni / Encrypt-ConfigurationSections.ps1
Created April 1, 2016 14:47
.Net Configuration Sections Encryption
function Encrypt-ConfigurationSection {
param(
[Parameter(Mandatory=$true)]
[ValidateScript({ Test-Path $_ -PathType ‘Leaf’ })]
[String]$ConfigurationFilePath,
[Parameter(Mandatory=$true)]
[String]$SectionNames,
[Parameter(Mandatory=$true)]
[ValidateSet(“RsaProtectedConfigurationProvider”,”DataProtectionConfigurationProvider”)]
[String]$DataProtectionProvider