- parametrize BMC credentials.
- adding ability to set variables from the ENV to avoid sensitive
data leak to a terminal or process listing.
'required=True' has been removed from the '--instance' parameter
to allow setting it from the ENV.
Change-Id: Ida5df11fc3c50dcdabd2741b9a8abfa5fb87ed45
Currently every auth attribute (including every service endpoint
version) ends up in the generated BMC clouds.yaml, but most of these
values are not required and are discovered via the catalog.
This change builds a bare-minimal clouds.yaml.
Change-Id: Ic408cefa03f0c1ae7ba00fa891aa4bf3f81b3d1e
build-nodes-json now has an --interface argument which allows setting
any of the supported ironic node interfaces. For example, the
following will result in "boot_interface": "pxe" being set for every
node entry:
--interface boot=pxe
Change-Id: I209456464e5e605f777b02869e3aae4c9c192fe5
OVB correctly detects when the image is UEFI boot enabled and sets
boot_mode:uefi. However non-UEFI images will use the ironic configured
default, and this will soon change from 'bios' to 'uefi'.
This change explicitly sets to boot mode to either 'bios' or 'uefi'
based on discovered image properties so that ironic defaults can
change without causing CI failures.
Change-Id: If97d33aee65a05f6fb860eb4f3c1655bc4605908
When there are less bmc_ports, compared to bm_ports filter
away bm_ports without a match bmc_port and set up the
baremetal to bmc pairs in bmc_bm_port_pairs.
All bm_ports are returned, and used with the new separate
function to build network_details. The new bmc_bm_port_pairs
is used with the _build_nodes method to create the a "nodes"
section containing only the bm nodes with a bmc port peer.
This is useful when using multiple roles, where one role
is hosting extra nodes that is not intended as virtual
baremetal nodes.
Change-Id: Ifc36d15b72c7421d7e0ec810d1ead17f4232b3ab
The mac field in TripleO nodes JSON has been deprecated
since Rocky. Let's switch to use the 'ports' field by
default.
Add the argument '--use-mac' to allow the user to choose
to use the legacy "mac" field.
Change-Id: I3728bb8589a82fea71f54505c6f7c17e79d8378e
It's needed when environments/create-private-network.yaml
is used with ovb jobs where '--id' is used, in this
case each ovb env should have seperate private network
with different id.
Related-Change: https://review.rdoproject.org/r/#/c/32142/
Change-Id: Icf5c87ae1ab083a143a0f3f8a991426bb5433c37
When using routed networks it is required to set the
physical_network property for baremetal ports. The
'--physical-network' option makes the build-nodes-json
command add this.
Whith this change the '--id' arg can be used with the
build-nodes-json command to strip the id added with the
deploy commands '--id' option from the resource name
when setting the physical_network property.
Usage:
ovb-build-nodes-json --env my-env.yaml \
--nodes_json instackenv.json \
--physical_network \
--id <ID-to-strip>
Change-Id: Ic5fea591464a9f8bb91bcaef9a99d0b9e994e19e
Add prefix support for radvd and dhcrelay instances.
Also adds missing parameters for these instances in
the sample env generator environment.
Change-Id: I86bd6b014b62c3a382458f68443cfb02ed2e7031
Now that we no longer support py27, we can use the standard library
unittest.mock module instead of the third party mock lib.
Change-Id: I78a70c535950f645fcb3a5f1e820d70cc6958d36
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
Inside newer deployments of OpenStack, it's possible that powering
on takes quite sometime especially with a large amount of ports
attached to the VM. This is because Nova has to unplug and plug
all of the ports which can take a period of time.
During the period of time that Nova is starting the instance up,
the state of the VM is 'powering-on' and eventually it becomes
ACTIVE. However, the IPMI status value presented is still offline
which is inaccurate.
In order to model this more towards a real bare metal environment,
we now maintain that 'powering-up' means the instance is active
which will let tools be able to move on with other steps like
PXE boot which was going to take sometime anyways.
If the booting fails, the instance will likely timeout and fail to
provision anyways, so we don't really lose much and on the next
refresh we'll figure out that state is SHUTOFF with no task state.
Change-Id: Ifa4d0152ec3086ef2e2b65e03a4499798964b78e
When using pre-deployed servers, you may want all of the networking
setup of OVB but don't actually need to control the instances via
IPMI. While this could already be done, it left a useless BMC
instance lying around. This change allows the BMC to be disabled
completely to clean up such environments.
Change-Id: Icd6936977684d178277ebb721a7fbb3ffad51d9a
Previously no entry points were defined for the OVB scripts because
they were intended to be used directly out of the bin directory.
However, because of changes in the way Python 3 handles relative
imports we can't continue to do that going forward, so we need to
be able to pip install OVB and have callable binaries.
This adds entry points for the necessary user-called files, but
does not yet update the documentation as the previous method
should still work. Once the pip version has been more thoroughly
tested the docs will be updated to the new method.
Change-Id: I158f58a58314c985baaeb7309cee6f284cb53985
Also fixes a python 3 issue that was causing these tests to fail.
Note that I don't think we need to worry about supporting py35 in
this repo. I believe the only python 3 platforms we'll ever use it
on are py36 or higher.
Change-Id: I4ade3e0ae1ffa2253d998275f73044cacf656c0e
Without this I don't think we can merge any patches. Just a minimal
one for now while we sort out which jobs need to and can run on this
repo.
Also fixes a pep8 error so this can pass the pep8 job.
Change-Id: If2601ecd3d3596455d9826a9a0e1c5c8c27d3aab
Now that nodes.json contains the name of the baremetal instances,
there's no need to have a separate mapping file for the bmc ips.
This has been deprecated for close to a year, so let's remove it
in 2.0.
For ease of migration to OVB 2.0, let's provide a compatibility
interface from the old names. A deprecation warning is also added
to deploy.py to notify users that they are using outdated
environments and should switch.
port-security.yaml is not symlinked because there's no analog in
OVB 2.0. port-security.yaml is just the default now. I suppose that
could be an empty file, but I'm not sure anyone is using it
anyway so for the moment I'm omitting it. That decision can be
revisited if necessary.
It hasn't been recommended to pass settings in via the parameters
section for quite a while now, and in 2.0 let's remove it completely.
This simplifies a lot of the logic around id and role processing.
Previously the id was always appended, but when the network names
were inherited from the parent data they already had it. This change
looks for whether the name already ends in -id and if so it skips
the id addition.
Revert the change to _process_role() method done in commit:
c1364026fa. Passing networks
will only be supported via parameters_defaults.
Update the unit tests to include the data in parameter_defaults.
When deploying routed networks using quintupleo and roles
without '--id' arg specified the role stack fail with
property error:
resources.internal_port.properties.network: \
Error validating value 'overcloud_internal-None'
By only appending id if arg.id is set, the above problem is
fixed.
Additionally: The TripleO undercloud hard codes the physical
network for the provisioning network which is L2 local to the
undercloud to 'ctlplane'.
It makes sense to set the following in ovb environment:
provision_net: ctlplane
provision_net2: ctlplane-leaf1
provision_net3: ctlplane-leaf2
By ommitting the '-id <id>' parameter in combination with the
above the nodes.json build by build-nodes-json works out of
the box.
When using routed networks, i.e multiple provision networks
passing in the evironment file to build-nodes-json did'nt work.
It resulted in key errors when looking up the mac address of the
provision_net interface.
This change automates this by creating a provision_net_map, mapping
baremetal_port id's to subnet names.
Also deprecates the --provision-net option as it is no longer needed.
The role does not always override the network information.
Update the networks in role_env, get the network from
parameter_defaults, fallback to parameters if not set and
finally if the netwok is not in parameters set default.
Also make default for networks: in templates json instead
of literal string.
Previously routed networks only worked when --id was not used with
deploy.py. This adds the routed networks to the list of parameters
that can be updated with an id.
For a routed network topology we want to be able to deploy roles
that don't necessarily connect to the same networks as the base
role. By default the behavior will be the same as before, but now
it will be possible to override the parameters in a role env.
Clearly the shutdown action should not have had a target_status of
ACTIVE. This should only have impacted bmcs using the status cache,
which is off by default.
Previously the flavor size was used unconditionally, which in the
boot from volume case would generally be incorrect. This is
particularly problematic with flavors of a 0 disk size that can only
be used with boot from volume as the resulting Ironic nodes appear
to have no storage.
This change adds functionality to look up the volume size if we
detect that a baremetal instance was booted from volume.
When deploying an environment with --id, it is possible for the
input env file to be overwritten. For example, consider the deploy
command `bin/deploy.py --quintupleo --id foo -e env-foo.yaml`.
Because the output id env file would be named the same as the input
env file the input env file would be overwritten and lost.
This change prevents such a situation by checking for an input env
file named 'env-ID.yaml' and raising an error if one is found.
When multiple environment support was added, backwards compatibility
was supposed to be maintained by setting the env list to env.yaml
if no envs were passed. Unfortunately, this was done _after_ the
env list was read so it was ineffective.
This is a fairly uncommon use case as most OVB deploys will use at
least one environment file these days, but it should work so this
commit fixes it.
This is useful as a general way to easily retrieve the assigned
network addresses for all the deployed nodes. This also deprecates
the --add_undercloud parameter as those details will be included
in the network_details data.
When deploying a large number of nodes in a single role, it may be
necessary to specify a larger bmc flavor. Allowing override of that
parameter allows that to happen without requiring all roles to use
the larger bmc.