-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[build] Generate ironbank docker context
- Loading branch information
Showing
13 changed files
with
468 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
280 changes: 280 additions & 0 deletions
280
src/dev/build/tasks/os_packages/docker_generator/resources/ironbank/LICENSE
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
75 changes: 75 additions & 0 deletions
75
src/dev/build/tasks/os_packages/docker_generator/templates/ironbank/Dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
################################################################################ | ||
# Build stage 0 | ||
# Extract Kibana and make various file manipulations. | ||
################################################################################ | ||
ARG BASE_REGISTRY=registry1.dsop.io | ||
ARG BASE_IMAGE=redhat/ubi/ubi8 | ||
ARG BASE_TAG=8.3 | ||
|
||
FROM ${BASE_REGISTRY}/${BASE_IMAGE}:${BASE_TAG} as prep_files | ||
|
||
RUN yum update --setopt=tsflags=nodocs -y && \ | ||
yum install -y tar gzip && \ | ||
yum clean all | ||
|
||
RUN mkdir /usr/share/kibana | ||
WORKDIR /usr/share/kibana | ||
COPY --chown=1000:0 {{artifactTarball}} . | ||
RUN tar --strip-components=1 -zxf {{artifactTarball}} | ||
# Ensure that group permissions are the same as user permissions. | ||
# This will help when relying on GID-0 to run Kibana, rather than UID-1000. | ||
# OpenShift does this, for example. | ||
# REF: https://docs.openshift.org/latest/creating_images/guidelines.html | ||
RUN chmod -R g=u /usr/share/kibana | ||
|
||
|
||
################################################################################ | ||
# Build stage 1 | ||
# Copy prepared files from the previous stage and complete the image. | ||
################################################################################ | ||
FROM ${BASE_REGISTRY}/${BASE_IMAGE}:${BASE_TAG} | ||
EXPOSE 5601 | ||
|
||
RUN yum update --setopt=tsflags=nodocs -y && \ | ||
yum install -y fontconfig freetype shadow-utils libnss3.so && \ | ||
yum clean all | ||
|
||
COPY LICENSE /licenses/elastic-kibana | ||
|
||
# Add a dumb init process | ||
WORKDIR /usr/local/bin | ||
COPY dumb-init /usr/local/bin/dumb-init | ||
RUN chmod +x /usr/local/bin/dumb-init | ||
|
||
# Bring in Kibana from the initial stage. | ||
COPY --from=prep_files --chown=1000:0 /usr/share/kibana /usr/share/kibana | ||
WORKDIR /usr/share/kibana | ||
RUN ln -s /usr/share/kibana /opt/kibana | ||
|
||
ENV ELASTIC_CONTAINER true | ||
ENV PATH=/usr/share/kibana/bin:$PATH | ||
|
||
# Set some Kibana configuration defaults. | ||
COPY --chown=1000:0 config/kibana.yml /usr/share/kibana/config/kibana.yml | ||
|
||
# Add the launcher/wrapper script. It knows how to interpret environment | ||
# variables and translate them to Kibana CLI options. | ||
COPY --chown=1000:0 scripts/kibana-docker /usr/local/bin/ | ||
|
||
# Ensure gid 0 write permissions for OpenShift. | ||
RUN chmod g+ws /usr/share/kibana && find /usr/share/kibana -gid 0 -and -not -perm /g+w -exec chmod g+w {} \; | ||
|
||
# Remove the suid bit everywhere to mitigate "Stack Clash" | ||
RUN find / -xdev -perm -4000 -exec chmod u-s {} + | ||
|
||
# Provide a non-root user to run the process. | ||
RUN groupadd --gid 1000 kibana && useradd --uid 1000 --gid 1000 --home-dir /usr/share/kibana --no-create-home kibana | ||
USER kibana | ||
|
||
LABEL org.label-schema.schema-version="1.0" org.label-schema.vendor="Elastic" org.label-schema.name="kibana" org.label-schema.version="{{version}}" org.label-schema.url="https://www.elastic.co/products/kibana" org.label-schema.vcs-url="https://github.com/elastic/kibana" org.label-schema.license="Elastic License" license="Elastic License" | ||
|
||
ENTRYPOINT ["/usr/local/bin/dumb-init", "--"] | ||
|
||
CMD ["/usr/local/bin/kibana-docker"] | ||
|
||
HEALTHCHECK --interval=10s --timeout=5s --start-period=1m --retries=5 CMD curl -I -f --max-time 5 http://localhost:5601 || exit 1 |
2 changes: 2 additions & 0 deletions
2
src/dev/build/tasks/os_packages/docker_generator/templates/ironbank/Jenkinsfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
@Library('DCCSCR@master') _ | ||
dccscrPipeline(version: '{{version}}') |
39 changes: 39 additions & 0 deletions
39
src/dev/build/tasks/os_packages/docker_generator/templates/ironbank/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Kibana | ||
|
||
**Kibana** lets you visualize your Elasticsearch data and navigate the Elastic Stack, | ||
so you can do anything from learning why you're getting paged at 2:00 a.m. to | ||
understanding the impact rain might have on your quarterly numbers. | ||
|
||
For more information about Kibana, please visit | ||
https://www.elastic.co/products/kibana. | ||
|
||
### Installation instructions | ||
|
||
Please follow the documentation on [running Kibana on Docker](https://www.elastic.co/guide/en/kibana/{{branch}}/docker.html). | ||
|
||
### Where to file issues and PRs | ||
|
||
- [Issues](https://github.com/elastic/kibana/issues) | ||
- [PRs](https://github.com/elastic/kibana/pulls) | ||
|
||
### DoD Restrictions | ||
|
||
Due to the [NODE-SECURITY-1184](https://www.npmjs.com/advisories/1184) issue, Kibana users should not use the `ALL_PROXY` environment variable to specify a proxy when installing Kibana plugins with the kibana-plugin command line application. | ||
|
||
### Where to get help | ||
|
||
- [Kibana Discuss Forums](https://discuss.elastic.co/c/kibana) | ||
- [Kibana Documentation](https://www.elastic.co/guide/en/kibana/current/index.html) | ||
|
||
### Still need help? | ||
|
||
You can learn more about the Elastic Community and also understand how to get more help | ||
visiting [Elastic Community](https://www.elastic.co/community). | ||
|
||
This software is governed by the [Elastic | ||
License](https://github.com/elastic/elasticsearch/blob/{{branch}}/licenses/ELASTIC-LICENSE.txt), | ||
and includes the full set of [free | ||
features](https://www.elastic.co/subscriptions). | ||
|
||
View the detailed release notes | ||
[here](https://www.elastic.co/guide/en/elasticsearch/reference/{{branch}}/es-release-notes.html). |
16 changes: 16 additions & 0 deletions
16
src/dev/build/tasks/os_packages/docker_generator/templates/ironbank/download.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"resources": [ | ||
{ | ||
"url": "<artifact_path>/kibana-{{version}}-linux-x86_64.tar.gz", | ||
"filename": "kibana-{{version}}-linux-x86_64.tar.gz" | ||
}, | ||
{ | ||
"url": "https://github.com/Yelp/dumb-init/releases/download/v1.2.2/dumb-init_1.2.2_amd64", | ||
"filename": "dumb-init", | ||
"validation": { | ||
"type": "sha256", | ||
"value": "37f2c1f0372a45554f1b89924fbb134fc24c3756efaedf11e07f599494e0eff9" | ||
} | ||
} | ||
] | ||
} |