summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorTim Rozet <trozet@redhat.com>2017-05-17 15:58:59 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-05-17 15:58:59 +0000
commitb411839804e6fca023ef7a695bbb616ea80fd6f3 (patch)
tree4ff5708b37e36dfef879b762e91b9b9fae8e772b /build
parent2f1a9dc491f55b5890a030a8ee36faa15de57b9e (diff)
parent95ee731525170e8dd4df813d5ca7e43b0ba2f4eb (diff)
Merge "Adding yamllint to build checks"
Diffstat (limited to 'build')
-rw-r--r--build/Makefile9
-rw-r--r--build/csit-environment.yaml7
-rw-r--r--build/enable_rt_kvm.yaml1
-rw-r--r--build/first-boot.yaml27
-rw-r--r--build/kvm4nfv-1st-boot.yaml11
-rw-r--r--build/network-environment.yaml58
-rw-r--r--build/opnfv-environment.yaml32
-rw-r--r--build/ovs-dpdk-preconfig.yaml16
-rw-r--r--build/virtual-environment.yaml1
9 files changed, 102 insertions, 60 deletions
diff --git a/build/Makefile b/build/Makefile
index 2df41424..1d329fb5 100644
--- a/build/Makefile
+++ b/build/Makefile
@@ -117,6 +117,15 @@ python-pep8-check:
pep8 ../lib/python
pep8 ../tests
+#############
+# YAMLLINT #
+#############
+
+.PHONY: yamllint
+yamllint:
+ @echo "Running yamllint against all .yaml files"
+ cd ../ && yamllint $(shell cd ../ && git ls-tree -r HEAD --name-only | grep 'yaml$$')
+
##################
# NETWORKING-VPP #
##################
diff --git a/build/csit-environment.yaml b/build/csit-environment.yaml
index d9833218..3dcd6d9e 100644
--- a/build/csit-environment.yaml
+++ b/build/csit-environment.yaml
@@ -1,5 +1,6 @@
-#Environment file used to list common parameters required for all deployment
-#types
+---
+# Environment file used to list common parameters required for all deployment
+# types
parameters:
# CloudDomain:
@@ -14,7 +15,7 @@ parameter_defaults:
OvercloudComputeFlavor: compute
controllerImage: overcloud-full
ExtraConfig:
- tripleo::ringbuilder::build_ring: False
+ tripleo::ringbuilder::build_ring: false
nova::nova_public_key:
type: 'ssh-rsa'
replace_public_key:
diff --git a/build/enable_rt_kvm.yaml b/build/enable_rt_kvm.yaml
index 0059021c..4601fd40 100644
--- a/build/enable_rt_kvm.yaml
+++ b/build/enable_rt_kvm.yaml
@@ -1,3 +1,4 @@
+---
parameter_defaults:
ComputeKernelArgs: 'kvmfornfv_kernel.rpm'
resource_registry:
diff --git a/build/first-boot.yaml b/build/first-boot.yaml
index d4ac5df6..1e8921ba 100644
--- a/build/first-boot.yaml
+++ b/build/first-boot.yaml
@@ -1,3 +1,4 @@
+---
heat_template_version: 2014-10-16
description: >
@@ -9,8 +10,10 @@ parameters:
ComputeKernelArgs:
description: >
Space seprated list of Kernel args to be update to grub.
- The given args will be appended to existing args of GRUB_CMDLINE_LINUX in file /etc/default/grub
- Example: "intel_iommu=on default_hugepagesz=2MB hugepagesz=2MB hugepages=2048"
+ The given args will be appended to existing args of
+ GRUB_CMDLINE_LINUX in file /etc/default/grub
+ Example:
+ "intel_iommu=on default_hugepagesz=2MB hugepagesz=2MB hugepages=2048"
type: string
default: ""
@@ -19,7 +22,7 @@ resources:
type: OS::Heat::MultipartMime
properties:
parts:
- - config: {get_resource: compute_kernel_args}
+ - config: {get_resource: compute_kernel_args}
# Verify the logs on /var/log/cloud-init.log on the overcloud node
compute_kernel_args:
@@ -30,24 +33,24 @@ resources:
template: |
#!/bin/bash
set -x
- sed 's/^\(GRUB_CMDLINE_LINUX=".*\)"/\1 $KERNEL_ARGS"/g' -i /etc/default/grub ;
+ sed 's/^\(GRUB_CMDLINE_LINUX=".*\)"/\1 $KERNEL_ARGS"/g' \
+ -i /etc/default/grub ;
grub2-mkconfig -o /etc/grub2.cfg
- hugepage_count=`echo $KERNEL_ARGS | grep -oP ' ?hugepages=\K[0-9]+'`
+ hugepage_count=$(echo $KERNEL_ARGS | \
+ grep -oP ' ?hugepages=\K[0-9]+')
if [ -z "$hugepage_count" ]; then
hugepage_count=1024
fi
echo vm.hugetlb_shm_group=0 >> /usr/lib/sysctl.d/00-system.conf
- echo vm.max_map_count=$(printf "%.0f" $(echo 2.2*$hugepage_count | bc)) >> /usr/lib/sysctl.d/00-system.conf
- echo kernel.shmmax=$(($hugepage_count * 2 * 1024 * 1024)) >> /usr/lib/sysctl.d/00-system.conf
- rm -f /etc/sysconfig/network-scripts/ifcfg-*
+ HPAGE_CT=$(printf "%.0f" $(echo 2.2*$hugepage_count | bc))
+ echo vm.max_map_count=$HPAGE_CT >> /usr/lib/sysctl.d/00-system.conf
+ HPAGE_CT=$(($hugepage_count * 2 * 1024 * 1024))
+ echo kernel.shmmax=$HPAGE_CT >> /usr/lib/sysctl.d/00-system.conf
+
reboot
params:
$KERNEL_ARGS: {get_param: ComputeKernelArgs}
outputs:
- # This means get_resource from the parent template will get the userdata, see:
- # http://docs.openstack.org/developer/heat/template_guide/composition.html#making-your-template-resource-more-transparent
- # Note this is new-for-kilo, an alternative is returning a value then using
- # get_attr in the parent template instead.
OS::stack_id:
value: {get_resource: userdata}
diff --git a/build/kvm4nfv-1st-boot.yaml b/build/kvm4nfv-1st-boot.yaml
index 0dad3e3b..4c1aefc0 100644
--- a/build/kvm4nfv-1st-boot.yaml
+++ b/build/kvm4nfv-1st-boot.yaml
@@ -1,3 +1,4 @@
+---
heat_template_version: 2014-10-16
description: >
@@ -21,7 +22,7 @@ resources:
type: OS::Heat::MultipartMime
properties:
parts:
- - config: {get_resource: compute_kernel_args}
+ - config: {get_resource: compute_kernel_args}
# Verify the logs on /var/log/cloud-init.log on the overcloud node
compute_kernel_args:
@@ -36,8 +37,10 @@ resources:
if [[ -z $FORMAT ]] ; then
FORMAT="compute" ;
else
- # Assumption: only %index% and %stackname% are the variables in Host name format
- FORMAT=$(echo $FORMAT | sed 's/\%index\%//g' | sed 's/\%stackname\%//g') ;
+ # Assumption: only %index% and %stackname% are
+ # the variables in Host name format
+ FORMAT=$(echo $FORMAT | sed 's/\%index\%//g');
+ FORMAT=$(echo $FORMAT | sed 's/\%stackname\%//g');
fi
if [[ $(hostname) == *$FORMAT* ]] ; then
yum install -y /root/$KVMFORNFV_KERNEL_RPM
@@ -56,5 +59,3 @@ outputs:
# get_attr in the parent template instead.
OS::stack_id:
value: {get_resource: userdata}
-
-
diff --git a/build/network-environment.yaml b/build/network-environment.yaml
index 40f8e3be..cb6e0198 100644
--- a/build/network-environment.yaml
+++ b/build/network-environment.yaml
@@ -1,39 +1,59 @@
+---
# Enable the creation of Neutron networks for isolated OvercloudV
# traffic and configure each role to assign ports (related
# to that role) on these networks.
# Many networks are disabled by default because they are not used
# in a typical configuration. Override via parameter_defaults.
resource_registry:
- OS::TripleO::Network::External: /usr/share/openstack-tripleo-heat-templates/network/external.yaml
+ OS::TripleO::Network::External: |-
+ /usr/share/openstack-tripleo-heat-templates/network/external.yaml
OS::TripleO::Network::InternalApi: OS::Heat::None
OS::TripleO::Network::StorageMgmt: OS::Heat::None
OS::TripleO::Network::Storage: OS::Heat::None
OS::TripleO::Network::Tenant: OS::Heat::None
# Management network is optional and disabled by default
- #OS::TripleO::Network::Management: /usr/share/openstack-tripleo-heat-templates/network/noop.yaml
+ # OS::TripleO::Network::Management:
+ # /usr/share/openstack-tripleo-heat-templates/network/noop.yaml
# Port assignments for the VIPs
- OS::TripleO::Network::Ports::ExternalVipPort: /usr/share/openstack-tripleo-heat-templates/network/ports/external.yaml
- OS::TripleO::Network::Ports::InternalApiVipPort: /usr/share/openstack-tripleo-heat-templates/network/ports/noop.yaml
- OS::TripleO::Network::Ports::StorageVipPort: /usr/share/openstack-tripleo-heat-templates/network/ports/noop.yaml
- OS::TripleO::Network::Ports::StorageMgmtVipPort: /usr/share/openstack-tripleo-heat-templates/network/ports/noop.yaml
- OS::TripleO::Network::Ports::RedisVipPort: /usr/share/openstack-tripleo-heat-templates/network/ports/ctlplane_vip.yaml
+ OS::TripleO::Network::Ports::ExternalVipPort: |-
+ /usr/share/openstack-tripleo-heat-templates/network/ports/external.yaml
+ OS::TripleO::Network::Ports::InternalApiVipPort: |-
+ /usr/share/openstack-tripleo-heat-templates/network/ports/noop.yaml
+ OS::TripleO::Network::Ports::StorageVipPort: |-
+ /usr/share/openstack-tripleo-heat-templates/network/ports/noop.yaml
+ OS::TripleO::Network::Ports::StorageMgmtVipPort: |-
+ /usr/share/openstack-tripleo-heat-templates/network/ports/noop.yaml
+ OS::TripleO::Network::Ports::RedisVipPort: |-
+ /usr/share/openstack-tripleo-heat-templates/network/ports/ctlplane_vip.yaml
# Port assignments for the controller role
- OS::TripleO::Controller::Ports::ExternalPort: /usr/share/openstack-tripleo-heat-templates/network/ports/external.yaml
- OS::TripleO::Controller::Ports::InternalApiPort: /usr/share/openstack-tripleo-heat-templates/network/ports/noop.yaml
- OS::TripleO::Controller::Ports::StoragePort: /usr/share/openstack-tripleo-heat-templates/network/ports/noop.yaml
- OS::TripleO::Controller::Ports::StorageMgmtPort: /usr/share/openstack-tripleo-heat-templates/network/ports/noop.yaml
- OS::TripleO::Controller::Ports::TenantPort: /usr/share/openstack-tripleo-heat-templates/network/ports/noop.yaml
- #OS::TripleO::Controller::Ports::ManagementPort: /usr/share/openstack-tripleo-heat-templates/network/ports/noop.yaml
+ OS::TripleO::Controller::Ports::ExternalPort: |-
+ /usr/share/openstack-tripleo-heat-templates/network/ports/external.yaml
+ OS::TripleO::Controller::Ports::InternalApiPort: |-
+ /usr/share/openstack-tripleo-heat-templates/network/ports/noop.yaml
+ OS::TripleO::Controller::Ports::StoragePort: |-
+ /usr/share/openstack-tripleo-heat-templates/network/ports/noop.yaml
+ OS::TripleO::Controller::Ports::StorageMgmtPort: |-
+ /usr/share/openstack-tripleo-heat-templates/network/ports/noop.yaml
+ OS::TripleO::Controller::Ports::TenantPort: |-
+ /usr/share/openstack-tripleo-heat-templates/network/ports/noop.yaml
+ # OS::TripleO::Controller::Ports::ManagementPort:
+ # /usr/share/openstack-tripleo-heat-templates/network/ports/noop.yaml
# Port assignments for the compute role
- OS::TripleO::Compute::Ports::InternalApiPort: /usr/share/openstack-tripleo-heat-templates/network/ports/noop.yaml
- OS::TripleO::Compute::Ports::StorageMgmtPort: /usr/share/openstack-tripleo-heat-templates/network/ports/noop.yaml
- OS::TripleO::Compute::Ports::StoragePort: /usr/share/openstack-tripleo-heat-templates/network/ports/noop.yaml
- OS::TripleO::Compute::Ports::TenantPort: /usr/share/openstack-tripleo-heat-templates/network/ports/noop.yaml
- OS::TripleO::Compute::Ports::ExternalPort: /usr/share/openstack-tripleo-heat-templates/network/ports/external.yaml
- #OS::TripleO::Compute::Ports::ManagementPort: /usr/share/openstack-tripleo-heat-templates/network/ports/noop.yaml
+ OS::TripleO::Compute::Ports::InternalApiPort: |-
+ /usr/share/openstack-tripleo-heat-templates/network/ports/noop.yaml
+ OS::TripleO::Compute::Ports::StorageMgmtPort: |-
+ /usr/share/openstack-tripleo-heat-templates/network/ports/noop.yaml
+ OS::TripleO::Compute::Ports::StoragePort: |-
+ /usr/share/openstack-tripleo-heat-templates/network/ports/noop.yaml
+ OS::TripleO::Compute::Ports::TenantPort: |-
+ /usr/share/openstack-tripleo-heat-templates/network/ports/noop.yaml
+ OS::TripleO::Compute::Ports::ExternalPort: |-
+ /usr/share/openstack-tripleo-heat-templates/network/ports/external.yaml
+ # OS::TripleO::Compute::Ports::ManagementPort:
+ # /usr/share/openstack-tripleo-heat-templates/network/ports/noop.yaml
# NIC assignments
OS::TripleO::Compute::Net::SoftwareConfig: nics/compute.yaml
diff --git a/build/opnfv-environment.yaml b/build/opnfv-environment.yaml
index 6289e2d9..a8613124 100644
--- a/build/opnfv-environment.yaml
+++ b/build/opnfv-environment.yaml
@@ -1,26 +1,28 @@
-#Environment file used to list common parameters required for all deployment
-#types
+---
+# Environment file used to list common parameters required for all deployment
+# types
parameters:
- # value updated via lib/overcloud-deploy-functions.sh
- #CloudDomain:
+ # # value updated via lib/overcloud-deploy-functions.sh
+ # CloudDomain:
parameter_defaults:
CeilometerStoreEvents: true
NeutronEnableForceMetadata: true
NeutronEnableDHCPMetadata: true
NeutronEnableIsolatedMetadata: true
- # the following parameters are given values via
- # lib/overcloud-deploy-functions.sh when they are used by a scenario
- #NeutronVPPAgentPhysnets: 'datacentre:GigabitEthernet2/2/0'
- #NovaSchedulerDefaultFilters:
- #ComputeKernelArgs:
- #PmdCoreList:
- #OvsDpdkCoreList:
- #OvsDpdkSocketMemory:
- #ControllerExtraConfig:
- #NovaComputeExtraConfig:
+ # NeutronVPPAgentPhysnets:
+ # NovaSchedulerDefaultFilters:
+ # # Kernel arguments, this value will be set to kernel arguments specified
+ # # for compute nodes in deploy setting file.
+ # ComputeKernelArgs:
+ # PmdCoreList:
+ # OvsDpdkCoreList:
+ # OvsDpdkSocketMemory:
+ # ControllerExtraConfig:
+ # NovaComputeExtraConfig:
ExtraConfig:
+ tripleo::ringbuilder::build_ring: false
nova::nova_public_key:
type: 'ssh-rsa'
replace_public_key:
@@ -34,7 +36,7 @@ parameter_defaults:
nova::api::default_floating_pool: 'external'
# VPP routing node, used for odl-fdio only.
# value updated via lib/overcloud-deploy-functions.sh
- #opendaylight::vpp_routing_node: overcloud-novacompute-0.opnfvlf.org
+ # opendaylight::vpp_routing_node: overcloud-novacompute-0.opnfvlf.org
ControllerServices:
- OS::TripleO::Services::CACerts
- OS::TripleO::Services::CephMon
diff --git a/build/ovs-dpdk-preconfig.yaml b/build/ovs-dpdk-preconfig.yaml
index a4663ff3..91cd6e13 100644
--- a/build/ovs-dpdk-preconfig.yaml
+++ b/build/ovs-dpdk-preconfig.yaml
@@ -1,3 +1,4 @@
+---
heat_template_version: 2014-10-16
description: >
@@ -27,7 +28,7 @@ resources:
OvsDpdkSetup:
type: OS::Heat::StructuredDeployment
properties:
- server: {get_param: server}
+ server: {get_param: server}
config: {get_resource: OvsDpdkConfig}
OvsDpdkConfig:
@@ -81,13 +82,16 @@ resources:
sed -i "s/#group\s*=.*/group = \"root\"/" /etc/libvirt/qemu.conf
ovs-vsctl --no-wait set Open_vSwitch . other_config:dpdk-init=true
if [ -n "$SOCKET_MEMORY" ]; then
- ovs-vsctl --no-wait set Open_vSwitch . other_config:dpdk-socket-mem=$SOCKET_MEMORY
+ other_config="dpdk-socket-mem=$SOCKET_MEMORY"
+ ovs-vsctl --no-wait set Open_vSwitch . other_config:$other_config
fi
- if [[ -n "$pmd_cpu_mask" && -n "$PMD_CORES" ]]; then
- ovs-vsctl --no-wait set Open_vSwitch . other_config:pmd-cpu-mask=$pmd_cpu_mask
+ if [ -n "$pmd_cpu_mask" ]; then
+ other_config="pmd-cpu-mask=$pmd_cpu_mask"
+ ovs-vsctl --no-wait set Open_vSwitch . other_config:$other_config
fi
- if [ -n "$dpdk_lcore_mask" && -n "$DPDK_CORES" ]]; then
- ovs-vsctl --no-wait set Open_vSwitch . other_config:dpdk-lcore-mask=$dpdk_lcore_mask
+ if [ -n "$dpdk_lcore_mask" ]; then
+ other_config="dpdk-lcore-mask=$dpdk_lcore_mask"
+ ovs-vsctl --no-wait set Open_vSwitch . other_config:$other_config
fi
systemctl restart openvswitch
diff --git a/build/virtual-environment.yaml b/build/virtual-environment.yaml
index f87879cf..399a3120 100644
--- a/build/virtual-environment.yaml
+++ b/build/virtual-environment.yaml
@@ -1,3 +1,4 @@
+---
parameter_defaults:
controllerExtraConfig:
heat::api_cloudwatch::enabled: false