summaryrefslogtreecommitdiffstats
path: root/framework/scripts/installer/fuel/fuel-plugin-onos/deployment_scripts/puppet/modules/onos/manifests/config.pp
diff options
context:
space:
mode:
authorCNlukai <lukai1@huawei.com>2016-01-11 17:39:55 +0800
committerCNlukai <lukai1@huawei.com>2016-01-11 17:41:56 +0800
commita94e0159d98d511be4b4da9afe077e1188cc6ce6 (patch)
tree46015bb12d272deef477fb90ebbc8bef67f960f8 /framework/scripts/installer/fuel/fuel-plugin-onos/deployment_scripts/puppet/modules/onos/manifests/config.pp
parent5d28b35794d9bdd8def6dfdf0224420daaa05f11 (diff)
ONOSFW-157
Add script of installer integration onos Change-Id: I0ac05b6a7ede8654af2c2573ea7ecb3e5e7a9473 Signed-off-by: CNlukai <lukai1@huawei.com>
Diffstat (limited to 'framework/scripts/installer/fuel/fuel-plugin-onos/deployment_scripts/puppet/modules/onos/manifests/config.pp')
-rw-r--r--framework/scripts/installer/fuel/fuel-plugin-onos/deployment_scripts/puppet/modules/onos/manifests/config.pp55
1 files changed, 55 insertions, 0 deletions
diff --git a/framework/scripts/installer/fuel/fuel-plugin-onos/deployment_scripts/puppet/modules/onos/manifests/config.pp b/framework/scripts/installer/fuel/fuel-plugin-onos/deployment_scripts/puppet/modules/onos/manifests/config.pp
new file mode 100644
index 00000000..457d732f
--- /dev/null
+++ b/framework/scripts/installer/fuel/fuel-plugin-onos/deployment_scripts/puppet/modules/onos/manifests/config.pp
@@ -0,0 +1,55 @@
+class onos::config{
+$onos_home = $onos::onos_home
+$karaf_dist = $onos::karaf_dist
+$onos_boot_features = $onos::onos_boot_features
+$onos_extra_features = $onos::onos_extra_features
+$roles = $onos::roles
+$public_vip = hiera('public_vip')
+$management_vip = hiera('management_vip')
+$manager_ip = $onos::manager_ip
+$onos_names = $onos::onos_names
+
+$onos_pkg_name = $onos::onos_pkg_name
+$jdk8_pkg_name = $onos::jdk8_pkg_name
+
+Exec{
+ path => "/usr/bin:/usr/sbin:/bin:/sbin",
+ timeout => 180,
+ logoutput => "true",
+}
+
+file{ '/opt/onos_config.sh':
+ source => "puppet:///modules/onos/onos_config.sh",
+} ->
+exec{ 'install onos config':
+ command => "sh /opt/onos_config.sh;
+ rm -rf /opt/onos_config.sh;",
+}->
+exec{ "clean used files":
+ command => "rm -rf /opt/$onos_pkg_name;
+ rm -rf /opt/$jdk8_pkg_name
+ rm -rf /root/.m2/*.tar"
+}->
+exec{ 'onos boot features':
+ command => "sed -i '/^featuresBoot=/c\featuresBoot=$onos_boot_features' $onos_home/$karaf_dist/etc/org.apache.karaf.features.cfg",
+ path => "/usr/bin:/usr/sbin:/bin:/sbin",
+}
+case $::operatingsystem {
+ ubuntu:{
+ file{'/etc/init/onos.conf':
+ ensure => file,
+ content => template('onos/debian/onos.conf.erb')
+}}
+ centos:{
+ file{'/etc/init.d/onos':
+ ensure => file,
+ content => template('onos/centos/onos.erb'),
+ mode => 0777
+}}}
+
+
+#if !member($roles, 'compute') {
+# include onos::ha::haproxy
+#}
+
+}