149 Commits

Author SHA1 Message Date
Christian Berendt
4cd95dbcc5 Enable central logging without deploying elasticsearch/kibana
This changed introduces 4 new parameters to be able to use an existing
elasticsearch service for central logging.

* elasticsearch_address - address of elasticsearch server
* elasticsearch_protocol - protocol (HTTP/HTTPS) used by elasticsearch server
* enable_elasticsearch - deploy elasticsearch container
* enable_kibana - deploy kibana container

Closes-bug: #1584861

Change-Id: Ia1ff9ae8b6d9929c3826da02693d1e2fc9ea2522
2016-08-03 21:59:51 +02:00
Dave Walker (Daviey)
c3a6aa684a Add Watcher ansible roles and templates
Previous work on Watcher added the Docker images, this
change adds the ansible configuration.

There is support for HA, via haproxy to balance across the
Watcher API hosts.

There is also a hook into nova.conf to conditionally add
Nova compute Host metrics via Ceilometer if Watcher is enabled.

This defaults to enabled false.

Change-Id: I8763528bb6ff12943b810212c71396d2d7cf6836
Partial-bug: #1598929
Partially-implements: bp watcher
Signed-off-by: Dave Walker (Daviey) <email@daviey.com>
2016-07-22 11:45:19 +01:00
Dennis Mueller
30e3d90499 Add missing configuration files for ceilometer
Added pipeline.yaml, event_pipeline.yaml and event_definitions.yaml
based on sample files in OpenStack documentation

Edited haproxy.cfg for ceilometer support

Edited ceilometer-base dockerfile for missing dependency

Change-Id: I6ade05255e7e1aa7dbcffd026fad5869036d0d32
Closes-Bug: #1604004
2016-07-19 07:41:38 +02:00
Jenkins
04f4e074c1 Merge "Fix the upgrade haproxy failed" 2016-07-08 09:42:42 +00:00
Jeffrey Zhang
fd641380ad Fix the upgrade haproxy failed
The haproxy failed when there is one stand alone network node

Closes-Bug: #1598339
Change-Id: I3390ee37eb51c292fc5149fc22b4f6a6f07da688
2016-07-02 11:20:45 +08:00
Dipa Thakkar
e26751b955 Remove MariaDB warning from HAproxy
The forwardfor option cannot be used in certain modes
such as TCP.  To resolve that create a special default
section for MariaDB

Change-Id: I743bbbfb732b04f115d1a878a0dfc22e29d2623d
Closes-Bug: #1549746
2016-06-27 11:36:10 -04:00
Christian Berendt
c073b2d897 Remove EC2 API related configurations and tasks
The Nova EC2 API is disabled by default, the default value
of the enabled_apis parameter in nova.conf is "osapi_compute, metadata"
The EC2 API is marked as deprecated and will be removed from Nova in
the future.

Change-Id: I6b9d66017e066cde5749be45b367194d2192ead3
Closes-bug: #1586605
2016-06-16 12:16:07 +02:00
Jenkins
162fa25829 Merge "Run HAProxy in a chroot jail" 2016-05-27 21:19:46 +00:00
Waldemar Znoinski
a2c2eba34f add support for non-default database_port in kolla/ansible
This change makes each step of the kolla deployment aware
of the port database was configured to listen on.
It defaults mariadb_port to database_port.

Change-Id: I8e85d5732015afc0a5481cb33e0b629fdfa84a1b
Closes-Bug: #1576151
DocImpact
2016-05-13 12:12:25 +00:00
Michal Rostecki
a5c1aa0b81 Run HAProxy in a chroot jail
It's impossible to drop root for the HAProxy container.
But HAProxy provides a possibility to use a chroot jail.

When attaching to the HAProxy container, we see that
the root directory is changed:

    $ sudo docker exec -ti haproxy bash
    (haproxy)[root@operator /]# ls -di /
    259 /

Co-Authored-By: Vikram Hosakote <vhosakot@cisco.com>

Closes-Bug: #1552289

Change-Id: I9d55e9b741b8560cac53dc8b837a24a3029a4dc0
2016-05-06 10:23:49 +02:00
Jeffrey Zhang
0fcee87549 map the host localtime to the container
Closes-Bug: #1577148
Change-Id: I636cefc63cf532434a41af3898b63dffa711e280
2016-05-03 09:27:51 +08:00
Dave McCowan
4c8227ec8b Add TLS to Kibana Web Interface
Use HAProxy to terminate a TLS connection on port 5601 for the
Kibana dashboard when TLS is enabled for Kolla. x-forwarded-for
and x-forwarded-proto headers are set to give Kibana the info it
needs to write returned URLs.

Change-Id: I03a2dd3a8e2513d38281b30bf4bae6449fec0316
Closes-bug: #1566117
2016-04-15 14:06:36 -04:00
Jenkins
d3f7eee9c1 Merge "Start the haproxy by using haproxy-system-wrapper" 2016-04-06 19:23:38 +00:00
Jenkins
3161202bd9 Merge "Enable the kibana access from the external network" 2016-04-05 11:57:47 +00:00
Carlos Cesario
676998a124 Make keepalived virtual_router_id param configurable
To be kolla deploy multiple clouds, we need to be able to configure
virtual_router_id other wise haproxy will fail setup the VIP for the
second cloud.

Partially-Implements: blueprint multiple-cloud
Closes-Bug: #1564547
Change-Id: I9eb27dd6fba61205841eadafc96601e235d2fe6d
2016-04-01 17:35:35 -03:00
Dave McCowan
bbbe84667d When two interfaces are used for two VIPs, tie them together
When a node uses two physical interfaces for its two VIPs, these
physical interfaces should be tied together, so both VIPs will
be taken out of scheduling if either one fails.  Without this change,
if a request comes into one interface that needs access to the
second interface to process the request, the original request
unnecessarily fails.  Repeating this results in a black hole where
a failing server keeps getting new requests.

Change-Id: Ic51e6584c1fbda3eb7821cb47f759c77e562cc65
Closes-Bug: #1550455
2016-04-01 12:04:22 -04:00
Jeffrey Zhang
5680bf0f24 Enable the kibana access from the external network
Closes-Bug: #1564440
Change-Id: I8b9ff303d131fab18e51e9f99c64f4e4004f41b4
2016-03-31 22:34:14 +08:00
Jeffrey Zhang
de6650874d Start the haproxy by using haproxy-system-wrapper
haproxy-system-wrapper is a solution for systemd from upstream. it can
handle the reload graceful.

Change-Id: I6a3d141af065e429bd1be1b7252f5c6df1fda3bb
Closes-Bug: #1559238
2016-03-30 18:07:40 +08:00
akwasniewska
ba62740a93 Add kibana authentication using HAproxy
Change-Id: Ib501571dd34cb68924775ce738499d63df5718dd
Closes-Bug: 1556487
2016-03-24 11:46:06 +01:00
Jenkins
d9d70d0502 Merge "Reconfigure for haproxy" 2016-03-23 07:14:27 +00:00
SamYaple
f4175f04d7 Fix 'optional' config.json values
These values are optional only when the services are not enabled.

If the file does not exist we should not warn, but rather inform.

Ceph-mon is an exception here since its bootstrap process means
the files may or may not exist initially.

TrivialFix

Change-Id: Ic02bece76d480e99deecf612036f37abb5604135
2016-03-19 23:01:27 +00:00
MD NADEEM
a41ab6fd73 Reconfigure for haproxy
Add reconfiguration for haproxy

Co-Authored-By: Jeffrey Zhang <jeffrey.zhang@99cloud.net>
Closes-Bug: #1553528
Change-Id: Ibe9266dfac8e79c5aa56a17eb908ff12cd81cc05
2016-03-17 21:12:52 +08:00
SamYaple
22fe11840b Move sysctl out of haproxy container
sysctl was improperly set in the contaienr itself which is not correct

TrivialFix

Change-Id: If2ffca6d2a40e86db4af2f103a27b280bc5fa2ff
2016-03-15 14:56:38 +00:00
Jenkins
ae27f19aff Merge "Use nopreempt for keepalived" 2016-03-14 14:00:00 +00:00
SamYaple
024d76534e Use nopreempt for keepalived
Without this option the vip will always bounce to the highest priority
node that is up. So if you reboot the highest priority node the vip
will fail to the second highest. When the highest priority node
recovers it will claim the vip again leaving you will two fail overs
rather than one.

TrivialFix

Change-Id: I4a3c6c10eee391cdbdd80c44a71a9fafd1069944
2016-03-14 01:36:33 +00:00
SamYaple
9500bd239a haproxy formatting was incorrect
haproxy 1.6+ does not allow the formatting that was used for stats
listener. We need to adjust it to the correct syntax

TrivialFix

Change-Id: I5f0111c756d40a0cf7385e6963ebbb57adb36b35
2016-03-14 00:24:38 +00:00
Éric Lemoine
95e8ac65d1 Do not make Kibana available at the external VIP
Kibana is a tool for operators. It should not be accessible though
the external VIP.

Closes-Bug: #1554977
Change-Id: I1dc101de18e4e01ebde9d317ab7e3193e307a14e
2016-03-09 10:12:59 +01:00
Dave McCowan
3b378b11ed Glance registry should only be accessible from internal network
When configured with a separate external VIP, glance registry
should listen on only the internal VIP.

TrivialFix

Change-Id: Ie186f2ea391b53b9ea0cb230c573c9e09efd44b2
2016-03-07 22:17:34 -05:00
Jenkins
08101fd465 Merge "Make Heka send logs to Elasticsearch" 2016-03-05 15:36:44 +00:00
Éric Lemoine
491aff0b88 Make Heka send logs to Elasticsearch
This patch includes changes relative to integrating Heka with
Elasticsearch and Kibana.

The main change is the addition of an Heka ElasticSearchOutput plugin
to make Heka send the logs it collects to Elasticsearch.

Since Logstash is not used the enable_elk deploy variable is renamed
to enable_central_logging.

If enable_central_logging is false then Elasticsearch and Kibana are
not started, and Heka won't attempt to send logs to Elasticsearch.

By default enable_central_logging is set to false. If
enable_central_logging is set to true after deployment then the Heka
container needs to be recreated (for Heka to get the new
configuration).

The Kibana configuration used property names that are deprecated in
Kibana 4.2. This is changed to use non-deprecated property names.

Previously logs read from files and from Syslog had a different Type
in Heka. This is changed to always use "log" for the Type. In this
way just one index instead of two is used in Elasticsearch, making
things easier to the user on the visualization side.

The HAProxy configuration is changed to add entries for Kibana.
Kibana server is now accessible via the internal VIP, and also via
the external VIP if there's one configured.

The HAProxy configuration is changed to add an entry for
Elasticsearch. So Elasticsearch is now accessible via the internal
VIP. Heka uses that channel for communicating with Elasticsearch.

Note that currently the Heka logs include "Plugin
elasticsearch_output" errors when Heka starts. This occurs when Heka
starts processing logs while Elasticsearch is not yet started. These
are transient errors that go away when Elasticsearch is ready. And
with buffering enabled on the ElasticSearchOuput plugin logs will be
buffered and then retransmitted when Elasticsearch is ready.

Change-Id: I6ff7a4f0ad04c4c666e174693a35ff49914280bb
Implements: blueprint central-logging-service
2016-03-05 11:51:49 +01:00
Jenkins
32ce37cb8f Merge "Fix horizon with ssl" 2016-03-04 23:17:52 +00:00
SamYaple
dd8e1cb2ee Fix horizon with ssl
Ubuntu did not have mod_headers enabled by default

Remove unused variable and adjust 'when' conditional positioning

TrivialFix

Change-Id: I82b8724526c24f4481a80165520d624f6a02c336
2016-03-04 14:51:50 +00:00
Jeffrey Zhang
e6b230d784 Add authentication for keepalived
TrivialFix

Closes-Bug: #1551314
Change-Id: Id85859500aec283703b6b6714abf213a42286182
2016-03-04 21:28:01 +08:00
Dave McCowan
3daded6242 Add TLS protection on external API endpoints
TLS can be used to encrypt and authenticate the connection with
OpenStack endpoints.  This patch provides the necessary
parameters and changes the resulting service configurations to
enable TLS for the Kolla deployed OpenStack cloud.

The new input parameters are:

kolla_enable_tls_external: "yes" or "no" (default is "no")
kolla_external_fqdn_cert: "/etc/kolla/certificates/haproxy.pem"
kolla_external_fqdn_cacert: "/etc/kolla/certificates/haproxy-ca.crt"

Implements: blueprint kolla-ssl

Change-Id: I48ef8a781c3035d58817f9bf6f36d59a488bab41
2016-03-03 14:44:37 -05:00
SamYaple
d3cfb2052a Change kolla_internal_address variable
Due to poor planning on our variable names we have a situation where
we have "internal_address" which must be a VIP, but "external_address"
which should be a DNS name. Now with two vips "external_vip_address"
is a new variable.

This corrects that issue by deprecating kolla_internal_address and
replacing it with 4 nicely named variables.

kolla_internal_vip_address
kolla_internal_fqdn
kolla_external_vip_address
kolla_external_fqdn

The default behaviour will remain the same, and the way the variable
inheritance is setup the kolla_internal_address variable can still be
set in globals.yml and propogate out to these 4 new variables like it
normally would, but all reference to kolla_internal_address has been
completely removed.

Change-Id: I4556dcdbf4d91a8d2751981ef9c64bad44a719e5
Partially-Implements: blueprint ssl-kolla
2016-02-26 20:00:09 +00:00
Jenkins
6fa1ce127d Merge "HAProxy and Keepalived upgrade" 2016-02-25 23:05:13 +00:00
Jenkins
c79174012c Merge "Add the default empty reconfigure.yml file to all roles" 2016-02-25 21:58:56 +00:00
Michal (inc0) Jastrzebski
097e259ee9 HAProxy and Keepalived upgrade
This is single task to upgrade both haproxy and keepalived. It stops
slave nodes of keepalived and upgrades them separately to avoid
VIP migration and allow nearly no-downtime upgrade

Change-Id: I06124635a3f3553a4e8e91013cefbf897dd7179f
Implements: blueprint upgrade-haproxy
Implements: blueprint upgrade-keepalived
Partially-implements: blueprint upgrade-kolla
2016-02-25 19:05:20 +00:00
Jeffrey Zhang
d26c259754 Add the default empty reconfigure.yml file to all roles
DocImpact

Partially-implements: bp kolla-reconfig
Change-Id: I9738e80960bcfbef18d1ef1b7942f81c45684e85
2016-02-25 09:32:53 +08:00
Jenkins
bb48523f9f Merge "Use passed client IP address in various audit logs" 2016-02-24 17:00:35 +00:00
Dave McCowan
b770339534 Use passed client IP address in various audit logs
HAProxy: change to use option forwardfor to pass origin IP address
to backend via X-Forwarded-For header

Keystone: Apache does the audit logs for keystone.  Change the
LogFormat to display the passed address instead of the connection
address which is that of the load balancer.

Nova, Cinder, Glance: these services can make use of the address
passed in X-Forwarded-For.  With this setting the API logs for
these services include the client IP address.

Change-Id: Ia861ecc11a7c7d463d0366586926d1a842853f69
Closes-Bug: #1548935
2016-02-24 09:51:13 -05:00
Dave McCowan
34c2cb8e64 Implement Option for Two VIPs to separate API traffic
To improve security, operators have asked for two VIPs for
their cloud.

VIP 1 is the internal VIP that can reach internal and admin endpoints.
In addition, the internal VIP can also reach other internal services,
such as the database and message services.
VIP 2 is the external VIP that can only reach public endpoints.

With one VIP only, all services are reached at the same address.

To add a second VIP, this patch adds two new configuration parameters.

kolla_external_vip_address: is an IPv4 address to use for created VIP
kolla_external_vip_interface: is the network interface to use for VIP
In this scenario, the first VIP (the internal VIP), is defined by
the original parameters (kolla_internal address and network_interface).

When using two VIPs, the existing kolla_external_address parameter
should be/point to/resolve to the kolla_external_vip_address.

Closes-bug: 1535333

Change-Id: I5bfcefaf7899298455cdade8209c34324aebfecb
2016-02-24 09:18:06 -05:00
Éric Lemoine
3fca4ccbaf Make Heka collect HAProxy and Keepalived logs
Partially implements: blueprint heka
Change-Id: I7e2bf4e520fa14fd40e3b329f3b2998ae6ea47f4
2016-02-19 20:32:10 +00:00
SamYaple
7ddad3f3d5 Move haproxy socket to volume
Partial-Bug: #1544545
Change-Id: I292bcaeacb080ff4c5ab6b42b7d899039d6b19c4
2016-02-17 14:45:59 +00:00
Hui Kang
3ae0063944 Add an ansible role for mongodb
Change-Id: Ia6ac371845d1f2b545406d096b35a6d5f68be5f6
Implements: blueprint ansible-mongodb
2016-01-27 10:48:34 -05:00
Michal Jastrzebski
375965ddfb Add stub upgrade.yml
After introduction of pull action and turing every main.yml into
{{action}}.yml we lost ability to perform upgrade

Change-Id: Ie9fa2cd083b061033abc733fba53d54f9c55e393
Fixes-Bug: #1538210
2016-01-26 11:52:19 -06:00
Maciej Szankin
57fdb0ceed Consistency changes in configs
TrivialFix

Change-Id: Iafd92e4e962dec5a225582ff058ab3603e5a50bb
2016-01-19 14:58:11 +01:00
SamYaple
e435042b9b Allow haproxy role to pull images
Change-Id: I094f1d35f60bf566ba7382504a7425f16ae975d8
Partially-Implements: blueprint pre-pull-images
2016-01-06 04:23:28 +00:00
SamYaple
a6eba02256 Convert haproxy to kolla_docker
Change-Id: Iff39395010f47099e7dbbb9ddf7c014756455e91
Partially-Implements: blueprint kolla-docker-module
2015-12-31 16:38:56 +00:00
Andrey Shestakov
1a368c9134 Add RadosGW container
Implements blueprint radosgw-container

Change-Id: Idc88a67a0979be626d3eaa9b2b9a527010aa2006
2015-12-29 12:49:03 +00:00