51 Commits

Author SHA1 Message Date
Jenkins
b6a0f98346 Merge "Set ServerTokens parameter to 'Prod' for Ubuntu Apache config" 2016-05-31 14:54:56 +00:00
Christian Berendt
d1b170dfd8 Set ServerTokens parameter to 'Prod' for Ubuntu Apache config
The default value of the ServerTokens parameter is OS by default when
using Ubuntu as base image. This results in "Server: Apache/2.4.7 (Ubuntu)"
as server signature. Setting the parameter to "Prod" produces a less
verbose server signature.

Change-Id: I9a1422890cc667423bde73ea2dd7be143eb8b04a
Partial-bug: #1586112
2016-05-26 20:10:17 +02:00
Jenkins
383730443c Merge "Update ubuntu dockerfiles for formatting" 2016-05-26 11:13:10 +00:00
Jenkins
6148a303ee Merge "Update the horizon dockerfile for formatting" 2016-05-26 11:13:05 +00:00
Swapnil Kulkarni (coolsvap)
435b21b90d Update ubuntu dockerfiles for formatting
Change-Id: If4be00b937e14ec93443dcb7249cf17099d57cbe
Closes-Bug: #1569417
2016-05-26 04:09:22 +00:00
Jeffrey Zhang
669d735ae8 Compile the messages in the horizon
Change-Id: Ic5d4a3dbd5efcd1337bafae0e2b0bf67d90cd1e5
Closes-Bug: #1574008
2016-05-23 04:38:50 +00:00
Swapnil Kulkarni (coolsvap)
f93739fa4f Update the horizon dockerfile for formatting
Change-Id: Iacea37d84a57d1543f6332a8b600d431dc2c6270
Partial-Bug:#1569417
2016-05-18 22:01:52 +05:30
Serguei Bezverkhi
8d96d639c8 Add creation of new log folder for Horizon
The previous Horizon logging fix missed the part of creating new folder,
this fix adds it.

Change-Id: I14da441ebb6de94964326c0a1b02ae1480b080bd
Closes-Bug: 1561073
2016-03-23 12:05:08 -04:00
SamYaple
28cc39e2fe Fix bad apache2 close
Change-Id: Id19450a566da1bf7b824f0050e7c3e3f73581a9b
Closes-Bug: #1557036
2016-03-21 18:59:50 +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
xionglingfeng
50b885c260 Fix horizon startup failure
original extend_start.sh try to write temp files to a non-existent folder (/home/horizon) and cause horizon failed to start. It is fixed by moving the file to /tmp.

Partial-Bug: 1543429

Change-Id: I8d8778be755a4db9e57d6ff7aaee623547c4243e
2016-02-13 15:39:22 -03:30
Jeffrey Zhang
4afe624f07 Re-generate the compressed css and js on every horizon start
The local_settings file affect django-compress behavior, so
re-generate the compressed javascript and css if it is changed

Closes-Bug: #1537815
Change-Id: I330bfb666e39ffb88a4488793562df697d5572d0
2016-01-27 09:38:26 +08:00
Artur Zarzycki
3d24231be6 Horizon ubuntu binary container
Change-Id: Ie11456e2b1e9bf641f7739044e8ae13d78405427
Partially-Implements: blueprint binary-ubuntu
2016-01-11 14:09:17 +01:00
SamYaple
cda0459ad1 Fix pip install settings
There were some inconsistencies with pip install instructions
thoughout Kolla. We fix those here.

Additionally, we fix the virtualenv to properly use the site-packages
on the host if a library is not available in the venv.

Change-Id: Ib84d48e8826bb96060338b3fa0782620c98794a8
Related-Bug: #1524684
Closes-Bug: #1529434
2015-12-27 03:35:35 +00:00
Proskurin Kirill
9f604456be Fix owner of horizon docroot
Horizon starts WSGI deamon from user "horizon", its docroot has "root" user.

Change-Id: Iac424a88a747772a37b2ff2ae94f302a988f7201
Closes-Bug: 1525296
2015-12-11 19:16:25 +03:00
Michal Rostecki
febcb600f1 Source installation in virtualenv
Use virtualenv for installation of OpenStack projects and
dependencies to avoid conflicts with Python libraries installed
by non-OpenStack binary packages.

Change-Id: I21ecd673b2e93335b1d3dd4e279e940c9d694c3c
Implements: blueprint virtualenv
2015-11-27 10:22:17 +01:00
Swapnil Kulkarni (coolsvap)
59a1c8b9fb Remove hardcoded MAINTAINER in Dockerfiles
Added new option in kolla-build.conf

Change-Id: I45fe51966bcb59ea19d112281ba3d5a1ba091a56
Closes-Bug:#1514304
2015-11-23 11:03:47 +00:00
Sam Yaple
6ec1fabf65 Revert "Drop root for Horizon service"
This reverts commit f9ccb1c8829cef551b875c7c387530e7980414a7.

There are many issues with this patch that prevents it from working
under numerous circumstances. The implementation is entirely busted
on Ubuntu. Additionally, best practice for apache is to run as root.
Apache itself does the privlege dropping.

Change-Id: I4395debb7d32223fb3752a6d3e7c4d7672d29916
2015-11-13 08:53:49 +00: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
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
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
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
Martin André
15290dc6cc Horizon rdo package requires python-keystoneauth1
Change-Id: I0d98399d7d573ea43689746dda59a647c307b25f
Closes-Bug: #1514697
2015-11-10 17:33:31 +09: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
Paul Bourke
ef3c7a5df0 Use openstack/requirements for horizon
See Iccb4e99f8e4b6659a19c1817d0f4c697824af25c for context.

Change-Id: I145908bef5d18fea35f38032725f48c18f8cb831
Partial-Bug: #150530
2015-10-15 11:09:42 +00:00
Sam Yaple
cb4e875ae1 Common start.sh
The majority of the start.sh code is identical. This removes that
duplicate code while still maintaining the ability to call code in a
specific container.

The start.sh is moved into /usr/local/bin/kolla_start in the container

The extend_start.sh script is called by the kolla_start script at the
location /usr/local/bin/kolla_extend_start . It always exists because
we create a noop kolla_extend_start in the base directory. We override
it with extend_start.sh in a specific image should we need to.

Of note, the neutron-agents container is exempt from this new
structure due to it being a fat container.

Additionally, we fix the inconsistent permissions throughout. 644 for
repo files and the scripts are set to 755 via a Docker RUN command to
ensure someones local perm change won't break upstream containers.

Change-Id: I7da8d19965463ad30ee522a71183e3f092e0d6ad
Closes-Bug: #1501295
2015-10-06 03:30:26 +00:00
Jenkins
6a622ec82c Merge "Implement a install_type and install_metatype" 2015-09-28 10:49:53 +00:00
Jenkins
aadbbcbee0 Merge "remove set_configs" 2015-09-28 10:34:58 +00:00
Steven Dake
0e99b69de4 Implement a install_type and install_metatype
This prepares for the RHEL OSP implementation by making the build
tool convert all binary-* into an install_type of binary and * into
an install_metatype variable substitution inside the Dockerfiles.
Further binary-* is substituted as install_name to enable proper
building only.

Change-Id: Ib681b29176eb79a3cab12ec824313fdecb6e7a5f
Partially-Implements: blueprint rhel-based-image-support
2015-09-28 03:16:48 -07:00
Sam Yaple
160f1cc011 remove set_configs
Change-Id: I9bb0a1fac63cc326234b0f06b1e56b43e0753279
Partially-Implements: blueprint replace-config-external
2015-09-27 13:44:50 +00:00
Sam Yaple
39aba34b2a Remove all fail sections for Ubuntu
Ubuntu binary is not supported and may never be. Installing from
cloud-archive packaging is only for the current stable distros, Ubuntu
does not have a Delorean type repo. We place a fail message in the
base image to catch this and remove the messages throughout the
project.

An additional fail message is placed to catch all other things.

Change-Id: Id2953f503ebd42226f6a08e75979ae56511c40f7
Implements: blueprint install-from-ubuntu
2015-09-27 08:10:59 +00:00
Sam Yaple
a1b0518b9a Fix removal of config-external
I removed the files but not the COPY commands thus breaking all of
Kolla

Change-Id: I37d3e0cb94a1ecc12971f485f953310ba8fee53c
Partially-Implements: blueprint replace-config-external
2015-09-25 20:08:40 +00:00
Sam Yaple
e2e0fd288f Remove config-external.sh
Removes config-external for all services that have been replaced in
Ansible

Change-Id: I839a14418638b977fbc1d02ba6839811b0f909ea
Partially-Implements: blueprint replace-config-external
2015-09-25 13:00:55 +00:00
Sam Yaple
4d5186473e Replace config-external - horizon
Change-Id: I72577ee7dd2dfbd199ca91f6f33f970fe1c9c89f
Partially-Implements: blueprint replace-config-external
2015-09-25 11:06:35 +00:00
Steven Dake
41909d070b Remove pip install of pyscss in Horizon
Because of the correction of the dependney repos in RDO, pyscss
no longer needs to be installed via pip.

Change-Id: Ide0a0181a9b1353a043956ab9849a2d261f1c243
Closes-Bug: #1497436
2015-09-21 14:37:09 +00:00
Steven Dake
6992049323 Add 'rhel' for RPM distros
Add 'rhel' to list for RPM based distros.  Also sort the distro
list for rpm packages for affected lines.

Change-Id: Ied4cb3e9763d6c6359f314d16185383ac3e006ed
Partially-Implements: blueprint rhel-based-image-support
2015-09-04 03:12:15 -07:00
Jenkins
91bc4b094c Merge "Allow arbitrary source archive name to be imported into Dockerfile" 2015-09-04 06:24:28 +00:00
Vladislav Belogrudov
c22cf33268 Allow arbitrary source archive name to be imported into Dockerfile
Currently we cannot import source archives with names different
than expected by hardcoded line in Dockerfiles. This worked well
for Openstack services' tarballs where we expected SERVICE-* root
folder after extraction or kanaka-noVNC for nova-novncproxy docker.
The latter fails if one tries to clone or get tarball under other
names. This fix allows any archive (tar,tgz,zip) or repo name to be
imported into dockerfile.

Change-Id: I869a6a19afaf0e93925572746c22b7589b6600c9
Closes-Bug: #1491415
2015-09-03 16:49:50 +03:00
Sam Yaple
9d3f3f28e2 Create openstack-base container
This creates and moves the dependencies for Ubuntu into a common
openstack-base container. This commit shows dramatically smaller
sizes for all non-openstack containers. The Openstack container remain
the same size.

Change-Id: I2f46420d4b9edcfddda374caddcce906fc708f6c
Partially-Implements: blueprint openstack-common-container
2015-09-03 10:37:45 +00:00
Steven Dake
f587ed3729 Make Horizon work on centos+binary
Several problems exist with Horizon on centos+binary:

1. The default setup of http binds a port to port 80 on RPM
   based distros.

2. There is no horizon user/group added causing config-external
   to break badly.

3. openstack-dashboard is installed in
   /usr/share/openstack-dashboard/openstack_dashboard. This
   is incompatible with the expectations of the wsgi configuration.

4. the target for config-external is
   /etc/httpd/sites.d/horizon.conf. It should be
   /etc/httpd/conf.d/horizon.conf

5. A workaround is required for:
    https://bugzilla.redhat.com/show_bug.cgi?id=1220070

6. Static display requires compressing the installation via
   manage.py.  To do this correctly pyscss needs to be upgraded
   because the version in RDO is broken.

Co-Authored-By: Sam Yaple <sam@yaple.net>
Change-Id: Iabd3044906920f5cc60b9a6b320e62d1d7c9210f
Closes-Bug: #1490066
2015-08-29 09:50:52 +00:00
Sam Yaple
cbd42ca6e9 Move docker_templates to docker dir
Updated build.py to reflect this change.
Deprecate --template option and make it a noop.

Change-Id: I7cd98d1ee684a4c64984a49597159868152683b2
Partially-Implements: blueprint remove-docker-dir
2015-08-28 13:33:50 +00:00
Sam Yaple
13062e23e8 Restructure builds to allow more flexibility
As a restructure, nothing is changed from the original behaviour and
naming despite the file structure changing. The symlinks to build had
to be updated generating lots of "deleted" and "new_file".

The new structure is:

docker/${base_distro}/${type}/${container}

base_distro == centos, ubuntu, fedora, etc
type == source, binary, rdo

type rdo is a symlink to binary for backwards compatibility

Two new flags are added to the build-all script to support the ability
to support different base distros and a flag to support binary or source
containers.

There are several added folders that are empty to hold the directory
structure for future containers of these types.

To use a prefix other than centos-rdo- you can set PREFIX in the toplevel
directory .buildconf file

Change-Id: Ifc7bac0d827470f506c8b5c004a833da9ce13b90
2015-05-15 01:32:22 -05:00
Harm Weites
861ece743e Move Horizon to / and make it work in the first place.
Having the dasboard in /dashboard doesn't feel right, especially
since there is no automatic redirect when people browse to the ip or
hostname. Which would be a natural first try. Moving to / now to make
the process behave in a simpler fashion.

Because of a packaging error the js/css wouldn't load properly, next
to that there is an issue with a supposed missing 'manage.py
compress' run. This is handled through Kolla now as well (for the
time being).
There is another supposed bug in packaging that makes webfont.ttf
return a 404. This is because of a missing alias for /static stuff,
and with moving the whole thing to / this gets adressed as well.

Change-Id: I64cd7c9effad6cf9ec7c6a41f34e1184640c8adc
2015-05-09 21:56:52 +02:00
Steven Dake
d30f69bc83 Port to icehouse
This represents making build-docker-images --release build
with the icehouse tag and causes docker-compsoe to pull from
the icehouse tag.

Partially-implements: blueprint port-kilo

Change-Id: I66b2c39abc55c0f47152dd90e696fc46b9c58f50
2015-05-06 09:58:43 -07:00
Steven Dake
a87980e5c2 Remove EXPOSE options from Dockerfiles
The EXPOSE options will create a local docker-proxy.  This is
unnecessary with --net=host mode.  The docker-proxy adds about
20 microseconds of latency.  Add documentation to the specification
to indicate where to find the ports that are exposed by the
services in case someone were to desire to add EXPOSE back to
the Dockerfiles.

Change-Id: I398e922fe096d6022a2d5985bb92498f89a5ea31
2015-04-06 20:25:18 -07:00
Martin André
34872c1c2f Allow check_for_* functions to be consumed by wait_for
In order for the `check_for_*` functions to be consumed by `wait_for`,
they should notify of their success but not exit.

As a consequence, the previous behavior is restored by the fail_unless_*
companion functions.

With this change, it is now possible to do:

    wait_for 30 1 check_for_os_service_running keystone

Change-Id: I16ddf8913027030c3ccb5487713d172904508fd6
2015-04-01 16:39:44 +09:00
Steven Dake
71576f4e42 Make the Horizon dashboard work properly
The Horizon dashboard was not working properly prior to this work.

Also a docker-compose file was added to start the dashboard.

Change-Id: I8a438c15b967b0cec00bfe44b997f833bf745191
2015-03-20 10:21:29 -07:00
Martin André
0764fd7dea Allow changing base image
By changing the PREFIX variable in the .buildconf one is now able to
build docker images from different bases.

For example, add the following line to your .buildconf file to build
CentOS based images:

    PREFIX=centos-rdo-

Default base image is Fedora. For now only RH family is supported.

Additionally, changing the namespace either with the NAMESPACE variable
in .buildconf or via --namespace commandline option now changes the
source namespace as well from the default kollaglue one.

Implements: blueprint multi-baseos
Co-Authored-By: Steven Dake <stdake@cisco.com>
Change-Id: I3964cd2292789ea883a1f2d2738a5731a4fff49b
2015-03-02 14:08:06 +09:00
Martin André
91ca8d4b00 Cleanup required variables checks for all containers
This allows Kubernetes to reschedule containers in case a required
variable is missing, for example when the Kubernetes pod is started
before the service.

The checks were cleaned using the following method:
  * remove duplicates
  * remove check for variables that get a default value in the same file
  * check for all variables used in the file
  * check for required services when it is obvious.

Change-Id: Ib7e0530c410c61f828d36efe8925a20dc9781eab
2015-01-19 16:29:59 +09:00