Skip to content
This repository has been archived by the owner on Oct 19, 2020. It is now read-only.

Commit

Permalink
uploading our own-compiled openshift-install executable to a dedicate…
Browse files Browse the repository at this point in the history
…d docker image, and using this image to build the ignition-manifets image
  • Loading branch information
yevgeny-shnaidman committed Jun 6, 2020
1 parent 61277e1 commit 989bf40
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
8 changes: 6 additions & 2 deletions Dockerfile.baremetal
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#FROM python:2.7
# [TODO] - remove this line, once we are ready to use openshift-installer from the release
FROM quay.io/yshnaidm/openshift-installer


FROM fedora:31
RUN dnf install -y libvirt-libs pip python && \
yum clean all && \
Expand All @@ -13,7 +16,8 @@ ARG WORK_DIR=/data
RUN mkdir $WORK_DIR
RUN chmod 777 $WORK_DIR

COPY ./openshift-install $WORK_DIR
# [TODO] - change this line to use openshift-installer from the release, once we are ready
COPY --from=0 /root/installer/openshift-install $WORK_DIR
COPY ./process-ignition-manifests-and-kubeconfig.py $WORK_DIR

ENV WORK_DIR=$WORK_DIR
Expand Down
3 changes: 3 additions & 0 deletions Dockerfile.installer-image
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM alpine:latest
RUN mkdir /root/installer
COPY ./openshift-install /root/installer
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
### This is a image for generating ignition manifests & kubeconfig

1) Dockerfile - dockerfile for building the ignition-manifests-and-kubeconfig-generate image with openshift-installer platform none
1) Dockerfile (depricated) - dockerfile for building the ignition-manifests-and-kubeconfig-generate image with openshift-installer platform none
2) Dockerfile.baremetal - dockerfile for building the ignition-manifests-and-kubeconfig-generate image with openshift-installer platform baremetal
3) installer_dir/install-config.yaml - example of install-config.yaml for none platform
4) installer_dir/install-config.yaml.baremetal - example of install-config.yaml for baremetal platform.
Expand All @@ -10,6 +10,15 @@
- hack/build.sh - CGO_ENABLED flag should be enable in case of baremetal platform also: <if (echo "${TAGS}" | grep -q 'libvirt\|baremetal')>
- pkg/types/baremetal/validation/libvirt.go - build tag should be changed from baremetal to libvirt ( to avoid validations via libvirt)

Building:
----------------
1) currently we use our own openshift-install executable. We save it into the containener using Dockerfile.installer-image and pushing it to a repository ( make sure ot make it public. Currently
we use quay.io/yshnaidm/openshift-installer. In case we recompile openshift-install, we need to update this image:
docker build -f Dockerfile.installer-image -t <repository> .
Example: docker build -f Dockerfile.installer-image -t quay.io/yshnaidm/openshift-installer:latest .
2) we are using the image built in step 1 to get the needed openshift-install. Once we start using openshift-install from the release, we can update Dockerfile.baremetal accordingly
docker build -f Dockerfile.baremetal . -t quay.io/ocpmetal/ignition-manifests-and-kubeconfig-generate:stable


Testing:
---------------
Expand Down

0 comments on commit 989bf40

Please sign in to comment.