summaryrefslogtreecommitdiff
path: root/platform.rb
diff options
context:
space:
mode:
authorMicah Anderson <micah@riseup.net>2013-07-09 16:43:39 +0100
committerMicah Anderson <micah@riseup.net>2013-07-09 16:43:39 +0100
commitb4077083b971377636754b2988668a6ddd384da5 (patch)
treeb8e358b5f0f6dfa882d31d7446266111bc0d201b /platform.rb
parent625aaa11138bba365958391664299692402f8da4 (diff)
parent672154a8322901b86c9882854234eae53221a38e (diff)
Merge remote-tracking branch 'origin/develop'0.2.2
Conflicts: provider_base/services/webapp.json
Diffstat (limited to 'platform.rb')
-rw-r--r--platform.rb77
1 files changed, 77 insertions, 0 deletions
diff --git a/platform.rb b/platform.rb
new file mode 100644
index 00000000..9f63b4ca
--- /dev/null
+++ b/platform.rb
@@ -0,0 +1,77 @@
+#
+# These are variables defined by this leap_platform and used by leap_cli.
+#
+
+Leap::Platform.define do
+ self.version = "1.1.2"
+ self.compatible_cli = "1.1.2".."1.99"
+
+ #
+ # the facter facts that should be gathered
+ #
+ self.facts = ["ec2_local_ipv4"]
+
+ #
+ # the named paths for this platform
+ #
+ self.paths = {
+ # directories
+ :hiera_dir => 'hiera',
+ :files_dir => 'files',
+ :nodes_dir => 'nodes',
+ :services_dir => 'services',
+ :tags_dir => 'tags',
+ :node_files_dir => 'files/nodes/#{arg}',
+
+ # input config files
+ :common_config => 'common.json',
+ :provider_config => 'provider.json',
+ :secrets_config => 'secrets.json',
+ :node_config => 'nodes/#{arg}.json',
+ :service_config => 'services/#{arg}.json',
+ :tag_config => 'tags/#{arg}.json',
+
+ # input templates
+ :provider_json_template => 'files/service-definitions/provider.json.erb',
+ :eip_service_json_template => 'files/service-definitions/#{arg}/eip-service.json.erb',
+ :soledad_service_json_template => 'files/service-definitions/#{arg}/soledad-service.json.erb',
+ :smtp_service_json_template => 'files/service-definitions/#{arg}/smtp-service.json.erb',
+
+ # output files
+ :facts => 'facts.json',
+ :user_ssh => 'users/#{arg}/#{arg}_ssh.pub',
+ :user_pgp => 'users/#{arg}/#{arg}_pgp.pub',
+ :known_hosts => 'files/ssh/known_hosts',
+ :authorized_keys => 'files/ssh/authorized_keys',
+ :ca_key => 'files/ca/ca.key',
+ :ca_cert => 'files/ca/ca.crt',
+ :client_ca_key => 'files/ca/client_ca.key',
+ :client_ca_cert => 'files/ca/client_ca.crt',
+ :dh_params => 'files/ca/dh.pem',
+ :commercial_key => 'files/cert/#{arg}.key',
+ :commercial_csr => 'files/cert/#{arg}.csr',
+ :commercial_cert => 'files/cert/#{arg}.crt',
+ :commercial_ca_cert => 'files/cert/commercial_ca.crt',
+ :vagrantfile => 'test/Vagrantfile',
+
+ # node output files
+ :hiera => 'hiera/#{arg}.yaml',
+ :node_ssh_pub_key => 'files/nodes/#{arg}/#{arg}_ssh.pub',
+ :node_x509_key => 'files/nodes/#{arg}/#{arg}.key',
+ :node_x509_cert => 'files/nodes/#{arg}/#{arg}.crt',
+
+ # testing files
+ :test_client_key => 'test/cert/client.key',
+ :test_client_cert => 'test/cert/client.crt',
+ :test_openvpn_config => 'test/openvpn/#{arg}.ovpn',
+ :test_client_openvpn_template => 'test/openvpn/client.ovpn.erb'
+ }
+
+ #
+ # the files that need to get renamed when a node is renamed
+ #
+ self.node_files = [
+ :node_config, :hiera, :node_x509_cert, :node_x509_key, :node_ssh_pub_key
+ ]
+end
+