105 Commits

Author SHA1 Message Date
Emilien Macchi
df9cbd400e Implement 'openstack tripleo upgrade'
Adding a new command:
$ openstack tripleo upgrade

This new command will run underneath:
$ openstack tripleo deploy --upgrade

The only difference when running this command is that we'll execute
upgrade tasks generated by config-download before the deployment tasks.

It'll be used by the containerized undercloud to upgrade by re-using the
upgrade tasks in THT, that were designed for the overcloud. We'll try to
re-use them so we avoid code duplication.

Change-Id: Ic932b3b308c83bc72fff4c0ef8ce94e878f33997
2018-05-05 17:09:01 +00:00
Zuul
102382cdce Merge "Add 'overcloud node clean' command to run metadata cleaning on nodes" 2018-05-03 16:32:12 +00:00
Alex Schultz
569b59e48c Create generic deployment action
Previously we've created an undercloud deploy action for use with the
containerized undercloud. In order to support other deployments that may
not be underclouds, we should rename the interface to something more
generic. This change creates a tripleo deploy action and switches the
undercloud deployment mechanism to leverage the tripleo deployment
action.

The tripleo deployment action has a new parameter called --standalone to
indicate if we want to trigger an standalone deploy scenario. The
undercloud deployment is a special standalone deployment so the existing
undercloud deploy command passes standalone as true to the tripleo
deployment action. Eventually we should roll in the existing overcloud
deployment into this tripleo deploy command to align the two interfaces.

Change-Id: I377b304ad78f54701971c7a29f71d612c62f5dc0
Related-Blueprint: all-in-one
2018-04-30 20:48:16 -07: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
Lukas Bezdicka
25b6b5dbab Introduce Ceph upgrade command
Ceph upgrade becomes standalone flow for all Update/Upgrade/FFWD.

Change-Id: If26fa9476500161b2baebb6e93664a2cd6337605
2018-04-24 11:36:25 +02:00
Zuul
8d26f89ebd Merge "Add ffwd-upgrade cli - overcloud ffwd-upgrade [prepare|run|converge]" 2018-04-19 20:01:14 +00:00
Zuul
fbe6548507 Merge "Add update converge CLI to remove no-ops" 2018-04-19 19:50:59 +00:00
Jiri Stransky
f35211c11b Add update converge CLI to remove no-ops
The no-opped DeploymentSteps need to be re-added after we're done with
minor update.

Change-Id: I9656d8c6137fb656aecda7d13768ca4ab3c10b1f
Depends-On: I6abe8cba12806730bb3686d4f2695070c85e468a
Closes-Bug: #1760898
2018-04-18 11:44:34 +00:00
mandreou
78cf0c495d Add ffwd-upgrade cli - overcloud ffwd-upgrade [prepare|run|converge]
Working with the sequence described in [0] with this patch and
the tripleo-common review in dependency below the operator can do:

    1 openstack overcloud ffwd-upgrade prepare ... $params
    # ^^^ added here, stack update for playbook generation.

    2 openstack overcloud ffwd-upgrade run ... $params
    # ^^^ added here. run fast_forward_upgrade_playbook.yaml
    # against the overcloud (don't expost limit_hosts)

    3 openstack overcloud upgrade run --roles Controller
    # ^^^ exists... runs the upgrade_steps_playbook.yaml and
    # deploy_steps_playbook.yaml and
    # post_upgrade_steps_playbook.yaml. Repeat 3. with all --roles

    4 openstack overcloud ffwd-upgrade converge
    # ^^^ added here. no stack update, just unset noop from plan

Co-Authored-By: Lukas Bezdicka <social@v3.sk>
Co-Authored-By: Jiri Stransky <jistr@redhat.com>
[0] https://bugzilla.redhat.com/show_bug.cgi?id=1561178#c0
Depends-On: Ib9647b899fb9d49203c4d35c1abfe9c36e0babbe
Change-Id: Ie7823e121a4fa57feb1c56bd4d58f3183e41b8d7
2018-04-17 17:38:21 +02:00
Nguyen Hai
44d573cd71 Follow the new PTI for document build [Updated]
This project already followed the new PTI
https://review.openstack.org/#/c/530328/

However, we also should remove [build_sphinx] section
as described in:
http://lists.openstack.org/pipermail/openstack-dev/2018-March/128594.html

Change-Id: I58f0d1ab22494b72db1a470f1cc25692b4dde889
2018-04-16 04:25:39 +00:00
mandreou
96ffa3a325 Adds Overcloud Upgrade class and entry points for major upgrade
This further refactors the update/upgrades cli and separates
the update and upgrade code. This adds the overcloud_upgrade.py
which defines the UpgradePrepare and UpgradeRun. The entry
points are now:

  openstack overcloud upgrade prepare --container-registry-file ...

For the no-op heat stack update to refresh stack outputs and

  openstack overcloud upgrade run --nodes foo --playbooks all

For running all the upgrade ansible playbooks. A corresponding
converge sub-command will be introduced in a subsequent patch.

Change-Id: I1880e8f546df8d509871ba3b4f02877e95c611c8
2018-03-02 14:44:58 +00:00
Zuul
b169c283ef Merge "Clarify minor update CLI and split minor and major classes" 2018-02-24 03:07:05 +00:00
Mathieu Bultel
6956e07e59 Clarify minor update CLI and split minor and major classes
This is the first step which defines the minor update related
classes and entry points:

    openstack overcloud update prepare --container-registry-file ...

For running the no-op heat stack update to refresh outputs and

    openstack overcloud update run --nodes FOO --playbook all

For running the minor update ansible playbooks on specified
nodes.

A child review will add the openstack overcloud upgrade prepare
and openstack overcloud upgrade run classes and entry points
here https://review.openstack.org/545365

Co-Authored-By: Marios Andreou <marios@redhat.com>
Change-Id: I32c672dffc876250b9949f4fc4ff77c648186e4d
2018-02-23 12:38:42 +00:00
Zuul
c915236efb Merge "Add workflows-based role listing commands" 2018-02-14 15:12:07 +00:00
Zuul
88c617d17a Merge "Add Openstack Undercloud backup" 2018-02-08 18:46:13 +00:00
Carlos Camacho
eaaf2e8bc5 Add Openstack Undercloud backup
This new option allows to call the Mistral workflow to run an Undercloud full
backup.

Usage: openstack undercloud backup [--add-path ADD_FILES_TO_BACKUP]

The --add-path allows to add additional files or folders to the
Undercloud backup, for example:

openstack undercloud backup --add-path /etc/hosts \
                            --add-path /var/log/

Depends-on: Iebd67568d5e72967e694b88fc8c73361543929a1
Change-Id: Ief10f5313244d2848b6de604e0493a51db1ed30f
Related bp undercloud-backup-restore
2018-02-08 07:50:37 +00:00
Mathieu Bultel
e62b638acf Add major update implementation
Add the openstack overcloud upgrade command and workflow
for major upgrade from P to Queens.
It share the same code base as the minor upgrade but add options
for the converge part and take as parameter a list of
environment files, that could be needed in some cases for the
upgrade init stage. (like repo_setupt)

Change-Id: I54f8fc57b758e34c620d607be15d2291d545ff6f
2018-01-31 10:25:24 +00:00
Julie Pichon
4cbb6cc53b Add workflows-based role listing commands
This is to show all the available roles and their details. The
--current flag shows the roles currently enabled for a given plan.

The commands use a new namespace "overcloud roles" while the "overcloud
role" commands are deprecated. It was difficult to set both in parallel
while keeping user-friendly defaults, perhaps once the other commands
are fully deprecated we can revisit.

Implements blueprint: tripleoclient-list-available-roles
Implements blueprint: tripleoclient-list-current-roles

Depends-On: I23087bd38c3730c9f24e03e4d7c54688ae912b08
Change-Id: I5c90d4330b861dc8bde54197911e564a1955f4ac
2018-01-11 15:10:08 +00:00
caishan
ce92caa21f Update ole home page info python-tripleoclient.
Change-Id: Iefeac1e5d3acf0302eca4a4a9e829381a45b2238
2018-01-09 06:36:09 -08:00
Tony Breeds
ada02718a1 Remove Old baremetal commands provided by python-tripleoclient
python-tripleoclient provides the following openstack baremetal
commands:

openstack baremetal instackenv validate:
openstack baremetal import:
openstack baremetal introspection bulk start:
openstack baremetal introspection bulk status:
openstack baremetal configure ready state:
openstack baremetal configure boot:

Based on the data below several of these are already deprecated and have
been so longer enough to be removed.

openstack baremetal instackenv validate:
    tripleoclient.v1.baremetal:ValidateInstackEnv
    NOT Deprecated
openstack baremetal import:
    tripleoclient.v1.baremetal:ImportBaremetal
    DEPRECATED in b272a5c6 2017-01-03
    New command: openstack overcloud node import
openstack baremetal introspection bulk start:
    tripleoclient.v1.baremetal:StartBaremetalIntrospectionBulk
    DEPRECATED in b272a5c6 2017-01-03
    New command: openstack overcloud node introspect
openstack baremetal introspection bulk status:
    tripleoclient.v1.baremetal:StatusBaremetalIntrospectionBulk
    NOT Deprecated
openstack baremetal configure ready state:
    tripleoclient.v1.baremetal:ConfigureReadyState
    NOT Deprecated
openstack baremetal configure boot:
    tripleoclient.v1.baremetal:ConfigureBaremetalBoot
    DEPRECATED in b272a5c6 2017-01-03
    New command: openstack overcloud node configure

This leaves:
openstack baremetal instackenv validate
- This is somewhat superceded by the mistral validation in
  tripleo-common
openstack baremetal introspection bulk status
- This should have been deprecated along with
  'openstack baremetal introspection bulk start' and isn't useful without
  the former.
openstack baremetal configure ready state
- Seems to only support drac and requires a datafile no loner generated
  by tools

As these commands have outlived their useful lifetime and do not require
deprecation we're free to remove them so let do it.

Change-Id: Ie6b6a8578e4d12503a3dbfa5747309033d53466e
2017-12-18 11:50:45 +11:00
Pradeep Kilambi
65dd3cb043 Add support to generate a sample undercloud.conf
This is needed to kick off undercloud install with
--use-heat option. This includes new config options
to configure containerized undercloud along with
existing instack options.

Change-Id: Ibebaf068018a790afdb599e4e6fbc79d3b2a57dc
Partially-implements: blueprint heat-undercloud
2017-11-16 13:31:38 -05:00
Mathieu Bultel
8a7da9fe26 Implement minor update workflow with config download
This change aim to refactor the way of doing the minor upgrade
via ansible playbook download by the config download
It will depend on a mistral change which will get the
ansible update_task and run it via mistral
The user will have two ways for performing the minor update:
  - the stack update command which will make an automatic minor
    upgrade (or just upgrade a given set of nodes)
  - running it manually via ansible on the undercloud

Closes-Bug: #1715557
Closes-Bug: #1723108
Change-Id: I4fcd443d975894a1da0286b19506d00682c5768c
2017-10-16 07:11:46 +00:00
Steve Baker
eca5393ddc Command to discover the versioned tag from latest
This change implements the command
"openstack overcloud container image tag discover" which will become
part of the update and upgrade workflow for deploying new container
images.

It is used to discover the version-based tag by inspecting the image
from a stable tag like current-tripleo-rdo. Stable tags like 'latest'
or 'pike' can't be used for container updates because something needs
to change to trigger the new containers being pulled. Without this
command it would be up to the user to find out what versioned tag to
specify when calling prepare.

This was implemented as its own command instead of integrating with
prepare because there may be multiple image build chains feeding into
the image list (such as RDO, ceph and eventually others) and each will
need its own call to discover the versioned tag.

  tag=$(openstack overcloud container image tag discover \
        --image trunk.registry.rdoproject.org/pike/centos-binary-base:current-tripleo-rdo
        --tag-from-label rdo_version)
  echo $tag
  openstack overcloud container image prepare --tag $tag

Change-Id: I12b16cb267c80e3059786fb980178eb5b3d1a76d
Depends-On: I27ea031287604d70032fb5392aecbce313d4b096
Closes-Bug: #1708967
2017-09-04 13:39:11 +12:00
Jenkins
11ad017824 Merge "Add 'overcloud node discover' command" 2017-07-26 20:48:01 +00:00
Steven Hardy
3d4e2d20e8 Rename download config to config download
This aligns better with other interfaces which are all
openstack overcloud <noun> <verb>

E.g "image upload", "plan export" etc - so "config download" fits better?

Change-Id: Ic46ed75397714e46895bdb44a408f6a10d7b40cf
2017-07-17 09:15:43 +01:00
Jenkins
eb01f1458c Merge "Dump all deployment role_data files to a config dir" 2017-07-13 18:38:27 +00:00
Mathieu Bultel
d26d5c680d Dump all deployment role_data files to a config dir
Add new overcloud cli command in order to dump
all the configs from the overcloud contains in role_data.
All different type of configs are dump in a separate file
per role ex:
ls config/tmpD2nDOd-config/
config_settings-Compute.yaml
global_config_settings-Compute.yaml
logging_sources-Compute.yaml
monitoring_subscriptions-Compute.yaml
service_config_settings-Compute.yaml
service_metadata_settings-Compute.yaml
service_names-Compute.yaml
step_config-Compute.yaml
upgrade_batch_tasks-Compute.yaml
upgrade_tasks-Compute.yaml

The upgrade_tasks is in yaml format and can be directly
call with ansible-playbook command, example:

$ cat config/tmpD2nDOd-config/upgrade_tasks-Compute.yaml
- hosts: Compute
  name: Compute playbook
  tasks:
  - name: Stop snmp service
    service: name=snmpd state=stopped
    tags: step1
  - name: Stop nova-compute service
    service: name=openstack-nova-compute state=stopped
    tags: step1

This patch to allow operators to run manually
the upgrade tasks via ansible on the Undercloud.

Change-Id: I7d89ffde8a19b30aaf59efb11e41d32cfa644b83
Closes-bug: #1665585
2017-07-11 12:45:35 +00:00
Steve Baker
daf0f04bcf New command "overcloud container image prepare"
This new command allows the user to generate their own
overcloud_containers.yaml file in preperation for calling
"overcloud container image build" or
"overcloud container image upload".

Arguments allow the caller to customise the resulting
overcloud_containers.yaml file with the aim of not requiring any
further manual editing for the majority of cases.

The file generated by the --env-file option adopts the convention
established in change Ieaedac33f0a25a352ab432cdb00b5c888be4ba27 where
the DockerNamespace parameter is not used and image names are fully
qualified.

Partial-Bug: #1696598
Change-Id: I6af1828ea2b26f3c6295981fe40fe825d8ccef37
2017-07-07 16:05:17 +12:00
Jenkins
9233ca95ee Merge "Remove support for py34" 2017-06-23 09:38:35 +00: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
Vu Cong Tuan
47fb0b2ad8 Remove support for py34
The gating on python 3.4 is restricted to <= Mitaka. This is due to
the change from Ubuntu Trusty to Xenial, where only python3.5 is
available. There is no need to continue to keep these settings.

Change-Id: Icad236d4055dde8389fe19f2b3ca921e76e9faf7
2017-06-07 10:41:31 +07:00
Alex Schultz
be2a20637a Provide commands for example roles
In order to improve the experiance for the end user, we have existing
sets of roles that can be combined in a roles_data.yaml file for the
deployment. This change exposes the ability to generate roles_data.yaml
from a folder containing role yaml files rather than requiring the end
user manually construct the roles_data.yaml.

Change-Id: I326bae5bdee088e03aa89128d253612ef89e5c0c
Related-Blueprint: example-custom-role-environments
2017-06-01 12:31:21 -06:00
Alex Schultz
1e69403a9e Add overcloud support report collect command
This command is to be used by an operator to run sosreport on
specific set of servers (or all) and retrieve log bundles that can
be used to debug the status of the cluster or troubleshoot issues.

Depends-On: I47c486d14c46a653c61cfd92d9f484efe0407217
Change-Id: I45699dfa6eb3e83d419c7041dbb72cc5d5e4f0ea
Implements-Blueprint: capture-environment-status-and-logs
2017-05-11 09:28:59 -06:00
Stephen Finucane
3653a6006f Use Sphinx 1.5 warning-is-error
With pbr 2.0 and Sphinx 1.5, the setting for treat sphinx warnings as
errors is setting warning-is-error in build_sphinx section. Enable this.

Change-Id: I981b05275e1a75e3c42ea3ef24812cded0cefc0d
2017-04-26 08:53:45 +00:00
Stephen Finucane
1e260a1c86 Explicitly set 'builders' option
An upcoming release of pbr will require explicitly stating which
builders are requested, rather than defaulting to html and man. Head off
any potential impact this may cause by explicitly setting this
configuration now.

Change-Id: I06850630c9e85811a09f8464060728679c093dbf
2017-04-26 08:53:12 +00:00
Jenkins
846f087ea4 Merge "New command "overcloud container image build"" 2017-04-26 03:01:10 +00:00
Jenkins
76e472ebc1 Merge "Add plan export command" 2017-04-22 01:41:33 +00:00
Ana Krivokapic
41bf090d01 Add plan export command
Depends-On: I789c960f61a30ccd4b076fcae4b3e1b80e825585
Implements: blueprint plan-export-command

Change-Id: Ibedca0d80f93ab5e4bf7f105472bb384bc9506e6
2017-04-18 14:02:15 +02:00
Brad P. Crochet
1d3231de5a Remove update abort
The update abort is not reliable, and could mess up a TripleO stack
beyond repair. Since this has a potential for data loss, I would
suggest this be removed without a deprecation period.

Change-Id: Ieec4f01e38768eafb3df1f06340bdd3e220d30bd
2017-04-12 11:08:21 +00:00
Steve Baker
5ae4769354 New command "overcloud container image build"
This command receives the same --config-file argument as "overcloud
container image upload" and invokes kolla-build to build the images
specified in that file.

It is also possible to specify --kolla-config-file multiple times to
control the behaviour of kolla-build.

Change-Id: If06a941eaf8d92c29ed84387c4f040866cf07cfa
Depends-On: I061f626fdb3d71613aa23436bf6c53cf4de62213
2017-04-11 15:35:29 +12:00
Dougal Matthews
4da6ecdba6 Add a new command to get the overcloudrc files
If a user deploys via the GUI, then this file wont automatically be
created. We can now create it via a Mistral action - this command
provides CLI users a way to call that action and save the file.

While adding tests a typo was spotted in utils.py, this is also resolved
by this patch and covered by the tests.

Change-Id: I7808cd2c43a95bbb154ec6c6f77896b97551e354
2017-04-03 12:57:00 +00:00
Steve Baker
efedf4bb7c New command "overcloud container image upload"
This is the container image equivalent to the "overcloud image upload"
command. It wraps tripleo-common logic which has existed for some time
now[1].

The configuration file used in CI is also in tripleo-common [2] and
the existence of this command will allow the custom python[3] to be
replaced with a simple command invocation.

The same configuration file format will be used to implement another
new command "overcloud container image build".

[1] http://git.openstack.org/cgit/openstack/tripleo-common/tree/tripleo_common/image/image_uploader.py
[2] http://git.openstack.org/cgit/openstack/tripleo-common/tree/contrib/overcloud_containers.yaml
[3] http://git.openstack.org/cgit/openstack/tripleo-quickstart-extras/tree/roles/overcloud-prep-containers/templates/upload_images_to_local_registry.py.j2

Change-Id: Id505b57698b6a15c62494764b2d9eca1933e63f1
2017-03-16 00:46:51 +00:00
Dan Prince
5f58088ff5 Deploy the undercloud with Heat
This patch adds a new 'undercloud deploy' option which:

 -installs and configures os-collect-config, and hooks using instack

 -forks an all-in-one heat-api/engine process using noauth

 -spawn our own fake keystone thread for noauth Heat

 -creates a Heat stack for the undercloud using t-h-t

 -starts os-collect-config to drive the deployment of Heat
  metadata

Partially-implements: blueprint heat-undercloud

Depends-On: I50a8cc46b4c3c235d438a711760fba94bf8e9715
Depends-On: I36df7fa86c2ff40026d59f02248af529a4a81861

Co-Authored-By: Ian Main <imain@redhat.com>
Co-Authored-by: Flavio Percoco <flaper87@gmail.com>
Change-Id: Ib05062e3710aeec922988d5f1308be44b5468473
2017-02-14 17:01:33 +01:00
Jenkins
45e8fa9721 Merge "Add overcloud_parameters.GenerateFencingParameters." 2017-01-26 15:47:44 +00:00
Chris Jones
eb4686cfc1 Add overcloud_parameters.GenerateFencingParameters.
We can now generate parameters to enable HA fencing, by re-consuming the
instackenv.json file and introspecting the deployed stack.

Closes-Bug: #1649695

Depends-On: I0ff173b6daf770329b25f61b76fcba0e28b2550a
Change-Id: I8b717b069f95cac20fe2d8c7fdaaacc46214957b
2017-01-25 20:53:45 +00:00
Brad P. Crochet
7a31915c49 Migrate overcloud update to a mistral workflow
This moves the package update to using a mistral workflow.

Change-Id: I5176746ca4843202a385206289be66f7e6450f48
Depends-On: I8a1f2dbffa19c2d8c93684562d2fb16aef6667db
Closes-Bug: #1614928
2017-01-24 11:46:07 -05:00
Dmitry Tantsur
a3f687c953 Create command for building RAID on given nodes
This change introduces a new command to build RAID:
$ openstack overcloud raid create --node UUID1 [--node UUID2] configuraiton

More variants of this command will come later.

Part of blueprint raid-workflow

Change-Id: Ic4a547939213e5305cb7ca4f4458ef9eb577437b
2017-01-23 17:01:36 +01:00
Jenkins
31d0486064 Merge "Fix the author and author-email in setup.cfg file" 2016-12-21 12:16:59 +00:00
Jenkins
8f74280843 Merge "Remove "baremetal show capabilities" command" 2016-12-01 22:09:30 +00:00
Alex Schultz
7dd16b1da2 Implement overcloud delete command
This change adds an overcloud delete that will delete the stack and
issue a plan delete for the overcloud in a single command.

Change-Id: I97a2b5606f47deb929972c06c869cd1eda0dc9a6
Closes-Bug: #1632271
2016-11-28 13:26:11 -07:00