21 Commits

Author SHA1 Message Date
Dan Prince
d2e0dcdb20 Default docker-puppet.py logging to INFO
If you want debug logging you can set the new DockerPuppetDebug
heat parameter to 'True'.

Change-Id: Iae7bb67379351ea15d61c331867d7005f07ba98e
Closes-bug: 1700570
2017-06-28 10:26:32 -04:00
Giulio Fidente
9c1940e461 Provides a list of per-service ctlplane IPs to the workflows env
Adds in the execution environment of the workflow steps a list of
per-service network IPs. This can be used by the workflows to
execute actions against the nodes hosting a given service.

Change-Id: Id7c735d53f04f6ad848b2f9f1adaa3c84ecd2fcd
Implements: blueprint tripleo-ceph-ansible
2017-06-26 16:32:02 +02:00
Giulio Fidente
71f1338816 Allows use of Mistral workflows during deployment steps
Introduces a general mechanism meant to allow for the execution
of workflows during the deployment steps.

Services can define workflow actions to be triggered during a step
in the newly added service_workflow_tasks section. The syntax is:

  service_workflow_tasks:
    step2:
      - name: my_action_name
        action: std.echo
        input:
          output: 'hello world'

Implements: blueprint tripleo-ceph-ansible
Depends-On: If02799e7457ca017cc119317dfb2db7198a3559f
Depends-On: Ibc5707f9f06266fe84ad1dd91dcb984157871d30
Change-Id: I36a642fbc2076ad9e4a10ffc56d6d16f3ed6f27a
2017-06-26 16:28:23 +02:00
Jenkins
05ec01df43 Merge "Moving *postconfig where it was *postpuppet" 2017-06-12 22:21:44 +00:00
Carlos Camacho
834fe9cde3 Moving *postconfig where it was *postpuppet
We need to ensure that the pacemaker cluster restarts
in the end of the deployment.

Due to the resources renaming we added the
postconfig resource not in the end of the
deployment as it was *postpuppet.

Closes-bug: 1695904

Change-Id: Ic6978fcff591635223b354831cd6cbe0802316cf
2017-06-12 19:17:21 +02:00
Michele Baldessari
30bf499eae Remove pip install paunch
We now have python-paunch-1.1.1 [1] in the overcloud images so we do not
need to pip install it any longer.

[1] https://trunk.rdoproject.org/centos7-master-head/current/python-paunch-1.1.1-0.20170602043913.c8e22e5.el7.centos.noarch.rpm

Change-Id: I1ede514a8aee7ac217fa75843e67fb6542e06f99
2017-06-11 20:21:42 +02:00
Steven Hardy
03811f176a Convert puppet and docker steps to ansible
Replace the multiple SoftwareDeployment resources with a common
playbook that runs on all roles, consuming the configuration data
written via the HostPrepAnsible tasks.

This hopefully simplifies things, and will enable re-running the
deploy steps for minor updates (we'll need some way to detect
a container should be replaced, but that will be done via a
follow-up patch).

Change-Id: I674a4d9d2c77d1f6fbdb0996f6c9321848e32662
2017-06-06 15:44:01 +01:00
Jiri Stransky
76ee9d1d38 Remove duplicate PreConfig definition
We had two exactly the same definitions of PreConfig in
docker_steps.j2.yaml. We should remove one of them.

I chose to remove the first definition, as the 2nd definition is amended
by change I674a4d9d2c77d1f6fbdb0996f6c9321848e32662, so we'll avoid a
conflict.

Change-Id: If65e30daefcf6552e085c7648c6691b7068834d4
2017-05-24 15:00:22 +02:00
Jiri Stransky
a42b93d503 Fix race condition between docker-puppet and container steps
GenerateConfigDeployment wasn't anchored with dependencies anywhere. If
it took too long to complete and step 1 of containers creation already
started executing, problems happened. This is now fixed by adding the
required dependency relationship.

Change-Id: Ie7dfd2a965e704ba278d4c2fad67f14a3a62799e
Closes-Bug: #1692503
2017-05-24 12:21:47 +02:00
Jenkins
f231f6a3d3 Merge "Consolidate writing json configs with HostPrepTasks" 2017-05-20 00:08:35 +00: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
Steven Hardy
c96130bb79 Consolidate writing json configs with HostPrepTasks
We already have an ansible deployment that applies the per-service
host_prep_tasks, so we can simplify the dependencies here by just
doing the docker-steps host preparation at the same time.

The motivation behind this is to both simplify the depends_on web we
have here, reduce the number of discrete deployments, and also to
potentially make running ansible directly e.g for debugging easier.

In a future patch we'll convert the configuration steps to work in
a similar way, such that they can be more easily reapplied e.g for
rolling minor updates, possibly outside of heat.

Change-Id: I9a201fc5a9e82c7fba4c2de36eb5332e21a81d37
2017-05-17 15:15:11 +01:00
Steven Hardy
ba44524d46 Fix dependencies for PreConfig/PostConfig resources
We have a circular dependency errror since

https://review.openstack.org/#/c/452734/ landed.

This adjusts the dependencies to ensure we run pre-config before
the first puppet deploy step, and removes the duplicate declaration
of the ControllerPostConfig resource.  Also we ensure the first
container step always depends on the same step puppet deploy.

Change-Id: I70c5a39fb36b951bdeb04c15bddac7d00eebf08a
Closes-Bug: #1686098
2017-04-25 15:13:38 +00:00
Carlos Camacho
258c6ce52d Merge pre|post puppet resources into pre|post config.
The [Pre|Post]Puppet resources were renamed in
https://review.openstack.org/#/c/365763.
This was intended for having a pre/post deployment
steps using an agnostic name instead of
being attached to a technology.

The renaming was unintentionally reverted in
https://review.openstack.org/#/c/393644/ and
https://review.openstack.org/#/c/434451.

This submission merge both resources into one,
and remove the old pre|post hooks.

Closes-bug: #1669756
Change-Id: Ic9d97f172efd2db74255363679b60f1d2dc4e064
2017-04-24 12:56:49 +02:00
Jenkins
85b2282336 Merge "Use -net=host for docker-puppet.py config gen" 2017-04-21 12:56:11 +00:00
Steven Hardy
0a5d85ea32 Add defaults for docker puppet tasks
Currently we're referencing some steps that don't exist in the
output from the OS::Heat::Value resource, but as noted in the heat
bug #1681749 I think this isn't valid and probably should not be
allowed, so instead merge defaults with the non-empty step
tasks. To avoid further duplication of the loop variables, I
made the max step a variable.

Change-Id: Icf3d639b53c97006a0c370c12600449fba6f3323
Related-Bug: #1681749
2017-04-20 15:31:31 +00:00
Alex Schultz
be274f1f49 Add tags to roles
Prior to Ocata, the Controller role was hardcoded for various lookups.
When we switched to having the primary role name being dynamically
pulled from the roles_data.yaml using the first role as the primary
role as part of I36df7fa86c2ff40026d59f02248af529a4a81861, it
introduced a regression for folks who had previously been using
a custom roles file without the Controller being listed first.

Instead of relying on the position of the role in the roles data, this
change adds the concepts of tags to the role data that can be used when
looking for specific functionality within the deployment process. If
no roles are specified with this the tags indicating a 'primary'
'controller', it will fall back to using  the first role listed in the
roles data as the primary role.

Change-Id: Id3377e7d7dcc88ba9a61ca9ef1fb669949714f65
Closes-Bug: #1677374
2017-04-12 06:55:29 -06:00
Dan Prince
93e0e58bcc Use -net=host for docker-puppet.py config gen
We pass the short hostname to docker-puppet.py. In order to satisfy the
factor FQDN check for the short hostname we need to run the container
with --net=host in some cases.

Change-Id: I2929f122f23ee33e8ea5d4c5006d2bbb8b928b67
Closes-bug: #1681903
2017-04-11 13:51:26 -04:00
Jiri Stransky
6050809e57 Tasks hook for preparing BM host for deploying containerized services
This implements a host_prep_tasks hook where we can specify Ansible
tasks to perform on the host before deploying containerized
services. The hook runs in a single step, the assumption is that we will
mostly use the hook for creating per-service directories on the host to
ensure we are able to mount them into the containers. (We cannot do this
operation via Puppet because all containerized services run their Puppet
within a config container, so Puppet doesn't have access to host's
filesystem.)

Change-Id: I7d8bac39e0cd422fd651eefe29f7d10941ab4a1a
2017-03-13 11:01:06 +01:00
Dan Prince
ab83e7731c Remove docker_image sections (unused)
We don't use docker_image for anything. It is a remant of the
pre-composable docker templates and we can now remove it.

This patch removes references to the 'docker_image' section
from docker/post.yaml and all of the docker/services* templates.

Change-Id: I208c1ef1550ab39ab0ee47ab282f9b1937379810
2017-03-10 08:35:57 +01:00
Steven Hardy
fb748ba307 Enable composable upgrades for docker service templates
This aligns the docker based services with the new composable upgrades
architecture we landed for ocata, and does a first-pass adding upgrade_tasks
for the services (these may change, atm we only disable the service on
the host).

To run the upgrade workflow you basically do two steps:

openstack overcloud deploy --templates \
  -e environments/major-upgrade-composable-steps-docker.yaml

This will run the ansible upgrade steps we define via upgrade_tasks
then run the normal docker PostDeploySteps to bring up the containers.

For the puppet workflow there's then an operator driven step where
compute nodes (and potentially storage nodes) are upgrades in batches
and finally you do:

openstack overcloud deploy --templates \
  -e environments/major-upgrade-converge-docker.yaml

In the puppet case this re-applies puppet to unpin the nova RPC API
so I guess it'll restart the nova containers this affects but otherwise
will be a no-op (we also disable the ansible steps at this point.

Depends-On: I9057d47eea15c8ba92ca34717b6b5965d4425ab1
Change-Id: Ia50169819cb959025866348b11337728f8ed5c9e
2017-03-06 15:53:46 +00:00