Skip to content
This repository has been archived by the owner on Nov 8, 2023. It is now read-only.

Commit

Permalink
Added example files
Browse files Browse the repository at this point in the history
site.pp and device.conf examples added and updated README
  • Loading branch information
sdodsley committed Feb 13, 2017
1 parent 8b67d06 commit ee6b6ae
Show file tree
Hide file tree
Showing 3 changed files with 95 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ in the following order:

1. Any existing connection.
2. A Facter-supplied URL.
3. A user-supplied URL (in `device.conf` or `site.pp` file).
3. A user-supplied URL (in `device.conf` or `site.pp` file - examples provided here).

## Usage

Expand Down
7 changes: 7 additions & 0 deletions device.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Pure Storage Array Name
[cloud-dev-405-a12-02.puretec.purestorage.com]
#Custom type
type pure
#Below URL format is https://<username>:<password>:<FQDN_Storage_Array>
url https://pureuser:[email protected]

87 changes: 87 additions & 0 deletions site.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
#Example of Puppet Device
node 'cloud-dev-405-a12-02.puretec.purestorage.com' { #--> This is Device name
volume{ "pure_storage_volume":
#ensure either "present" or "absent"
ensure => "present",
volume_name => "test_device_volume_1",
volume_size => "2.5G",
}
hostconfig{ "pure_storage_host":
ensure => "present",
host_name => "test-device-host",
host_iqnlist => ["iqn.1994-04.jp.co.pure:rsd.d9s.t.10103.0e03f","iqn.1994-04.jp.co.pure:rsd.d9s.t.10103.0e03g"],
}
connection{ "pure_storage_connection":
ensure => "present",
host_name => "test-device-host",
volume_name => "test_device_volume_1",
#Added dependency on volume and host resource types
#to be present, other wise connection will fail.
require => [Volume['pure_storage_volume'],
Hostconfig['pure_storage_host']
],
}

}
#Example of Puppet Agent
node 'calsoft-puppet-agent.puretec.purestorage.com'{ #--> This is Agent vm name
#Note : device_url is MANDATORY here.
$device_url = 'https://pureuser:[email protected]'

volume{ "pure_storage_volume":
#ensure either "present" or "absent"
ensure => "present",
volume_name => "test_agent_volume_1",
volume_size => "1.0G",
device_url => $device_url,
}
hostconfig{ "pure_storage_host":
ensure => "present",
host_name => "test-agent-host",
host_iqnlist => ["iqn.1994-04.jp.co.pure:rsd.d9s.t.10103.0e03h","iqn.1994-04.jp.co.pure:rsd.d9s.t.10103.0e0i"],
device_url => $device_url,
}
connection{ "pure_storage_connection":
ensure => "present",
host_name => "test-agent-host",
volume_name => "test_agent_volume_1",
#Added dependency on volume and host resource types
#to be present, other wise connection will fail.
require => [Volume['pure_storage_volume'],
Hostconfig['pure_storage_host']
],
#Mandatory only for Puppet Apply and Agent approach.
device_url => $device_url,
}
}
#Example of Puppet Apply
node 'puppet.puretec.purestorage.com'{ #--> This is master vm name
#Note: device_url is MANDATORY here.
$device_url = 'https://pureuser:[email protected]'

volume{ "pure_storage_volume":
#ensure either "present" or "absent"
ensure => "present",
volume_name => "test_apply_volume_1",
volume_size => "1.0G",
device_url => $device_url,
}
hostconfig{ "pure_storage_host":
ensure => "present",
host_name => "test-apply-host",
host_iqnlist => ["iqn.1994-04.jp.co.pure:rsd.d9s.t.10103.0e03j","iqn.1994-04.jp.co.pure:rsd.d9s.t.10103.0e03k"],
device_url => $device_url,
}
connection{ "pure_storage_connection":
ensure => "present",
host_name => "test-apply-host",
volume_name => "test_apply_volume_1",
#Added dependency on volume and host resource types
#to be present, other wise connection will fail.
require => [Volume['pure_storage_volume'],
Hostconfig['pure_storage_host']
],
#Mandatory only for Puppet Apply and Agent approach.
device_url => $device_url,
}
}

0 comments on commit ee6b6ae

Please sign in to comment.