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

fixes for pipeline flow/dependencies #38

Closed
wants to merge 4 commits into from
Closed
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
3 changes: 2 additions & 1 deletion buildconfigs/20-ovn-kubernetes-base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ spec:
type: Docker
dockerStrategy:
imageOptimizationPolicy: SkipLayers
dockerfilePath: Dockerfile.base.rhel9
# Dockerfile.rhel9 is suitable for 4.13 only
dsevost marked this conversation as resolved.
Show resolved Hide resolved
dockerfilePath: Dockerfile.base
from:
kind: "ImageStreamTag"
name: "release:base"
Expand Down
2 changes: 2 additions & 0 deletions buildconfigs/30-network-tools.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ spec:
name: 'release:ovn-kubernetes'
as:
- registry.ci.openshift.org/ocp/4.13:ovn-kubernetes-rhel-9
# still needed by 4.12 branch
- registry.ci.openshift.org/ocp/4.12:ovn-kubernetes
strategy:
type: Docker
dockerStrategy:
Expand Down
3 changes: 2 additions & 1 deletion buildconfigs/30-ovn-kubernetes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ spec:
type: Docker
dockerStrategy:
imageOptimizationPolicy: SkipLayers
dockerfilePath: Dockerfile.rhel9
# Dockerfile.rhel9 is suitable for 4.13 only
dockerfilePath: Dockerfile
from:
kind: "ImageStreamTag"
name: "release:ovn-kubernetes-base"
Expand Down
2 changes: 1 addition & 1 deletion pipelines/build-from-scratch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ spec:
- installer-artifacts
- installer
- hyperkube
- ovn-kubernetes-base
- name: batch-02
timeout: "2h0m0s"
runAfter:
Expand All @@ -227,7 +228,6 @@ spec:
- tools
- haproxy-router
- ovn-kubernetes
- ovn-kubernetes-base
- machine-os-images
- deployer
- name: batch-03
Expand Down
37 changes: 37 additions & 0 deletions variants/fcos/40-okd-rpms.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
apiVersion: build.openshift.io/v1
kind: BuildConfig
metadata:
name: okd-rpms
labels:
builder-replacement: skip
spec:
source:
type: Git
git:
uri: 'https://github.com/okd-project/okd-payload-pipeline.git'
ref: main
contextDir: variants/fcos/okd-rpms
images:
- as:
- release:artifacts
from:
kind: ImageStreamTag
name: release:artifacts
- as:
- release:machine-config-operator
from:
kind: ImageStreamTag
name: release:machine-config-operator
strategy:
type: Docker
dockerStrategy:
from:
kind: ImageStreamTag
name: tools:fedora37
buildArgs:
- name: CRIO_VERSION
value: "1.25"
output:
to:
kind: ImageStreamTag
name: 'release:okd-rpms'
37 changes: 33 additions & 4 deletions variants/fcos/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace: okd-fcos
resources:
- ../../buildconfigs
- ../../pipelines

- 40-okd-rpms.yaml
patches:
- patch: |-
apiVersion: build.openshift.io/v1
Expand All @@ -25,6 +25,13 @@ patches:
labelSelector: "change-build-arg-tags==true"
kind: BuildConfig
- patch: |-
- op: add
path: /spec/tags/-
value:
from:
kind: DockerImage
name: registry.fedoraproject.org/fedora:37
name: fedora37
- op: add
path: "/spec/tags/-"
value:
Expand All @@ -37,6 +44,13 @@ patches:
target:
kind: ImageStream
name: tools
- patch: |-
- op: replace
path: "/spec/source/git/ref"
value: release-4.12
target:
kind: BuildConfig
name: fedora-coreos
- patch: |-
- op: add
path: "/spec/tags/-"
Expand All @@ -50,10 +64,25 @@ patches:
name: release
- patch: |-
- op: add
path: "/spec/tasks/3/params/0/value/-"
path: "/spec/tasks/3/params/0/value"
value:
fedora-coreos
- tests
- network-tools
- ovn-kubernetes-microshift
- fedora-coreos
- okd-rpms
target:
kind: Pipeline
name: build-from-scratch

- patch: |-
- op: replace
path: "/spec/tasks/20/params/0/value"
value:
- artifacts
- tests
- network-tools
- machine-os-content
- odk-rpms
target:
kind: Pipeline
name: full-rebuild
21 changes: 21 additions & 0 deletions variants/fcos/okd-rpms/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FROM release:artifacts as artifacts
Copy link
Member

Choose a reason for hiding this comment

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

we want to avoid adding new Dockerfiles here.

Copy link
Member

Choose a reason for hiding this comment

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

Right, we don't need those. okd-rpms is useful for Assisted Installer but not usable for SCOS installs

Copy link
Contributor Author

Choose a reason for hiding this comment

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

so, what is the solution? should okd-rpms be build separately out of main pipeline? or just create symlinks inside release:artifacts imagestream to make assisted installer feature supported? but ai still refers to release:okd-rpms

Copy link
Member

Choose a reason for hiding this comment

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

i'd say symbolic links could be good.

To resolve the release:okd-rpms missing ISTag, can we create it in advance even if the source IStag (artifacts) is not yet available?

Copy link
Contributor Author

@dsevost dsevost Jun 7, 2023

Choose a reason for hiding this comment

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

just for my understanding: will release:artifacts and release:installer-artifacts be converged further?

FROM release:machine-config-operator as mcd

FROM fedora:37
ARG CRIO_VERSION=1.25

WORKDIR /rpms

COPY --from=artifacts /srv/repo/* /tmp/rpms
COPY manifests /

# TODO: check: is it really needed
COPY --from=mcd /usr/bin/machine-config-daemon /binaries/machine-config-daemon

RUN \
mkdir -p /rpms && \
mv -v /tmp/rpms/$([ -d /tmp/rpms/$(uname -m) ] && echo $(uname -m)/)*.rpm /rpms/ && \
dnf install -y dnf-plugins-core && \
dnf module enable -y cri-o:${CRIO_VERSION} && \
dnf download -y cri-o cri-tools --destdir /rpms && \
dnf clean all
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
apiVersion: machineconfiguration.openshift.io/v1
Copy link
Member

Choose a reason for hiding this comment

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

Ditto, we should build SCOS with these options enabled (not sure if intel_pstate is necessary anymore)

Copy link
Member

Choose a reason for hiding this comment

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

@vrutkovs we don't build scos here yet as we consume it directly from the artifacts produced by the okd-project/okd-scos pipeline.

Ideally, we should reach a target like:

  • okd-project/okd-scos produces a base scos image (w/o okd-specific content)
  • we build the layered okd-specific scos as we do for fcos (leveraging a third repo similar to openshift/okd-machine-os)

right?

kind: MachineConfig
metadata:
annotations:
include.release.openshift.io/ibm-cloud-managed: "true"
include.release.openshift.io/self-managed-high-availability: "true"
include.release.openshift.io/single-node-developer: "true"
release.openshift.io/create-only: "true"
labels:
machineconfiguration.openshift.io/role: master
name: 99-okd-master-disable-mitigations
spec:
config:
ignition:
version: 3.2.0
kernelArguments:
- mitigations=off
- intel_pstate=disable
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
apiVersion: machineconfiguration.openshift.io/v1
kind: MachineConfig
metadata:
annotations:
include.release.openshift.io/ibm-cloud-managed: "true"
include.release.openshift.io/self-managed-high-availability: "true"
include.release.openshift.io/single-node-developer: "true"
release.openshift.io/create-only: "true"
labels:
machineconfiguration.openshift.io/role: worker
name: 99-okd-worker-disable-mitigations
spec:
config:
ignition:
version: 3.2.0
kernelArguments:
- mitigations=off
- intel_pstate=disable
8 changes: 8 additions & 0 deletions variants/fcos/okd-rpms/manifests/99-sca-disable.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
kind: Secret
apiVersion: v1
metadata:
name: support
namespace: openshift-config
stringData:
scaPullDisabled: "true"
type: Opaque