forked from openscanhub/fedora-infra
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Siteshwar Vashisht <[email protected]>
- Loading branch information
Showing
3 changed files
with
67 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[default] | ||
region = us-west-2 | ||
output = table |
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,49 @@ | ||
# TODO: Check if we can use ubi. | ||
# resalloc dependencies require a subscription. | ||
# FROM registry.access.redhat.com/ubi9/ubi | ||
FROM quay.io/centos/centos:stream9 | ||
USER 0 | ||
|
||
RUN dnf install -y dnf-plugins-core | ||
RUN dnf config-manager --set-enabled crb extras-common | ||
|
||
RUN dnf install -y epel-release | ||
|
||
# Deployment instructions are described here | ||
# https://github.com/praiskup/resalloc/blob/master/docs/start-resalloc-server.txt | ||
|
||
RUN dnf install -y ansible \ | ||
findutils \ | ||
openssh-clients \ | ||
postgresql \ | ||
python3-psycopg2 \ | ||
resalloc \ | ||
resalloc-aws \ | ||
resalloc-server \ | ||
sqlite \ | ||
vim \ | ||
&& dnf clean all | ||
|
||
# copy filesystem setup | ||
# COPY files/ / | ||
|
||
# `/etc/resallocserver/` belongs to `resalloc` group and is not readable by `root`. | ||
RUN chgrp -R root /etc/resallocserver/ /var/log/resallocserver /var/lib/resallocserver | ||
RUN chmod -R g+rwx /etc/resallocserver/ /var/log/resallocserver /var/lib/resallocserver | ||
|
||
# Set up aws configurations. Ssh key would be mounted from OpenShift. | ||
RUN mkdir /var/lib/resallocserver/.aws /var/lib/resallocserver/.ssh | ||
COPY configs/aws-config /var/lib/resallocserver/.aws/config | ||
|
||
# `server.yaml` and `pools.yaml` are mount through OpenShift configurations. | ||
RUN rm -f /etc/resallocserver/server.yaml /etc/resallocserver/pools.yaml | ||
|
||
# TODO: This should be probably done through `COPY` from the same repository. | ||
RUN git clone --branch openscanhub-fedora-infra https://pagure.io/forks/svashisht/rhcopr/vm-provisioning.git /etc/resallocserver/vm-provisioning | ||
RUN git clone --branch main https://github.com/siteshwar/openscanhub-deployment-configs.git /etc/resallocserver/openscanhub-deployment-configs | ||
|
||
USER 1001 | ||
ENV HOME=/var/lib/resallocserver | ||
ENV CONFIG_DIR=/etc/resallocserver | ||
CMD /usr/bin/resalloc-server | ||
# CMD sleep inf |