Skip to content

Instantly share code, notes, and snippets.

View aspiers's full-sized avatar

Adam Spiers aspiers

View GitHub Profile
/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' \
@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/
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
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/' \
diff --git a/scripts/create-vm.sh b/scripts/create-vm.sh
index fa3dc1b..5d71a5a 100755
--- a/scripts/create-vm.sh
+++ b/scripts/create-vm.sh
@@ -69,7 +69,10 @@ main () {
else
echo "Creating $vm_disk as qcow2 image ..."
qemu-img create -f qcow2 "$vm_disk" 4G
- opts=( --pxe )
+ opts=(
#!/bin/bash
ibs=aspiers@10.11.0.159:/mounts/dist/ibs
# should use http://download.suse.de/update/ not euklid?
# mairix:m:20120803222629.93475e8vgyyav9it@imap.suse.de
updates=aspiers@euklid.suse.de:/mirror/SuSE/zypp-patches.suse.de/x86_64/update
sles_updates=$updates/SLE-SERVER
cloud_updates=$updates/SUSE-CLOUD
dest=/data/install/mirrors
[github]
- aspiers/barclamp-provisioner
+ created branch 'release/pebbles/master'
- crowbar/crowbar
+ opened pull request #1798 (show admin IP and network range during sanity check at setup time)
+ created comment on issue #1801 (more install-chef-suse.sh changes for pebbles)
@aspiers
aspiers / gca.sh
Last active December 17, 2015 09:49
#!/bin/bash
read -p 'Enter event> ' event
google calendar add --user myaccount@gmail.com "${event// @ / at }" 2>&1 | \
awk '{ print "* " $0 }
/^Event created: / {
system("url_handler.sh " substr($0, 16))
}'
%% if create_events
%% for repo, events in create_events|groupby("repo.name")
%% for type, elist in events|groupby("payload.ref_type")
%% trans count=elist|length
- created {{ count }} {{ type }} in {{ repo }}: {{ elist|first }}
%% pluralize
- created {{ count }} {{ type }}es in {{ repo }}: {{ elist|first }}
%% endtrans
%% endfor
%% endfor
@aspiers
aspiers / gist:5091419
Created March 5, 2013 16:10
rubygems-bundler not working
$ gem list
*** LOCAL GEMS ***
bundler (1.2.4)
rake (10.0.3)
rubygems-bundler (1.1.1, 1.1.0)
rvm (1.11.3.6)
$ bundle exec gem list | wc -l
98