Skip to content

Commit

Permalink
[Heartbeat] Remove synthetics support for ironbank (#35551)
Browse files Browse the repository at this point in the history
* [Heartbeat] Remove synthetics support for ironbank

* ci: remove heartbeat ironbank validation

* ci: remove heartbeat ironbank validation scheduler

* remove heartbeat ironbank

* avoid running it

* Revert "ironbank: support for heartbeat (#32954)"

This reverts commit 544cfd6.

* Revert "Revert "ironbank: support for heartbeat (#32954)""

This reverts commit 1e6b816.

* Revert "avoid running it"

This reverts commit 0c533e7.

* Revert "remove heartbeat ironbank"

This reverts commit afa51b7.

* Revert "ci: remove heartbeat ironbank validation scheduler"

This reverts commit e34fa74.

* Revert "ci: remove heartbeat ironbank validation"

This reverts commit b0e0ad0.

* update version

---------

Co-authored-by: Victor Martinez <VictorMartinezRubio@gmail.com>
(cherry picked from commit 3f5afa5)

# Conflicts:
#	dev-tools/packaging/templates/ironbank/heartbeat/hardening_manifest.yaml
  • Loading branch information
emilioalvap authored and mergify[bot] committed May 26, 2023
1 parent ff1e767 commit 3006b7f
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 273 deletions.

This file was deleted.

This file was deleted.

This file was deleted.

35 changes: 0 additions & 35 deletions dev-tools/packaging/templates/ironbank/heartbeat/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,22 +44,6 @@ ARG ELASTIC_PRODUCT=heartbeat

COPY LICENSE /licenses/elastic-${ELASTIC_PRODUCT}

# Install synthetics dependencies.
COPY signatures/* *.rpm /
RUN rpm --import linux_signing_key.pub RPM-GPG-KEY-CentOS-Official RPM-GPG-KEY-rockyofficial \
&& yum -y --allowerasing --nodocs --nobest --setopt=install_weak_deps=False install *.rpm \
&& rm -r *.rpm RPM-GPG-KEY-CentOS-Official linux_signing_key.pub RPM-GPG-KEY-rockyofficial \
&& yum clean all && rm -rf /var/cache/yum

ENV NODE_PATH=/usr/share/${ELASTIC_PRODUCT}/.node
RUN echo \
$NODE_PATH \
/usr/share/${ELASTIC_PRODUCT}/.config \
/usr/share/${ELASTIC_PRODUCT}/.synthetics \
/usr/share/${ELASTIC_PRODUCT}/.npm \
/usr/share/${ELASTIC_PRODUCT}/.cache \
| xargs -IDIR sh -c 'mkdir -p DIR && chmod 0770 DIR'

# Add a dumb init process
COPY tinit /tinit
RUN chmod +x /tinit
Expand Down Expand Up @@ -87,28 +71,9 @@ RUN find / -xdev -perm -4000 -exec chmod u-s {} +
# Provide a non-root user to run the process.
RUN groupadd --gid 1000 ${ELASTIC_PRODUCT} && useradd --uid 1000 --gid 1000 --groups 0 --home-dir /usr/share/${ELASTIC_PRODUCT} --no-create-home ${ELASTIC_PRODUCT}

RUN chown -R ${ELASTIC_PRODUCT} $NODE_PATH

USER ${ELASTIC_PRODUCT}
ENV ELASTIC_PRODUCT=${ELASTIC_PRODUCT}

# Setup synthetics env vars
ENV ELASTIC_SYNTHETICS_CAPABLE=true
ENV SUITES_DIR=/usr/share/${ELASTIC_PRODUCT}/suites
ENV PATH="$NODE_PATH/node/bin:$PATH"
# Install the latest version of @elastic/synthetics forcefully ignoring the previously
# cached node_modules, heartbeat then calls the global executable to run test suites
# Setup node
COPY node.tar.gz /usr/share/heartbeat/.node
COPY elastic-synthetics.tar.gz /usr/share/heartbeat/.node
RUN cd /usr/share/heartbeat/.node \
&& mkdir -p node \
&& tar -xzf "node.tar.gz" --strip 1 -C node \
&& rm "node.tar.gz" \
&& npm i -g --offline -f "elastic-synthetics.tar.gz" \
&& rm "elastic-synthetics.tar.gz" \
&& chmod ug+rwX -R $NODE_PATH

ENTRYPOINT ["/tinit", "--", "/usr/share/heartbeat/heartbeat", "-E", "http.enabled=true", "-E", "http.host=unix:///usr/share/heartbeat/data/heartbeat.sock"]
CMD ["-environment", "container"]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,6 @@ labels:
## Product the image belongs to for grouping multiple images
mil.dso.ironbank.product.name: "heartbeat"

# List of project maintainers
maintainers:
- email: "nassim.kammah@elastic.co"
name: "Nassim Kammah"
username: "nassim.kammah"
- email: "ivan.fernandez@elastic.co"
name: "Ivan Fernandez Calvo"
username: "ivan.fernandez"
- email: "victor.martinez@elastic.co"
name: "Victor Martinez"
username: "victor.martinez"

# List of resources to make available to the offline build context
resources:
- filename: "heartbeat-{{ beat_version }}-linux-x86_64.tar.gz"
Expand All @@ -60,6 +48,7 @@ resources:
validation:
type: sha256
value: 93dcc18adc78c65a028a84799ecf8ad40c936fdfc5f2a57b1acda5a8117fa82c
<<<<<<< HEAD
- filename: fontconfig-2.13.1-4.el8.x86_64.rpm
url: https://dl.rockylinux.org/pub/rocky/8/BaseOS/x86_64/os/Packages/f/fontconfig-2.13.1-4.el8.x86_64.rpm
validation:
Expand Down Expand Up @@ -529,4 +518,18 @@ resources:
url: https://storage.googleapis.com/obs-ci-cache/beats/elastic-synthetics-1.0.0-beta.17.tgz
validation:
type: sha256
value: aa890887a1630abf9c73ac2568b1d7a59494bf1ed23d44789c162da92655178c
value: aa890887a1630abf9c73ac2568b1d7a59494bf1ed23d44789c162da92655178c
=======

# List of project maintainers
maintainers:
- email: "nassim.kammah@elastic.co"
name: "Nassim Kammah"
username: "nassim.kammah"
- email: "ivan.fernandez@elastic.co"
name: "Ivan Fernandez Calvo"
username: "ivan.fernandez"
- email: "victor.martinez@elastic.co"
name: "Victor Martinez"
username: "victor.martinez"
>>>>>>> 3f5afa5ef9 ([Heartbeat] Remove synthetics support for ironbank (#35551))
2 changes: 1 addition & 1 deletion x-pack/heartbeat/ironbank/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
BEAT_VERSION ?= 8.5.0
BEAT_VERSION ?= 8.9.0
LOCATION := ../build/heartbeat-ironbank-$(BEAT_VERSION)-docker-build-context

YQ_VERSION ?= v4.13.2
Expand Down

0 comments on commit 3006b7f

Please sign in to comment.