Commit ba5a4f36 authored by ijaz ahmad's avatar ijaz ahmad Committed by GitHub
Browse files

Update docker-host-puppet-config.pp

parent 07140ed0
...@@ -2,53 +2,98 @@ class hg_vocmssdt::sdt::cmsdocker { ...@@ -2,53 +2,98 @@ class hg_vocmssdt::sdt::cmsdocker {
include "afs" include "afs"
yumrepo { Exec { path => [ '/bin/', '/sbin/' , '/usr/bin/', '/usr/sbin/' ] }
"dockerrepo":
baseurl => 'https://yum.dockerproject.org/repo/main/centos/7/',
gpgcheck => 1, cmssw::build_environment{"build-environment": }
gpgkey => 'https://yum.dockerproject.org/gpg',
enabled => 1, cmssw::runtime_environment {"runtime-environment": }
#globally set exec paths
firewall { "0 enable all connections":
proto => "tcp",
action => "accept",
}
firewall { "600 allow AFS cache callback":
proto => "udp",
action => "accept",
dport => [7001],
}
yumrepo { "dockerrepo":
baseurl => 'https://yum.dockerproject.org/repo/main/centos/7/',
gpgcheck => 1,
gpgkey => 'https://yum.dockerproject.org/gpg',
enabled => 1,
}-> }->
package { package { "docker":
"docker": ensure => latest,
ensure => latest,
}-> }->
file { file { "/build/docker":
"/build/docker": ensure => directory,
ensure => directory,
}-> }->
file { file { "/var/lib/docker":
"/var/lib/docker": ensure => link,
ensure => link, target => "/build/docker",
target => "/build/docker", require => File["/build/docker"],
require => File["/build/docker"], mode => 772,
mode => 772, force => true,
force => true,
}-> }->
file { file { "/usr/lib/systemd/system/docker.service":
"/usr/lib/systemd/system/docker.service": ensure => present,
ensure => present, source => "puppet:///modules/hg_vocmssdt/usr/lib/systemd/system/docker.service",
source => "puppet:///modules/hg_vocmssdt/usr/lib/systemd/system/docker.service", require => Package['docker'],
require => Package['docker'],
}-> }->
exec { exec { "realod-systemd":
"realod-systemd": command => "systemctl daemon-reload",
command => "systemctl daemon-reload", subscribe => File["/usr/lib/systemd/system/docker.service"],
path => "/usr/bin", refreshonly => true,
subscribe => File["/usr/lib/systemd/system/docker.service"],
refreshonly => true,
}-> }->
service { service { "docker":
"docker":
ensure => running, ensure => running,
enable => true, enable => true,
subscribe => File["/usr/lib/systemd/system/docker.service"], subscribe => File["/usr/lib/systemd/system/docker.service"],
} }
group { 'docker':
ensure => present,
notify => Service['docker'],
}
exec { "adds cmsbld into docker group":
command => "usermod -aG docker cmsbld",
onlyif => "grep -q 'docker[[:space:]]*cmsbld' /etc/group",
require => User['cmsbld'],
}
file { "/var/opt/increase.sh":
source => "puppet:///modules/hg_vocmssdt/lvm_increase/increase.sh",
mode => 755,
owner => "root",
group => "root",
}
exec { "increase_lv_size":
command => "/var/opt/increase.sh",
unless => "/usr/bin/test -e /etc/volume_expanded",
require => File["/var/opt/increase.sh"],
}
file { '/home/cmsbld/.docker':
ensure => directory,
owner => cmsbld,
group => cmsbld,
mode => 640,
}
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment