Initial commit
diff --git a/CHANGELOG.rst b/CHANGELOG.rst
new file mode 100644
index 0000000..76758e2
--- /dev/null
+++ b/CHANGELOG.rst
@@ -0,0 +1,6 @@
+maas formula
+=========================================
+
+0.1 (2015-08-22)
+
+- Initial formula setup
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..6f2b42f
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,13 @@
+Copyright (c) 2014-2015 tcp cloud a.s.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
\ No newline at end of file
diff --git a/README.rst b/README.rst
new file mode 100644
index 0000000..bd2f1a1
--- /dev/null
+++ b/README.rst
@@ -0,0 +1,22 @@
+
+==================
+Metal as a SErvice
+==================
+
+Service maas description
+
+Sample pillars
+==============
+
+Single maas service
+
+.. code-block:: yaml
+
+ maas:
+ server:
+ enabled: true
+
+Read more
+=========
+
+*
diff --git a/VERSION b/VERSION
new file mode 100644
index 0000000..49d5957
--- /dev/null
+++ b/VERSION
@@ -0,0 +1 @@
+0.1
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..f4c9994
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,5 @@
+salt-formula-maas (0.1) trusty; urgency=medium
+
+ * Initial release
+
+ -- Ales Komarek <ales.komarek@tcpcloud.eu> Thu, 13 Aug 2015 23:23:41 +0200
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000..ec63514
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+9
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..943a448
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,15 @@
+Source: salt-formula-maas
+Maintainer: Ales Komarek <ales.komarek@tcpcloud.eu>
+Section: admin
+Priority: optional
+Build-Depends: debhelper (>= 9)
+Standards-Version: 3.9.6
+Homepage: http://www.tcpcloud.eu
+Vcs-Browser: https://github.com/tcpcloud/salt-formula-maas
+Vcs-Git: https://github.com/tcpcloud/salt-formula-maas.git
+
+Package: salt-formula-maas
+Architecture: all
+Depends: ${misc:Depends}, salt-master, reclass
+Description: maas salt formula
+ Install and configure maas system.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..fc4caa4
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,15 @@
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: salt-formula-maas
+Upstream-Contact:
+Source: https://github.com/tcpcloud/salt-formula-maas
+
+Files: *
+Copyright: 2014-2015 tcp cloud a.s.
+License: Apache-2.0
+ Copyright (C) 2014-2015 tcp cloud a.s.
+ .
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ .
+ On a Debian system you can find a copy of this license in
+ /usr/share/common-licenses/Apache-2.0.
diff --git a/debian/docs b/debian/docs
new file mode 100644
index 0000000..d585829
--- /dev/null
+++ b/debian/docs
@@ -0,0 +1,3 @@
+README.rst
+CHANGELOG.rst
+VERSION
diff --git a/debian/install b/debian/install
new file mode 100644
index 0000000..622ece0
--- /dev/null
+++ b/debian/install
@@ -0,0 +1,6 @@
+maas/* /usr/share/salt-formulas/env/maas/
+metadata/service/* /usr/share/salt-formulas/reclass/service/maas/
+# Not all salt formulas has custom states and modules,
+# uncomment to install them
+# _modules/* /usr/share/salt-formulas/env/_modules/
+# _states/* /usr/share/salt-formulas/env/_states/
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..abde6ef
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,5 @@
+#!/usr/bin/make -f
+
+%:
+ dh $@
+
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..89ae9db
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (native)
diff --git a/maas/files/maas.conf b/maas/files/maas.conf
new file mode 100644
index 0000000..44e3449
--- /dev/null
+++ b/maas/files/maas.conf
@@ -0,0 +1 @@
+# Service config file
\ No newline at end of file
diff --git a/maas/init.sls b/maas/init.sls
new file mode 100644
index 0000000..27b631f
--- /dev/null
+++ b/maas/init.sls
@@ -0,0 +1,6 @@
+{%- if pillar.maas is defined %}
+include:
+{%- if pillar.maas.server is defined %}
+- maas.server
+{%- endif %}
+{%- endif %}
diff --git a/maas/map.jinja b/maas/map.jinja
new file mode 100644
index 0000000..70352e3
--- /dev/null
+++ b/maas/map.jinja
@@ -0,0 +1,10 @@
+{%- load_yaml as base_defaults %}
+
+Debian:
+ pkgs:
+ - maas
+ - maas-region-controller
+ - maas-cluster-controller
+{%- endload %}
+
+{%- set server = salt['grains.filter_by'](base_defaults, merge=salt['pillar.get']('maas:server')) %}
\ No newline at end of file
diff --git a/maas/meta/sensu.yml b/maas/meta/sensu.yml
new file mode 100644
index 0000000..30938a9
--- /dev/null
+++ b/maas/meta/sensu.yml
@@ -0,0 +1,8 @@
+# Sample check
+check:
+ local_maas_proc:
+ command: "PATH=$PATH:/usr/lib64/nagios/plugins:/usr/lib/nagios/plugins check_procs -C maas -u maas -c 1:1"
+ interval: 60
+ occurrences: 1
+ subscribers:
+ - local-maas-server
diff --git a/maas/meta/sphinx.yml b/maas/meta/sphinx.yml
new file mode 100644
index 0000000..b6af0a7
--- /dev/null
+++ b/maas/meta/sphinx.yml
@@ -0,0 +1,12 @@
+{%- from "maas/map.jinja" import server with context %}
+# Fill in documentation details
+doc:
+ name: maas
+ description: Some service info
+ role:
+ server:
+ name: server
+ param:
+ some_param:
+ name: "Some name"
+ value: "some value"
diff --git a/maas/server.sls b/maas/server.sls
new file mode 100644
index 0000000..6f893c0
--- /dev/null
+++ b/maas/server.sls
@@ -0,0 +1,8 @@
+{%- from "maas/map.jinja" import server with context %}
+{%- if server.enabled %}
+
+mass_server_packages:
+ pkg.installed:
+ - names: {{ server.pkgs }}
+
+{%- endif %}
diff --git a/metadata/service/server/cluster.yml b/metadata/service/server/cluster.yml
new file mode 100644
index 0000000..e231e4d
--- /dev/null
+++ b/metadata/service/server/cluster.yml
@@ -0,0 +1,10 @@
+applications:
+- maas
+classes:
+- service.maas.support
+parameters:
+ maas:
+ server:
+ enabled: true
+ bind:
+ address: 0.0.0.0
diff --git a/metadata/service/server/single.yml b/metadata/service/server/single.yml
new file mode 100644
index 0000000..e231e4d
--- /dev/null
+++ b/metadata/service/server/single.yml
@@ -0,0 +1,10 @@
+applications:
+- maas
+classes:
+- service.maas.support
+parameters:
+ maas:
+ server:
+ enabled: true
+ bind:
+ address: 0.0.0.0
diff --git a/metadata/service/support.yml b/metadata/service/support.yml
new file mode 100644
index 0000000..09b1d97
--- /dev/null
+++ b/metadata/service/support.yml
@@ -0,0 +1,11 @@
+parameters:
+ maas:
+ _support:
+ collectd:
+ enabled: false
+ heka:
+ enabled: false
+ sensu:
+ enabled: false
+ sphinx:
+ enabled: true