diff options
Diffstat (limited to 'mcp/salt-formulas')
26 files changed, 166 insertions, 97 deletions
diff --git a/mcp/salt-formulas/maas/machines/delete.sls b/mcp/salt-formulas/maas/machines/delete.sls deleted file mode 100644 index 2903f9226..000000000 --- a/mcp/salt-formulas/maas/machines/delete.sls +++ /dev/null @@ -1,20 +0,0 @@ -############################################################################## -# Copyright (c) 2017 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 delete_machine via _modules/maas.py -delete_machine: - 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 delete {{ pillar['system_id'] }}" - - require: - - cmd: maas_login_admin diff --git a/mcp/salt-formulas/maas/machines/mark_broken_fixed.sls b/mcp/salt-formulas/maas/machines/mark_broken_fixed.sls deleted file mode 100644 index 46691bb09..000000000 --- a/mcp/salt-formulas/maas/machines/mark_broken_fixed.sls +++ /dev/null @@ -1,20 +0,0 @@ -############################################################################## -# Copyright (c) 2017 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 mark_broken_fixed_machine via _modules/maas.py -mark_broken_fixed_machine: - 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 mark-broken {{ pillar['system_id'] }} && sleep 10 && maas opnfv machine mark-fixed {{ pillar['system_id'] }} && maas opnfv machine test {{ pillar['system_id'] }} testing_scripts=fio" - - require: - - cmd: maas_login_admin diff --git a/mcp/salt-formulas/maas/machines/override_failed_testing.sls b/mcp/salt-formulas/maas/machines/override_failed_testing.sls deleted file mode 100644 index e7fe1d267..000000000 --- a/mcp/salt-formulas/maas/machines/override_failed_testing.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 override_failed_testing via _modules/maas.py -mark_broken_fixed_machine: - 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 override-failed-testing {{ pillar['system_id'] }}" - - require: - - cmd: maas_login_admin diff --git a/mcp/salt-formulas/maas/pxe_nat.sls b/mcp/salt-formulas/maas/pxe_nat.sls deleted file mode 100644 index 8a03c4fdb..000000000 --- a/mcp/salt-formulas/maas/pxe_nat.sls +++ /dev/null @@ -1,37 +0,0 @@ -############################################################################## -# Copyright (c) 2017 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 -############################################################################## -net.ipv4.ip_forward: - sysctl.present: - - value: 1 - -iptables_pxe_nat: - iptables.append: - - table: nat - - chain: POSTROUTING - - jump: MASQUERADE - - destination: 0/0 - - source: {{ salt['pillar.get']('_param:single_address') }}/{{ salt['pillar.get']('_param:opnfv_net_admin_mask') }} - - save: True - -iptables_pxe_source: - iptables.append: - - table: filter - - chain: INPUT - - jump: ACCEPT - - destination: 0/0 - - source: {{ salt['pillar.get']('_param:single_address') }}/{{ salt['pillar.get']('_param:opnfv_net_admin_mask') }} - - save: True - -iptables_pxe_destination: - iptables.append: - - table: filter - - chain: INPUT - - jump: ACCEPT - - destination: {{ salt['pillar.get']('_param:single_address') }}/{{ salt['pillar.get']('_param:opnfv_net_admin_mask') }} - - source: 0/0 - - save: True diff --git a/mcp/salt-formulas/salt-formula-armband/armband/files/nova-libvirt-aarch64-rollup.diff b/mcp/salt-formulas/salt-formula-armband/armband/files/nova-libvirt-aarch64-rollup.diff new file mode 100644 index 000000000..1ecbf2973 --- /dev/null +++ b/mcp/salt-formulas/salt-formula-armband/armband/files/nova-libvirt-aarch64-rollup.diff @@ -0,0 +1,27 @@ +From: Charalampos Kominos <Charalampos.Kominos@enea.com> +Date: Wed, 2 May 2018 14:20:47 +0200 +Subject: [PATCH] Allow libvirt to honor root device naming + +Current behaviour in upstream nova is for rootfs to be in /dev/vda +which is the default behaviour when using virtio driver. However when +other devices are requested either by glance or by CLI, nova ignores +that naming and still tries to attach to vda which fails. + +Manually applied in https://review.openstack.org/#/c/214314/ + +JIRA: ARMBAND-376 + +Signed-off-by: Charalampos Kominos <charalampos.kominos@enea.com> +--- + +--- a/nova/virt/libvirt/driver.py ++++ b/nova/virt/libvirt/driver.py +@@ -8257,6 +8257,8 @@ + "Ignoring supplied device name: %(device_name)s. " + "Libvirt can't honour user-supplied dev names", + {'device_name': bdm.device_name}, instance=instance) ++ if instance.root_device_name == bdm.device_name: ++ instance.root_device_name = None + bdm.device_name = None + block_device_info = driver.get_block_device_info(instance, + block_device_mapping) diff --git a/mcp/salt-formulas/salt-formula-armband/armband/init.sls b/mcp/salt-formulas/salt-formula-armband/armband/init.sls new file mode 100644 index 000000000..8a8cf2ab1 --- /dev/null +++ b/mcp/salt-formulas/salt-formula-armband/armband/init.sls @@ -0,0 +1,7 @@ +include: + - armband.qemu_efi + - armband.vgabios + {%- if salt['pkg.version']('python-nova') %} + - armband.nova_libvirt + - armband.nova_config + {%- endif %} diff --git a/mcp/salt-formulas/salt-formula-armband/armband/nova_config.sls b/mcp/salt-formulas/salt-formula-armband/armband/nova_config.sls new file mode 100644 index 000000000..b0e17b718 --- /dev/null +++ b/mcp/salt-formulas/salt-formula-armband/armband/nova_config.sls @@ -0,0 +1,37 @@ +{% if grains['cpuarch'] == 'aarch64' %} +{% if grains['virtual'] == 'kvm' %} +nova_virt_type: + file.replace: + - name: "/etc/nova/nova.conf" + - pattern: '^virt_type\s*=.*$' + - repl: "virt_type = qemu" +nova_compute_virt_type: + file.replace: + - name: "/etc/nova/nova-compute.conf" + - pattern: '^virt_type\s*=.*$' + - repl: "virt_type = qemu" +{% endif %} +nova_pointer_model: + file.replace: + - name: "/etc/nova/nova.conf" + - pattern: '^#pointer_model\s*=.*$' + - repl: "pointer_model = ps2mouse" +nova_cpu_mode: + file.replace: + - name: "/etc/nova/nova.conf" + - pattern: '^cpu_mode\s*=\s*host-passthrough' + - repl: "cpu_mode = custom" +nova_cpu_model: + file.replace: + - name: "/etc/nova/nova.conf" + - pattern: '^#cpu_model\s*=.*$' + {% if grains['virtual'] == 'kvm' %} + - repl: "cpu_model = cortex-a57" + {% else %} + - repl: "cpu_model = host" + {% endif %} +restart_nova-compute: + cmd: + - run + - name: "service nova-compute restart" +{% endif %} diff --git a/mcp/salt-formulas/salt-formula-armband/armband/nova_libvirt.sls b/mcp/salt-formulas/salt-formula-armband/armband/nova_libvirt.sls new file mode 100644 index 000000000..9d26e86a4 --- /dev/null +++ b/mcp/salt-formulas/salt-formula-armband/armband/nova_libvirt.sls @@ -0,0 +1,9 @@ +{% if grains['cpuarch'] == 'aarch64' %} +nova-libvirt-aarch64-rollup: + file.patch: + - name: /usr/lib/python2.7/dist-packages + - source: salt://armband/files/nova-libvirt-aarch64-rollup.diff + - hash: False + - options: '-p1' + - unless: 'test -f /var/cache/salt/minion/files/base/armband/files/nova-libvirt-aarch64-rollup.diff && cd /usr/lib/python2.7/dist-packages && patch -p1 -R --dry-run -r - < /var/cache/salt/minion/files/base/armband/files/nova-libvirt-aarch64-rollup.diff' +{% endif %} diff --git a/mcp/salt-formulas/salt-formula-armband/armband/qemu_efi.sls b/mcp/salt-formulas/salt-formula-armband/armband/qemu_efi.sls new file mode 100644 index 000000000..aef17f9a8 --- /dev/null +++ b/mcp/salt-formulas/salt-formula-armband/armband/qemu_efi.sls @@ -0,0 +1,4 @@ +{% if grains['cpuarch'] == 'aarch64' %} +qemu-efi: + pkg.installed +{% endif %} diff --git a/mcp/salt-formulas/salt-formula-armband/armband/vgabios.sls b/mcp/salt-formulas/salt-formula-armband/armband/vgabios.sls new file mode 100644 index 000000000..7f004971c --- /dev/null +++ b/mcp/salt-formulas/salt-formula-armband/armband/vgabios.sls @@ -0,0 +1,9 @@ +{% if grains['cpuarch'] == 'aarch64' %} +vgabios: + pkg.installed +/usr/share/qemu: + file.directory +/usr/share/qemu/vgabios-stdvga.bin: + file.symlink: + - target: "/usr/share/vgabios/vgabios.bin" +{% endif %} diff --git a/mcp/salt-formulas/salt-formula-keystone b/mcp/salt-formulas/salt-formula-keystone new file mode 160000 +Subproject df75142aaf6487c3af9e2868f4f12ef18228ca9 diff --git a/mcp/salt-formulas/salt-formula-linux b/mcp/salt-formulas/salt-formula-linux new file mode 160000 +Subproject cf1b5b322a077dc8d6f9bf5b36a7a0a71a2b3a0 diff --git a/mcp/salt-formulas/salt-formula-maas b/mcp/salt-formulas/salt-formula-maas new file mode 160000 +Subproject c6a12dea5f8d8c7c700f596dbabb805113f1d34 diff --git a/mcp/salt-formulas/salt-formula-opendaylight/metadata/service/server/single.yml b/mcp/salt-formulas/salt-formula-opendaylight/metadata/service/server/single.yml new file mode 100644 index 000000000..3a762b39a --- /dev/null +++ b/mcp/salt-formulas/salt-formula-opendaylight/metadata/service/server/single.yml @@ -0,0 +1,20 @@ +############################################################################## +# Copyright (c) 2017 Mirantis Inc. 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 +############################################################################## +--- +applications: + - opendaylight +parameters: + _param: + version: oxygen + opendaylight: + server: + enabled: 'True' + version: ${_param:version} + repo: 'odl-team/${_param:version}' + logging: + engine: syslog diff --git a/mcp/salt-formulas/salt-formula-opendaylight/metadata/service/support.yml b/mcp/salt-formulas/salt-formula-opendaylight/metadata/service/support.yml new file mode 100644 index 000000000..bbb204315 --- /dev/null +++ b/mcp/salt-formulas/salt-formula-opendaylight/metadata/service/support.yml @@ -0,0 +1,19 @@ +############################################################################## +# Copyright (c) 2017 Mirantis Inc. 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 +############################################################################## +--- +parameters: + opendaylight: + _support: + collectd: + enabled: false + heka: + enabled: false + sensu: + enabled: false + sphinx: + enabled: false diff --git a/mcp/salt-formulas/opendaylight/files/jetty.xml b/mcp/salt-formulas/salt-formula-opendaylight/opendaylight/files/jetty.xml index de2ac677d..de2ac677d 100644 --- a/mcp/salt-formulas/opendaylight/files/jetty.xml +++ b/mcp/salt-formulas/salt-formula-opendaylight/opendaylight/files/jetty.xml diff --git a/mcp/salt-formulas/opendaylight/files/setenv.shell b/mcp/salt-formulas/salt-formula-opendaylight/opendaylight/files/setenv.shell index 2921ade14..2921ade14 100644 --- a/mcp/salt-formulas/opendaylight/files/setenv.shell +++ b/mcp/salt-formulas/salt-formula-opendaylight/opendaylight/files/setenv.shell diff --git a/mcp/salt-formulas/opendaylight/init.sls b/mcp/salt-formulas/salt-formula-opendaylight/opendaylight/init.sls index 132f69b33..132f69b33 100644 --- a/mcp/salt-formulas/opendaylight/init.sls +++ b/mcp/salt-formulas/salt-formula-opendaylight/opendaylight/init.sls diff --git a/mcp/salt-formulas/opendaylight/map.jinja b/mcp/salt-formulas/salt-formula-opendaylight/opendaylight/map.jinja index 38575111e..38575111e 100644 --- a/mcp/salt-formulas/opendaylight/map.jinja +++ b/mcp/salt-formulas/salt-formula-opendaylight/opendaylight/map.jinja diff --git a/mcp/salt-formulas/opendaylight/server.sls b/mcp/salt-formulas/salt-formula-opendaylight/opendaylight/server.sls index 206dc52a2..206dc52a2 100644 --- a/mcp/salt-formulas/opendaylight/server.sls +++ b/mcp/salt-formulas/salt-formula-opendaylight/opendaylight/server.sls diff --git a/mcp/salt-formulas/salt-formula-tacker/metadata/service/server/single.yml b/mcp/salt-formulas/salt-formula-tacker/metadata/service/server/single.yml new file mode 100644 index 000000000..597d9f8fb --- /dev/null +++ b/mcp/salt-formulas/salt-formula-tacker/metadata/service/server/single.yml @@ -0,0 +1,34 @@ +############################################################################## +# Copyright (c) 2018 Mirantis Inc. 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 +############################################################################## +--- +classes: + - service.git.client +parameters: + _param: + keystone_tacker_endpoint_type: internalURL + tacker: + server: + bind_host: ${_param:cluster_local_address} + enabled: true + branch: stable/queens + database: + engine: mysql + host: ${_param:single_address} + port: 3306 + name: tacker + user: tacker + password: ${_param:mysql_tacker_password} + identity: + engine: keystone + region: RegionOne + host: ${_param:single_address} + port: 35357 + user: tacker + password: ${_param:keystone_tacker_password} + tenant: service + endpoint_type: ${_param:keystone_tacker_endpoint_type} diff --git a/mcp/salt-formulas/tacker/files/tacker.conf b/mcp/salt-formulas/salt-formula-tacker/tacker/files/tacker.conf index 7adfd3139..7adfd3139 100644 --- a/mcp/salt-formulas/tacker/files/tacker.conf +++ b/mcp/salt-formulas/salt-formula-tacker/tacker/files/tacker.conf diff --git a/mcp/salt-formulas/tacker/files/tacker.systemd b/mcp/salt-formulas/salt-formula-tacker/tacker/files/tacker.systemd index 12ff5cdde..12ff5cdde 100644 --- a/mcp/salt-formulas/tacker/files/tacker.systemd +++ b/mcp/salt-formulas/salt-formula-tacker/tacker/files/tacker.systemd diff --git a/mcp/salt-formulas/tacker/init.sls b/mcp/salt-formulas/salt-formula-tacker/tacker/init.sls index 35291b8f9..35291b8f9 100644 --- a/mcp/salt-formulas/tacker/init.sls +++ b/mcp/salt-formulas/salt-formula-tacker/tacker/init.sls diff --git a/mcp/salt-formulas/tacker/map.jinja b/mcp/salt-formulas/salt-formula-tacker/tacker/map.jinja index 9a35c8e52..9a35c8e52 100644 --- a/mcp/salt-formulas/tacker/map.jinja +++ b/mcp/salt-formulas/salt-formula-tacker/tacker/map.jinja diff --git a/mcp/salt-formulas/tacker/server.sls b/mcp/salt-formulas/salt-formula-tacker/tacker/server.sls index eb3468a11..eb3468a11 100644 --- a/mcp/salt-formulas/tacker/server.sls +++ b/mcp/salt-formulas/salt-formula-tacker/tacker/server.sls |