summaryrefslogtreecommitdiffstats
path: root/mcp
diff options
context:
space:
mode:
Diffstat (limited to 'mcp')
-rw-r--r--mcp/config/scenario/defaults.yaml3
-rwxr-xr-xmcp/config/states/maas11
-rwxr-xr-xmcp/config/states/openstack_ha12
-rwxr-xr-xmcp/config/states/openstack_noha10
-rw-r--r--mcp/reclass/classes/cluster/mcp-pike-common-ha/infra/maas_pdf.yml.j28
-rw-r--r--mcp/reclass/classes/cluster/mcp-pike-odl-ha/infra/maas.yml.j2 (renamed from mcp/reclass/classes/cluster/mcp-pike-odl-ha/infra/maas.yml)8
-rw-r--r--mcp/salt-formulas/maas/machines/set_storage_layout.sls20
7 files changed, 18 insertions, 54 deletions
diff --git a/mcp/config/scenario/defaults.yaml b/mcp/config/scenario/defaults.yaml
index 110ffc704..6affc7da6 100644
--- a/mcp/config/scenario/defaults.yaml
+++ b/mcp/config/scenario/defaults.yaml
@@ -43,8 +43,7 @@ aarch64:
- armband 1100 deb [arch=arm64] http://linux.enea.com/mcp-repos/pike/xenial pike-armband main
pkg:
install:
- - linux-image-generic-hwe-16.04-edge
- - linux-headers-generic-hwe-16.04-edge
+ - linux-generic-hwe-16.04
- python-futures
- salt-minion
control:
diff --git a/mcp/config/states/maas b/mcp/config/states/maas
index 10cfd01bf..ec2458234 100755
--- a/mcp/config/states/maas
+++ b/mcp/config/states/maas
@@ -57,16 +57,7 @@ function maas_fixup() {
sleep 10
done
if [ -n "${fdnodes}" ] || [ -n "${rnodes}" ]; then
- for node_system_id in ${fdnodes} ${rnodes}; do
- # For now, we allocate 30GB (fixed) for / on cmp nodes
- local node_hostname=$(echo "${statusout}" | \
- grep -Pzo 'hostname: \K.+(?=\n.+\n\s+system_id: '"${node_system_id}"')')
- if [[ "${node_hostname}" =~ ^cmp ]]; then
- salt -C 'mas01*' state.apply maas.machines.set_storage_layout \
- pillar="{'system_id': '${node_system_id}', 'lv_size': '32212254720'}"
- sleep 10
- fi
- done
+ salt -C 'mas01*' state.apply maas.machines.storage
salt -C 'mas01*' state.apply maas.machines.deploy
return 1
fi
diff --git a/mcp/config/states/openstack_ha b/mcp/config/states/openstack_ha
index 77063d6c8..576a47e13 100755
--- a/mcp/config/states/openstack_ha
+++ b/mcp/config/states/openstack_ha
@@ -65,18 +65,6 @@ salt -I 'ceilometer:agent' state.sls ceilometer
salt -I 'horizon:server' state.sls horizon
salt -I 'nginx:server' state.sls nginx
-# workaround for Ubuntu Pike Horizon missing css, FUEL-324
-if ! salt -C 'I@horizon:server and *01*' --out=yaml pkg.version openstack-dashboard | grep -qE ':.*mcp'; then
- salt -I 'horizon:server' file.symlink \
- /var/lib/openstack-dashboard/static \
- /usr/share/openstack-dashboard/static
- salt -I 'horizon:server' cmd.run "/usr/share/openstack-dashboard/manage.py collectstatic --noinput"
- salt -I 'horizon:server' cmd.run "/usr/share/openstack-dashboard/manage.py compress --force"
- salt -I 'horizon:server' file.append /etc/openstack-dashboard/local_settings.py \
- "AVAILABLE_THEMES = [ ('default', 'Default', 'themes/default'),]"
- salt -I 'horizon:server' service.reload apache2
-fi
-
cluster_public_host=$(salt -C 'I@nginx:server and *01*' --out=yaml \
pillar.get _param:cluster_public_host | awk '{print $2; exit}')
dashboard_host=$(salt -C 'I@nginx:server and *01*' --out=yaml cp.push \
diff --git a/mcp/config/states/openstack_noha b/mcp/config/states/openstack_noha
index 4c8cbcf8a..0fffd7a55 100755
--- a/mcp/config/states/openstack_noha
+++ b/mcp/config/states/openstack_noha
@@ -52,13 +52,3 @@ salt -I 'ceilometer:server' state.sls ceilometer
salt -I 'ceilometer:agent' state.sls ceilometer
salt -I 'horizon:server' state.sls horizon
-
-# workaround for the pike horizon is missing css, FUEL-324
-salt -I 'horizon:server' file.symlink \
- /var/lib/openstack-dashboard/static \
- /usr/share/openstack-dashboard/static
-salt -I 'horizon:server' cmd.run "/usr/share/openstack-dashboard/manage.py collectstatic --noinput"
-salt -I 'horizon:server' cmd.run "/usr/share/openstack-dashboard/manage.py compress --force"
-salt -I 'horizon:server' file.append /etc/openstack-dashboard/local_settings.py \
- "AVAILABLE_THEMES = [ ('default', 'Default', 'themes/default'),]"
-salt -I 'horizon:server' service.reload apache2
diff --git a/mcp/reclass/classes/cluster/mcp-pike-common-ha/infra/maas_pdf.yml.j2 b/mcp/reclass/classes/cluster/mcp-pike-common-ha/infra/maas_pdf.yml.j2
index 963a45ef4..1838590e9 100644
--- a/mcp/reclass/classes/cluster/mcp-pike-common-ha/infra/maas_pdf.yml.j2
+++ b/mcp/reclass/classes/cluster/mcp-pike-common-ha/infra/maas_pdf.yml.j2
@@ -82,5 +82,13 @@ parameters:
architecture: {{ node.node.arch | dpkg_arch }}/generic
distro_series: xenial
hwe_kernel: ${_param:hwe_kernel}
+ {%- if loop.index0 >= node_roles.index('cmp001') %}
+ disk_layout:
+ type: lvm
+ root_device: sda
+ volume_group: vgroot
+ volume_name: lvroot
+ volume_size: 100
+ {%- endif %}
{%- endif %}
{%- endfor %}
diff --git a/mcp/reclass/classes/cluster/mcp-pike-odl-ha/infra/maas.yml b/mcp/reclass/classes/cluster/mcp-pike-odl-ha/infra/maas.yml.j2
index 6662f1fad..153b493ce 100644
--- a/mcp/reclass/classes/cluster/mcp-pike-odl-ha/infra/maas.yml
+++ b/mcp/reclass/classes/cluster/mcp-pike-odl-ha/infra/maas.yml.j2
@@ -5,10 +5,18 @@
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
+{%- set cluster_arch = [] %}
+{%- for node in conf.nodes %}
+ {%- if node.node.arch not in cluster_arch %}
+ {%- do cluster_arch.append(node.node.arch) %}
+ {%- endif %}
+{%- endfor %}
---
classes:
- cluster.mcp-pike-common-ha.infra.maas
- cluster.mcp-pike-odl-ha.infra
+{%- if 'aarch64' not in cluster_arch %}
parameters:
_param:
hwe_kernel: 'ga-16.04'
+{%- endif %}
diff --git a/mcp/salt-formulas/maas/machines/set_storage_layout.sls b/mcp/salt-formulas/maas/machines/set_storage_layout.sls
deleted file mode 100644
index 0b7e37153..000000000
--- a/mcp/salt-formulas/maas/machines/set_storage_layout.sls
+++ /dev/null
@@ -1,20 +0,0 @@
-##############################################################################
-# Copyright (c) 2018 Mirantis Inc., Enea AB and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Apache License, Version 2.0
-# which accompanies this distribution, and is available at
-# http://www.apache.org/licenses/LICENSE-2.0
-##############################################################################
-{%- from "maas/map.jinja" import region with context %}
-
-maas_login_admin:
- cmd.run:
- - name: "maas-region apikey --username {{ region.admin.username }} > /var/lib/maas/.maas_credentials"
- - unless: 'test -e /var/lib/maas/.maas_credentials'
-
-# TODO: implement set_storage_layout via _modules/maas.py
-set_storage_layout:
- cmd.run:
- - name: "maas login {{ region.admin.username }} http://{{ region.bind.host }}:5240/MAAS/api/2.0 - < /var/lib/maas/.maas_credentials && maas opnfv machine set-storage-layout {{ pillar['system_id'] }} storage_layout={{ pillar['storage_layout'] | default('lvm') }} lv_size={{ pillar['lv_size'] | default('100%') }}"
- - require:
- - cmd: maas_login_admin