7 changed files with 132 additions and 0 deletions
@ -0,0 +1,35 @@ |
|||
hostname = 'eniac-homenet' |
|||
DQDN = 'homenet.petrovs.info' |
|||
|
|||
file '/etc/hostname' do |
|||
content "#{hostname}\n" |
|||
end |
|||
|
|||
file '/etc/hosts' do |
|||
content " |
|||
127.0.0.1 localhost\n |
|||
127.0.1.1 #{DQDN} #{hostname}\n |
|||
" |
|||
end |
|||
|
|||
##Install some base packages: |
|||
|
|||
#Version Controls |
|||
package 'git' |
|||
package 'subversion' |
|||
|
|||
#Development Tools |
|||
package 'build-essential' |
|||
|
|||
#NTP: |
|||
package 'ntp' |
|||
|
|||
#Utilities and some fun |
|||
package 'nano' |
|||
package 'iptraf' |
|||
package 'nmap' |
|||
package 'traceroute' |
|||
package 'tcpdump' |
|||
package 'cowsay' |
|||
package 'sl' |
|||
|
@ -0,0 +1,37 @@ |
|||
#Install Acces Control Lists |
|||
package 'acl' |
|||
|
|||
#Create mount points |
|||
directory '/mnt/stardisk' |
|||
directory '/mnt/disk500' |
|||
directory '/mnt/mp3disk' |
|||
directory '/mnt/contrast' |
|||
directory '/mnt/usbdisk' |
|||
|
|||
mount '/mnt/stardisk' do |
|||
device 'a9cf36f9-7c47-4651-b825-870aa2285970' |
|||
device_type :uuid |
|||
fstype 'ext4' |
|||
options 'acl,defaults' |
|||
end |
|||
|
|||
mount '/mnt/disk500' do |
|||
device 'bfc79fbf-486f-481a-9c62-3fe999a9c1a1' |
|||
device_type :uuid |
|||
fstype 'ext4' |
|||
options 'defaults' |
|||
end |
|||
|
|||
##Given to Stilyana |
|||
#mount '/mnt/mp3disk' do |
|||
# device '67467d42-8ad1-4a22-9668-27fe0da0401b' |
|||
# device_type :uuid |
|||
# fstype 'ext4' |
|||
# options 'defaults' |
|||
#end |
|||
|
|||
mount '/mnt/usbdisk' do |
|||
device '5def2dbf-8f25-4e50-bbc6-365c68dbeaa1' |
|||
device_type :uuid |
|||
fstype 'ext4' |
|||
options 'defaults' |
@ -0,0 +1,16 @@ |
|||
#Install NgInx |
|||
package 'nginx' |
|||
|
|||
#Install PHP |
|||
pacakge 'php5' |
|||
package 'php5-cli' |
|||
package 'php5-fpm' |
|||
package 'php5-sqlite' |
|||
package 'php5-curl' |
|||
package 'php5-gd' |
|||
package 'php5-mysql' |
|||
package 'php5-intl' |
|||
package 'smbclient' #for OwnCloud |
|||
package 'curl' |
|||
package 'libcurl3' |
|||
|
@ -0,0 +1,15 @@ |
|||
#!/bin/bash |
|||
|
|||
# Usage: ./deploy.sh [host] |
|||
|
|||
host="${1:-blago@10.28.6.91}" |
|||
|
|||
ssh-keygen -R "${host#*@}" 2> /dev/null |
|||
|
|||
|
|||
tar cj . | ssh -o 'StrictHostKeyChecking no' "$host" ' |
|||
sudo rm -rf ~/chef && |
|||
mkdir ~/chef && |
|||
cd ~/chef && |
|||
tar xj && |
|||
sudo bash install.sh' |
@ -0,0 +1,8 @@ |
|||
{ |
|||
"run_list": [ |
|||
"recipe[base]", |
|||
"recipe[mount-disks]", |
|||
"recipe[webserver]", |
|||
"recipe[transmission-daemon]" |
|||
] |
|||
} |
@ -0,0 +1,18 @@ |
|||
#!/bin/bash |
|||
|
|||
chef_binary=`which chef-solo` |
|||
|
|||
#Install chef if necessary |
|||
|
|||
if ! test -f "$chef_binary"; then |
|||
export DEBIAN_FRONTEND=noninteractive |
|||
sudo apt-get update && |
|||
sudo apt-get -o Dpkg::Options::="--force-confnew" \ |
|||
--force-yes -fuy upgrade && |
|||
|
|||
sudo apt-get install -y ruby ruby1.8-dev build-essential wget libruby1.8 rubygems |
|||
sudo gem update --no-rdoc --no-ri |
|||
sudo gem install ohai chef --no-rdoc --no-ri |
|||
fi |
|||
|
|||
"$chef_binary" -c solo.rb -j homenet.json |
@ -0,0 +1,3 @@ |
|||
file_cache_path "/home/blago/chef" |
|||
cookbook_path "/home/blago/chef/cookbooks" |
|||
json_attribs "/home/blago/chef/homenet.json |
Loading…
Reference in new issue