13 Commits

Author SHA1 Message Date
Alex Schultz
ee4ddada26 Add connection timeout options to ssh
Change-Id: I8047b0bbd672d052a0d4cbe3db549d3f52002280
2018-01-06 15:18:16 +00:00
James Slagle
08641d846a Use StrictHostKeyChecking=no in enable-ssh-admin.sh
Use StrictHostKeyChecking=no to inject the temporary ssh key in
enable-ssh-admin.sh. The user provides the list of hosts for ssh, so we
can safely assume that they intend to ssh to those hosts.

Also, for the ovb case the hosts will have new host ssh keys which have
not yet been accepted.

Change-Id: Ia2a2d1e4c214d9d9190131c280a54eab066e3657
Closes-Bug: #1737027
2017-12-07 14:54:49 -05:00
Jiri Stransky
b0e72c1413 Create short lived ssh key for enable-ssh-admin.sh
Instead of using the key provided by user on the command line, create
a new short-lived key, give it to Mistral to create a tripleo-admin
user with it, and remove the short-lived key.

Co-Authored-By: John Fulton <fulton@redhat.com>
Change-Id: I6e6ed83fa62319d59d7289b16a1412a340ea6b26
Closes-Bug: #1724578
2017-10-19 11:55:04 +02:00
Jiri Stransky
507bed1da9 Add script to create tripleo-admin on deployed servers
When using deployed servers, we want to create a standard
tripleo-admin user for Mistral's ssh tasks (e.g. running Ansible on
overcloud). This script wraps the respective Mistral workflow.

Change-Id: I2de698b4aae07f74569243a9e7c1c56eb578e700
Related-Bug: #1708180
Depends-On: Ibe8e54f7b38d8c6c8d944d2b13f0eed004c34c4c
2017-08-08 08:07:19 +02:00
James Slagle
e17590c69e Add $STACK_NAME input var
The stack name can now be overridden in the get-occ-config.sh script for
deployed-server's by setting the $STACK_NAME variable in the
environment.

Change-Id: Iecba21499b80e463b4c629be53c309996d39472d
Closes-Bug: #1686719
2017-04-27 13:02:57 -04:00
Steve Baker
5e934cd9b8 Use the local collector to bootstrap deployed servers
os-collect-config is already configured to use json files in
/var/lib/os-collect-config/local-data/ as a data source, so this can
be used in the deployed-server get-occ-config.sh to copy in the
required json to generate the required os-collect-config.conf.

Co-Authored-By: James Slagle <jslagle@redhat.com>
Closes-Bug: #1679705
Change-Id: Ibde9e6bf360277d4ff64f66d637a5c7f0360e754
2017-04-04 22:31:58 -04:00
James Slagle
c5e5d21a61 Sort ResourceGroup resource list
We should sort the results by resource_name when listing resources in
the ResourceGroup stack in get-occ-config.sh, as the order is not
guaranteed. We want the order to always be numerical ascending by
resource_name (which are just integers starting at 0).

Change-Id: Iccef81e4dfd9586e0030f20bdde131d1a885eb19
Closes-Bug: #1665458
2017-02-17 10:39:18 -05:00
James Slagle
c9596b72a1 Continue checking for request url if initially null
When using get-occ-config.sh during overcloud upgrades, the script could
potentially be started before the stack has been upgraded. In that
scenario, the script will return null for the request metadata url for
the deployed-server resource since the stack has not yet been updated
and it's still using the previous Heat signaling.

This patch updates the script to just continue checking the resource
metadata if the request url is null. Eventually, once the resource has
been updated, the script will continue and properly populate the
os-collect-config configuration.

Change-Id: I9db54d8ad278715f42b768edf8f0fd21998b2098
2017-01-08 18:40:50 -05:00
James Slagle
0097da7710 Use OS::Heat::DeployedServer
The new DeployedServer resource in Heat will provide a native resource
for Server resources that are not orchestrated via Nova. This will allow
associating SoftwareDeployment's with servers that have not been
launched with Nova with Heat directly.

With the new resource, all of the SoftwareConfigTransport methods are
available, including POLL_TEMP_URL. This patch also updates the
get-occ-config.sh script to configure the requests collector in
os-collect-config.conf on the deployed servers.

Change-Id: I4b80421088acca709fe3f92741c5c052be483131
Partially-implements: blueprint split-stack-software-configuration
Depends-On: I07b9a053ecd3ef4411b602bbc6ef985224834cf8
2016-12-13 15:50:29 -05:00
James Slagle
64e44e8626 Make get-occ-config.sh support custom roles
Updates the get-occ-config.sh script used with the deployed-server
environment to support custom roles. Any custom role name, and a
corresponding set of hosts (ip addresses or hostnames) can now be passed
to the script and it will query for the proper nested stack uuid's and
configure os-collect-config appropriately on the respective nodes.

Change-Id: I8fc39e6d18cd70ff881e2a284234b26261018d67
2016-12-01 17:43:45 -05:00
Steve Baker
4f88933f9f get-occ-config.sh replace deprecated heat commands
The modern openstack equivalent heat commands require no awk and will
be slightly more efficient.

The roles variable is optionally populated by OVERCLOUD_ROLES so that
a subset of roles can be specified.

Change-Id: I6b66cb3bd81825fba726dd45b0db25896908f6dd
2016-11-28 21:53:19 +00:00
James Slagle
fc93cf3e29 Force a tty for sudo in get-occ-config.sh
This script will sometimes fail with "you must have a tty to run sudo"
depending on how it was executed. Add -tt to the $SSH_OPTIONS to always
force a tty.

Change-Id: Ic1144b9ba90d4af35db826a78e637da965569841
Closes-Bug: #1606544
2016-07-26 07:41:00 -04:00
James Slagle
c3d595c49a Use already Deployed/Installed servers
This patch provides a set of templates that enables
tripleo-heat-templates to be used with a set of already deployed,
installed, and running servers. In this method, Nova and Ironic are not
used to deploy any servers.

This approach is attractive for POC deployments where dedicated
provisioning networks are not available, or other server install methods
are dictated for various reasons.

There are also assumptions that currently have to be made about the software
installed on the already deployed servers.  Effectively, they must match the
standard TripleO overcloud-full image.

Co-Authored-By: Steve Hardy <shardy@redhat.com>

Change-Id: I4ab1531f69c73457653f1cca3fe30cc32a04c129
2016-07-11 16:20:07 -04:00