Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Updating JDK and IntelliJ recipes

  • Loading branch information...
commit 3ba60fb8acba9c4e1d943127ec1b0539c97fd84d 1 parent 9151326
@halvards authored
View
3  Rakefile
@@ -18,6 +18,9 @@ configs.each do |os_type, vm_types|
vagrant_env.cli("up")
end
+ desc "Start #{vm_name} and SSH in"
+ task :start => [:up, :ssh]
+
desc "Destroy and recreate #{vm_name} from base box"
task :recreate => [:destroy, :up]
View
16 go-centos64/manifests/go-centos64.pp
@@ -6,13 +6,13 @@
include utils::base
include utils::vcs
include utils::rpm
- include java::openjdk
+ include java::oraclejdk7
- $go_version = '2.3.1'
- $go_build = "${go_version}-14065"
+ $go_version = '2.4.0'
+ $go_build = "${go_version}-14481"
$go_server_rpm_file = "go-server-$go_build.noarch.rpm"
$go_server_local_file = "/vagrant-share/apps/$go_server_rpm_file"
- $go_server_md5_checksum = '925797ef1ce0e8b366ba2fd685ce4458'
+ $go_server_md5_checksum = '8105717cf55c113c4fc9e1ffbdbf9c2d'
wget::fetch { 'go-server':
source => "http://download01.thoughtworks.com/go/$go_version/ga/go-server-$go_build.noarch.rpm",
@@ -46,13 +46,13 @@
include utils::base
include utils::vcs
include utils::rpm
- include java::openjdk
+ include java::oraclejdk7
- $go_version = '2.3.1'
- $go_build = "${go_version}-14065"
+ $go_version = '2.4.0'
+ $go_build = "${go_version}-14481"
$go_agent_rpm_file = "go-agent-$go_build.noarch.rpm"
$go_agent_local_file = "/vagrant-share/apps/$go_agent_rpm_file"
- $go_agent_md5_checksum = '9bb7c23a531211f7f1e675220e8121c4'
+ $go_agent_md5_checksum = '00f6831e916443b71c5f7df90ed3cb83'
wget::fetch { 'go-agent':
source => "http://download01.thoughtworks.com/go/$go_version/ga/go-agent-$go_build.noarch.rpm",
View
20 go-ubuntu64/manifests/go-ubuntu64.pp
@@ -1,15 +1,15 @@
include timezone::sydney
-include go::agent
-include go::server
+#include go::agent
+#include go::server
include fix::lucid
class go::server {
include utils::base
include utils::vcs
- include java::sunjdk
+ include java::openjdk6
- $go_version = '2.3.1'
- $go_build = "$go_version-14065"
+ $go_version = '2.4.0'
+ $go_build = "$go_version-14481"
wget::fetch { 'go-server':
source => "http://download01.thoughtworks.com/go/$go_version/ga/go-server-$go_build.deb",
@@ -20,7 +20,7 @@
provider => dpkg,
ensure => installed,
source => "/vagrant-share/apps/go-server-$go_build.deb",
- require => [Wget::Fetch['go-server'], Package['sun-java6-jdk'], Package['unzip']],
+ require => [Wget::Fetch['go-server'], Package['openjdk-6-jdk'], Package['unzip']],
}
service { 'go-server':
@@ -35,10 +35,10 @@
class go::agent {
include utils::base
include utils::vcs
- include java::sunjdk
+ include java::openjdk6
- $go_version = '2.3.1'
- $go_build = "$go_version-14065"
+ $go_version = '2.4.0'
+ $go_build = "$go_version-14481"
wget::fetch { 'go-agent':
source => "http://download01.thoughtworks.com/go/$go_version/ga/go-agent-$go_build.deb",
@@ -49,7 +49,7 @@
provider => dpkg,
ensure => installed,
source => "/vagrant-share/apps/go-agent-$go_build.deb",
- require => [Wget::Fetch['go-agent'], Package['sun-java6-jdk'], Package['unzip']],
+ require => [Wget::Fetch['go-agent'], Package['openjdk-6-jdk'], Package['unzip']],
}
service { 'go-agent':
View
8 javadev-ubuntu64/Vagrantfile
@@ -2,10 +2,10 @@ Vagrant::Config.run do |config|
vm_type = 'javadev'
# Every Vagrant virtual environment requires a box to build off of.
- config.vm.box = 'lucid64'
+ config.vm.box = 'oneiric64-unity'
# The url from where the 'config.vm.box' box will be fetched.
- config.vm.box_url = 'http://files.vagrantup.com/lucid64.box'
+ #config.vm.box_url = 'http://files.vagrantup.com/lucid64.box'
# Boot with a GUI so you can see the screen. (Default is headless)
config.vm.boot_mode = :gui
@@ -15,7 +15,7 @@ Vagrant::Config.run do |config|
# Forward a port from the guest to the host (id, guest port, host port)
config.vm.forward_port 'http', 8080, 8080, :auto => true
- config.vm.forward_port 'jmx', 8081, 8081, :auto => true
+ #config.vm.forward_port 'jmx', 8081, 8081, :auto => true
# Enable provisioning with Puppet stand alone. Puppet manifests
# are contained in a directory path relative to this Vagrantfile.
@@ -30,7 +30,7 @@ Vagrant::Config.run do |config|
# Set memory allocated to the VM in MB
config.vm.customize do |vm|
- vm.memory_size = 2048
+ vm.memory_size = 3072
vm.cpu_count = 4
vm.vram_size = 16
vm.accelerate_2d_video_enabled = true
View
13 javadev-ubuntu64/manifests/javadev-ubuntu64.pp
@@ -1,17 +1,16 @@
include avahi::disable
-include debrepos::exclude_recommended
include debrepos::partner
-#include editor::idea-ultimate
-#include editor::janus
+include editor::idea-ultimate
+include editor::janus
include fix::lucid
-#include gnome::desktop
-#include google::chrome
+include google::chrome
include iptables::disable
-include java::sunjdk
+include java::openjdk7
+include rvm::system_install
include timezone::sydney
include utils::base
include utils::gitconfig
include utils::netcat
-#include viewer::evince
+include viewer::evince
include xwindows::hideerrors
View
62 modules/debrepos/manifests/pparepo.pp
@@ -0,0 +1,62 @@
+# Setup a PPA repo, where the name is "user/ppaname", e.g. "blueyed/ppa" ("ppa" being the default)
+#
+# Example usage:
+# debrepos::pparepo { 'nilarimogard/webupd8':
+# apt_key => '4C9D234C',
+# }
+#
+define debrepos::pparepo($apt_key = "", $dist = $ppa_default_name, $ensure = present, $keyserver = "keyserver.ubuntu.com") {
+ $name_for_file = regsubst($name, '/', '-', 'G')
+ $file = "/etc/apt/sources.list.d/pparepo-${name_for_file}.list"
+ file { "$file": }
+
+ case $ensure {
+ present: {
+ File["$file"] {
+ content => "deb http://ppa.launchpad.net/$name/ubuntu $dist main\n"
+ }
+ File["$file"] { ensure => file }
+ if ( $apt_key ) {
+ debrepos::aptkey { "$apt_key": }
+ }
+ }
+ absent: {
+ File["$file"] { ensure => false }
+ }
+ default: {
+ fail "Invalid 'ensure' value '$ensure' for pparepo"
+ }
+ }
+}
+
+# source http://projects.puppetlabs.com/projects/1/wiki/Apt_Keys_Patterns
+define debrepos::aptkey($ensure = present, $keyserver = "keyserver.ubuntu.com") {
+ $grep_for_key = "apt-key list | grep '^pub' | sed -r 's.^pub\\s+\\w+/..' | grep '^$name'"
+ case $ensure {
+ present: {
+ exec { "Import $name to apt keystore":
+ path => "/bin:/usr/bin",
+ environment => "HOME=/root",
+ command => "gpg --keyserver $keyserver --recv-keys $name && gpg --export --armor $name | apt-key add -",
+ user => "root",
+ group => "root",
+ unless => "$grep_for_key",
+ logoutput => on_failure,
+ }
+ }
+ absent: {
+ exec { "Remove $name from apt keystore":
+ path => "/bin:/usr/bin",
+ environment => "HOME=/root",
+ command => "apt-key del $name",
+ user => "root",
+ group => "root",
+ onlyif => "$grep_for_key",
+ }
+ }
+ default: {
+ fail "Invalid 'ensure' value '$ensure' for apt::key"
+ }
+ }
+}
+
View
4 modules/editor/manifests/idea-ruby-plugin.pp
@@ -3,8 +3,8 @@
$idea_ruby_plugin_version = '3.2.4'
$idea_config_dir = $idea_edition ? {
- 'IC' => '/home/vagrant/.IdeaIC10',
- 'IU' => '/home/vagrant/.IntelliJIdea10',
+ 'IC' => '/home/vagrant/.IdeaIC11',
+ 'IU' => '/home/vagrant/.IntelliJIdea11',
}
wget::fetch { "idea-ruby-plugin":
View
16 modules/editor/manifests/idea.pp
@@ -2,12 +2,12 @@
include vagrant::user
$idea_name = "idea$idea_edition"
- $idea_version = '10.5.2'
- $idea_build = '107.587'
+ $idea_version = '11'
+ $idea_build = '111.69'
$idea_tarball_name = "${idea_name}-${idea_version}.tar.gz"
$idea_config_dir = $idea_edition ? {
- 'IC' => '/home/vagrant/.IdeaIC10',
- 'IU' => '/home/vagrant/.IntelliJIdea10',
+ 'IC' => '/home/vagrant/.IdeaIC11',
+ 'IU' => '/home/vagrant/.IntelliJIdea11',
}
wget::fetch { "$idea_name":
@@ -133,5 +133,13 @@
source => '/vagrant-share/conf/gnome-shortcut-gconf.xml',
require => File['/home/vagrant/.gconf/apps/metacity/window_keybindings'],
}
+
+ case $operatingsystem {
+ 'Ubuntu': {
+ package { 'gtk2-engines-pixbuf':
+ ensure => present,
+ }
+ }
+ }
}
View
6 modules/java/manifests/openjdk.pp
@@ -1,6 +0,0 @@
-class java::openjdk {
- package { ['java-1.6.0-openjdk', 'java-1.6.0-openjdk-devel']:
- ensure => present,
- }
-}
-
View
15 modules/java/manifests/openjdk6.pp
@@ -0,0 +1,15 @@
+class java::openjdk6 {
+ case $operatingsystem {
+ 'CentOS': {
+ package { ['java-1.6.0-openjdk', 'java-1.6.0-openjdk-devel']:
+ ensure => present,
+ }
+ }
+ 'Ubuntu': {
+ package { 'openjdk-6-jdk':
+ ensure => present,
+ }
+ }
+ }
+}
+
View
12 modules/java/manifests/openjdk7.pp
@@ -0,0 +1,12 @@
+class java::openjdk7 {
+ case $operatingsystem {
+ 'CentOS': {
+ }
+ 'Ubuntu': {
+ package { 'openjdk-7-jdk':
+ ensure => present,
+ }
+ }
+ }
+}
+
View
70 modules/java/manifests/oraclejdk7.pp
@@ -0,0 +1,70 @@
+class java::oraclejdk7 {
+ case $operatingsystem {
+ 'CentOS': {
+ $rpm_filename = 'jdk-7-linux-x64.rpm'
+ $rpm_location = "/vagrant-share/apps/${rpm_filename}"
+
+ wget::fetch { 'oraclejdk7':
+ source => 'http://download.oracle.com/otn-pub/java/jdk/7/jdk-7-linux-x64.rpm',
+ destination => $rpm_location,
+ }
+
+ package { 'oraclejdk7':
+ provider => 'rpm',
+ source => $rpm_location,
+ require => Wget::Fetch['oraclejdk7'],
+ }
+ }
+ 'Ubuntu': {
+ $tarball_filename = 'jdk-7-linux-x64.tar.gz'
+ $tarball_location = "/vagrant-share/apps/${tarball_filename}"
+
+ wget::fetch { 'oraclejdk7':
+ source => 'http://download.oracle.com/otn-pub/java/jdk/7/jdk-7-linux-x64.tar.gz',
+ destination => $tarball_location,
+ }
+
+ file { '/usr/lib/jvm':
+ ensure => directory,
+ owner => 'root',
+ group => 'root',
+ mode => 0755,
+ }
+
+ exec { 'extract-oraclejdk7':
+ command => "/bin/tar -zxf ${tarball_location} --directory=/usr/lib/jvm",
+ creates => '/usr/lib/jvm/jdk1.7.0',
+ require => [Wget::Fetch['oraclejdk7'], File['/usr/lib/jvm']],
+ }
+
+ file { '/usr/lib/jvm/java-7-oraclejdk-amd64':
+ ensure => link,
+ target => '/usr/lib/jvm/jdk1.7.0',
+ require => Exec['extract-oraclejdk7'],
+ }
+
+ package { ['ca-certificates-java', 'default-jre', 'default-jre-headless', 'java-common', 'libswing-layout-java', 'tzdata-java', 'visualvm']:
+ ensure => present,
+ }
+
+ debrepos::pparepo { 'nilarimogard/webupd8':
+ apt_key => '4C9D234C',
+ }
+
+ exec { 'update-apt-cache-webupd8':
+ command => '/usr/bin/apt-get update',
+ require => Debrepos::Pparepo['nilarimogard/webupd8'],
+ }
+
+ package { 'update-java':
+ ensure => present,
+ require => Exec['update-apt-cache-webupd8'],
+ }
+
+ package { 'gksu':
+ ensure => present,
+ }
+ }
+ }
+}
+
View
4 modules/java/manifests/sunjdk.pp → modules/java/manifests/sunjdk6.pp
@@ -1,4 +1,4 @@
-class java::sunjdk {
+class java::sunjdk6 {
case $operatingsystem {
'CentOS': {
include yumrepos::vagrantvms
@@ -16,7 +16,7 @@
'Ubuntu': {
include debrepos::partner
- package { 'sun-java6-jdk':
+ package { ['sun-java6-jdk', 'sun-java6-fonts', 'visualvm', 'java-common']:
ensure => present,
responsefile => '/vagrant-share/repos/ubuntu-sun-java-license.seeds',
require => Exec['update-apt'],
View
6 modules/line/manifests/absent.pp
@@ -0,0 +1,6 @@
+define line::absent($file, $line) {
+ exec { "/bin/grep -vFx '${line}' '${file}' | /usr/bin/tee '${file}' > /dev/null 2>&1":
+ onlyif => "/bin/grep -qFx '${line}' '${file}'",
+ }
+}
+
View
6 modules/line/manifests/present.pp
@@ -0,0 +1,6 @@
+define line::present($file, $line) {
+ exec { "/bin/echo '${line}' >> '${file}'":
+ unless => "/bin/grep -qFx '${line}' '${file}'",
+ }
+}
+
View
73 modules/rvm/manifests/dependencies.pp
@@ -1,28 +1,51 @@
class rvm::dependencies {
- if ! defined(Package['which']) { package { 'which': ensure => present } }
- if ! defined(Package['gcc']) { package { 'gcc': ensure => present } }
- if ! defined(Package['gcc-c++']) { package { 'gcc-c++': ensure => present } }
- if ! defined(Package['make']) { package { 'make': ensure => present } }
- if ! defined(Package['gettext-devel']) { package { 'gettext-devel': ensure => present } }
- if ! defined(Package['expat-devel']) { package { 'expat-devel': ensure => present } }
- if ! defined(Package['zlib-devel']) { package { 'zlib-devel': ensure => present } }
- if ! defined(Package['openssl-devel']) { package { 'openssl-devel': ensure => present } }
- if ! defined(Package['perl']) { package { 'perl': ensure => present } }
- if ! defined(Package['cpio']) { package { 'cpio': ensure => present } }
- if ! defined(Package['expat-devel']) { package { 'expat-devel': ensure => present } }
- if ! defined(Package['gettext-devel']) { package { 'gettext-devel': ensure => present } }
- if ! defined(Package['wget']) { package { 'wget': ensure => present } }
- if ! defined(Package['bzip2']) { package { 'bzip2': ensure => present } }
- if ! defined(Package['sendmail']) { package { 'sendmail': ensure => present } }
- if ! defined(Package['mailx']) { package { 'mailx': ensure => present } }
- if ! defined(Package['libxml2']) { package { 'libxml2': ensure => present } }
- if ! defined(Package['libxml2-devel']) { package { 'libxml2-devel': ensure => present } }
- if ! defined(Package['libxslt']) { package { 'libxslt': ensure => present } }
- if ! defined(Package['libxslt-devel']) { package { 'libxslt-devel': ensure => present } }
- if ! defined(Package['readline-devel']) { package { 'readline-devel': ensure => present } }
- if ! defined(Package['patch']) { package { 'patch': ensure => present } }
- if ! defined(Package['git']) { package { 'git': ensure => present } }
- if ! defined(Package['curl']) { package { 'curl': ensure => present } }
- #if ! defined(Package['curl-devel']) { package { 'curl-devel': ensure => present } }
+ case $operatingsystem {
+ 'CentOS': {
+ if ! defined(Package['which']) { package { 'which': ensure => present } }
+ if ! defined(Package['gcc']) { package { 'gcc': ensure => present } }
+ if ! defined(Package['gcc-c++']) { package { 'gcc-c++': ensure => present } }
+ if ! defined(Package['make']) { package { 'make': ensure => present } }
+ if ! defined(Package['gettext-devel']) { package { 'gettext-devel': ensure => present } }
+ if ! defined(Package['expat-devel']) { package { 'expat-devel': ensure => present } }
+ if ! defined(Package['zlib-devel']) { package { 'zlib-devel': ensure => present } }
+ if ! defined(Package['openssl-devel']) { package { 'openssl-devel': ensure => present } }
+ if ! defined(Package['perl']) { package { 'perl': ensure => present } }
+ if ! defined(Package['cpio']) { package { 'cpio': ensure => present } }
+ if ! defined(Package['expat-devel']) { package { 'expat-devel': ensure => present } }
+ if ! defined(Package['gettext-devel']) { package { 'gettext-devel': ensure => present } }
+ if ! defined(Package['wget']) { package { 'wget': ensure => present } }
+ if ! defined(Package['bzip2']) { package { 'bzip2': ensure => present } }
+ if ! defined(Package['sendmail']) { package { 'sendmail': ensure => present } }
+ if ! defined(Package['mailx']) { package { 'mailx': ensure => present } }
+ if ! defined(Package['libxml2']) { package { 'libxml2': ensure => present } }
+ if ! defined(Package['libxml2-devel']) { package { 'libxml2-devel': ensure => present } }
+ if ! defined(Package['libxslt']) { package { 'libxslt': ensure => present } }
+ if ! defined(Package['libxslt-devel']) { package { 'libxslt-devel': ensure => present } }
+ if ! defined(Package['readline-devel']) { package { 'readline-devel': ensure => present } }
+ if ! defined(Package['patch']) { package { 'patch': ensure => present } }
+ if ! defined(Package['git']) { package { 'git': ensure => present } }
+ if ! defined(Package['curl']) { package { 'curl': ensure => present } }
+ }
+ 'Ubuntu': {
+ if ! defined(Package['build-essential']) { package { 'build-essential': ensure => present } }
+ if ! defined(Package['bison']) { package { 'bison': ensure => present } }
+ if ! defined(Package['openssl']) { package { 'openssl': ensure => present } }
+ if ! defined(Package['libreadline6']) { package { 'libreadline6': ensure => present } }
+ if ! defined(Package['libreadline6-dev']) { package { 'libreadline6-dev': ensure => present } }
+ if ! defined(Package['curl']) { package { 'curl': ensure => present } }
+ if ! defined(Package['git']) { package { 'git': ensure => present, name => 'git-core' } }
+ if ! defined(Package['zlib1g']) { package { 'zlib1g': ensure => present } }
+ if ! defined(Package['zlib1g-dev']) { package { 'zlib1g-dev': ensure => present } }
+ if ! defined(Package['libssl-dev']) { package { 'libssl-dev': ensure => present } }
+ if ! defined(Package['libyaml-dev']) { package { 'libyaml-dev': ensure => present } }
+ if ! defined(Package['libsqlite3-0']) { package { 'libsqlite3-0': ensure => present } }
+ if ! defined(Package['libsqlite3-dev']) { package { 'libsqlite3-dev': ensure => present } }
+ if ! defined(Package['sqlite3']) { package { 'sqlite3': ensure => present } }
+ if ! defined(Package['libxml2-dev']) { package { 'libxml2-dev': ensure => present } }
+ if ! defined(Package['libxslt-dev']) { package { 'libxslt-dev': ensure => present, name => 'libxslt1-dev' } }
+ if ! defined(Package['autoconf']) { package { 'autoconf': ensure => present } }
+ if ! defined(Package['libc6-dev']) { package { 'libc6-dev': ensure => present } }
+ }
+ }
}
View
20 modules/utils/manifests/git.pp
@@ -1,14 +1,16 @@
class utils::git {
- case $operatingsystem {
- 'CentOS': {
- package { 'git':
- ensure => present,
+ if ! defined(Package['git']) {
+ case $operatingsystem {
+ 'CentOS': {
+ package { 'git':
+ ensure => present,
+ }
}
- }
- 'Ubuntu': {
- package { 'git':
- ensure => present,
- name => 'git-core',
+ 'Ubuntu': {
+ package { 'git':
+ ensure => present,
+ name => 'git-core',
+ }
}
}
}
View
1  plain-centos64/manifests/plain-centos64.pp
@@ -3,4 +3,5 @@
include utils::rpm
include utils::vcs
include yumrepos::epel
+include yumrepos::vagrantvms
Please sign in to comment.
Something went wrong with that request. Please try again.