From 1777d5b64e49ef2eb834aa6f6cd6c6411f60d76a Mon Sep 17 00:00:00 2001 From: Michal Skalski Date: Tue, 21 Apr 2015 13:14:11 +0200 Subject: Allow deployment on Centos 6.5 environment Modify Fuel@OPNFV puppet manifest to allow deployment on CentOS 6.5 environment. Add installation of docker-io centos package on controller nodes. Change-Id: I76cdd086607f279f46d827558c878b7be0d8314f JIRA: BGS-36 Signed-off-by: Michal Skalski --- .../puppet/modules/opnfv/manifests/odl_docker.pp | 93 ++++++++++++---------- 1 file changed, 53 insertions(+), 40 deletions(-) (limited to 'fuel/build/f_odl_docker/puppet/modules/opnfv') 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'], + } + } + } + } } - } } -- cgit 1.2.3-korg