Merge "Remove Tuskar from the CLI usage"

This commit is contained in:
Jenkins 2015-09-25 19:40:25 +00:00 committed by Gerrit Code Review
commit 4a189f2a9a
7 changed files with 27 additions and 269 deletions

View File

@ -12,7 +12,6 @@ In this chapter you will find advanced deployment of various |project| areas.
Additional node configuration <extra_config>
Deploying with Heat Templates <template_deploy>
Network Isolation <network_isolation>
Managing Tuskar Plans and Roles <managing_plans_and_roles>
Deploying Manila <deploy_manila>
Configuring Cinder with a NetApp Backend <cinder_netapp>

View File

@ -1,189 +0,0 @@
Managing Plans and Roles
========================
This section provides a description of the Plan and Role concepts and the
operations available to each from the command line.
To learn how to delete and reload all plans and roles skip to the relevant
`Reload the deployment plan and all deployment roles`_ section below.
Understanding Roles & Plans
---------------------------
Roles represent the functionality that will be served by a node, for example a
Compute or Storage node. Plans define the full deployment and consist of one
or more roles and their related Parameters.
Roles
-----
The Roles included in the Tuskar API can be viewed with the following command::
$ openstack management role list
+--------------------------------------+----------------+---------+---------------------------------------------------+
| uuid | name | version | description |
+--------------------------------------+----------------+---------+---------------------------------------------------+
| 6830e747-6d43-44bf-99b6-97a7145c58c6 | Swift-Storage | 1 | OpenStack swift storage node configured by Puppet |
| 96faca30-8c05-48b2-b9c8-d01cd2d0dc47 | Compute | 1 | OpenStack hypervisor node configured via Puppet. |
| b0c87438-871d-46e2-9fee-4b42c65f3c45 | Ceph-Storage | 1 | OpenStack ceph storage node configured by Puppet |
| d5ffd638-8df3-4ed6-8925-32e8891dae25 | Cinder-Storage | 1 | OpenStack cinder storage configured by Puppet |
| e3e09fa8-00c8-4870-8f2b-de67a9faa5ab | Controller | 1 | OpenStack controller node configured by Puppet. |
+--------------------------------------+----------------+---------+---------------------------------------------------+
Plans
-----
By default Tuskar comes with one Plan named overcloud with all of the above
Roles added to the plan. However, only Control and Compute have their scale
value set and will be deployed by default.
The Plan can be viewed with the following command::
$ openstack management plan list
+--------------------------------------+-----------+-------------+------------------------------------------------------------------+
| uuid | name | description | roles |
+--------------------------------------+-----------+-------------+------------------------------------------------------------------+
| eac9c4cc-9d85-4c6a-85bb-e1f38afcff7e | overcloud | None | Compute, Ceph-Storage, Cinder-Storage, Controller, Swift-Storage |
+--------------------------------------+-----------+-------------+------------------------------------------------------------------+
Once you have the Plan UUID you can view more details about the plan::
$ openstack management plan show eac9c4cc-9d85-4c6a-85bb-e1f38afcff7e
+-------------+------------------------------------------------------------------+
| Field | Value |
+-------------+------------------------------------------------------------------+
| created_at | 2015-07-13T10:09:14 |
| description | None |
| name | overcloud |
| parameters | Parameter output suppressed. Use --long to display them. |
| roles | Compute, Ceph-Storage, Cinder-Storage, Controller, Swift-Storage |
| updated_at | None |
| uuid | eac9c4cc-9d85-4c6a-85bb-e1f38afcff7e |
+-------------+------------------------------------------------------------------+
The command can be repeated with ``--long`` appended to the end for a
detailed output of all the available Plan parameters.
Adding and Removing Roles
~~~~~~~~~~~~~~~~~~~~~~~~~
Roles can be removed from the plan like this::
$ openstack management plan remove role "[plan-uuid]" "[role-uuid]"
And similarly they can be added back to the plan::
$ openstack management plan add role "[plan-uuid]" "[role-uuid]"
The output of both of these commands is the summary of the plan and it will
reflect the role being added or removed.
Assigning Flavors to Roles
~~~~~~~~~~~~~~~~~~~~~~~~~~
Roles can have a flavor assigned with the following command::
$ openstack management plan set "[plan-uuid]" -F Compute-1=baremetal
In this example we are assigning the ``baremetal`` flavor to the Compute role,
but we need to include the role version when doing this. Making the syntax
``-F [role-name]-[role-version]=[flavor-name]``.
Setting Scale values
~~~~~~~~~~~~~~~~~~~~
Similar to assigning Flavors, scaling an individual role can be done like
this::
$ openstack management plan set "[plan-uuid]" -S Compute-1=3
In this example we are scaling the Compute role to three nodes.
Setting other parameters
~~~~~~~~~~~~~~~~~~~~~~~~
Arbitrary parameters can be set for Roles. To do this, the following syntax
needs to be used.::
$ openstack management plan set "[plan-uuid]" -P Compute-1::Image=compute
Making the syntax ``-F [role-name]-[role-version]::[parameter-
name]=[value]``. The above example assigns the compute image to the compute
role - for this to work a compute image needs to be uploaded to glance.
Downloading a Plan
------------------
Plans can be downloaded from Tuskar. The result of doing this is a set of
Heat templates that can be then manipulated or manually passed to the Heat
client.::
$ openstack management plan download "[plan-uuid]" -O path/to/output
Once you have downloaded the templates from Tuskar, they can be sent directly
to Heat with this command.::
$ heat stack-create overcloud \
-f path/to/output/plan.yaml \
-e path/to/output/environment.yaml \
-t 240;
Reload the deployment plan and all deployment roles
---------------------------------------------------
You may wish to recreate the overcloud deployment plan and deployment roles
from scratch, for example to work with a newer version of the tripleo heat
templates from which the deployment roles are created.
.. note::
The steps documented below will completely remove the current
overcloud deployment plan and deployment roles including any overridden
and saved deployment parameters.
Delete the overcloud deployment plan and any roles
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Get the current deployment plan uuid and specify it for deletion::
openstack management plan list
openstack management plan delete PLAN_UUID
Now you can safely delete all deployment roles::
roles=`tuskar role-list | grep OpenStack | awk '{print $2}'`
tuskar-delete-roles --config-file /etc/tuskar/tuskar.conf --uuids $roles
Recreate the deployment roles
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Roles are reloaded by running the tuskar-db-sync script from the tuskar
tripleo image element::
/usr/share/tripleo-image-elements/tuskar/os-refresh-config/configure.d/90-tuskar-db-sync
This script defaults to using `/usr/share/openstack-tripleo-heat-templates/`
as the path to the local tripleo heat templates from which to define the roles.
This can be overridden by setting the TUSKAR_ROLE_DIRECTORY environment
variable::
TUSKAR_ROLE_DIRECTORY=/foo/ /usr/share/tripleo-image-elements/tuskar/os-refresh-config/configure.d/90-tuskar-db-sync
Recreate the deployment plan and associate the new roles
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Create a new deployment plan and associate the newly created roles to it. This
is achieved by running the plan-add-roles script from the tuskar tripleo image
element::
/usr/share/tripleo-image-elements/tuskar/os-refresh-config/post-configure.d/101-plan-add-roles

View File

@ -649,7 +649,7 @@ instance, to deploy VXLAN mode, the deployment command might be::
openstack overcloud deploy -e /home/stack/network-environment.yaml \
-e /usr/share/openstack-tripleo-heat-templates/environments/network-isolation.yaml \
--plan openstack --ntp-server pool.ntp.org --neutron-network-type vxlan \
--templates --ntp-server pool.ntp.org --neutron-network-type vxlan \
--neutron-tunnel-types vxlan
To deploy with VLAN mode, you should specify the range of VLANs that will be
@ -657,7 +657,7 @@ used for tenant networks::
openstack overcloud deploy -e /home/stack/network-environment.yaml \
-e /usr/share/openstack-tripleo-heat-templates/environments/network-isolation.yaml \
--plan openstack --ntp-server pool.ntp.org --neutron-network-type vlan \
--templates --ntp-server pool.ntp.org --neutron-network-type vlan \
--neutron-bridge-mappings datacentre:br-ex \
--neutron-network-vlan-ranges datacentre:30:100 \
--neutron-disable-tunneling

View File

@ -187,17 +187,11 @@ The |project| CLI has options to support more advanced role matching.
Continuing with the example with only a control and compute profile:
* Get the Tuskar plan name
::
openstack management plan list
* Deploy the overcloud
::
openstack overcloud deploy --control-flavor control --compute-flavor compute --plan <Name or UUID from above>
openstack overcloud deploy --control-flavor control --compute-flavor compute --templates
Use the flavors to scale

View File

@ -5,11 +5,10 @@ Deleting Overcloud Nodes
You can delete specific nodes from an overcloud with command::
openstack overcloud node delete --stack $STACK_NAME --plan $PLAN_UUID <list of nova instance IDs>
openstack overcloud node delete --stack $STACK_NAME --templates [templates dir] <list of nova instance IDs>
This command updates number of nodes in tuskar plan and then updates heat stack
with updated numbers and list of resource IDs (which represent nodes) to be
deleted.
This command updates the heat stack with updated numbers and list of resource
IDs (which represent nodes) to be deleted.
.. note::
If you passed any extra environment files when you created the overcloud (for
@ -18,7 +17,6 @@ deleted.
using the ``-e`` or ``--environment-file`` option to avoid making undesired
changes to the overcloud.
.. note::
Before deleting a compute node please make sure that the node is quiesced,
see :ref:`quiesce_compute`.
@ -27,18 +25,3 @@ deleted.
A list of nova instance IDs can be listed with command::
nova list
Deleting nodes without using Tuskar
-----------------------------------
If the overcloud was :doc:`deployed from heat templates directly
<../advanced_deployment/template_deploy>` then use the ``--templates``
parameter when deleting nodes::
openstack overcloud node delete --stack $STACK_NAME --templates [templates dir] <list of nova instance IDs>
If you passed any extra environment files when you created the overcloud (for
instance, in order to configure :doc:`network isolation
<../advanced_deployment/network_isolation>`), you must pass them again here
using the ``-e`` or ``--environment-file`` option to avoid making undesired
changes to the overcloud.

View File

@ -3,15 +3,22 @@ Updating Packages on Overcloud Nodes
You can update packages on all overcloud nodes with command::
openstack overcloud update stack --plan $PLAN_UUID -i overcloud
openstack overcloud update stack --templates [templates dir] -i overcloud
This command updates UpdateIdentifier parameter in the overcloud tuskar plan
and triggers stack update operation. If this parameter is set 'yum update'
command is executed and each node. Because running update on all nodes in
parallel might be unsafe (an update of a package might involve restarting
a service), the command above sets breakpoints on each overcloud node so nodes
are updated one by one. When the update is finished on a node the command
will prompt for removing breakpoint on next one.
This command updates the UpdateIdentifier parameter and triggers stack update
operation. If this parameter is set 'yum update' command is executed and each
node. Because running update on all nodes in parallel might be unsafe (an
update of a package might involve restarting a service), the command above
sets breakpoints on each overcloud node so nodes are updated one by one. When
the update is finished on a node the command will prompt for removing
breakpoint on next one.
.. note::
If you passed any extra environment files when you created the overcloud (for
instance, in order to configure :doc:`network isolation
<../advanced_deployment/network_isolation>`), you must pass them again here
using the ``-e`` or ``--environment-file`` option to avoid making undesired
changes to the overcloud.
.. note::
Multiple breakpoints can be removed by specifying list of nodes with a
@ -24,18 +31,3 @@ will prompt for removing breakpoint on next one.
.. note::
If the update command is aborted for some reason you can always continue
in the process by re-running same command.
Updating Packages on Overcloud Nodes Without Using Tuskar
---------------------------------------------------------
If the overcloud was :doc:`deployed from heat templates directly
<../advanced_deployment/template_deploy>` then use the ``--templates``
parameter when updating packages::
openstack overcloud update stack --templates [templates dir] -i overcloud
If you passed any extra environment files when you created the overcloud (for
instance, in order to configure :doc:`network isolation
<../advanced_deployment/network_isolation>`), you must pass them again here
using the ``-e`` or ``--environment-file`` option to avoid making undesired
changes to the overcloud.

View File

@ -2,21 +2,10 @@ Scaling overcloud roles
=======================
If you want to increase or decrease resource capacity of a running overcloud,
you can start more servers of a selected role or delete some servers if
capacity should be decreased. First update the Overcloud plan with a new
number of nodes of the role::
capacity should be decreased. To set the capacity for the compute role,
the following command can be used::
openstack management plan set $PLAN_UUID -S Compute-1=5
.. note::
The role is specified including the role version. Both role names
and role versions can be listed with command::
openstack role list
And then re-deploy the Overcloud with the updated plan::
openstack overcloud deploy --plan $PLAN_UUID
openstack overcloud deploy --templates [templates dir] --compute-scale 5
.. note::
Scaling out assumes that newly added nodes has already been
@ -26,17 +15,7 @@ And then re-deploy the Overcloud with the updated plan::
When scaling down random servers of specified role will be deleted, how to
delete specific nodes is decribed in :ref:`delete_nodes`.
Scaling overcloud roles without using Tuskar
--------------------------------------------
.. note::
The different scale parameters can be seen in the output of::
If the overcloud was :doc:`deployed from heat templates directly
<../advanced_deployment/template_deploy>` then you can just re-deploy the
overcloud with ``--templates`` and ``--<role>-scale`` parameters::
openstack overcloud deploy --templates [templates dir] --compute-scale 5
If you passed any extra environment files when you created the overcloud (for
instance, in order to configure :doc:`network isolation
<../advanced_deployment/network_isolation>`), you must pass them again here
using the ``-e`` or ``--environment-file`` option to avoid making undesired
changes to the overcloud.
openstack help overcloud deploy