rack controller definition
diff --git a/maas/cluster.sls b/maas/cluster.sls
index 2e63ccb..f9bf31f 100644
--- a/maas/cluster.sls
+++ b/maas/cluster.sls
@@ -11,6 +11,8 @@
- service: maas_region_services
- require:
- pkg: maas_region_packages
+ - require_in:
+ - pkg: maas_cluster_packages
maas_cluster_dns_conflicts:
cmd.run:
@@ -20,7 +22,22 @@
- service: maas_region_services
- require:
- pkg: maas_region_packages
+ - require_in:
+ - pkg: maas_cluster_packages
{%- endif %}
+maas_cluster_packages:
+ pkg.installed:
+ - names: {{ cluster.pkgs }}
+
+/etc/maas/rackd.conf:
+ file.line:
+ - content: 'maas_url: {{ cluster.region.host }}/MAAS'
+ - match: 'maas_url*'
+ - mode: replace
+ - location: end
+ - require:
+ - pkg: maas_cluster_packages
+
{%- endif %}
diff --git a/maas/map.jinja b/maas/map.jinja
index 33c70c5..d72fbd1 100644
--- a/maas/map.jinja
+++ b/maas/map.jinja
@@ -1,7 +1,8 @@
{%- load_yaml as cluster_defaults %}
Debian:
- pkgs: {}
+ pkgs:
+ - maas-rack-controller
{%- endload %}
{%- set cluster = salt['grains.filter_by'](cluster_defaults, merge=salt['pillar.get']('maas:cluster', {})) %}
diff --git a/metadata/service/cluster/single.yml b/metadata/service/cluster/single.yml
index 1a22d4a..1097e23 100644
--- a/metadata/service/cluster/single.yml
+++ b/metadata/service/cluster/single.yml
@@ -5,4 +5,6 @@
parameters:
maas:
cluster:
- enabled: true
\ No newline at end of file
+ enabled: true
+ port: 80
+ host: localhost
\ No newline at end of file