Skip to content

Instantly share code, notes, and snippets.

View binamov's full-sized avatar

Bakh Inamov binamov

  • Google Cloud
  • SF Bay Area
View GitHub Profile
@binamov
binamov / az-chef.md
Last active March 23, 2018 00:11
setting up azure service principal for chef

Create Azure RM Service Principal

This makes kitchen-azurerm and knife-azure ARM mode work

  1. Install Azure CLI

  2. Run az login and take note of its output:

[

@binamov
binamov / vbox_ipaddress.rb
Created April 25, 2014 17:40
An Ohai 7 plugin that assigns the IP address of eth1 to node.ipaddress attribute (for virtualbox vagrant boxes). It's an Ohai 7 rewrite of this: http://johntdyer.com/blog/2013/01/25/ohai/
Ohai.plugin(:Vboxipaddress) do
provides "ipaddress"
depends "ipaddress", "network/interfaces", "virtualization/system", "etc/passwd"
collect_data(:default) do
if virtualization["system"] == "vbox"
if etc["passwd"].any? { |k,v| k == "vagrant"}
if network["interfaces"]["eth1"]
network["interfaces"]["eth1"]["addresses"].each do |ip, params|
if params['family'] == ('inet')
ipaddress ip
@binamov
binamov / user_data.ps1
Last active December 22, 2015 16:28 — forked from scarolan/user_data.ps1
pass this as User Data to ec2 stock Windows AMIs to be able to knife bootstrap (--user-data file://user_data.ps1 w the new cli)
<powershell>
#####
#DON'T FORGET TO SET/CHANGE THE USERNAME/PASSWORD BELOW!
#####
$user="chef"
$password="chef"
# Disable password complexity requirements
@binamov
binamov / gist:5635326
Created May 23, 2013 11:10
squ.edu.om hosts centos repos, right on
$ sudo yum update
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
* base: mirror.squ.edu.om
* extras: mirror.squ.edu.om
* updates: mirror.squ.edu.om