commit
8dfc069087
6 changed files with 53 additions and 11 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,3 +1,4 @@
|
||||||
modules/*
|
modules/*
|
||||||
.tmp/
|
.tmp/
|
||||||
modules/
|
modules/
|
||||||
|
.ruby-version
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
forge "http://forge.puppetlabs.com"
|
forge "http://forge.puppetlabs.com"
|
||||||
|
|
||||||
mod 'camptocamp/augeas', '0.0.1'
|
mod 'camptocamp/augeas', '0.0.1'
|
||||||
|
mod 'hunner/wordpress', '0.6.0'
|
||||||
mod 'puppetlabs/apache', '0.10.0'
|
mod 'puppetlabs/apache', '0.10.0'
|
||||||
|
mod 'puppetlabs/mysql', '2.2.3'
|
||||||
mod 'saz/ssh', '1.2.0'
|
mod 'saz/ssh', '1.2.0'
|
||||||
mod 'saz/sudo', '2.4.3'
|
mod 'saz/sudo', '2.4.3'
|
||||||
|
|
||||||
|
|
|
@ -2,11 +2,17 @@ FORGE
|
||||||
remote: http://forge.puppetlabs.com
|
remote: http://forge.puppetlabs.com
|
||||||
specs:
|
specs:
|
||||||
camptocamp/augeas (0.0.1)
|
camptocamp/augeas (0.0.1)
|
||||||
|
hunner/wordpress (0.6.0)
|
||||||
|
puppetlabs/concat (>= 1.0.0)
|
||||||
|
puppetlabs/mysql (>= 2.1.0)
|
||||||
|
puppetlabs/stdlib (>= 2.3.1)
|
||||||
puppetlabs/apache (0.10.0)
|
puppetlabs/apache (0.10.0)
|
||||||
puppetlabs/concat (>= 1.0.0)
|
puppetlabs/concat (>= 1.0.0)
|
||||||
puppetlabs/stdlib (>= 2.4.0)
|
puppetlabs/stdlib (>= 2.4.0)
|
||||||
puppetlabs/concat (1.1.0-rc1)
|
puppetlabs/concat (1.1.0-rc1)
|
||||||
puppetlabs/stdlib (>= 3.0.0)
|
puppetlabs/stdlib (>= 3.0.0)
|
||||||
|
puppetlabs/mysql (2.2.3)
|
||||||
|
puppetlabs/stdlib (>= 3.2.0)
|
||||||
puppetlabs/stdlib (4.1.0)
|
puppetlabs/stdlib (4.1.0)
|
||||||
saz/ssh (1.2.0)
|
saz/ssh (1.2.0)
|
||||||
puppetlabs/stdlib (>= 2.2.1)
|
puppetlabs/stdlib (>= 2.2.1)
|
||||||
|
@ -14,7 +20,9 @@ FORGE
|
||||||
|
|
||||||
DEPENDENCIES
|
DEPENDENCIES
|
||||||
camptocamp/augeas (= 0.0.1)
|
camptocamp/augeas (= 0.0.1)
|
||||||
|
hunner/wordpress (= 0.6.0)
|
||||||
puppetlabs/apache (= 0.10.0)
|
puppetlabs/apache (= 0.10.0)
|
||||||
|
puppetlabs/mysql (= 2.2.3)
|
||||||
saz/ssh (= 1.2.0)
|
saz/ssh (= 1.2.0)
|
||||||
saz/sudo (= 2.4.3)
|
saz/sudo (= 2.4.3)
|
||||||
|
|
||||||
|
|
|
@ -26,12 +26,17 @@ if [[ $(/usr/bin/id -u) -ne 0 ]]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$SETUP" = true ] ; then
|
if [ "$SETUP" = true ] ; then
|
||||||
|
# SWAPFILE
|
||||||
|
dd if=/dev/zero of=/swapfile bs=1024 count=512k
|
||||||
|
mkswap /swapfile
|
||||||
|
swapon /swapfile
|
||||||
|
|
||||||
# SET TIMESTAMP
|
# SET TIMESTAMP
|
||||||
echo "America/New_York" | tee /etc/timezone
|
echo "America/New_York" | tee /etc/timezone
|
||||||
dpkg-reconfigure --frontend noninteractive tzdata
|
dpkg-reconfigure --frontend noninteractive tzdata
|
||||||
|
|
||||||
# UPGRADE ALL CURRENT PACKAGES
|
# UPGRADE ALL CURRENT PACKAGES
|
||||||
apt-get upgrade -y && apt-get dist-upgrade -y
|
apt-get update && apt-get upgrade -y && apt-get dist-upgrade -y
|
||||||
|
|
||||||
# INSTALL GIT
|
# INSTALL GIT
|
||||||
apt-get install git -y
|
apt-get install git -y
|
||||||
|
|
|
@ -7,7 +7,7 @@ group { 'web':
|
||||||
# atomaka, with SSH key
|
# atomaka, with SSH key
|
||||||
user { 'atomaka':
|
user { 'atomaka':
|
||||||
ensure => present,
|
ensure => present,
|
||||||
groups => ['sudo', 'web', 'maverick', 'iceman'],
|
groups => ['sudo', 'web', 'maverick', 'iceman', 'wordpress'],
|
||||||
managehome => true,
|
managehome => true,
|
||||||
shell => '/bin/zsh',
|
shell => '/bin/zsh',
|
||||||
require => [
|
require => [
|
||||||
|
@ -15,6 +15,7 @@ user { 'atomaka':
|
||||||
Group['web'],
|
Group['web'],
|
||||||
User['maverick'],
|
User['maverick'],
|
||||||
User['iceman'],
|
User['iceman'],
|
||||||
|
User['wordpress'],
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
file { '/home/atomaka/.ssh':
|
file { '/home/atomaka/.ssh':
|
||||||
|
@ -41,7 +42,7 @@ user { 'jeff':
|
||||||
password => '$6$.AURF9sE09Q$..S10CFY7G.AVXzSW//w6GoV6yPzBzdvyUl8a7oyYbW/XzBU.o6AdHxTgTkCSWb64zmN3QoKovoUyLJhE/MFP/',
|
password => '$6$.AURF9sE09Q$..S10CFY7G.AVXzSW//w6GoV6yPzBzdvyUl8a7oyYbW/XzBU.o6AdHxTgTkCSWb64zmN3QoKovoUyLJhE/MFP/',
|
||||||
require => Group['web'],
|
require => Group['web'],
|
||||||
}
|
}
|
||||||
#maverick and iceman, no login
|
#maverick, iceman, and wordpress with no login
|
||||||
user { 'maverick':
|
user { 'maverick':
|
||||||
ensure => present,
|
ensure => present,
|
||||||
shell => '/sbin/nologin',
|
shell => '/sbin/nologin',
|
||||||
|
@ -50,6 +51,10 @@ user { 'iceman':
|
||||||
ensure => present,
|
ensure => present,
|
||||||
shell => '/sbin/nologin',
|
shell => '/sbin/nologin',
|
||||||
}
|
}
|
||||||
|
user { 'wordpress':
|
||||||
|
ensure => present,
|
||||||
|
shell => '/sbin/nologin',
|
||||||
|
}
|
||||||
|
|
||||||
# PACKAGES
|
# PACKAGES
|
||||||
package { 'mosh': }
|
package { 'mosh': }
|
||||||
|
@ -60,12 +65,25 @@ package { 'mailutils': }
|
||||||
include augeas
|
include augeas
|
||||||
include sudo
|
include sudo
|
||||||
|
|
||||||
class { 'ssh::server':
|
class { '::ssh::server':
|
||||||
require => Class['augeas'],
|
require => Class['augeas'],
|
||||||
}
|
}
|
||||||
|
|
||||||
class { 'apache':
|
class { '::apache':
|
||||||
default_vhost => false,
|
default_vhost => false,
|
||||||
|
mpm_module => 'prefork',
|
||||||
|
}
|
||||||
|
class { '::apache::mod::php': }
|
||||||
|
|
||||||
|
class { '::mysql::server': }
|
||||||
|
class { '::mysql::bindings':
|
||||||
|
php_enable => true,
|
||||||
|
}
|
||||||
|
|
||||||
|
class { '::wordpress':
|
||||||
|
wp_owner => 'root',
|
||||||
|
wp_group => 'wordpress',
|
||||||
|
install_dir => '/var/www/wordpress.atomaka.com',
|
||||||
}
|
}
|
||||||
|
|
||||||
# CONFIGURATIONS
|
# CONFIGURATIONS
|
||||||
|
@ -87,20 +105,24 @@ apache::vhost { 'tc362.atomaka.com':
|
||||||
docroot_owner => 'atomaka',
|
docroot_owner => 'atomaka',
|
||||||
docroot_group => 'web',
|
docroot_group => 'web',
|
||||||
}
|
}
|
||||||
|
|
||||||
apache::vhost { 'maverick.atomaka.com':
|
apache::vhost { 'maverick.atomaka.com':
|
||||||
port => '80',
|
port => '80',
|
||||||
docroot => '/var/www/maverick.atomaka.com',
|
docroot => '/var/www/maverick.atomaka.com',
|
||||||
docroot_owner => 'maverick',
|
docroot_owner => 'maverick',
|
||||||
docroot_group => 'maverick',
|
docroot_group => 'maverick',
|
||||||
}
|
}
|
||||||
|
|
||||||
apache::vhost { 'iceman.atomaka.com':
|
apache::vhost { 'iceman.atomaka.com':
|
||||||
port => '80',
|
port => '80',
|
||||||
docroot => '/var/www/iceman.atomaka.com',
|
docroot => '/var/www/iceman.atomaka.com',
|
||||||
docroot_owner => 'iceman',
|
docroot_owner => 'iceman',
|
||||||
docroot_group => 'iceman',
|
docroot_group => 'iceman',
|
||||||
}
|
}
|
||||||
|
apache::vhost { 'wordpress.atomaka.com':
|
||||||
|
port => '80',
|
||||||
|
docroot => '/var/www/wordpress.atomaka.com',
|
||||||
|
docroot_owner => 'wordpress',
|
||||||
|
docroot_group => 'wordpress',
|
||||||
|
}
|
||||||
|
|
||||||
# FILES
|
# FILES
|
||||||
file { '/var/www/tc362.atomaka.com':
|
file { '/var/www/tc362.atomaka.com':
|
||||||
|
@ -112,7 +134,6 @@ file { '/var/www/tc362.atomaka.com':
|
||||||
recurse => true,
|
recurse => true,
|
||||||
before => Apache::Vhost['tc362.atomaka.com'],
|
before => Apache::Vhost['tc362.atomaka.com'],
|
||||||
}
|
}
|
||||||
|
|
||||||
file { '/var/www/maverick.atomaka.com':
|
file { '/var/www/maverick.atomaka.com':
|
||||||
ensure => directory,
|
ensure => directory,
|
||||||
owner => 'maverick',
|
owner => 'maverick',
|
||||||
|
@ -122,7 +143,6 @@ file { '/var/www/maverick.atomaka.com':
|
||||||
recurse => true,
|
recurse => true,
|
||||||
before => Apache::Vhost['maverick.atomaka.com'],
|
before => Apache::Vhost['maverick.atomaka.com'],
|
||||||
}
|
}
|
||||||
|
|
||||||
file { '/var/www/iceman.atomaka.com':
|
file { '/var/www/iceman.atomaka.com':
|
||||||
ensure => directory,
|
ensure => directory,
|
||||||
owner => 'iceman',
|
owner => 'iceman',
|
||||||
|
@ -140,7 +160,6 @@ file { '/home/atomaka/web':
|
||||||
target => '/var/www/tc362.atomaka.com',
|
target => '/var/www/tc362.atomaka.com',
|
||||||
require => [ User['atomaka'], File['/var/www/tc362.atomaka.com'] ],
|
require => [ User['atomaka'], File['/var/www/tc362.atomaka.com'] ],
|
||||||
}
|
}
|
||||||
|
|
||||||
file { '/home/atomaka/maverick':
|
file { '/home/atomaka/maverick':
|
||||||
ensure => link,
|
ensure => link,
|
||||||
owner => 'atomaka',
|
owner => 'atomaka',
|
||||||
|
@ -148,7 +167,6 @@ file { '/home/atomaka/maverick':
|
||||||
target => '/var/www/maverick.atomaka.com',
|
target => '/var/www/maverick.atomaka.com',
|
||||||
require => [ User['atomaka'], File['/var/www/maverick.atomaka.com'] ],
|
require => [ User['atomaka'], File['/var/www/maverick.atomaka.com'] ],
|
||||||
}
|
}
|
||||||
|
|
||||||
file { '/home/atomaka/iceman':
|
file { '/home/atomaka/iceman':
|
||||||
ensure => link,
|
ensure => link,
|
||||||
owner => 'atomaka',
|
owner => 'atomaka',
|
||||||
|
@ -156,6 +174,13 @@ file { '/home/atomaka/iceman':
|
||||||
target => '/var/www/iceman.atomaka.com',
|
target => '/var/www/iceman.atomaka.com',
|
||||||
require => [ User['atomaka'], File['/var/www/iceman.atomaka.com'] ],
|
require => [ User['atomaka'], File['/var/www/iceman.atomaka.com'] ],
|
||||||
}
|
}
|
||||||
|
file { '/home/atomaka/wordpress':
|
||||||
|
ensure => link,
|
||||||
|
owner => 'atomaka',
|
||||||
|
group => 'atomaka',
|
||||||
|
target => '/var/www/wordpress.atomaka.com',
|
||||||
|
require => [ User['atomaka'], File['/var/www/wordpress.atomaka.com'] ],
|
||||||
|
}
|
||||||
|
|
||||||
file { '/home/jeff/web':
|
file { '/home/jeff/web':
|
||||||
ensure => link,
|
ensure => link,
|
||||||
|
|
1
week9/wordpress.txt
Normal file
1
week9/wordpress.txt
Normal file
|
@ -0,0 +1 @@
|
||||||
|
wordpress.atomaka.com
|
Loading…
Reference in a new issue