2219 Commits

Author SHA1 Message Date
Britt Houser
66c15ce55e drop root on memcached
This patch add the USER directive to the memcached container.
It also removes the -u from the command line to launch
memcached, since it will already be run as that use.

Change-Id: I87d782a424df99fe1b5694debafa3c0c4a9aba27
Partially-Implements: blueprint drop-root
2015-11-14 11:38:30 -05:00
Jenkins
f54c5bee3a Merge "Drop root for Zaqar service" 2015-11-13 20:14:01 +00:00
Jenkins
4650d81341 Merge "Add ZooKeeper support in kolla-ansible" 2015-11-13 19:28:01 +00:00
Josh Lothian
63d5e9b552 Drop root for Zaqar service
Change-Id: I59797a8539406e478f6953a9aa0c933e73eb5892
Partially-Implements: blueprint drop-root
2015-11-13 13:20:36 -06:00
Michal Rostecki
1dfb791116 Add ZooKeeper support in kolla-ansible
In kolla-mesos, ZK will be used for storing information about
actions done in bootstrap.

Change-Id: Id7067a493b457cf7b73eb007852df7b13f4363b3
Partially-Implements: blueprint zookeeper
2015-11-13 19:39:07 +01:00
Jenkins
84b6f7edc4 Merge "Add Ansible support for Magnum" 2015-11-13 17:01:04 +00:00
Chris Ricker
a84e0f5235 Update commands in kolla-build section
Remove build.py reference from kolla-build for clarity.

Change-Id: I82db9428fe3b1697877e967e060843270574ae71
Closes-Bug: #1516040
2015-11-13 10:02:17 -05:00
Jenkins
24c50af433 Merge "Fix typo in Fedora section of quickstart" 2015-11-13 14:50:20 +00:00
Jenkins
9e9dc83d85 Merge "Add playbook for hosts pre-deployment checks (ports, files)" 2015-11-13 14:43:39 +00:00
Chris Ricker
cd7f451ea6 Fix typo in Fedora section of quickstart
Trivial patch to remove duplicated text.

Change-Id: Icb6046a6a3d0c31c1ad7ef58b0da79d4ececdd9b
Closes-Bug: #1516017
2015-11-13 09:07:59 -05:00
Vladislav Belogrudov
3bd4c2a607 Add playbook for hosts pre-deployment checks (ports, files)
This playbook runs on hosts before deployment to be sure we don't
have any conflicting services running and systems are in expected
state.

DocImpact

Change-Id: If5f288b7fbdf269697ca834da4eb969b61683ca0
Partially-implements: blueprint precheck-tasks
2015-11-13 16:35:33 +03:00
Michal Rostecki
2cd5d9ed74 Add Ansible support for Magnum
Change-Id: Idb25ac4d3148c9b9400cf675ac2e47d35cce6224
Implements: blueprint ansible-magnum
2015-11-13 11:31:34 +01:00
Jenkins
52bd56e686 Merge "Drop root privileges for rabbitmq" 2015-11-13 07:53:06 +00:00
Ryan Hallisey
22def41d37 Drop root privileges for rabbitmq
Drop root privileges for rabbitmq.  Only the rabbitmq user
will be able to execute chown of /var/lib/rabbitmq.

Change-Id: I546e6b475a8462bfbc75972854e1fee64f96d9cb
Partially-Implements: blueprint drop-root
2015-11-12 11:38:17 -05:00
Sam Yaple
ea9d5cd067 Move USER operation after footer
The USER operation affects all docker commands after it. This causes a
problem with our {{ include_footer }} implementation since commands in
that footer may require elevated permissions to perform.

In the current implementation I can no longer remove my proxy settings
once the USER has been changed.

Change-Id: I9b2bab5a15f595f6d52a46c64ddf59ba5608b938
Partially-Implements: blueprint drop-root
2015-11-12 14:34:09 +00:00
Jenkins
55e4b54e23 Merge "Drop root privileges for mariadb" 2015-11-12 13:13:50 +00:00
Jenkins
336074a6c3 Merge "Fix --retries option to kolla-build" 2015-11-12 10:43:10 +00:00
Jenkins
71339b376e Merge "Added Ubuntu support for Vagrant" 2015-11-12 10:31:29 +00:00
Steven Dake
4c9e15b94e Drop root privileges for mariadb
Drop root privileges for mariadb.  This isn't perfect.  If somemone
breaks out of the container and can run sudo within the contianer,
it would be possible to replace the root credentials of the database.

Any container that uses sudo suffers from some extra attack vector
related to the sudo command.  That said, the sudo commands are
locked down to minimize harm.

Change-Id: I4b3573725d940bb8aa90d43a6235d8cf7d30fc64
Partially-Implements: blueprint drop-root
2015-11-12 03:12:40 -05:00
Steven Dake
09e9b1be33 Move the mariadb expect code to a script
Atleast in a script, sudo can be made to only allow the script to
run from the mysql process in the future, versus all the proceesses
being able to be executed as root presently.

Change-Id: I030b57086e37e4dc8f668f98c04335d94ab9d2b0
Partially-Implements: blueprint drop-root
2015-11-11 18:42:07 -05:00
Steven Dake
f9ccb1c882 Drop root for Horizon service
Drop root privileges for Horizon service.  It is necesssary to set
a capability on the filesystem to allow binding to port 80 as a
non-root user.  I have tested this works correctly from a registry
on both CentOS and Ubuntu.

Change-Id: I4c26f28bb28b6633784e6842f3423a2425332c27
Partially-Implements: blueprint drop-root
2015-11-11 18:41:56 -05:00
Jenkins
b6212875d3 Merge "Install keystoneauthv1 in openstack-base image" 2015-11-11 22:59:19 +00:00
Jenkins
d9f49d1026 Merge "Drop root for kolla-ansible" 2015-11-11 22:36:36 +00:00
Jenkins
1a6050e5e5 Merge "Clean up horizon httpd pid files for RPM distros" 2015-11-11 22:34:26 +00:00
Steven Dake
87c5b6b86b Install keystoneauthv1 in openstack-base image
Lots of tools rqeuire keystoneeauthv1 not just horizon

TrivialFix

Change-Id: I35eb958e35500b04657679371019f2e6f3c2f2dd
2015-11-11 13:49:54 -07:00
Steven Dake
d11b8f260b Drop root for heat
Drop root user for heat containers.

Change-Id: Ib07c0193f97bb18cc6154b4015b4056fd983f6c1
Partially-Implements: blueprint drop-root
2015-11-11 14:50:02 -05:00
Steven Dake
5e15ee16de install openstack-heat-common in heat-base
the openstack-heat-common package installs the Heat UID/GID.
This is necessary pre-work for drop-root for heat services.

Change-Id: I247b0209248de144d20f5245973833be5cd8f14f
Partially-Implements: blueprint drop-root
2015-11-11 14:50:02 -05:00
Jenkins
d4379a5cde Merge "Drop root for designate" 2015-11-11 18:35:33 +00:00
Paul Bourke
0f315a0ed0 Drop root for kolla-ansible
This change ensures commands run in the kolla-ansible container are done
as the 'ansible' user rather than root.

By default Ansible tries to write it's temporary files to $HOME/.ansible
on the target, which in most cases won't exist when run as the new user.
Hence we now supply the kolla-ansible container with an ansible.cfg, to
tweak the remote_dir option to /tmp.

Change-Id: I838a8c8cd0c7dc1aeca4d12e38c346f252170e7c
Partially-Implements: blueprint drop-root
2015-11-11 18:04:02 +00:00
Diogo Monteiro
558627b1ce Added Ubuntu support for Vagrant
Added support for Vagrant VirtualBox provider to
provision an Ubuntu VM to run kolla. A new
bootstrap-ubuntu.sh script has been created which
provisions the Ubuntu VM with all kolla depdencies
including docker 1.8.2, ansible 1.9.6 and python-tools
Also created vars in the Vagrantfile to define the cpu and memory settings of the
VM nodes used to run kolla

DocImpact

Change-Id: I4609d7f577e948b04663901afd0c5d1d154c8ac4
Implements: blueprint vagrant-ubuntu-support
2015-11-11 11:26:39 -05:00
Sam Yaple
e21c39b098 Rename jobs for Kolla
Due to the length of the job name and the tox target we run into an
uncommon limitation; the virtualenv that tox launches is nested in a
path that is too long. This leads to and error on our longest named
job which prevents tox from running at all.

This limitation is the limit for the line length of the first line
in a shell script. See `man execve` for more info. A quote from that
manpage: 'A maximum line length of 127 characters is allowed for the
first line in a #! executable shell script.'

Change-Id: I43fba2a5ff1890d699045496c9eaee5e849f3e75
Backport: Liberty
Partially-Implements: blueprint multinode-gate
2015-11-11 15:44:56 +00:00
Paul Bourke
bac1235ed2 Clean up horizon httpd pid files for RPM distros
(apply same fix that we did for keystone, to horizon)

In some cases we're seeing httpd not cleaning up properly after itself,
which results in the horizon container failing to restart. This is
confirmed to happen on rpm based distros, but have not had any reports
on Ubuntu.

Change-Id: I8ece6da1a8a1180730d68be0d129a656ddcede07
Closes-Bug: #1515214
backport: liberty
2015-11-11 11:46:24 +00:00
Jenkins
3768a54ed7 Merge "We now have a logs publisher" 2015-11-10 16:12:43 +00:00
Jenkins
28cccf5184 Merge "Add a test case for load_config" 2015-11-10 16:08:04 +00:00
Michal Rostecki
c691334181 Drop root for designate
Change-Id: I1df05608be62cc008ccef1ca88d0b37983568d22
Partially-Implements: blueprint drop-root
2015-11-10 10:41:13 +01:00
Martin André
15290dc6cc Horizon rdo package requires python-keystoneauth1
Change-Id: I0d98399d7d573ea43689746dda59a647c307b25f
Closes-Bug: #1514697
2015-11-10 17:33:31 +09:00
Martin André
b2530cdd44 Fix --retries option to kolla-build
Off by one error made the --retries option control the number of tries
rather than the number of retries.

Closes-Bug: #1514730
backport: Liberty

Change-Id: I976a8bb9e489d226f44926a6562d4d2af5de099c
2015-11-10 17:30:55 +09:00
Angus Salkeld
1af722eb49 Add a test case for load_config
This is just a basic test to make sure loading from file works.

Change-Id: I074f36023ac4198c436fcee1668d32f9d1f0e61b
2015-11-10 13:37:51 +10:00
Jenkins
e8a37b7c7f Merge "Add registry information to quickstart.rst" 2015-11-09 21:58:44 +00:00
Jenkins
8992b41db0 Merge "Remove unused cinder-data container" 2015-11-09 20:56:05 +00:00
Steven Dake
dcd4f3fadf Add registry information to quickstart.rst
We get an awful lot of questions about how to operate with a registry
on the IRC channel and the obvious way to fix that is to document it.

I don't know what to document about Ubuntu but if someone leaves the
appropriate commands in the review I'll be happy to update it to include
the correct operations to make the registry run on Ubuntu.  Another option
is perhaps we can get Sam to write those docs once this hits the repo since
the structure will be mostly in place.

TrivialFix

Change-Id: Ib88abbaf9bd6bcabddae994157d9288aab8be2bf
2015-11-09 13:53:33 -07:00
Jenkins
610604e4b3 Merge "drop root for glance" 2015-11-09 18:04:47 +00:00
Jenkins
cb578df3b0 Merge "Base image changes for drop-root" 2015-11-09 18:02:50 +00:00
Steven Dake
bd9e8c22d7 drop root for glance
This uses the grouping feature of sudo to limit the amount of times
the base sudo file has to be modified to only once.  The container
contents always runs as the user root, except the software which is
controlled by Kolla.  This software may run as root, but it has
undergone a security audit and preserves permissions of the correct
files and does not permit the glance user to write any of the
set_config.py control files.

Change-Id: Ie3cd23edcde5b408a8f66970456279a1b15028e0
Partially-Implements: blueprint drop-root
2015-11-09 11:00:29 -05:00
Steven Dake
6cf5928ff1 Base image changes for drop-root
The reason we are doing drop root is so that a network exposed
software component (i.e. glance) cannot be used to affect the
immutability of the container which it runs in.  I have tried
several different approaches and this is the only approach which
puts glance in PID=1 while ensuring no files may be written by
the glance process in the container image except for the log files.

Change-Id: Ifd3c8c361b78d0e4791dade3afa6435290407c41
Partially-Implements: blueprint drop-root
2015-11-09 11:00:26 -05:00
Sam Yaple
4a7cd7063f We now have a logs publisher
We need to create a directory to allow publishing of logs.

Change-Id: Ieeac5d236b698bedaccb8b5f0bb16f0de9df9386
Backport: Liberty
Partially-Implements: blueprint multinode-gate
2015-11-09 10:59:15 +00:00
Jenkins
817b31231c Merge "Incorrect parsed variable name" 2015-11-09 10:55:01 +00:00
Sam Yaple
4ad8db7168 Remove unused cinder-data container
The cinder-data container serves no purpose and is not actually used
past the bootstrap container and should be removed.

Additionally add the missing '---' header to the start.yml file.

TrivialFix
Related-Bug: #1513598
Related-Bug: #1513439
Change-Id: I22b630bbee954e12a4de5652b7fb068669f633c5
2015-11-09 10:47:16 +00:00
Sam Yaple
6b28343017 Incorrect parsed variable name
database_user_create was not correctly referenced when parsing the
variable names. This could never actually lead to a situation that
reported a false change, but it could break an operation if you were
using the --step option with ansible and skipped the database create
task.

TrivialFix
Backport: Liberty

Change-Id: Idf69fffcc3814f509448ccea11b7d175f074ccf1
2015-11-09 10:47:15 +00:00
Angus Salkeld
33d39f2942 Fix validate-all-maintainer.sh to look for Dockerfile.j2
And fix the fallout.

Change-Id: Iccad3f4fdb0a6a7c14246df3408cae0425b833a5
2015-11-09 15:20:13 +10:00