-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.pp
140 lines (118 loc) · 2.43 KB
/
setup.pp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
# Notes:
# Assumes page_load_time/ is in your home directory
# Also require Phantomjs > 1.9 : http://phantomjs.org/
$local_user = "vagrant"
$local_home = "/home/$local_user"
$paths = [ "/usr/local/bin/", "/bin/", "/sbin/" , "/usr/bin/", "/usr/sbin/" ]
user {$local_user:
ensure => present,
shell => "/bin/bash",
}
define local_package () {
package { "$name":
ensure => latest,
}
}
define local_absent () {
package { "$name":
ensure => absent,
}
}
local_package {
# PhantomJS Requirements
'phantomjs':;
# Uncomment if building phantomjs from source
#'build-essential':;
#'g++':;
#'flex':;
#'bison':;
#'gperf':;
#'ruby':;
#'perl':;
#'libsqlite3-dev':;
#'libfontconfig1-dev':;
#'libicu-dev':;
#'libfreetype6':;
#'libssl-dev':;
#'libpng-dev':;
#'libjpeg-dev':;
#'python':;
#'libx11-dev':;
#'libxext-dev':;
# Text Editors
'vim':;
# Languages
'python2.7':;
'ruby1.9.1':;
'ruby1.9.1-dev':;
# Providers
'python-pip':;
# Networking
'curl':;
'ftp':;
'openssh-client':;
'openssh-server':;
'ssh':;
'wget':;
'whois':;
# Version Control
'git':;
'rdiff-backup':;
'rsync':;
# Searching
'grep':;
'ack-grep':;
# Processes
'htop':;
# Misc tools
'bash':;
'cron':;
'screen':;
'tar':;
'tmux':;
'xclip':;
}
# Remove apt-get packages
#local_absent {
#}
## Python Pip
define python_pip () {
package { "$name":
ensure => ['installed', 'latest'],
provider => 'pip',
}
}
# Remove python-pip packages
define remove_python_pip () {
package { "$name":
ensure => absent,
provider => 'pip',
}
}
python_pip {
'ipdb':;
}
# DotFiles
file { [ "$local_home/scripts" ]:
ensure => "directory",
owner => $local_user,
}
# Download web-page-replay
exec { "download_wpr":
require => Package['git'],
command => "git clone https://github.com/colin-scott/web-page-replay.git $local_home/page_load_time/wpr",
creates => "$local_home/page_load_time/wpr",
path => $paths,
user => $local_user,
}
# Uncomment to build PhantomJS from source
# After downloading, cd into ~/phantomjs and run `./build.py`
# Ensure that phantomjs is > 1.9
# exec { "download_phantomjs":
# require => Package['git'],
# command => "git clone --recurse-submodules git://github.com/ariya/phantomjs.git $local_home/phantomjs",
# cwd => "$local_home/",
# creates => "$local_home/phantomjs",
# path => $paths,
# user => $local_user,
# }