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)
  • Loading branch information
emilioalvap authored and mergify[bot] committed May 26, 2023
1 parent 8bc0dee commit d043686
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 742 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
Loading

0 comments on commit d043686

Please sign in to comment.