Skip to content

Instantly share code, notes, and snippets.

View aspiers's full-sized avatar

Adam Spiers aspiers

View GitHub Profile
rm /etc/crowbar/provisioner.json
/opt/dell/bin/json-edit \
-a 'attributes.provisioner.suse.autoyast_repos.SLES11-SP3-Updates.url' \
-v 'http://smt.suse.de/repo/$RCE/SLES11-SP3-Updates/sle-11-x86_64/' \
/etc/crowbar/provisioner.json
/opt/dell/bin/json-edit \
-a 'attributes.provisioner.suse.autoyast_repos.SLES11-SP3-Pool.url' \
-v 'http://smt.suse.de/repo/$RCE/SLES11-SP3-Pool/sle-11-x86_64/' \
commit 63f4d6cf988a15a3a9e2437fadd3c9e080fbf16d (HEAD, refs/heads/external-smt)
Author: Adam Spiers <aspiers@suse.com>
Date: Thu Aug 1 13:32:47 2013 +0100
eliminate suse_json
Modified chef/cookbooks/provisioner/recipes/update_nodes.rb
diff --git a/chef/cookbooks/provisioner/recipes/update_nodes.rb b/chef/cookbooks/provisioner/recipes/update_nodes.rb
index a86cca3..3855c29 100755
--- a/chef/cookbooks/provisioner/recipes/update_nodes.rb
@aspiers
aspiers / bug.txt
Last active December 20, 2015 12:39
chef > n = nodes.all.first; nil
=> nil
chef > json = n[:provisioner][:suse]
=> #<Chef::Node::Attribute @auto_vivifiy_on_read=false, @automatic={...}, @override={...}, @current_default={"autoyast_repos"=>{"SLES11-SP3-Updates"=>{"url"=>"http://smt.suse.de/repo/$RCE/SLES11-SP3-Updates/sle-11-x86_64/"}, "SLES11-SP3-Pool"=>{"url"=>"http://smt.suse.de/repo/$RCE/SLES11-SP3-Pool/sle-11-x86_64/"}}}, @has_been_read=false, @current_nesting_level=[:provisioner, :suse], @normal={...}, @current_normal=nil, @set_type=nil, @current_automatic={}, @default={...}, @set_unless_value_present=false, @current_override=nil>
chef > json.keys
=> ["autoyast_repos"]
chef > json.instance_variable_get '@current_nesting_level'
=> [:provisioner, :suse]
chef > json[:autoyast_repos].to_hash
=> {"SLES11-SP3-Updates"=>{"url"=>"http://smt.suse.de/repo/$RCE/SLES11-SP3-Updates/sle-11-x86_64/"}, "SLES11-SP3-Pool"=>{"url"=>"http://smt.suse.de/repo/$RCE/SLES11-SP3-Pool/sle-11-x86_64/
/opt/dell/bin/json-edit \
-a 'attributes.provisioner.suse.autoyast.repos.SLES11-SP3-Updates.url' \
-v 'http://smt.suse.de/repo/$RCE/SLES11-SP3-Updates/sle-11-x86_64/' \
/etc/crowbar/provisioner.json
/opt/dell/bin/json-edit \
-a 'attributes.provisioner.suse.autoyast.repos.SLES11-SP3-Pool.url' \
-v 'http://smt.suse.de/repo/$RCE/SLES11-SP3-Pool/sle-11-x86_64/' \
/etc/crowbar/provisioner.json
/opt/dell/bin/json-edit \
-a 'attributes.provisioner.suse.autoyast.repos.SUSE-Cloud-2\.0-Updates.url' \
app@host:~$ /usr/local/rvm/bin/rvm info
ruby-1.9.3-p194:
system:
uname: "Linux host 2.6.32-5-686-bigmem #1 SMP Fri May 10 09:11:45 UTC 2013 i686 GNU/Linux"
system: "debian/6/i386"
bash: "/bin/bash => GNU bash, version 4.1.5(1)-release (i486-pc-linux-gnu)"
zsh: "/usr/bin/zsh => zsh 4.3.10 (i686-pc-linux-gnu)"
col1_min = 50
col1_max = 200
col3_min = 200
margin = 3
fixSizes = ->
$(".row").each (i, row) =>
row_width = $(row).width()
col2_width = $(row).find(".col2").outerWidth(true)
col3_width = $(row).find(".col3").outerWidth(true)
@aspiers
aspiers / unblock.sh
Last active August 16, 2019 13:41
shell functions for unblocking stuck nodes and proposals in Crowbar
The code which used to be here is now in the crowbar CLI. FIXME: provide details
;;; This was originally installed by package-install.el.
;;; This provides support for the package system and
;;; interfacing with ELPA, the package archive.
(defvar as-elpa-packages
'(
;; MELPA
edit-server-htmlize
flx-ido ;; flx is flex with better ordering
guide-key
@aspiers
aspiers / a.rb
Created January 15, 2014 13:14
ovs-vsctl show on laptop
d799868f-951d-4d57-a590-44137817d59c
Bridge "crowbar-br0"
Port "vnet1"
Interface "vnet1"
Port "gre0"
Interface "gre0"
type: gre
options: {remote_ip="10.70.61.108"}
Port "vnet0"
Interface "vnet0"
@aspiers
aspiers / a.rb
Created January 15, 2014 13:14
ip a on laptop
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether f0:de:f1:cb:62:79 brd ff:ff:ff:ff:ff:ff
inet 10.70.61.113/24 brd 10.70.61.255 scope global eth0
valid_lft forever preferred_lft forever