Add class & template to configure vmware/vsphere
---
conf/default_cleanup | 2 ++
conf/default_configure | 11 +++++++++++
recipes/aeolus/manifests/init.pp | 1 +
recipes/aeolus/manifests/vmware.pp | 29 +++++++++++++++++++++++++++++
recipes/aeolus/templates/vmware.json | 10 ++++++++++
5 files changed, 53 insertions(+), 0 deletions(-)
create mode 100644 recipes/aeolus/manifests/vmware.pp
create mode 100644 recipes/aeolus/templates/vmware.json
diff --git a/conf/default_cleanup b/conf/default_cleanup
index 5a5ce55..d43e906 100644
--- a/conf/default_cleanup
+++ b/conf/default_cleanup
@@ -20,3 +20,5 @@ classes:
- aeolus::conductor::remove_seed_data
# Uncomment this to clean up RHEV details
#- aeolus::rhevm::disabled
+# Uncomment to remove vmware
+#- aeolus::vmware::disabled
diff --git a/conf/default_configure b/conf/default_configure
index d60b11a..33ac7e1 100644
--- a/conf/default_configure
+++ b/conf/default_configure
@@ -25,6 +25,14 @@ parameters:
# rhevm_deltacloud_username: username@fqdn
# rhevm_deltacloud_password: password
# rhevm_deltacloud_powershell_url:
https://rhevm.server.com:8543/rhevm-api-powershell
+#
+# Uncomment this section and provide appropriate values to configure vmware
+# vmware_api_endpoint:
vsphere.server.com
+# vmware_username: username
+# vmware_password: password
+# vmware_datastore: datastore
+# vmware_network_name: network_name
+# vmware_deltacloud_port: 3006
classes:
- aeolus::conductor
- aeolus::image-factory
@@ -32,3 +40,6 @@ classes:
- aeolus::conductor::seed_data
# Uncomment this section to include rhev setup
#- aeolus::rhevm
+#
+# Uncomment this section to include vmware setup
+#- aeolus::vmware
diff --git a/recipes/aeolus/manifests/init.pp b/recipes/aeolus/manifests/init.pp
index b370064..7768733 100644
--- a/recipes/aeolus/manifests/init.pp
+++ b/recipes/aeolus/manifests/init.pp
@@ -11,6 +11,7 @@ import "deltacloud"
import "iwhd"
import "image-factory"
import "rhevm"
+import "vmware"
if $aeolus_enable_https == "true" or $aeolus_enable_https == "1" {
import "openssl"
diff --git a/recipes/aeolus/manifests/vmware.pp b/recipes/aeolus/manifests/vmware.pp
new file mode 100644
index 0000000..61e861d
--- /dev/null
+++ b/recipes/aeolus/manifests/vmware.pp
@@ -0,0 +1,29 @@
+class aeolus::vmware inherits aeolus {
+ file {"/etc/vmware.json":
+ content => template("aeolus/vmware.json"),
+ mode => 755,
+ require => Package['aeolus-conductor-daemons'] }
+
+ aeolus::conductor::hwp{"vsphere-hwp":
+ memory => "256",
+ cpu => "",
+ storage => "",
+ architecture => "x86_64",
+ require => Aeolus::Site_admin["admin"] }
+
+ aeolus::deltacloud{"vsphere":
+ provider_type => 'vsphere',
+ endpoint => "$vmware_api_endpoint",
+ port => $vmware_deltacloud_port}
+
+ aeolus::conductor::provider{"vsphere":
+ type => "vsphere",
+ url => "http://localhost:${vmware_deltacloud_port}/api",
+ require => [Aeolus::Deltacloud["vsphere"]]}
+
+}
+
+class aeolus::vmware::disabled {
+ aeolus::deltacloud::disabled{"vsphere": }
+
+}
diff --git a/recipes/aeolus/templates/vmware.json b/recipes/aeolus/templates/vmware.json
new file mode 100644
index 0000000..ec69d5e
--- /dev/null
+++ b/recipes/aeolus/templates/vmware.json
@@ -0,0 +1,10 @@
+{
+ "vsphere":
+ {
+ "api-url": "https://<%= vmware_api_endpoint %>/sdk",
+ "username": "<%= vmware_username %>",
+ "password": "<%= vmware_password %>",
+ "datastore": "<%= vmware_datastore %>",
+ "network_name": "<%= vmware_network_name %>"
+ }
+}
--
1.7.4.4