22 Commits

Author SHA1 Message Date
Ian Main
e144858927 Create flavors for undercloud
We weren't creating the default flavors for the undercloud.  Do it here!

Co-Authored-By: Martin André <m.andre@redhat.com>
Change-Id: Ic0b00ab42422e8d7f1ddd750d993c7919af0823e
2017-12-19 22:17:53 +00:00
Ian Main
5ada69131b Fix permissions on .ssh directory.
Typo I think.. should be 700.

Change-Id: Iaafe68328b507caff46c9d2610a72541f19b0979
2017-12-15 19:31:24 +00:00
Ian Main
da42199dec Generate a default keypair for nova.
This was missing from the post configuration.  Need a default keypair
for CI.

Change-Id: I79ce491890e0b3b7c6ca6f27c762cf8687b1428f
2017-12-09 02:11:54 +00:00
Dan Prince
315091e8dc Add a new UndercloudHomeDir parameter
Add a parameter to control the homedir of the
Undercloud user. Useful if you don't want stackrc
and ssh creds in /root/

Change-Id: I2ad703689b600280b2c1ab1752654f2d334cb6db
Co-Authored-By: Ian Main <imain@redhat.com>
2017-12-09 02:08:29 +00:00
Carlos Camacho
927495fe3d Change template names to queens
The new master branch should point now to queens instead of pike.

So, HOT templates should specify that they might contain features
for queens release [1]

[1]: https://docs.openstack.org/heat/latest/template_guide/hot_spec.html#queens

Change-Id: I7654d1c59db0c4508a9d7045f452612d22493004
2017-11-23 10:15:32 +01:00
Ian Main
74641a37f0 Add a name to the post deployment.
This is used by ansible generation.

Co-Authored-By: Dan Prince <dprince@redhat.com>

Change-Id: Ifad323af8311f70c698bb50e2d4d8ff8b2ab0be9
2017-09-28 19:25:46 -04:00
Martin André
aae3cc1ef5 Fix stackrc for containerized undercloud
Commit 5a400f8011c482abd9c0b550f566bb452159a383 broke the stackrc for
the containerized undercloud, making all the openstack commands fail
with:

  Cannot use v2 authentication with domain scope

This replaces the OS_TENANT_NAME variable with OS_PROJECT_NAME to and
switch to versionless auth_url to use keystone v3 instead.

Change-Id: I869adb75294b38c61e508870a69e1637bb410a94
Closes-Bug: #1719796
2017-09-27 14:12:22 +02:00
Dan Prince
5a400f8011 Sync undercloud stackrc w/ instack
This adds some extra parameters that we now set in instack-undercloud's
stackrc. Some of which are required for the latest keystone v3
support.

Change-Id: I7043d105ce8312656cb3f2ef23cfaded62c9cf83
Closes-bug: #1718991
2017-09-22 14:28:19 -04:00
Ben Nemec
c02a343623 Make Deploy/UpdateIdentifier definition semi-consistent
It seems UpdateIdentifier is an overloaded parameter - it is used
both to trigger package updates in the minor update case as well as
to trigger the upgrade steps during a major upgrade.  I'm not sure
it's appropriate to change either of the descriptions as a result,
so for the moment that is added to the exclusion list.

Change-Id: Ied36cf259f6a6e5c8cfa7a01722fb7fda6900976
Partial-Bug: 1700664
2017-07-21 18:39:13 +00:00
Flavio Percoco
d27c778e3c Don't create networks if neutron is not enabled
With the composable undercloud installer, it's possible to disable
services.  The extraconfig script assumes both, neutron and nova, are
installed and fails if they aren't.

This patch checks if those services are available before.

Change-Id: Idcc2b9809fcfa92649a0a1f45175ce417dc0e608
2017-06-07 13:45:37 +02:00
Carlos Camacho
0a0e2ee629 Update the template_version alias for all the templates to pike.
Master is now the development branch for pike
changing the release alias name.

Change-Id: I938e4a983e361aefcaa0bd9a4226c296c5823127
2017-05-19 09:58:07 +02:00
Zane Bitter
b26fe7d164 Use the make_url function to build URLs
Change-Id: I2b23d92c85d5ecc889a7ee597b90e930bde9028e
Depends-On: I72f84e737b042ecfaabf5639c6164d46a072b423
2017-05-05 14:43:11 -04:00
Dan Prince
b1fe2e8d60 Template and role support for the undercloud
Add a new roles data YAML file and environment to help
create the undercloud via t-h-t.

Partially-implements: blueprint heat-undercloud

Change-Id: I36df7fa86c2ff40026d59f02248af529a4a81861
2017-01-06 20:01:14 -05:00
Steven Hardy
3c6ec654b4 Bump template version for all templates to "ocata"
Heat now supports release name aliases, so we can replace
the inconsistent mix of date related versions with one consistent
version that aligns with the supported version of heat for this
t-h-t branch.

This should also help new users who sometimes copy/paste old templates
and discover intrinsic functions in the t-h-t docs don't work because
their template version is too old.

Change-Id: Ib415e7290fea27447460baa280291492df197e54
2016-12-23 11:43:39 +00:00
Steven Hardy
8c0ba4c09e Add ExtraConfig example that always runs on update
Some user feedback indicates we need better examples showing how
we can run an extraconfig template, e.g on post-deploy so that it
runs every update, regardless of if a change to the config has
occurred.  We can leverage DeployIdentifier for this, just like with
the puppet deployments.

This can be tested with an example like this:

resource_registry:
  OS::TripleO::NodeExtraConfigPost: tripleo-heat-templates/extraconfig/post_deploy/example_run_on_update.yaml

Change-Id: I45d8f8093ab45c03238ec56651c437128661cb95
2016-03-23 14:29:50 +00:00
Steve Baker
1733d74392 Set the name property for all deployment resources
There are two reasons the name property should always be set for deployment
resources:
- The name often shows up in logs, files and API calls, the default
  derived name is long and unhelpful
- Sorting by name determines the merge order of os-apply-config, and the
  execution order of puppet/shell scripts (note this is different to
  resource dependency order) so leaving the default name results in an
  undetermined order which could lead to unpredictable deployment of
  configs

This change simply sets the name to the resource name, but a future change
should prepend each name with a run-parts style 2 digit prefix so that the
order is explicitly stated. Documentation for extraconfig needs to clearly
state what prefix is needed to override which merge/execution order.

For existing overcloud stacks, heat currently replaces deployment resources
when the name changes, so this change
Depends-On: I95037191915ccd32b2efb72203b146897a4edbc9

Change-Id: Ic4bcd56aa65b981275c3d4214588bfc4de63b3b0
2015-12-10 14:48:04 +13:00
Steven Hardy
2793ab34d2 Move RHEL (un)registration to NodeExtraConfig
Currently, we have a problem because the unregistration happens in the
"post deploy" phase, which works fine when the top-level stack is being
deleted, but not when the ResourceGroup of servers is being scaled down,
because then the normal "post deploy" update ordering is respected and
we try to unregister after the corresponding server has been deleted.

So, instead, register/unregister each node inside the unit of scale,
e.g the role template being scaled down, which is possible via the new
NodesExtraConfig interface, which means unregistration will take
place at the right time both on stack delete and on scale-down.

Change-Id: I8f117a49fd128f268659525dd03ad46ba3daa1bc
2015-10-01 10:26:16 +01:00
John Trowbridge
b4eea799ef RHEL registration shouldn't use attach with activation key
In the case of using portal registration with an
activation key, the RHEL registration script is still
executing a `subscription-manager attach` command. This
should not happen if an activation key is provided. This
is because an activation key already provides the
subscriptions to attach.

Change-Id: I2907bede28a9b7bef71cedeea69c876eb4949df0
2015-07-09 17:01:05 -04:00
Steven Hardy
e4c4c4068e Wire in Controller pre-deployment extraconfig
The recently added cinder-netapp extraconfig contains some additional
hieradata which needs to be applied during the initial pre-deployment
phase, e.g in controller-puppet.yaml (before the manifests are applied)
so wire in a new OS::TripleO::ControllerExtraConfigPre provider resource
which allows passing in a nested stack (empty by default) which contains
any required "pre deployment" extraconfig, such as applying this hieradata.

Some changes were required to the cinder-netapp extraconfig and environment
such that now the hieradata is actually applied, and the parameter_defaults
specified will be correctly mapped into the StructuredDeployment.

Change-Id: I8838a71db9447466cc84283b0b257bdb70353ffd
2015-07-06 10:56:11 -04:00
Steven Hardy
6e49e15e65 Use SoftwareDeployments for consistency in extraconfig
Currently we've got a mix of SoftwareConfig resource with
StructuredDeployments resources - while this will work it's
inconsistent and normally using the corresponding
SoftwareDeployments resouce is encourgaged instead.

Change-Id: I308d62d4ff491c073e3e8650fd4c2c65bf96d14a
2015-06-18 09:13:58 -04:00
Steven Hardy
c799b2e04e post-deploy hook for rhel registration
Adds a potential usage of the post-deploy hooks to register a server
with RHN or a satellite.

Note this requires some additional parameters, which can be specified in
environment_rhel_reg.yaml, and this must be passed into the call to heat
via another -e parameter.  An alternative may be to have a global
extraconfig_env.yaml at the top level, which the scripts always pass, or
to use the global environment (/etc/heat/environment.d/default.yaml) on
the seed.

Co-Authored-By: James Slagle <jslagle@redhat.com>
Change-Id: Ia6fd270122cbc2e51beb672654e5e1ebd3bd2966
2015-05-07 16:55:36 -04:00
Steven Hardy
b8b5ca12be Add hooks for extra post-deployment config
Adds optional hooks which can run operator defined additional config on
nodes after the application deployment has completed.

Change-Id: I3f99e648efad82ce2cd51e2d5168c716f0cee8fe
2015-04-24 10:19:04 +01:00