diff options
author | Jonas Bjurel <jonas.bjurel@ericsson.com> | 2015-04-23 08:30:46 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@172.30.200.206> | 2015-04-23 08:30:46 +0000 |
commit | e2b2d46756213fde3bca42a49b04e6a1e8792498 (patch) | |
tree | 526502f01cfb71d41a34de0962ca0f9b516238f9 /fuel/build/f_odl_docker | |
parent | 982f222862a1b1f2773152c535677931334ce60d (diff) | |
parent | 1777d5b64e49ef2eb834aa6f6cd6c6411f60d76a (diff) |
Merge "Allow deployment on Centos 6.5 environment"
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'], + } + } + } + } } - } } |