source: other-projects/hathitrust/vagrant-solr-cluster/trunk/manifests/base-zookeeper-solr.pp@ 30969

Last change on this file since 30969 was 30969, checked in by davidb, 8 years ago

Fine tuning resulting from testing the cloud/cluster

File size: 3.7 KB
Line 
1$install_dir = "/opt"
2$zookeeper_home = "${install_dir}/zookeeper"
3$solr_home = "${install_dir}/solr"
4
5$user = "htrc"
6$group = "solr"
7
8$zookeeper_master = '10.11.0.51'
9$solr_1 = '10.11.0.53'
10$solr_2 = '10.11.0.54'
11$solr_3 = '10.11.0.55'
12
13include zookeeper
14include solr
15
16file {
17 "/home/${user}":
18 ensure => "directory",
19 owner => "${user}",
20 group => "${group}",
21 mode => 700,
22 require => [ User["${user}"], Group["${group}"] ],
23
24}
25
26group { "${group}":
27 ensure => "present",
28}
29
30user {
31 "${user}":
32 ensure => "present",
33 home => "/home/${user}",
34 name => "${user}",
35 shell => "/bin/bash",
36 managehome => true,
37 gid => $group
38}
39
40#sudo add-apt-repository ppa:webupd8team/java
41#sudo apt-get update
42#sudo apt-get install oracle-java8-installer
43
44#echo debconf shared/accepted-oracle-license-v1-1 select true | \
45# sudo debconf-set-selections
46#echo debconf shared/accepted-oracle-license-v1-1 seen true | \
47# sudo debconf-set-selections
48
49 exec { 'add-apt-repository':
50 command => '/usr/bin/add-apt-repository ppa:webupd8team/java -y && \
51 echo debconf shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections && \
52 echo debconf shared/accepted-oracle-license-v1-1 seen true | /usr/bin/debconf-set-selections'
53 }
54
55
56 exec { 'apt-get update':
57 command => '/usr/bin/apt-get update',
58 require => [ Exec['add-apt-repository'], File["/home/${user}"] ]
59 }
60
61 package { "oracle-java8-installer" :
62 ensure => present,
63 require => [ Exec['apt-get update'], File["/home/${user}"] ]
64 }
65
66#package { "subversion" :
67# ensure => present,
68# require => [ Exec['apt-get update'], File["/home/${user}"] ]
69#}
70
71#package { "maven" :
72# ensure => present,
73# require => [ Exec['apt-get update'], File["/home/${user}"] ]
74#}
75
76file {
77 "/home/${user}/.ssh":
78 ensure => "directory",
79 owner => "${user}",
80 group => "${group}",
81 mode => 750,
82 require => [ Exec['apt-get update'], File["/home/${user}"] ]
83}
84
85file {
86 "/home/${user}/.ssh/id_rsa":
87 source => "puppet:///modules/zookeeper/id_rsa",
88 ensure => present,
89 mode => 600,
90 owner => $user,
91 group => $group,
92 require => File["/home/${user}/.ssh"]
93 }
94
95file {
96 "/home/${user}/.ssh/id_rsa.pub":
97 source => "puppet:///modules/zookeeper/id_rsa.pub",
98 ensure => present,
99 mode => 644,
100 owner => $user,
101 group => $group,
102 require => File["/home/${user}/.ssh"]
103 }
104
105ssh_authorized_key { "ssh_key":
106 ensure => "present",
107 key => "AAAAB3NzaC1yc2EAAAADAQABAAABAQCeHdBPVGuSPVOO+n94j/Y5f8VKGIAzjaDe30hu9BPetA+CGFpszw4nDkhyRtW5J9zhGKuzmcCqITTuM6BGpHax9ZKP7lRRjG8Lh380sCGA/691EjSVmR8krLvGZIQxeyHKpDBLEmcpJBB5yoSyuFpK+4RhmJLf7ImZA7mtxhgdPGhe6crUYRbLukNgv61utB/hbre9tgNX2giEurBsj9CI5yhPPNgq6iP8ZBOyCXgUNf37bAe7AjQUMV5G6JMZ1clEeNPN+Uy5Yrfojrx3wHfG40NuxuMrFIQo5qCYa3q9/SVOxsJILWt+hZ2bbxdGcQOd9AXYFNNowPayY0BdAkSr",
108 type => "ssh-rsa",
109 user => "${user}",
110 require => File["/home/${user}/.ssh/id_rsa.pub"]
111}
112
113file{
114 "/home/${user}/.ssh/config":
115 owner => "${user}",
116 group => "${group}",
117 mode => 755,
118 content => "StrictHostKeyChecking no",
119 require => File["/home/${user}/.ssh/id_rsa.pub"]
120}
121
122 file {
123 "/home/${user}/.bashrc":
124 source => "puppet:///modules/zookeeper/bashrc",
125 ensure => present,
126 mode => 644,
127 owner => $user,
128 group => $group,
129 require => File["/home/${user}"]
130 }
131
132 file {
133 "/home/${user}/.bash_profile":
134 source => "puppet:///modules/zookeeper/bash_profile",
135 ensure => present,
136 mode => 644,
137 owner => $user,
138 group => $group,
139 require => File["/home/${user}"]
140 }
141
142
143host { 'solr1':
144 ip => "${solr_1}",
145}
146
147host { 'solr2':
148 ip => "${solr_2}",
149}
150
151host { 'solr3':
152 ip => "${solr_3}",
153}
154
155host { 'zookeeper':
156 ip => "${zookeeper_master}",
157}
158
Note: See TracBrowser for help on using the repository browser.