Commit graph

72 commits

Author SHA1 Message Date
Julien Mailleret
07ace8d0b9 fix ubi8 docker build context
This commit fixes a typo in the name of the docker build context for ubi8 images.
2020-08-26 08:16:50 -07:00
Andres Rodriguez
0d82bc064c
Docker: Expose xpack.management.elasticsearch.proxy (#12201)
Expose the proxy xpack management proxy setting in docker (xpack.management.elasticsearch.proxy).
Also surface the same proxy setting in the sample config.
2020-08-25 16:07:29 -04:00
Drew Boswell
b47cdc33ec add ssl verification_mode to env2yaml 2020-08-21 07:28:12 -07:00
Rob Bavey
dd4ab61454 Limit locale changes to ubi8 container 2020-08-20 07:35:49 -07:00
Rob Bavey
ec2514d814 Minor fixes to acceptance and docker test scripts 2020-08-20 07:35:49 -07:00
Rob Bavey
1c675aa74b Add UBI8 docker image to artifacts
This commit adds the rake docker_ubi8 rake task, and associated
changes to the docker template and makefiles.

This commit also refactors the acceptance tests to extract xpack tests
into a helper class to allow the same tests to be used in both 'full'
and 'ubi8' docker image tests
2020-08-20 07:35:49 -07:00
Rob Bavey
2d1e6d968f
Introduce integration tests for docker images (#12135)
* Introduce integration tests for docker

This commit adds integration tests for the Logstash docker images. Previous
integration tests were removed in https://github.com/elastic/logstash/pull/10693,
due to the tests being non functional.

The commit adds image and container tests. The image tests check the contents and the
metadata of the image; the container tests check the logstash process, and includes tests
ensuring that logstash runs, and is configurable.

This test also adds a ci script to allow the tests to be run on jenkins, and to split the
running of these tests up based on the image type and includes updates to the rake tasks to
support this.
2020-07-31 14:34:40 -04:00
andsel
a73a4787a7 Remove settings that was intended to direct ship monitoring data to ES monitoring cluster
During the development of PR #11541 to direct ship monitoring data to an monitoring ES cluster without hopping through a production ES cluster, the settings for elasticsearch ouput was cloned into a version without the `xpack` prefix.
Since that feature has been removed the settings should also be removed from the Docker image
2020-07-30 02:22:28 -07:00
andsel
4a5b49830f Expose xpack.monitoring.elasticsearch.proxy setting as Docker env variable
In PR #11799 we missed to add the exposure of proxy also as docker env variable so that uses can connect the dockerzied Logstash to a proxed monitoring cluster
2020-07-30 02:21:39 -07:00
Rob Bavey
ef4ae8147e Fix docker image labels
Prior to this commit, the value of `org.label-schema.license` and
the values in `org.opencontainers.image.*` were not set, and therefore
would be inherited from the base OS image.
2020-07-23 12:48:59 -07:00
andsel
3695580b92 Adaptations to internal collector to send data directly to monitoring cluster Close 11573
Fixes #11541
2020-02-28 14:26:19 +00:00
andsel
e4c0f1aa69 Adding plugin.id to docker images
Fixes #11593
2020-02-10 16:22:21 +00:00
Spencer Niemi
e09723efef Updating the log4j2.properties file that the Docker container image uses to also log the pipeline.id.
Fixes #11567
2020-02-04 16:49:32 +00:00
Rob Bavey
5c4d35343a Removes UBI7 docker code
Removal of code (#11335) to generate UBI7 based docker images, as this is not
being used for now

Fixes #11489
2020-01-14 14:04:54 +00:00
Rob Bavey
830e49a159 Add UBI based docker images
This commit adds support for images based on UBI7 base image

Closes #11265

Fixes #11335
2019-12-03 13:51:49 +00:00
Ry Biesemeyer
3e3a061a5e update Jinja2 docker dependency
Fixes #10986
2019-07-23 21:20:20 +00:00
Joao Duarte
75725e1a51 generate tarballs for docker images
Fixes #10819
2019-05-24 15:09:26 +00:00
Dan Hermann
0de53939e9 * Adds a java_generator input with jdots codec to facilitate testing, adds float config type
* Breaking change to codec.encode method

* Sink output for discarding events

* URI and password config types

* Utility methods for packaging Java plugins

* Plugin API validation, fix gemspec generation

* Plugin Jar validation

* Update developer documentation

* Update codec metrics for new encode method

* Beta: Isolated classloaders for Java plugins

* Address code review comments

Fixes #10620
2019-05-03 11:54:37 +00:00
Joao Duarte
088ece441a
rake task to generate dockerfile
* dont include docker tasks in artifact:all
* don't rebuild tar/zip if source hasn't changed
* allow SKIP_PREPARE to avoid tar creation if no modifications
* don't need a tarball to generate the dockerfile
* remove docker tests as they weren't working anymore

This commit adds a task to produce all necessary files to generate a docker image.

```
% RELEASE=1 rake artifact:dockerfile
....
Dockerfile created in /tmp/elastic/logstash/build/docker
% tree /tmp/elastic/logstash/build/docker
/tmp/elastic/logstash/build/docker
├── Dockerfile
├── bin
│   └── docker-entrypoint
├── config
│   ├── log4j2.properties
│   ├── logstash-full.yml
│   └── pipelines.yml
├── env2yaml
│   └── env2yaml
└── pipeline
    └── default.conf
% docker build --rm .
.....
Step 19/20 : LABEL org.label-schema.schema-version="1.0"   org.label-schema.vendor="Elastic"   org.label-schema.name="logstash"   org.label-schema.version="7.0.0"   org.label-schema.url="https://www.elastic.co/products/logstash"   org.label-schema.vcs-url="https://github.com/elastic/logstash" license="Elastic License"
 ---> Using cache
 ---> f622d7555220
Step 20/20 : ENTRYPOINT ["/usr/local/bin/docker-entrypoint"]
 ---> Using cache
 ---> b6feba7f4934
Successfully built b6feba7f4934
```

This task works only for releases (not snapshots).

This commit also adds a few tweaks to the artifacts building:

Using `SKIP_PREPARE=1` in `rake artifact:tar` or `rake artifact:tar_oss` will make a check to not rebuild the tarball if there are no code modifications.

These two changes are made since docker image build is new and we want to keep it out of artifact:all for a while. And if we're running these separately, we want to ensure the tarball built is used in the docker image (versus building a new one for each `rake artifact:tar` )

This means that, to generate all artifacts including docker images and dockerfile, it's necessary to run:

```
RELEASE=1 rake artifact:all
SKIP_PREPARE=1 RELEASE=1 rake artifact:docker
SKIP_PREPARE=1 RELEASE=1 rake artifact:docker_oss
RELEASE=1 rake artifact:dockerfile
```
2019-04-22 22:53:40 +01:00
João Duarte
c657f90362
moved to openjdk 11 in docker testing (#10563)
- also fix javadoc warning when building on jdk11
2019-04-15 21:13:05 +01:00
Joao Duarte
43f49b9764 remove docker-compose symlink
Fixes #10645
2019-04-04 14:33:05 +00:00
João Duarte
dc5db673ee
build docker images from logstash repo (#10603)
introduces two rake tasks: `rake artifact:docker_oss` and `rake artifact:docker`, which will create the docker images of the OSS and non OSS packages. These tasks depend on the tar artifacts being built.

Also `rake artifact:all` has been modified to also call these two tasks.

most code was moved from https://github.com/elastic/logstash-docker/
2019-04-04 11:27:06 +01:00