- http://dougireton.com/blog/2013/02/16/chef-cookbook-anti-patterns/
- http://www.devopsnotes.com/2012/02/how-to-write-good-chef-cookbook.html
- http://devopsanywhere.blogspot.com/2012/11/how-to-write-reusable-chef-cookbooks.html
- https://support.cloud.engineyard.com/entries/21406977-Custom-Chef-Recipes-Examples-Best-Practices
- https://learnchef.opscode.com/quickstart/chef-repo/
This file contains 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
#!/bin/zsh | |
# | |
## build kernel modules, if fail | |
cd /var/lib/dkms/vboxhost/`vboxmanage --version | sed 's/^\(......\).*/\1/'|tail -n 1`/build; sudo make KERNELRELEASE=`uname -r` -C /lib/modules/`uname -r`/build M=/var/lib/dkms/vboxhost/`vboxmanage --version | sed 's/^\(......\).*/\1/'|tail -n1`/build; for i in `find vbox* -name "*.ko"`;do sudo mkdir -p /lib/modules/`uname -r`/misc; sudo cp -v $i /lib/modules/`uname -r`/misc;sudo insmod /lib/modules/`uname -r`/misc/`basename $i`;done | |
K=`uname -r` | |
sudo rmmod vboxnetadp vboxnetflt vboxpci vboxdrv vmmon vmnet | |
for i in `ls /lib/modules/$K/misc/|xargs`; do | |
sudo insmod /lib/modules/$K/misc/$i; | |
done |
This file contains 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
#!/bin/bash | |
test -n SSH_AGENT || { | |
eval $(ssh-agent -s) | |
ssh-add | |
} | |
#create session | |
byobu-tmux new-session -dn $(hostname -f) "sudo -i" | |
# populate from salt-key |
This file contains 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
# Log in to MySQL command line as root | |
drop database keystone; | |
create database keystone; | |
GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'localhost' IDENTIFIED BY 'KEYSTONE_DBPASS'; | |
GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'%' IDENTIFIED BY 'KEYSTONE_DBPASS'; | |
exit | |
# now from the shell | |
sudo su -c "keystone-manage db_sync" keystone |
This file contains 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
With Release 3.0, contrail-heat resources/templates are being auto-generated from the Schema. | |
The generated resources/templates are part of the python-contrail package and located in | |
/usr/lib/python2.7/dist-packages/vnc_api/gen/heat/ directory. This directory has three sub-directories | |
1. resources/ | |
This sub-directory contains all the resources for the contrail-heat plugin. It runs in the context | |
of the heat-engine service. | |
2. templates/ | |
This sub-directory contains template for each resource. They are sample templates with every possible |
This file contains 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
#!/bin/bash | |
# cleanup tempest | |
neutron port-list --all-tenants | grep tempest | awk '{print $2}' | xargs -i neutron port-delete {} | |
neutron subnet-list --all-tenants | grep tempest | awk '{print $2}' | xargs -i neutron subnet-delete {} | |
neutron subnet-list --all-tenants | grep "100.FIXME" | awk '{print $2}' | xargs -i neutron subnet-delete {} | |
neutron net-list --all-tenants | grep tempest | awk '{print $2}' | xargs -i neutron net-delete {} | |
neutron net-list --all-tenants | grep snat-si-left_snat_ | awk '{print $2}' | xargs -i neutron net-delete {} | |
neutron security-group-list --all-tenants | grep tempest | awk '{print $2}' | xargs -i neutron security-group-delete {} | |
neutron router-list --all-tenants | grep tempest | awk '{print $2}' | xargs -i neutron router-delete {} |
This file contains 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
1. timeout when publishing to ifmap-server (mapclient.call()) | |
when timeout happens keep retrying | |
2. ifmap-server code needs to inspect healthcheck object publish and if it misses n of them, exit() OR | |
config-nodemgr keeps reading healthcheck object from ifmap-server and if it can't read in n secs or value is stale, kill ifmap-server | |
3. control-node keeps reading healthcheck object from ifmap and it sees stale, move to a new ifmap-server | |
4. ifmap-publish-greenlet enqueue finds q-full, no change from current |
This file contains 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
gpg --import private_key.asc | |
gpg --list-secret-keys --keyid-format LONG | |
gpg --delete-secret-key <key> | |
gpg --edit-key <key> | |
passwd | |
git config --global user.signingkey <key> |
OlderNewer