diff options
Diffstat (limited to 'framework/scripts/installer/fuel/fuel-plugin-onos/deployment_scripts/puppet/modules/onos/manifests/service.pp')
-rw-r--r-- | framework/scripts/installer/fuel/fuel-plugin-onos/deployment_scripts/puppet/modules/onos/manifests/service.pp | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/framework/scripts/installer/fuel/fuel-plugin-onos/deployment_scripts/puppet/modules/onos/manifests/service.pp b/framework/scripts/installer/fuel/fuel-plugin-onos/deployment_scripts/puppet/modules/onos/manifests/service.pp new file mode 100644 index 00000000..45399232 --- /dev/null +++ b/framework/scripts/installer/fuel/fuel-plugin-onos/deployment_scripts/puppet/modules/onos/manifests/service.pp @@ -0,0 +1,48 @@ + +class onos::service{ + +$public_eth = $onos::public_eth +Exec{ + path => "/usr/bin:/usr/sbin:/bin:/sbin", + timeout => 320, + logoutput => 'true', +} + +firewall {'221 onos': + port => [6633, 6640, 6653, 8181, 8101,9876], + proto => 'tcp', + action => 'accept', +}-> +service{ 'onos': + ensure => running, + enable => true, + hasstatus => true, + hasrestart => true, +}-> + +exec{ 'sleep 100 to stablize onos': + command => 'sleep 100;' +}-> + +exec{ 'restart onos': + command => 'service onos restart', +}-> + +exec{ 'sleep 100 again to stablize onos': + command => 'sleep 100;' +}-> +exec{ 'restart onos again': + command => 'service onos restart', +}-> + +exec{ 'sleep 60 to stablize onos': + command => 'sleep 60;' +}-> + +exec{ 'add onos auto start': + command => 'echo "onos">>/opt/service', +}-> +exec{ 'set public port': + command => "/opt/onos/bin/onos \"externalportname-set -n $public_eth\"" +} +} |