Commit Graph

24 Commits

Author SHA1 Message Date
Dan Prince a52498ab4d Move containers-common.yaml into deployment
Change-Id: I8cc27cd8ed76a1e124cbb54c938bb86332956ac2
Related-Blueprint: services-yaml-flattening
2019-04-14 18:15:12 -04:00
Emilien Macchi 860333cf31 Rename /var/lib/docker-config-scripts to /var/lib/container-config-scripts
We don't have Docker anymore so let's avoid confusion and rename this
directory.

Change-Id: I79fca28ef8e5396fee78bef992fd800918f05b88
2019-03-26 21:21:57 +00:00
Emilien Macchi 24fb8776dd Rename docker_puppet_apply to container_puppet_apply
Change-Id: I1e23b78f54f3609b249565bf3c448453b684d214
2019-03-12 00:57:21 +00:00
Emilien Macchi 160cddda3f Rename docker_config_scripts to container_config_scripts
Change-Id: Iabd65560c2fc28b3aeca07a21efa861c4c583c01
2019-03-06 09:05:50 -05:00
Michele Baldessari f279e6ce6b noop package installation inside docker_puppet_apply.sh
Just as we noop package installation in docker-puppet.py when run
inside containers (via I2bd247af2b54f3a834cdc8a2f253600527c7acd8)
we should always noop them inside the docker_puppet_apply.sh helper
script as it is always run inside containers anyway.

Co-Authored-By: Damien Ciabrini <dciabrin@redhat.com>

Change-Id: I572e31e933f7fd5b1bb695f28f78d57dceb28994
Related-Bug: #1812923
2019-01-26 11:18:07 +01:00
Alex Schultz a6408f0c09 Add python shim for docker config scripts
Unfortunately we may not necessarily know what version of python is
available in the containers when we run some python config scripts. In
order to work around this we have a pyshim which will try and find an
existing version of python available to run the script under. The
pyshim.sh will try python3 then python2 then python.

Depends-On: https://review.openstack.org/#/c/617716/
Change-Id: Ie08481722e9b22bb67d5282828df0941f37a140a
Closes-Bug: #1803411
2018-11-15 15:06:56 +00:00
Steve Baker 6bbc3b51df docker-puppet.py: used dedicated hiera entry, not uuid
Currently it is not possible to do per-node customization inside
docker-puppet.py because it overrides the fact 'uuid'.

This change adds a dedicated docker_puppet entry in hiera.yaml so that
docker-puppet.py needs to do nothing special for
/etc/puppet/hieradata/docker_puppet.json to be included in the hiera
merge.

Change-Id: Icf37dcd63e0152ee15e9f0079b45e31a4f8d9fbb
Depends-On: https://review.openstack.org/#/c/605478/
Closes-Bug: #1761624
2018-10-01 12:21:46 -04: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
Cédric Jeanneret 3637f0325f Added missing pki volume for custom CA.
Some services want the CA to be in the anchors directory. Just mount it
everywhere.

Change-Id: I5cf028d9424a253f8b5d66d818a091508b9486d7
Closes-Bug: #1766178
2018-04-23 13:37:20 +02:00
Michele Baldessari dc811f803a Fix a typo in docker_puppet_apply.sh
In change Icf4a64ed76635e39bbb34c3a088c55e1f14fddca we did a refactoring
of the puppet apply commmands into a single script. A typo slipped in
where we set FACTOR_uuid instead of FACTER_uuid

Change-Id: If67d1bbf50d4fdaffa14e197dffc90f5b1577712
Closes-Bug: #1750000
2018-02-16 18:31:31 +01:00
Alex Schultz 6f834f60e6 Use docker_config_scripts for puppet apply
There are some configuration applies that we need to do during the
deployment. These currently live as manually constructed bash runs which
are missing the --detailed-exitcode handling to know when we have
failures.  In order to reduce the duplicated code and simplify this
exeuction, this change creates a docker_config_scripts with
docker_puppet_run.sh in containers-common that can be reused by any of
the docker services. This allows use to properly handle
--detailed-exitcodes while also reducing the amount of duplicated code
bits that we have within THT.

Additionally this change adds a new shared value for ContainersCommon to
pull the required volumes for the docker_puppet_apply.sh script into a
single place. Unfortunately the existing volumes from ContainersCommon
includes a mount for /etc/puppet to /etc/puppet which causes problems
because we need to be able to write out a hiera value.  The /etc/puppet
mount is needed for the bootstrap_host_exec function which is consumed
by various docker_config tasks but the mount conflicts with the puppet
apply logic being used.

Depends-On: I24e5e344b7f657ce5d42a7c7c45be7b5ed5e6445
Change-Id: Icf4a64ed76635e39bbb34c3a088c55e1f14fddca
Related-Bug: #1741345
Co-Authored-By: Damien Ciabrini <dciabrin@redhat.com>
2018-01-09 17:17:13 -07: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
Oliver Walsh 7c8127cf96 Only mount selinux sysfs in nova_libvirt container
https://review.openstack.org/500952 initially just did this. Then we assumed
every container should have the selinux sysfs.
This causes issues with the sshd container used for live-migration.

The advice from the selinux experts is that it should not be enabled within
containers, so reverting back to the original fix that enables it only in the
nova-libvirt container.

Closes-bug: 1729405
Change-Id: I80bf38d7d64ab99510574af5c57423fde9b84eca
2017-11-01 18:14:32 +00:00
Oliver Walsh 520f889a31 Enable selinux in containers
We cannot use the --selinux-enabled docker daemon option on CentOS/RHEL 7.3.
It will fail if security_inode_copy_up is not found in the kernel symbols:
https://github.com/projectatomic/docker/blob/docker-1.12.6/daemon/daemon_unix.go#L661
NB this has been reduced to a warning upstream:
885b29df09

Instead this just bind mounts /sys/fs/selinux in containers-common.yaml.

Everything appears to work at initial glance. Pingtest succeeds, and
live-migration between baremetal and containerized computes works.

Change-Id: I018221bf7ae9ab9ece193b55f1ce31eb1591046c
Depends-On: I521c5351ad6020911106464bf712cf92e6fb0fca
Closes-bug: #1715171
2017-09-05 23:27:21 +01:00
Juan Antonio Osorio Robles 7fb7ed7a84 Fix CA file bind mounting in containers
The syntax was wrong and wasn't actually bind mounting the CA file.
This fixes it.

Change-Id: Icfa2118ccd2a32fdc3d1af27e3e3ee02bdfbb13b
2017-08-01 07:28:33 +00:00
Giulio Fidente baf6eee501 Adds network/cidr mapping into a new service property
Makes it possible to resolve network subnets within a service
template; the data is transported into a new property ServiceData
wired into every service which hopefully is generic enough to
be extended in the future and transport more data.

Data can be consumed in service templates to set config values
which need to know what is the subnet where a deamon operates (for
example the Ceph Public vs Cluster network).

Change-Id: I28e21c46f1ef609517175f7e7ee19e28d1c0cba2
2017-07-14 13:44:04 +02:00
Juan Antonio Osorio Robles 31f773a95b Bind mount internal CA file to all containers
This will allow the services running in the containers to trust the CA.

bp tls-via-certmonger-containers

Change-Id: Ib7eb682da64473a651b34243c92ab76009964aba
2017-06-13 16:28:03 +03:00
Oliver Walsh 1f946b63a2 Map /etc/ssh/ssh_known_hosts to all containers
This allows any ssh client spawned from a container to validate ssh host key.

Change-Id: I86d95848e5f049e8af98107cd7027098d6cdee7c
Closes-bug: #1693841
2017-06-07 11:17:19 +00:00
Jenkins 5f374b863d Merge "docker bootstrap service commands" 2017-05-30 13:52:28 +00:00
Dan Prince 51da97d04a docker bootstrap service commands
This patch guards db syncs and initialization code from executing
on multiple nodes at the same time by using the new
bootstrap_host_exec script. This helper script checks to make
sure the container is executing on the "bootstrap host" for the
specified service (arg 0) and then if it matches runs the
specified command.

Depends-On: If25f217bbb592edab4e1dde53ca99ed93c0e146c
Depends-On: Ic1585bae27c318bd6bafc287e905f2ed250cce0f

Change-Id: I0c864ca093ea476248b619d8c88477ef0b64e2eb
Closes-Bug: 1688380
2017-05-22 12:04:42 -04: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
Bogdan Dobrelya 4ea0307bd8 Add syslog socket to common containers volumes
Partial blueprint containerized-services-logs

Change-Id: Idbf1884226503aca9072b12d050500af407973cf
Signed-off-by: Bogdan Dobrelya <bdobreli@redhat.com>
2017-05-08 10:27:50 +02:00
Juan Antonio Osorio Robles f8f295be3e Introduce common CAs to be mounted to the containers
When TLS is enabled, the containers need to trust the CAs that the
host trusts.

Change-Id: I0434b0ac10290970857cad3d1a89d00f5b054196
2017-04-18 11:20:06 +03:00
Juan Antonio Osorio Robles e81ddeb685 Introduce common resources for docker templates
This enables common resources that the docker templates might need.
The initial resource only is common volumes, and two volumes are
introduced (localtime and hosts).

Change-Id: Ic55af32803f9493a61f9b57aff849bfc6187d992
2017-04-18 11:20:06 +03:00