diff options
Diffstat (limited to 'fuel/build/f_odl_docker')
-rw-r--r-- | fuel/build/f_odl_docker/puppet/modules/opnfv/manifests/odl_docker.pp | 93 |
1 files changed, 53 insertions, 40 deletions
diff --git a/fuel/build/f_odl_docker/puppet/modules/opnfv/manifests/odl_docker.pp b/fuel/build/f_odl_docker/puppet/modules/opnfv/manifests/odl_docker.pp index 922ab41..b44ef26 100644 --- a/fuel/build/f_odl_docker/puppet/modules/opnfv/manifests/odl_docker.pp +++ b/fuel/build/f_odl_docker/puppet/modules/opnfv/manifests/odl_docker.pp @@ -1,44 +1,45 @@ class opnfv::odl_docker { - case $::fuel_settings['role'] { - /controller/: { - - file { "/opt": - ensure => "directory", - } - - file { "/opt/opnfv": - ensure => "directory", - owner => "root", - group => "root", - mode => 777, - } - - file { "/opt/opnfv/odl": - ensure => "directory", - } - - file { "/opt/opnfv/odl/odl_docker_image.tar": - ensure => present, - source => "/etc/puppet/modules/opnfv/odl_docker/odl_docker_image.tar", - mode => 750, - } - - file { "/opt/opnfv/odl/docker-latest": - ensure => present, - source => "/etc/puppet/modules/opnfv/odl_docker/docker-latest", - mode => 750, - } - - file { "/opt/opnfv/odl/start_odl_conatiner.sh": - ensure => present, - source => "/etc/puppet/modules/opnfv/scripts/start_odl_container.sh", - mode => 750, - } - - # fix failed to find the cgroup root issue - # https://github.com/docker/docker/issues/8791 - if $::operatingsystem == 'Ubuntu' { + case $::fuel_settings['role'] { + /controller/: { + + file { '/opt': + ensure => 'directory', + } + + file { '/opt/opnfv': + ensure => 'directory', + owner => 'root', + group => 'root', + mode => 777, + } + + file { '/opt/opnfv/odl': + ensure => 'directory', + } + + file { '/opt/opnfv/odl/odl_docker_image.tar': + ensure => present, + source => '/etc/puppet/modules/opnfv/odl_docker/odl_docker_image.tar', + mode => 750, + } + + file { '/opt/opnfv/odl/docker-latest': + ensure => present, + source => '/etc/puppet/modules/opnfv/odl_docker/docker-latest', + mode => 750, + } + + file { '/opt/opnfv/odl/start_odl_conatiner.sh': + ensure => present, + source => '/etc/puppet/modules/opnfv/scripts/start_odl_container.sh', + mode => 750, + } + + # fix failed to find the cgroup root issue + # https://github.com/docker/docker/issues/8791 + case $::operatingsystem { + 'ubuntu': { package {'cgroup-lite': ensure => present, } @@ -49,6 +50,18 @@ class opnfv::odl_docker require => Package['cgroup-lite'], } } + 'centos': { + package {'docker-io': + ensure => latest, + } + + service {'docker': + ensure => running, + enable => true, + require => Package['docker-io'], + } + } + } + } } - } } |