Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add healthcheck_repo setting option #154

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ masters:
pg_lava_password: The Postgres lavaserver password to set
http_fqdn: The FQDN used to access the LAVA web interface. This is necessary if you use https otherwise you will issue CSRF errors.
healthcheck_url: Hack healthchecks hosting URL. See hosting healthchecks below
healthcheck_repo: Hack healthchecks git repository URL. See hosting healthchecks below
build_args:
- line1 A list of line to set docker build-time variables
- line2
Expand Down Expand Up @@ -514,6 +515,13 @@ One master and slave on DC A, and one slave on DC B.
Both slave need to have healthcheck_host to true and master will have healthcheck_url set to http://healthcheck:8080
You have to add a DNS server on both slave with an healthcheck entry.

For mirroring the healthcheck repository and keeping it local

- Mirror https://github.com/kernelci/lava-healthchecks-binary to your repository of choice
- Add your local boards healthchecks binary
- Set the repository to your new repository using healthcheck_repo on the master
- Rebuild healthchecks docker container

## Bugs, Contact
The prefered way to submit bugs are via the github issue tracker
You can also contact us on #lava-docker on the Libera.chat IRC network
7 changes: 2 additions & 5 deletions healthcheck/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
FROM bitnami/minideb:stretch

RUN apt-get update && apt-get -y install git
RUN git clone https://github.com/BayLibre/lava-healthchecks-binary.git
RUN git clone https://github.com/kernelci/lava-healthchecks-binary.git lava-healthchecks-binary
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This repository do not exists. And lava-docker will migrate off kernelci to baylibre soon.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh I thought it was going to gitlab.com under the Linaro / LAVA org?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since lava-docker is not a Linaro project, it is easier to go to baylibre. It will requires less "spetial rigths".


FROM nginx:mainline-alpine

COPY port.conf /etc/nginx/conf.d/

COPY --from=0 /lava-healthchecks-binary/mainline /usr/share/nginx/html/mainline/
COPY --from=0 lava-healthchecks-binary/images /usr/share/nginx/html/images/
COPY --from=0 lava-healthchecks-binary/next /usr/share/nginx/html/next/
COPY --from=0 lava-healthchecks-binary/stable /usr/share/nginx/html/stable/
COPY --from=0 /lava-healthchecks-binary/healthchecks /usr/share/nginx/html/healthchecks/
9 changes: 8 additions & 1 deletion lavalab-gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def main():
"allowed_hosts",
"build_args",
"groups",
"healthcheck_url", "host", "http_fqdn",
"healthcheck_url","healthcheck_repo", "host", "http_fqdn",
"loglevel", "lava-coordinator",
"name",
"persistent_db", "pg_lava_password",
Expand Down Expand Up @@ -558,6 +558,13 @@ def main():
if "build_args" in master:
dockcomp["services"]["healthcheck"]["build"]["args"] = master['build_args']
shutil.copytree("healthcheck", "output/%s/healthcheck" % host)
if "healthcheck_repo" in master:
healthcheckdir = "output/%s/healthcheck" % (host)
dockerfile = open("%s/Dockerfile" % healthcheckdir, "r+")
dockerfilec = re.sub('(RUN git clone ).*', '\g<1>%s lava-healthchecks-binary' % master["healthcheck_repo"], dockerfile.read())
dockerfile.seek(0)
dockerfile.write(dockerfilec)
dockerfile.close()
if "extra_actions" in worker:
fp = open("%s/scripts/extra_actions" % workerdir, "w")
for eaction in worker["extra_actions"]:
Expand Down