Commit Graph

14 Commits

Author SHA1 Message Date
Emilien Macchi fc65d197c7 Move apache service under deployment directory
Move the apache service undercloud the deployment directory.

Change-Id: Iead4f910390cb75f56f96da2d24889a461275c9d
Related-Blueprint: services-yaml-flattening
2019-03-26 08:04:42 -04:00
Juan Antonio Osorio Robles 514f99c575 TLS everywhere: Set post-save command for httpd
The default command wasn't working, so here we set one that will
actually work.

httpd is a fairly simple instance, since the certs are mounted from the
directory (and not the individual certs). So there is no need to copy
anything to the container or do any post-processing. All we need to do
is tell httpd to load the new certs.

Related-Bug: #1811401
Depends-On: I642f48aa0e66ca57de2ecee921c798747ba41e1a
Change-Id: I862f0d15f769167c8b5d27cf302b7087b8fad0ab
2019-01-29 05:51:29 +00:00
Harald Jensås 53027484ae Skip templating disabled networks
Ignore disabled networks when rendering templates.

Add's the ctlplane network to maps to ensure we don't
end up with no keys/values in map_replace functions.

Also some Jinja cleanup:
 - Reduce the number of times we iterate over networks
   where we can.
 - Add's indentation to make the code easier to read.

Related-Bug: #1809313
Depends-On: I2e8135bc9389d3bf1a6ef01e273515af5c488a9a
Change-Id: Ifeb2d2d1acb43c16a5bf29e95965776494d61fef
2019-01-21 19:35:37 +01:00
Harald Jensås da1de3aafc Apache - Use net_cidr_map for proxy_ips
Change I68e064d23ec5d43f59146d974cae604d2c5fdb52 makes
NetCidrMapValue a list of ip networks.

Pass the list of cidr's from the ApacheNetwork entry in
the cidr map to 'apache::mod::remoteip::proxy_ips:'.

Partial: blueprint tripleo-routed-networks-templates
Change-Id: Ieb6aff9889136f0ccbec32e36b46140aa7826019
2019-01-06 18:20:38 +01:00
Harald Jensås 8665a0d97b Make NetCidrMapValue contain list of cidrs in each net
Prior to routed networks we only had one subnet per network.
With routed networks each network can have multiple subnets.
The NetCidrMapValue should contain a list storing the cidr
of each subnet for each network.

Ceph:
  list_join is used to make a comma separated list of
  cidrs for public_network, monitor_address_block,
  cluster_network and radosgw_address_block.

Partial: blueprint tripleo-routed-networks-templates
Depends-On: Ia8e219b30d4f8b199b882e95fe2834252a92c15a
Depends-On: I1ace0a02e6aa2610559fee0d8576e6f1bc98d699
Change-Id: I68e064d23ec5d43f59146d974cae604d2c5fdb52
2019-01-06 18:20:27 +01:00
Emilien Macchi e4ee042a2a upgrade: remove tasks that stop and disable services
We don't need upgrade_tasks that stop systemd services since all
services are now containerized.
However, we decided to keep the tasks that remove the rpms in case some
of deployments didn't cleanup them in previous releases, they can still
do it now.

Change-Id: I6abdc9e37966cd818306f7af473958fd4662ccb5
Related-Bug: #1806733
2018-12-10 09:19:59 -05:00
Rabi Mishra 2777c2b7d8 Set `TraceEnable` directive for apache to 'Off'
Openstack service don't support TRACE requests, so there is little
point allowing TRACE for apache.

Change-Id: I396a4c3bfab8f353d038b011d5dc8029f4137a57
Closes-Bug: #1801298
2018-11-02 12:10:55 +05:30
Emilien Macchi b3a7cfc43f ansible: replace yum module by package module when possible
Problem: RHEL and CentOS8 will deprecate the usage of Yum.

From DNF release note:
DNF is the next upcoming major version of yum, a package
manager for RPM-based Linux distributions.
It roughly maintains CLI compatibility with YUM and defines a strict API for
extensions.

Solution: Use "package" Ansible module instead of "yum".

"package" module is smarter when it comes to detect with package manager
runs on the system. The goal of this patch is to support both yum/dnf
(dnf will be the default in rhel/centos 8) from a single ansible module.

Change-Id: I8e67d6f053e8790fdd0eb52a42035dca3051999e
2018-07-21 00:17:25 +00:00
Lukas Bezdicka 81db32ca8c Upgrades: Refactor httpd_enabled variable
To not to redefine variable multiple times in each service we
split httpd_enabled to per service fact set in step|int == 0 block.

Change-Id: Icea0865aadd9253ead464247bf78f45842b3a578
2018-05-31 13:46:15 +02:00
Carlos Camacho 44ef2a3ec1 Change template names to rocky
The new master branch should point now to rocky.

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

Also, this submission updates the yaml validation to use only latest
heat_version alias. There are cases in which we will need to set
the version for specific templates i.e. mixed versions, so there
is added a variable to assign specific templates to specific heat_version
aliases, avoiding the introductions of error by bulk replacing the
the old version in new releases.

[1]: https://docs.openstack.org/heat/latest/template_guide/hot_spec.html#rocky
Change-Id: Ib17526d9cc453516d99d4659ee5fa51a5aa7fb4b
2018-05-09 08:28:42 +02:00
Juan Antonio Osorio Robles 1b54e4b5a7 Disallow SSLv2, SSLv3 and TLS1.0 in httpd for FedRAMP compliance.
We now enforce TLS1.1 or higher for httpd connections, to meet the
requirements for FedRAMP.

Change-Id: If875822f1cb705d17405621e64fea2536edc142a
Related-Bug: #1754368
2018-04-19 09:51:20 +03:00
Steven Hardy 3a7baa8fa6 Convert ServiceNetMap evals to hiera interpolation
Since https://review.openstack.org/#/c/514707/ added the net_ip_map
to hieradata, we can look up the per-network bind IPs via hiera
interpolation instead of heat map_replace.

In some cases the ServiceNetMap lookup is used for other things,
but anywhere we make use of the "magic" translation via NetIpMap
is changed the same way.

This will enable more of the configuration data to be exposed per
role vs per node in a future patch (to simplify our ansible
workflow).

Co-authored-by: Bogdan Dobrelya <bdobreli@redhat.com>
Change-Id: Ie3da9fedbfce87e85f74d8780e7ad1ceadda79c8
2018-03-10 08:18:30 +00:00
Lukas Bezdicka 0cb5c847f3 Always evaluate step first in conditional
If we use variables defined in later step in conditional before
checking which step are we on we will fail.

Resolves: rhbz#1535457
Closes-Bug: #1743764
Change-Id: Ic21f6eb5c4101f230fa894cd0829a11e2f0ef39b
2018-02-09 17:12:29 +01:00
Oliver Walsh fa66c327fc Do not generate apache/haproxy certs for invalid networks
Certs were being generated for all networks in service net map.
This was failing as we do not generate hieradata for all of these networks.

Switching from yaql to jinga templating to match the logic that
generates the hieradata.

Change-Id: Ic6c25aceb07ea3824a8fb23549bc5d1205e5cefc
Closes-bug: 1748023
Closes-Bug: 1748053
2018-02-08 12:50:04 +00:00