20 Commits

Author SHA1 Message Date
Kevin Carter
5e3719d21e
Improve the ability to enable swap
This change will imporve the ability to enable a swap partition should
one be present. The updated script will now use the label when defined
and found, it then will look for a partition in the /etc/fstab file prior
to writing the file system entry. This resolves an issue where if this
template was executed more than once, a given partition would be written
to the /etc/fstab file repeatedly. If a given label is undefined the
script will look for swap filesystem types and use the UUID of the given
swap filesystem to enable swap functionality. This improvement will
ensure hosts that have swap partition already created, but potentially
unlabled, are able to be handled correctly. This will work with LVM,
Logical, Primary partition types.

Change-Id: I60a1f427d4f58ae559c797f37f8230d6eb694e1d
Signed-off-by: Kevin Carter <kecarter@redhat.com>
2020-02-20 17:41:04 -06:00
Emilien Macchi
e6fe9ff3d9 Remove mac_hostname & random_string
These resources aren't used anymore and are leftovers from previous Heat
resources which don't exist anymore.

Change-Id: I4b33df191c4eb3cd961bbdbaf6ef28844de6d1a9
2019-07-18 19:10:31 +00:00
Rabi Mishra
39a5545c41 Change OS::Heat::*Deployments to OS::Heat:*DeploymentGroup
Those are hidden resource types in heat. Changing these types
would not result in replacement of the resources.

Change-Id: I22d23a8f187263bd36e364f0cd3301c830f3220b
2019-07-04 20:21:06 +05:30
Carlos Camacho
44ef2a3ec1 Change template names to rocky
The new master branch should point now to rocky.

So, HOT templates should specify that they might contain features
for rocky release [1]

Also, this submission updates the yaml validation to use only latest
heat_version alias. There are cases in which we will need to set
the version for specific templates i.e. mixed versions, so there
is added a variable to assign specific templates to specific heat_version
aliases, avoiding the introductions of error by bulk replacing the
the old version in new releases.

[1]: https://docs.openstack.org/heat/latest/template_guide/hot_spec.html#rocky
Change-Id: Ib17526d9cc453516d99d4659ee5fa51a5aa7fb4b
2018-05-09 08:28:42 +02:00
Michael Henkel
4b2ef6887a Removal of Contrail templates
As a preparation for the new contrail microservices current templates are
removed.

Change-Id: Iea61fefe9a147b96cf00a008bbb61a482eb95a75
Closes-Bug: 1741452
2018-01-06 15:25:09 +00:00
Zuul
410027d64f Merge "Add name property where missing" 2017-12-05 18:07:49 +00:00
James Slagle
7a3fc67559 Add name property where missing
All SoftwareDeployment resources should use the name property when using
config-download.

This also adds a validation to check that the name property is set in
yaml-validate.py

Change-Id: I621e282a2e2c041a0701da0296881c615f0bfda4
Closes-Bug: #1733586
2017-12-04 18:01:52 -05:00
Carlos Camacho
927495fe3d Change template names to queens
The new master branch should point now to queens instead of pike.

So, HOT templates should specify that they might contain features
for queens release [1]

[1]: https://docs.openstack.org/heat/latest/template_guide/hot_spec.html#queens

Change-Id: I7654d1c59db0c4508a9d7045f452612d22493004
2017-11-23 10:15:32 +01:00
Michael Henkel
aa5194f878 Contrail network realignement + DPDK enablement
This patch moves Contrail roles communication from public/external
to internal_api network for OpenStack API.
It also adds the option to enable dpdk.
Monolithic firstboot script is broken down into small pre-network
and per-node extraconfig scripts

Change-Id: I296a3bf60cef6fa950fd71d6e68effe367d1e66b
Closes-Bug: 1698422
2017-07-25 18:24:13 +02:00
Carlos Camacho
0a0e2ee629 Update the template_version alias for all the templates to pike.
Master is now the development branch for pike
changing the release alias name.

Change-Id: I938e4a983e361aefcaa0bd9a4226c296c5823127
2017-05-19 09:58:07 +02:00
Carlos Camacho
92e203aab6 Fix for AllNodesExtraConfig and fix environment files to create swap files/partitions
This submission:

 - Fix an error in the AllNodesExtraConfig resource.
   (Can't merge servers multiple times).
 - Add environment files to deploy swap file/partition
   without manual edit over the templates.
 - If a swap partition is mounted without having it available
   the deployment will fail, the fix checks that if the
   partition is not created then the deployment continues.
 - Removing empty extra lines in swap templates.
 - Adjust description and remove unnecessary comments in
   swap templates.

Closes-Bug: 1652184

Change-Id: I828bbbbd4c178956aac74af49f80fcd4f62fa16b
2017-01-16 15:47:50 +01:00
Steven Hardy
3c6ec654b4 Bump template version for all templates to "ocata"
Heat now supports release name aliases, so we can replace
the inconsistent mix of date related versions with one consistent
version that aligns with the supported version of heat for this
t-h-t branch.

This should also help new users who sometimes copy/paste old templates
and discover intrinsic functions in the t-h-t docs don't work because
their template version is too old.

Change-Id: Ib415e7290fea27447460baa280291492df197e54
2016-12-23 11:43:39 +00:00
Michele Baldessari
9393a3e2a5 get_param calls with multiple arguments need brackets around them
This issue was spotted during major upgrade where we had calls like
this:

   servers: {get_param: servers, Controller}

These get_param calls are hanging indefinitely and make the whole
upgrade end in a timeout. We need to put brackets around the get_param
function when there are multiple arguments:
http://docs.openstack.org/developer/heat/template_guide/hot_spec.html#get-param

This is already done in most of the tree, and the few places where this
was not happening were parts not under CI. After this change the
following grep returns only one false positive:

   grep -ir get_param: |grep -v -- '\[' |grep ','

Change-Id: I65b23bb44f37b93e017dd15a5212939ffac76614
Closes-Bug: #1626628
2016-09-25 22:05:00 +02:00
Steven Hardy
b738e9ca78 Convert AllNodesExtraConfig to support composable roles
This adjusts the interface to OS::TripleO::AllNodesExtraConfig so
it supports custom/composable/optional roles.

Note this does break backwards compatibility, and I can't see any way
to avoid that.  I've converted the in-tree templates, and we'll have
to document carefully and or provide a script (or automated conversion
via mistral perhaps?) to allow folks to easily adjust any out of tree
templates to the new format.

Basically you just have to:

1. Remove all the *_servers parameters, replace with one "servers"
   json parameter

2. Replace references to e.g "controller_servers" with "servers, Controller"
   which does a path-based lookup into the json map provided by overcloud.yaml

Change-Id: I5eebf853646b2f6300d6b542fcd4f43e82d3b413
Partially-Implements: blueprint custom-roles
2016-09-16 00:24:44 +00:00
Steven Hardy
fe1f8a8c86 Convert AllNodesExtraConfig to OS::Heat::None
Instead of creating a nested stack, as it's slightly lower overhead
and will make things easier when adding custom roles (where a
hard-coded default template can't work)

Change-Id: If9f8294ba477d1c1364e19a52152905a2c02e959
2016-07-05 17:48:28 +01:00
Steven Hardy
7ff66b9af1 Remove config_identifier from all_nodes extraconfig examples
Since https://review.openstack.org/#/c/315616 this is no longer
required.

Change-Id: I0452d1577a25d19b4351bfe7830a6c7bbe485e67
2016-07-05 17:46:23 +01:00
James Slagle
94f580370d Add an environment to use a swap partition
This environment can be used with AllNodesExtraConfig to enable swap on
a device with the given label as specified by the swap_partition_label
parameter.

If Ironic is used to create the swap partition, the partition will have
a label of swap1, so that's a reasonable default for the parameter.

The partition is also written to /etc/fstab as a swap mount so that it
will be enabled on reboot.

Change-Id: I5cd68c13dbfe53eecf6c6ad93151eadc980a902d
2016-03-06 16:06:18 -05:00
James Slagle
570bf54311 Support adding a swap file to overcloud nodes
Create a new SoftwareDeployment that can be used to add a swap file to
all nodes The amount of swap and the location of the swap file can be
customized via parameter_defaults and the swap_size_megabytes/swap_path
parameters.

Change-Id: I1fb14c0fab2255410fceb26c3a7d5cfe0ba57b3b
2016-03-01 14:29:22 -05:00
Steve Baker
1733d74392 Set the name property for all deployment resources
There are two reasons the name property should always be set for deployment
resources:
- The name often shows up in logs, files and API calls, the default
  derived name is long and unhelpful
- Sorting by name determines the merge order of os-apply-config, and the
  execution order of puppet/shell scripts (note this is different to
  resource dependency order) so leaving the default name results in an
  undetermined order which could lead to unpredictable deployment of
  configs

This change simply sets the name to the resource name, but a future change
should prepend each name with a run-parts style 2 digit prefix so that the
order is explicitly stated. Documentation for extraconfig needs to clearly
state what prefix is needed to override which merge/execution order.

For existing overcloud stacks, heat currently replaces deployment resources
when the name changes, so this change
Depends-On: I95037191915ccd32b2efb72203b146897a4edbc9

Change-Id: Ic4bcd56aa65b981275c3d4214588bfc4de63b3b0
2015-12-10 14:48:04 +13:00
Steven Hardy
196e6f3ff6 Add "AllNodes" ExtraConfig interface
Adds hook to enable additional "AllNodes" config to be performed prior
to applying puppet - this is useful when you need to build
configuration data which requires knowledge of all nodes in a cluster,
or of the entire deployment.

As an example, there is a sample config template which collects the
hostname and mac addresses for all nodes in the deployment then writes
the data to all Controller nodes.  Something similar to this may be
required to enable creation of the nexus_config in
https://review.openstack.org/#/c/198754/

There's also another, simpler, example which shows how you could share
the output of an OS::Heat::RandomString between nodes.

Change-Id: I8342a238f50142d8c7426f2b96f4ef1635775509
2015-09-17 15:50:35 +01:00