26 Commits

Author SHA1 Message Date
Harald Jensås
7b9199de95 os-net-config-mappings move out of firsboot
Define the parameter NetConfigDataLookup in overcloud.yaml,
and write it's content into ansible group_vars. The parameter
was previously used in the firstboot heat software config
resource firstboot/os-net-config-mappings.yaml. With nova-less
none of the firstboot software configuration resource can be
used. The depends-on change in tripleo-ansible will parse the
lookup data, and write the os-net-config mapping file.

Depends-On: https://review.opendev.org/749669
Change-Id: I583bf17c0020bb2a90f885ece0cd5684fc27a980
Blueprint: nova-less-deploy
2020-09-07 13:26:08 +00:00
Zhu Sheng Li
a13b7f07f8 Add resource claim in the environment example
The customized interface mapping will not take effect unless we
explicitly claim `NodeUserData` resource in the environment file.

Change-Id: I567e5a43a86d31c03adfa41cffd6d597858eaa40
2020-06-08 12:33:43 +08:00
Lucas Alvares Gomes
373a27163e Replace chronyc "waitsync" with "makestep"
Prior to this patch we had the "chrony waitsync" command with a
hardcoded timeout of "20". Sometimes that wasn't enough when deploying
on some slower machines in my experience [0].

This patch is changing the "waitsync" command to "makestep", that way
we tell chronyd to make the system clock correct immediately (instead
of gradually correcting the time). It should be fine for our usecase
because these are ran during the deployment.

[0] http://paste.openstack.org/show/783888/

Change-Id: I07057eb089585f43346c44a03ae50aa2ac837fd7
Signed-off-by: Lucas Alvares Gomes <lucasagomes@gmail.com>
2019-10-15 15:47:57 +01:00
Alex Schultz
eafe390853 Try a timesync as part of first boot
We're running into issues where if someone creates a firstboot script
that touches a file that will eventually be mounted into a container, it
can fail if the time of the file ends up being in the future due to a
later timesync. Let's try a basic timesync bootstrap as part of
cloud-init to address the case of configuration changes occuring prior
to the host_prep_tasks where we traditionally configure chrony/ntp

Depends-On: https://review.opendev.org/#/c/659398
Change-Id: I294eba826b98c5793336815282f766e3d2e60a51
Related-Bug: #1776869
2019-05-20 21:34:50 +00:00
Alex Schultz
e2a8a494c5 Handle upper and lower case system uuids
We need to be able to handle when system uuids are upper or lower case
because newer versions of dmidecode have normalized to lower case. Users
who were on CentOS/RHEL 7.5 and older may have per-node customizations
with upper case which turn lowercase with an update to 7.6. This affects
hieradata customizations as well as os-net-config mapping files. This
change outputs both an upper and lowercase hieradata uuid file to handle
the both versions of the UUID. Additionally this change normalizes the
id comparison for os-net-config mappings to lower case.

Change-Id: I65f46056f8a908c60c99d1cee3738344a0bce6b7
Closes-Bug: #1816652
2019-02-19 12:58:54 -07:00
Alex Schultz
1e5ccb4c7d Handle python binary look for scripts
We have some scripts that we deploy via tripleo that use inline python.
For this we need to be able to find an available python on the system in
order for it to work. This change adds a lookup function to the scripts
to find a working version of python as /usr/bin/python may not exist.

Change-Id: Ida7a7cbd064ebdb923f38c9102eb4b0771f9b273
Related-Blueprint: python3-support
2018-11-26 16:48:51 +00:00
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
waleed mousa
bbc8e0ac3e Adding a workaround for enabling steering in ConnectX-3 devices
This file will add this configuration
"options mlx4_core log_num_mgm_entry_size=-1" to
/etc/modprobe.d/mlx4.conf file in order to enable steering in
ConnectX-3 devices and then will rebuild the initramfs at the first
boot stage

Change-Id: Ia64e62e7fdb70e19be7b0a5cee163bd03c6de65d
2018-02-26 06:55:51 +00: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
Andreas Karis
397a5cc207 Case insentitive MAC address matching in OsNetConfigMappings
OsNetConfigMappings should be case insensitive in
os-net-config-mappings.yaml
This patch casts all MAC addresses to lower case.

Change-Id: Ide18660a3a8063cfdf53500cd727c8f49407b436
Closes-Bug: 1709653
2017-09-10 15:05:00 -04:00
Jenkins
ee5a92b953 Merge "Don't curl metadata server in userdata example" 2017-08-09 04:41:12 +00:00
Steve Baker
05f773006a Don't curl metadata server in userdata example
The metadata server is switched off in
I45ae6d0e3726cc71c7dc35a9a47da8b7a0bab9cb, so this example has been
updated to use os-apply-config to fetch the ssh key instead.

Change-Id: I82b05f9b35ffc6ea2cee9a64d5702c0404cd47de
2017-07-26 10:14:30 +12: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
Jenkins
2da6d7f1c2 Merge "Add support for node groups in NetConfigDataLookup" 2017-02-23 03:51:37 +00:00
Michael Henkel
da91bb6e1e Re-organizes Contrail services to the correct roles
In current setup some Contrail services belong to the wrong roles.
The Contrail control plane can be impacted if the Analytics database has
problems.

Change-Id: I0d57a2324c38b5b20cc687c6217a7a364941f7e6
Depends-On: Id0dd35b95c5fe9d0fcc1e16c4b7d6cc601f10818
Closes-Bug: #1659560
2017-02-08 20:25:41 +01:00
Steven Hardy
724ba3a32f Add example showing how to set root password via cloud-init
There have been some requests to enable this, and although it's not
something we should enable by default, this shows how you can use
the generic NodeUserData interface to have cloud-init do it.

To use this you create an environment file like:

resource_registry:
  OS::TripleO::NodeUserData: path/to/userdata_root_password.yaml
parameter_defaults:
  NodeRootPassword: insecure_changeme

Obviously this isn't that secure, and thus isn't intended for
production environments, but it may be useful for debugging and
as a further example showing how to configure things via cloud-init.

Change-Id: If87a1e1dbfaf31b84cc0667c9a60bbd3c757d8cd
2017-01-04 18:07:13 +00: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
Harald Jensas
ed2ed55ffb Add support for node groups in NetConfigDataLookup
By using DMI String as identifier, such as 'system-product-name'
or 'system-version' add support for node groups. This allow the
use of a single entry in 'NetConfigDataLookup' to match a group
of systems of the same model, vendor etc.

Try to match on ethernet mac address first, then if no match is
found 'dmiString' and 'id' is used, if the keys are set.

Example:

  NetConfigDataLookup:
    node1:
      nic1: "00:c8:7c:e6:f0:2e"
    node2:
      nic1: "00:18:7d:99:0c:b6"
    node3:
      dmiString: 'system-version'
      id: 'ThinkPad T460p'
      nic1: enp0s31f6
    # Dell PowerEdge R630 - nodegroup
    nodegroup1:
      dmiString: "system-product-name"
      id: "PowerEdge R630"
      nic1: em3
      nic2: em1
      nic3: em2
    # Cisco UCS B200-M4 - nodegroup
    nodegroup2:
      dmiString: "system-product-name"
      id: "UCSB-B200-M4"
      nic1: enp7s0
      nic2: enp6s0

Change-Id: Ie2547cd8805c57ed9afe7362eada802580ffc215
2016-12-05 00:11:24 +01:00
Harald Jensas
06d4d088ad No longer hard coding to a specifc network interface name.
Instead of using a specific network interface name, thi fix
fetch all ethernet mac addresses. Then uses this list of
mac addresses to do a check if any entries in the list
match any of the values in NetConfigDataLookup for a node.
If there is a match, the /etc/os-net-config/mapping.yaml
file for the node will be written.

This fix removes the hard coded interface name 'eth0' used
to get a mac address as identifyer for the specific node
before. Using a hard coded interface name such as 'eth0'
would have failed on most hardware because of "consistent
network device names".

    Fix Bug: #1642551

Change-Id: I6c1d1b4d70b916bc5d9049469df8221f8ab2eb95
2016-11-17 23:34:43 +01:00
Steven Hardy
b4bfc17728 Add an optional extra node admin ssh key parameter
This can be used to pass the e.g. the tripleo-validations ssh key into
the deployment.

Change-Id: I861b9e2252a9c8122dcf7df261386f1ea5200c4f
Related-Bug: #1635226
2016-11-07 12:19:14 +01:00
Steven Hardy
8a0f5efc1a Add example of creating per-node os-net-config mappings
Adds an example of proving a mapping file for all nodes, then
extracting the data for each node based on a lookup of the mac address.

Some assumptions are made (e.g the hard-coded reference to eth0), but
it should be easily modified to suit specific environments.

Usage via an enviroment file will look like:

resource_registry:
  OS::TripleO::NodeUserData: os-net-config-mappings.yaml
parameter_defaults:
  NetConfigDataLookup:
    host1:
      nic1: "00:c8:7c:e6:f0:2e"
    host2:
      nic1: "00:18:7d:99:0c:b6"

Note this version requires liberty heat in the undercloud due to the
use of a new str_replace feature to serialize the json parameter.

Change-Id: I7da9c9d8805e676a383e888a7d77f05d3432ab12
2016-07-01 14:34:39 +01:00
Swapnil Kulkarni (coolsvap)
b49a96da29 Update typos
Change-Id: Id63c1bcfc34058eb7285698ba9bf86d1cf2025a6
2015-11-24 19:20:35 +05:30
Steven Hardy
d578cf1ac0 Add NodeAdminUserData interface for "heat-admin" user
Reinstates the heat-admin user via template user-data, which
replaces the previous boothook injected user provided by the
(deprecated now removed) heat instance_user option.

This has some advantages over the heat.conf option, e.g it allows
for much easier customzation of the user configuration (additional
SSH keys, adding groups etc), and also in future if we support
deploying more than one overcloud you could specify a different
user per deployment.

Co-Authored-By: Dan Prince <dprince@redhat.com>
Change-Id: I2235b9690c01542d8a28ec1c1a4607de751aea29
Closes-Bug: #1229849
2015-09-03 13:56:16 +01:00
Jiri Stransky
91e80992d4 Firstboot rsync for development purposes
Could be used to e.g. make changes to the puppet modules on the fly
without the need to rebuild images. Documented in the template
description.

Change-Id: I6a1fef20d4f4afa4bedac5ea520949697793f0ed
2015-05-04 15:47:58 +02:00
Steven Hardy
723db1317c Enable passing optional first-boot user-data
Currently all the OS::Nova::Server resource created don't pass any
user-data.  It's possible to pass user-data as well as using heat
SoftwareConfig/SoftwareDeployment resources, and this can be useful
when you have simple "first boot" tasks which are possible either via
cloud-init, or via simple run-once scripts.

This enables passing such data by implementing a new provider resource
OS::TripleO::NodeUserData, which defaults to passing an empty mime
archive (thus it's a no-op).  An example of non no-op usage is also
provided.

Change-Id: Id0caba69768630e3a10439ba1fc2547a609c0cfe
2015-04-24 10:18:31 +01:00