-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Use https * Upgrade cloud-info-provider * Install rclone * Add json output and upload to S3 * Make linter happy * Remove VOs not in ops portal * Remove VO not in ops portal * Simplify management of tokens We are no longer using the refresh style * Fixes tested in the playground * Fix linter / testing issues * Fix tests * Add some docs * ADR * Linter is my friend
- Loading branch information
Showing
16 changed files
with
156 additions
and
266 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
doc/architecture/decisions |
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 |
---|---|---|
@@ -1,33 +1,65 @@ | ||
FROM python:3 as build | ||
|
||
SHELL ["/bin/bash", "-o", "pipefail", "-c"] | ||
|
||
# hadolint ignore=DL3008 | ||
RUN curl -s https://dist.eugridpma.info/distribution/igtf/current/GPG-KEY-EUGridPMA-RPM-3 \ | ||
| apt-key add - \ | ||
&& echo "deb https://repository.egi.eu/sw/production/cas/1/current egi-igtf core" > /etc/apt/sources.list.d/igtf.list \ | ||
&& apt-get update \ | ||
&& apt-get install -y ca-policy-egi-core \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
WORKDIR /cloud-info | ||
|
||
RUN python -m venv /cloud-info/venv | ||
ENV PATH="/cloud-info/venv/bin:$PATH" | ||
|
||
COPY requirements.txt . | ||
|
||
RUN pip install --no-cache-dir -r requirements.txt \ | ||
&& cat /etc/grid-security/certificates/*.pem >> "$(python -m requests.certs)" | ||
|
||
COPY . . | ||
|
||
RUN pip install --no-cache-dir . | ||
|
||
# The actual image | ||
FROM python:3 | ||
|
||
LABEL org.opencontainers.image.source=https://github.com/EGI-Federation/fedcloud-catchall-operations | ||
|
||
SHELL ["/bin/bash", "-o", "pipefail", "-c"] | ||
|
||
RUN mkdir /cloud-info | ||
COPY requirements.txt /cloud-info/requirements.txt | ||
RUN pip install --no-cache-dir -r /cloud-info/requirements.txt | ||
|
||
# CA certificates: install and add to python | ||
# hadolint ignore=DL3015, DL3008 | ||
RUN curl -Ls \ | ||
https://dist.eugridpma.info/distribution/igtf/current/GPG-KEY-EUGridPMA-RPM-3 \ | ||
| apt-key add - \ | ||
&& echo 'deb http://repository.egi.eu/sw/production/cas/1/current egi-igtf core' \ | ||
> /etc/apt/sources.list.d/cas.list \ | ||
&& apt-get update \ | ||
&& apt-get install -y jq \ | ||
&& apt-get install -y ca-policy-egi-core \ | ||
&& rm -rf /var/lib/apt/lists/* \ | ||
&& cat /etc/grid-security/certificates/*.pem >> "$(python -m requests.certs)" | ||
RUN apt-get update \ | ||
&& apt-get install -y --no-install-recommends \ | ||
jq rclone \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
|
||
COPY . /cloud-info/ | ||
RUN pip install --no-cache-dir /cloud-info | ||
RUN mkdir /cloud-info \ | ||
&& groupadd -g 1999 python \ | ||
&& useradd -r -u 1999 -g python python \ | ||
&& chown -R python:python /cloud-info | ||
|
||
WORKDIR /cloud-info | ||
|
||
# All the python code from the build image above | ||
COPY --chown=python:python --from=build /cloud-info/venv ./venv | ||
# Add the scripts that call the cloud-info-provider as needed for the site | ||
# these create the configuration for the site by discovering the available | ||
# projects for the credentials and will send the output to the AMS queue and | ||
# upload to S3 | ||
COPY ams-wrapper.sh /usr/local/bin/ams-wrapper.sh | ||
COPY publisher.sh /usr/local/bin/publisher.sh | ||
# These are sample configuration files for cloud-info-provider that can be used | ||
# if the container is used outside of the catchall-operations as described in | ||
# https://docs.egi.eu/providers/cloud-compute/openstack/cloud-info/#local-operations | ||
COPY openstack.rc /etc/cloud-info-provider/openstack.rc | ||
COPY openstack.yaml /etc/cloud-info-provider/openstack.yaml | ||
|
||
USER 1999 | ||
|
||
ENV PATH="/cloud-info/venv/bin:$PATH" | ||
CMD ["publisher.sh"] |
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
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
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
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
Oops, something went wrong.