This file contains hidden or 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
| export VPS=YOUR.IP.ADDRESS.HERE | |
| function initialize { | |
| rm .ssh/known_hosts | |
| server=${1:=${VPS}} | |
| role=$2 | |
| : ${role:=rails} | |
| ssh-copy-id -i ~/.ssh/id_rsa root@$server | |
| ssh root@$1 "wget http://github.com/sid137/chef-repo/raw/master/install.sh -O install.sh && /bin/bash -x install.sh ${role}" |
This file contains hidden or 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 -x | |
| #run installer with | |
| # wget tiny.cc/chefconfig; bash -x install.sh role | |
| # role is a json file that describes a roles or runlist to execute. | |
| # download files to /tmp directory | |
| export REPO=/tmp/chef-repo | |
| # either run role supplied as argument, or test.json as default |
This file contains hidden or 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
| #preseed.cfg | |
| #-------------------------- | |
| # Local sets language and country. | |
| # Should be set in boot parameter, but just in case... | |
| d-i debian-installer/locale string en_US | |
| # Keyboard selection. | |
| # Disable automatic (interactive) keymap detection. |
This file contains hidden or 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
| ~/tmp/chef/chef-repo/server-setup $ cap chef:configure_clients | |
| * executing `chef:configure_clients' | |
| servers: ["dhcp-223.lkb.upmc.fr"] | |
| ** scp upload solo.rb -> /tmp/solo.rb | |
| [dhcp-223.lkb.upmc.fr] solo.rb | |
| * scp upload complete | |
| servers: ["dhcp-223.lkb.upmc.fr"] | |
| ** scp upload #<StringIO:0xb76f8094> -> /tmp/chef.json | |
| [dhcp-223.lkb.upmc.fr] /tmp/chef.json | |
| * scp upload complete |
NewerOlder