47 Commits

Author SHA1 Message Date
Dougal Matthews
bb639bc65c Remove mistral from the introspection workflows
This change removes all of mistral from the introspection workflows
by calling the new introspection playbook.

Story: 2007212
Task: 38444
Task: 38445

Depends-On: I7ba8a31b71ed5bc9bdd944769ea472b537c83a98
Change-Id: I48bedfe9a705f5ff8e0eed1f852b77938d53c763
Signed-off-by: Kevin Carter <kecarter@redhat.com>
2020-03-13 11:07:53 +00:00
Zuul
1badee0c28 Merge "Remove mistral when running the register_or_update workflow" 2020-03-10 23:13:44 +00:00
Kevin Carter
ad9c7a7504
Remove mistral when running the register_or_update workflow
This change removes all of mistral from the register_or_update workflow
by calling the required functions directly.

Story: 2007212
Task: 38442

Closes-Bug: #1866637
Change-Id: Ie85adc64cd4fcec469d6979a424d8f01b00f34f2
Signed-off-by: Kevin Carter <kecarter@redhat.com>
2020-03-09 19:48:56 -05:00
Steve Baker
74d4b37cde baremetal provision expose concurrency and timeout
These arguments are available in the workflow but are not exposed as
arguments. This change fixes that, allowing users to tune for their
environment.

The new ansible version of this command already has these arguments
(next change in this series)

Change-Id: I00b224ec7e2334afd2dfe549f36dbec2987a1be1
2020-03-10 08:49:47 +13:00
Kevin Carter
af749d1a6a
Use correct default key file and normalize the usage
The provision command was defaulting to id_rsa.pub, however the deploy
command uses id_rsa_tripleo for initial setup.

When using the deploy command for provision as well, use the public
key, not the private id_rsa_tripleo.

This option was being processed in several different ways, this change
normalize it by creating a single function in the Command class, which
all inheriting methods will consume. Tests have been updated to
accomodate this change.

Related-Bug: #1863920
Change-Id: I221480f3cfc77545a8fcbef777829239c3bad0a0
Signed-off-by: Kevin Carter <kecarter@redhat.com>
2020-02-20 08:52:09 -06:00
Kevin Carter
dc9ae1ac5b Remove mistral from the config_download deploy workflow
This change removes all of mistral from the config_download_deploy function
by calling the required functions directly.

- All of the inputs within this function have been cleaned up and documented.
- New log entires will be created when using this method giving the deployer
  a better overall user experience.
- To ensure we're able to support the ability to reproduce commands, the ssh
  args extravar has been moved to an environment variable.
- The methods get_config and get_key have been moved to the utils module.
  This was done to help avoid circular imports.

Update methods have been changed to execute without running within a mistral
workflow. This was changed because there's no need to support the multiple
code paths anymore given config_download is now running directly.

Test classes have been updated to reduce duplication.

With the new streamlined execution process we should see improved deployment
times and better visability into the deployment process.

Task: 38422
Story: 2007212

Depends-On: I006291a2465aa4c950abce76f9e5f9459b76e330
Change-Id: Ide1a4503dd2bdd2d5e494cd1eac483b842a21acf
Co-authored-by: Luke Short <ekultails@gmail.com>
Co-authored-by: Dougal Matthews <dougal@dougalmatthews.com>
Signed-off-by: Kevin Carter <kecarter@redhat.com>
2020-02-14 23:40:16 +00:00
Steve Baker
bd9302d552 openstack overcloud node delete --baremetal-deployment
This change integrates baremetal provisioning with the existing
"openstack overcloud node delete" command.

Instead of providing node ID(s), the --baremetal-deployment argument
will specify the provisioning yaml with instances set to
provisioned:false for the nodes to be deleted.

Internally the command needs to expand the roles and compare the
indexes of unprovisioned instances with the indexes of the heat
resources in the server resource group, using the match to specify the
heat resource physical_resource_id to pass to the scale down workflow,
automating what is done for deployed-server scale-down[1].

Blueprint: nova-less-deploy
[1] https://docs.openstack.org/project-deploy-guide/tripleo-docs/latest/features/deployed_server.html#scaling-down

Change-Id: I3376378cdffbe69b8d14aed683deba185ba1e0f5
2019-11-27 00:02:40 +00:00
Steve Baker
4a568fd7ea Improvements to unprovision command
- print a table of baremetal nodes which are about to be unprovisioned
- prompt user to confirm unprovision, overridable with --yes argument
- add an -all argument which will unprovision all nodes in the yaml,
  instead of just the provisioned:false nodes.
- add the missing plan argument to the provision deploy_roles to
  support multiple overcloud stacks

Blueprint: nova-less-undercloud

Change-Id: I25c5311ec3599e0de9bd87038366ed8c7d7896a2
2019-10-30 12:31:59 +13:00
Daniel King
3f5ddb8fb4 Removed references to bm-deploy images
Previously, kernel and ramdisk images had been
removed from glance in favor of using them directly from the
filesystem. However, some references to these images remained in a
couple of test scripts and also for node discovery where they were
being used as the default. The images being used were
bm-deploy-kernel and bm-deploy-ramdisk.

The change requiring this update was made in commit 7ad1b812fc and
can be found at review https://review.opendev.org/#/c/663897/

In tripleoclient/v1/overcloud_node.py, replaced the default kernel and
ramdisk image names with paths to the current default locations, and
adjusted tripleoclient/tests/v1/overcloud_node/test_overcloud_node.py
to use these paths in the test.

In tripleoclient/tests/v1/overcloud_image/test_overcloud_image.py,
removed mentions of these images in the image list as they no longer
appear as available images in a live setup. This rule change would
have correctly caused test failures for missing images before
overcloud_node.py was updated.

Closes-Bug: #1845698
Change-Id: Ia556e09b7e92ed16e50061ccfbd002af61252092
2019-10-02 10:45:09 -04:00
Steve Baker
2a0266dae1 New command "openstack overcloud node unprovision"
This is a companion command to "openstack overcloud node provision"
which is required for scale-down and should be run after "openstack
overcloud deploy".

It will undeploy any instance which has provisioned=False in the
supplied roles yaml, see this change[1] for the provisioned format.

[1] https://review.opendev.org/#/c/672605/

Change-Id: Ic7705c290220df7c55656fa080ff74315fb2030f
Blueprint: nova-less-deploy
Depends-On: https://review.opendev.org/#/c/672848/
2019-08-27 04:06:35 +00:00
Alex Schultz
6521585912 Close resources correctly
Under python3 not closing file handles or network resources correctly
results in warnings being shown to the end user. This change switches
the resource usage to properly close when we're done.

Change-Id: Iaf08f7d7b919b154797cf8f10663f349424cd6a2
Related-Bug: #1837393
2019-08-01 16:57:24 -06:00
Steve Baker
3e03e3b78c Add --concurrency argument to introspect commands
The default concurrency of 20 may be too high for small underclouds
(especially CI environments), so this change adds a --concurrency
argument so callers can control the maximum number of nodes
to introspect concurrently.

Depends-On: https://review.opendev.org/#/c/672389/
Change-Id: I9faee9ab133e34466a79aa1176a16106bda1f15d
Closes-Bug: #1836976
2019-07-24 21:10:58 +00:00
Zuul
eaced0d1c7 Merge "nova-less-deploy: stop using glance for ironic-python-agent images" 2019-06-26 08:08:24 +00:00
Dmitry Tantsur
7ad1b812fc nova-less-deploy: stop using glance for ironic-python-agent images
Ironic can use HTTP links or local files, and we already put the images to
a location accessible inside of ironic containers (for introspection).
This change switches to using file images for IPA. The existing Glance
images are not deleted since some nodes may be using them. Multi-arch
layout of [[PLATFORM-]ARCH/]agent.EXT is reused from the unit tests
of the `image upload` command, assuming that's what people are using.

Change-Id: Ie6fa04112e3348f429dc42b28442f8996ab03f29
Implements: blueprint nova-less-deploy
Depends-On: https://review.opendev.org/#/c/663897/
2019-06-14 17:06:56 +02:00
Steve Baker
73bc6f941e Improve yaml output of "openstack overcloud node provision"
The non-default flow style is better at spreading the yaml over
multiple lines, which is better for readability.

Change-Id: Ibb0c6fb927eca279724cd18e4f8fc9669c02e957
Blueprint: nova-less-deploy
2019-06-13 12:18:36 +12:00
Alex Schultz
2b3b7f1e1f Add a user confirmation to node delete
Node delete is a destructive action and we should prompt a user to
confirm they want to do this action. We also added a --yes parameter to
skip this confirmation prompt.

Change-Id: If4a82977e2351fd3a9e0241eee60cb3719ef43c0
2019-05-28 15:07:42 +00:00
Dmitry Tantsur
417d5b2da8 nova-less-deploy: command for deploying nodes with ironic
This changes introduces the command `overcloud node provision` that
takes a file with roles, deployes the requested nodes and creates
an environment file. See the spec for details:
http://specs.openstack.org/openstack/tripleo-specs/specs/stein/nova-less-deploy.html

Change-Id: I806fcbdabf0bb93fa222f3fa76944f0f50267011
Depends-On: https://review.openstack.org/637191
Implements: blueprint nova-less-deploy
2019-03-19 10:18:26 +01:00
Harald Jensås
940ee3279b Add '--provide' option to node clean command
Provide (make available) the nodes once cleaning is
completed.

Also add tests for node cleaning.

Closes-Bug: #1806502
Change-Id: Ic9212236e4372faaf7d43da8958adec5eac9df06
2018-12-11 13:07:46 +01:00
Derek Higgins
4b3fc8479f Stop setting boot_option=local on ironic nodes
This is now the default in ironic on tripleo and
redundant.

Change-Id: I4047298ac5af8a0314ace343518f695144073ff5
Depends-On: I249a1a9e30c06ea15b487e952b91949c606423c5
Related-Bug: #1803965
2018-11-20 16:26:49 +00:00
Tony Breeds
560b79cb1b Actually use the arch and platform to select appropriate images
The prior changes in this series enabled uploading of images tagged in
such a way that they could be used with multiple architectures, this
change uses the data from instckenv.json to select appropriate deploy
images for each node as it's registered to ironic.

Blueprint: multiarch-support
Depends-On: Id82de41e7a49c2d8124fc74125ed51031579aa80
Depends-On: Idaf05b8efce28cd0cbf339cf693db4f55a693d9b
Depends-On: I41dce6e25766562db4366021309b8c2b74a8ab80
Change-Id: I7c84f3035853d8ee7b8d45895e7acce8e9dd3d13
2018-07-10 11:16:27 +10:00
Dmitry Tantsur
373a4b6b2e Add 'overcloud node clean' command to run metadata cleaning on nodes
This is a manual replacement for the disabled automated cleaning.

Depends-On: I909aad89bb18bb416e9749395970617d45b247ee
Change-Id: I8e7f9b1122ff697adb4538233242c7b48420b17b
2018-04-27 15:41:14 +02:00
Tony Breeds
ebc64b681c Add --validate-only to openstack overcloud node import
Previously there was 'openstack baremetal instackenv validate' to
quickly validate an environment file.

Much of which is now done in the validate_nodes mistral workflow.  Add a
mode to cease operations after validating the environment file

Change-Id: Ie2bfc79b45f4652285718be34a5e07ce5777c60d
2018-01-25 12:15:32 +11:00
Zuul
d40016c93a Merge "Add each command to the history file" 2017-12-01 07:51:34 +00:00
Adriano Petrich
715324adf9 Fix for timeouts on scale down
There were two issues: The action timeout and the wait_for_messages
timeout.

The wait_for_messages did not need a timeout here and it was causing the
bug. I added an cli option for the timeout and setup a reasonable
default (the previous default was over 4 hours that would invalidate
keystone session duration)

Change-Id: I232d071516d3f53f9f87143d9d65ebe3e58b0f38
Closes-Bug: 1734712
2017-11-27 10:48:17 -05:00
Dougal Matthews
53d06b7f52 Add each command to the history file
Change-Id: I1e93305426dd94dbbcc8ca70f446dae4a1fa0434
2017-11-27 15:37:00 +00:00
Toure Dunnon
1bd1620ead Tripleoclient unified queue name.
This will allow the cli and tripleo UI to share a common queue,
which will help with scripting the frontend behaviour or track
the progress of the cli from the frontend.

Related-Bug: #1603345

Change-Id: I5849983eee82b5a56cae1bf38a3c2694b6b291db
2017-11-06 13:46:14 -05:00
Dmitry Tantsur
c86212cb76 Add 'overcloud node discover' command
This is the frontend for discover_and_enroll_nodes workflow.

Change-Id: I822ec89add3742020262c091e79ff94f92ef92e7
Depends-On: I158f0b8f5251d9d94e7e57b3fe24362316d26599
Implements: blueprint node-discovery-by-range
2017-06-09 13:41:27 +02:00
Brad P. Crochet
553e46e76a Add support for calling validations from introspection
The 'bulk introspection start' and 'overcloud node introspect' commands
can now enable the usage of the additional validations that are called
via workflows.
Commands now accept a '--run-validations' switch.

Change-Id: Ifcb30b9ceb15d82fffcda24cb98f2d03f4ded354
Partial-Bug: #1638697
Depends-On: I439361ae20c4e302b83870cdc06a5baa90ea683c
2017-01-26 15:55:39 -05:00
Adriano Petrich
a3012ca424 Use stack name or id for backwards compatibility
Heat used to accept either stack name or id

Scale nodes in the documentation and in the argparse usage
states that stacks can be identified by name or id but mistral
only accepts stack names.

This makes the client accept names or ids and pass names for the
mistral workflow

Change-Id: If7527e36c1e5d2214dc155392a2e3750b38ec365
Closes-Bug: #1640933
2016-11-21 15:42:59 +00:00
Dougal Matthews
2cc4eef660 Format the nodes list in openstack overcloud delete node
The current command will output something like the following:

  deleting nodes [u'UUID-UUID'] from stack overcloud

This change adds simple string formatting so that a raw Python list
isn't displayed.

Change-Id: Ibf8bc40f0c45be60e869c5ab3d99d892e24f8a94
Closes-Bug: #1633449
2016-11-16 20:21:39 +00:00
Dougal Matthews
0af664656d Default the stack name to 'overcloud' in overcloud node delete
The stack needs to be passed as either a CLI arg with --stack or via the
environment variable OVERCLOUD_STACK_NAME. At the moment if it isn't
provided either way the workflow is called with an empty string for the
stack name. This will then fail.

This change defaults the stack name to 'overcloud' which matches the
deploy command. One of the unit tests was updated so that it didn't pass
the default value to ensure that it can still be overwritten.

Change-Id: Ie44d5cba90e81ae1a35a4cabc6e20a202bfddef0
Closes-Bug: #1640244
Partial-Bug: #1640770
2016-11-10 12:50:46 +00:00
Ryan Brady
a85ad62d85 Use workflow for overcloud node delete
This patch adds support for using a workflow in tripleo-common
for deleting nodes from a stack (scale down).

Change-Id: Ia65734273d70ea0ae30d96122728950e1f0217b8
Partial-Bug: #1626736
2016-10-19 10:47:04 -04:00
Dougal Matthews
133e8cf91a Migrate to using osc-lib
This new library provides the common logic used by openstack
clients. Replacing the imports from openstackclient and cliff.

Depends-On-External: https://review.rdoproject.org/r/#/c/2088/
Depends-On: I095209c241876c6ab48595962e07144fc5cc34a6
Closes-Bug: #1620964
Change-Id: I103a13ff6c0af94b82f5e48652380adfbf331d34
2016-09-13 22:35:01 +00:00
Jenkins
a439cfb256 Merge "Add 'openstack overcloud node configure' command" 2016-08-29 15:18:01 +00:00
Jenkins
105352b8e6 Merge "Add 'openstack overcloud node import' command" 2016-08-26 22:54:36 +00:00
Julie Pichon
d0b6de2b4a Add 'openstack overcloud node configure' command
Calls to the Mistral workflows to configure boot options and the root
device.

Change-Id: Ifd868fcdd6ed2d54b40c2e1861558d0233731be5
Depends-On: I5ba0a3710012c44822dd3b8e69662bbef04d3787
Closes-Bug: #1595205
2016-08-25 20:50:58 +01:00
Julie Pichon
64dcf41222 Use Ironic's generic service name in help messages
Generic service names should be used instead of a specific
implementation name.

Change-Id: I5e05326cca62f6f99580740ebdcb4b6ca31c664b
2016-08-25 20:40:45 +01:00
Julie Pichon
dbe3b866a5 Add 'openstack overcloud node import' command
The new commands aim to simplify the node management workflow
[1]. Additional configuration will be possible via 'openstack overcloud
node configure.'

[1] http://lists.openstack.org/pipermail/openstack-dev/2016-May/095456.html

Change-Id: I704438da31a31a90f882ddd01ba02e3ca62549ac
Depends-On: Iea9b7f3b49f99f810ce759f65b45b88c1c40f010
Partial-Bug: #1595205
2016-08-25 20:36:23 +01:00
Julie Pichon
6108b3be7d Add 'openstack overcloud node introspect' command
Change-Id: I1c58d9c825543cf402ff417d1fd05e89759e3ecd
Partial-Bug: #1595205
2016-07-11 08:50:02 +01:00
Julie Pichon
13011dc041 Add 'openstack overcloud node provide' command
Change-Id: Id8660fc63ff29478b4f40d9a3f656e26f8149426
Partial-Bug: #1595205
2016-07-11 08:49:56 +01:00
Julie Pichon
15d79ffd45 Add missing i18n marker on some help strings
Change-Id: I78b058ae26c06d83f7dea55bfcfb0df834d2eaa0
2016-07-05 14:39:46 +01:00
Brad P. Crochet
cdcf16ee45 Remove the orchestration property from tripleoclient class
Use the OSC-compatible orchestration client instead of the home-grown
one. This reduces duplicate code, and relies on more thoroughly tested
code elsewhere.

Change-Id: Ib77d20086f86a260197c6f289fd9c270b766544c
Depends-On: I7aa0fd7c152ee91b6e2b956f7e594f8c8aacafa7
2016-05-17 08:07:57 -04:00
Jenkins
c772b51282 Merge "Turn the orchestration client reference into a property" 2015-10-27 12:34:52 +00:00
Ryan S. Brown
59c5e4d980 Consolidate module constants.
3 separate places had hardcoded values for the t-h-t directory. Many
values are/will be shared, this patch consolidates them to avoid having
them diverge in the future.

Depends-On: I98e19cc29d69cbd6636cd4ce77a07c7a0e3dc048
Change-Id: I205569f4be0bcee2b284048dec7ddf0b28bbd8a1
2015-10-19 10:22:50 -04:00
Brad P. Crochet
90bf132049 Turn the orchestration client reference into a property
Use a property instead of a function. This is more in line with how the
clients are referenced with openstackclient, thereby making it easier
to switch to the a Heat OSC plugin in the future.

Change-Id: I849593e6328f3883235e9ae34232f92d6b3c0d80
2015-10-13 10:53:03 +00:00
Dougal Matthews
6abf557aa1 Remove Tuskar support
This change removes Tuskar support from the following commands:

    - openstack overcloud deploy
    - openstack overcloud node delete
    - openstack overcloud update stack

This removal is due to the limiting nature of Tuskar, we can achieve everything
we need and more without it. The change also removes python-tuskarclient from
the requirements and if the Tuskar CLI (openstack management commands) is
required it will need to be installed independently.

This change is dependant on the Tuskar examples being removed from the
documentation. These are removed in the dependant change ID below.

Depends-On: I2d4aa114156c5bafb003e6a67862ed6d1449fd98
Change-Id: Ic6fd4568054fe91b8fc898728022a7d7ed8cf3cf
2015-09-28 07:50:48 +00:00
Brad P. Crochet
12edde8a53 Rename rdomanager_oscplugin to tripleoclient
Change-Id: I4593a5248160204645d567d7f2fa3a396629082b
2015-09-08 10:22:22 -04:00