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

Fix OKD podman deploy #6562 #6585

Closed
wants to merge 2 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
4 changes: 0 additions & 4 deletions .tekton/assisted-service-saas-main-pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@ spec:
value: Dockerfile.assisted-service
- name: path-context
value: .
- name: build-args
value:
- release={{target_branch}
- version={{revision}}
pipelineSpec:
finally:
- name: show-sbom
Expand Down
4 changes: 0 additions & 4 deletions .tekton/assisted-service-saas-main-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@ spec:
value: Dockerfile.assisted-service
- name: path-context
value: .
- name: build-args
value:
- release={{target_branch}
- version={{revision}}
pipelineSpec:
finally:
- name: show-sbom
Expand Down
29 changes: 0 additions & 29 deletions Dockerfile.assisted-service
Original file line number Diff line number Diff line change
Expand Up @@ -29,35 +29,9 @@ RUN cd ./cmd/operator && CGO_ENABLED=1 GOFLAGS="" GO111MODULE=on go build -o /bu
RUN cd ./cmd/webadmission && CGO_ENABLED=1 GOFLAGS="" GO111MODULE=on go build -o /build/assisted-service-admission
RUN cd ./cmd/agentbasedinstaller/client && CGO_ENABLED=1 GOFLAGS="" GO111MODULE=on go build -o /build/agent-installer-client

# Licenses
FROM registry.access.redhat.com/ubi9/go-toolset:1.18 AS licenses

ADD . /app
WORKDIR /app

RUN go install github.com/google/[email protected]
RUN ${HOME}/go/bin/go-licenses save --save_path /tmp/licenses ./...

# Create final image
FROM quay.io/centos/centos:$BASE_TAG

ARG release=main
ARG version=latest

LABEL com.redhat.component assisted-service
LABEL description "Service that installs Openshift"
LABEL summary "Service that installs Openshift"
LABEL io.k8s.description "Service that installs Openshift"
LABEL distribution-scope public
LABEL name assisted-service
LABEL release ${release}
LABEL version ${version}
LABEL url https://github.com/openshift/assisted-service
LABEL vendor "Red Hat, Inc."
LABEL maintainer "Red Hat"

COPY --from=licenses /tmp/licenses /licenses

COPY hack/container_build_scripts/replace_dnf_repositories_ref_if_needed.sh .
COPY hack/container_build_scripts/utils.sh .
ARG BASE_TAG
Expand Down Expand Up @@ -85,7 +59,4 @@ COPY --from=builder /build/agent-installer-client /usr/local/bin/agent-installer
RUN ln -s /usr/local/bin/agent-installer-client /agent-based-installer-register-cluster-and-infraenv
ENV GODEBUG=madvdontneed=1
ENV GOGC=50

USER 1001:1001

CMD ["/assisted-service"]
4 changes: 3 additions & 1 deletion cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,8 @@ func main() {
mirrorRegistriesBuilder,
system.NewLocalSystemInfo(),
)
extracterHandler := oc.NewExtracter(&executer.CommonExecuter{},
oc.Config{MaxTries: oc.DefaultTries, RetryDelay: oc.DefaltRetryDelay})

versionHandler, versionsAPIHandler, err := createVersionHandlers(
log,
Expand All @@ -328,7 +330,7 @@ func main() {
createS3Bucket(objectHandler, log)

manifestsApi := manifests.NewManifestsAPI(db, log.WithField("pkg", "manifests"), objectHandler, usageManager)
operatorsManager := operators.NewManager(log, manifestsApi, Options.OperatorsConfig, objectHandler)
operatorsManager := operators.NewManager(log, manifestsApi, Options.OperatorsConfig, objectHandler, extracterHandler)
hwValidator := hardware.NewValidator(log.WithField("pkg", "validators"), Options.HWValidatorConfig, operatorsManager, providerRegistry)
connectivityValidator := connectivity.NewValidator(log.WithField("pkg", "validators"))
Options.InstructionConfig.HostFSMountDir = hostFSMountDir
Expand Down
2 changes: 1 addition & 1 deletion data/default_public_container_registries.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
quay.io
quay.io,registry.ci.openshift.org
36 changes: 18 additions & 18 deletions data/default_release_images.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,17 +92,17 @@
"cpu_architectures": [
"x86_64"
],
"url": "quay.io/openshift-release-dev/ocp-release:4.13.45-x86_64",
"version": "4.13.45"
"url": "quay.io/openshift-release-dev/ocp-release:4.13.44-x86_64",
"version": "4.13.44"
},
{
"openshift_version": "4.13",
"cpu_architecture": "arm64",
"cpu_architectures": [
"arm64"
],
"url": "quay.io/openshift-release-dev/ocp-release:4.13.45-aarch64",
"version": "4.13.45"
"url": "quay.io/openshift-release-dev/ocp-release:4.13.44-aarch64",
"version": "4.13.44"
},
{
"openshift_version": "4.13-multi",
Expand All @@ -113,26 +113,26 @@
"ppc64le",
"s390x"
],
"url": "quay.io/openshift-release-dev/ocp-release:4.13.45-multi",
"version": "4.13.45-multi"
"url": "quay.io/openshift-release-dev/ocp-release:4.13.44-multi",
"version": "4.13.44-multi"
},
{
"openshift_version": "4.14",
"cpu_architecture": "x86_64",
"cpu_architectures": [
"x86_64"
],
"url": "quay.io/openshift-release-dev/ocp-release:4.14.33-x86_64",
"version": "4.14.33"
"url": "quay.io/openshift-release-dev/ocp-release:4.14.32-x86_64",
"version": "4.14.32"
},
{
"openshift_version": "4.14",
"cpu_architecture": "arm64",
"cpu_architectures": [
"arm64"
],
"url": "quay.io/openshift-release-dev/ocp-release:4.14.33-aarch64",
"version": "4.14.33"
"url": "quay.io/openshift-release-dev/ocp-release:4.14.32-aarch64",
"version": "4.14.32"
},
{
"openshift_version": "4.14-multi",
Expand All @@ -143,8 +143,8 @@
"ppc64le",
"s390x"
],
"url": "quay.io/openshift-release-dev/ocp-release:4.14.33-multi",
"version": "4.14.33-multi"
"url": "quay.io/openshift-release-dev/ocp-release:4.14.32-multi",
"version": "4.14.32-multi"
},
{
"openshift_version": "4.15",
Expand Down Expand Up @@ -182,8 +182,8 @@
"cpu_architectures": [
"x86_64"
],
"url": "quay.io/openshift-release-dev/ocp-release:4.16.3-x86_64",
"version": "4.16.3",
"url": "quay.io/openshift-release-dev/ocp-release:4.16.2-x86_64",
"version": "4.16.2",
"default": true
},
{
Expand All @@ -192,8 +192,8 @@
"cpu_architectures": [
"arm64"
],
"url": "quay.io/openshift-release-dev/ocp-release:4.16.3-aarch64",
"version": "4.16.3"
"url": "quay.io/openshift-release-dev/ocp-release:4.16.2-aarch64",
"version": "4.16.2"
},
{
"openshift_version": "4.16-multi",
Expand All @@ -204,8 +204,8 @@
"ppc64le",
"s390x"
],
"url": "quay.io/openshift-release-dev/ocp-release:4.16.3-multi",
"version": "4.16.3-multi"
"url": "quay.io/openshift-release-dev/ocp-release:4.16.2-multi",
"version": "4.16.2-multi"
},
{
"openshift_version": "4.17",
Expand Down
6 changes: 5 additions & 1 deletion deploy/podman/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,18 @@ the assisted-service API that agents will connect to.

Additionally, make sure to change the following:
```yaml
ASSISTED_SERVICE_URL: https://127.0.0.1:8090
ASSISTED_SERVICE_URL: https://127.0.0.1:8090
HTTPS_CERT_FILE: "/etc/certs/tls.crt" # Need to match certs-configmap-volume mountPath
HTTPS_KEY_FILE: "/etc/certs/tls.key" # Need to match certs-configmap-volume mountPath
HTTPS_CA_FILE: "/etc/certs/tls.crt" # Need to match certs-configmap-volume mountPath. Needed if the certificate is not signed by a CA in RHEL's default trust bundle.
ASSISTED_SERVICE_HOST: 127.0.0.1:8090
ASSISTED_SERVICE_SCHEME: https # A must for the UI nginx to be configured with TLS
```
If you are using a `RELEASE_IMAGE` hosted on a different registry than quay.io, add
the host name to the `PUBLIC_CONTAINER_REGISTRIES` environment variable. You have an
example in [okd-configmap.yml](./okd-configmap.yml).

## Optional Configuration

Other environment variables may be set in configmap.yml. For example, custom
Expand Down
4 changes: 2 additions & 2 deletions deploy/podman/configmap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ data:
POSTGRESQL_DATABASE: installer
POSTGRESQL_PASSWORD: admin
POSTGRESQL_USER: admin
PUBLIC_CONTAINER_REGISTRIES: 'quay.io'
RELEASE_IMAGES: '[{"openshift_version":"4.9","cpu_architecture":"x86_64","cpu_architectures":["x86_64"],"url":"quay.io/openshift-release-dev/ocp-release:4.9.59-x86_64","version":"4.9.59"},{"openshift_version":"4.10","cpu_architecture":"x86_64","cpu_architectures":["x86_64"],"url":"quay.io/openshift-release-dev/ocp-release:4.10.67-x86_64","version":"4.10.67"},{"openshift_version":"4.10","cpu_architecture":"arm64","cpu_architectures":["arm64"],"url":"quay.io/openshift-release-dev/ocp-release:4.10.67-aarch64","version":"4.10.67"},{"openshift_version":"4.11","cpu_architecture":"x86_64","cpu_architectures":["x86_64"],"url":"quay.io/openshift-release-dev/ocp-release:4.11.59-x86_64","version":"4.11.59"},{"openshift_version":"4.11","cpu_architecture":"arm64","cpu_architectures":["arm64"],"url":"quay.io/openshift-release-dev/ocp-release:4.11.59-aarch64","version":"4.11.59"},{"openshift_version":"4.11.0-multi","cpu_architecture":"multi","cpu_architectures":["x86_64","arm64","ppc64le","s390x"],"url":"quay.io/openshift-release-dev/ocp-release:4.11.0-multi","version":"4.11.0-multi"},{"openshift_version":"4.12","cpu_architecture":"x86_64","cpu_architectures":["x86_64"],"url":"quay.io/openshift-release-dev/ocp-release:4.12.60-x86_64","version":"4.12.60"},{"openshift_version":"4.12","cpu_architecture":"arm64","cpu_architectures":["arm64"],"url":"quay.io/openshift-release-dev/ocp-release:4.12.60-aarch64","version":"4.12.60"},{"openshift_version":"4.12-multi","cpu_architecture":"multi","cpu_architectures":["x86_64","arm64","ppc64le","s390x"],"url":"quay.io/openshift-release-dev/ocp-release:4.12.60-multi","version":"4.12.60-multi"},{"openshift_version":"4.13","cpu_architecture":"x86_64","cpu_architectures":["x86_64"],"url":"quay.io/openshift-release-dev/ocp-release:4.13.45-x86_64","version":"4.13.45"},{"openshift_version":"4.13","cpu_architecture":"arm64","cpu_architectures":["arm64"],"url":"quay.io/openshift-release-dev/ocp-release:4.13.45-aarch64","version":"4.13.45"},{"openshift_version":"4.13-multi","cpu_architecture":"multi","cpu_architectures":["x86_64","arm64","ppc64le","s390x"],"url":"quay.io/openshift-release-dev/ocp-release:4.13.45-multi","version":"4.13.45-multi"},{"openshift_version":"4.14","cpu_architecture":"x86_64","cpu_architectures":["x86_64"],"url":"quay.io/openshift-release-dev/ocp-release:4.14.33-x86_64","version":"4.14.33"},{"openshift_version":"4.14","cpu_architecture":"arm64","cpu_architectures":["arm64"],"url":"quay.io/openshift-release-dev/ocp-release:4.14.33-aarch64","version":"4.14.33"},{"openshift_version":"4.14-multi","cpu_architecture":"multi","cpu_architectures":["x86_64","arm64","ppc64le","s390x"],"url":"quay.io/openshift-release-dev/ocp-release:4.14.33-multi","version":"4.14.33-multi"},{"openshift_version":"4.15","cpu_architecture":"x86_64","cpu_architectures":["x86_64"],"url":"quay.io/openshift-release-dev/ocp-release:4.15.21-x86_64","version":"4.15.21"},{"openshift_version":"4.15","cpu_architecture":"arm64","cpu_architectures":["arm64"],"url":"quay.io/openshift-release-dev/ocp-release:4.15.21-aarch64","version":"4.15.21"},{"openshift_version":"4.15-multi","cpu_architecture":"multi","cpu_architectures":["x86_64","arm64","ppc64le","s390x"],"url":"quay.io/openshift-release-dev/ocp-release:4.15.21-multi","version":"4.15.21-multi"},{"openshift_version":"4.16","cpu_architecture":"x86_64","cpu_architectures":["x86_64"],"url":"quay.io/openshift-release-dev/ocp-release:4.16.3-x86_64","version":"4.16.3","default":true},{"openshift_version":"4.16","cpu_architecture":"arm64","cpu_architectures":["arm64"],"url":"quay.io/openshift-release-dev/ocp-release:4.16.3-aarch64","version":"4.16.3"},{"openshift_version":"4.16-multi","cpu_architecture":"multi","cpu_architectures":["x86_64","arm64","ppc64le","s390x"],"url":"quay.io/openshift-release-dev/ocp-release:4.16.3-multi","version":"4.16.3-multi"},{"openshift_version":"4.17","cpu_architecture":"x86_64","cpu_architectures":["x86_64"],"url":"quay.io/openshift-release-dev/ocp-release:4.17.0-ec.1-x86_64","support_level":"beta","version":"4.17.0-ec.1"},{"openshift_version":"4.17","cpu_architecture":"arm64","cpu_architectures":["arm64"],"url":"quay.io/openshift-release-dev/ocp-release:4.17.0-ec.1-aarch64","support_level":"beta","version":"4.17.0-ec.1"},{"openshift_version":"4.17-multi","cpu_architecture":"multi","cpu_architectures":["x86_64","arm64","ppc64le","s390x"],"url":"quay.io/openshift-release-dev/ocp-release:4.17.0-ec.1-multi","support_level":"beta","version":"4.17.0-ec.1-multi"}]'
PUBLIC_CONTAINER_REGISTRIES: 'quay.io,registry.ci.openshift.org'
RELEASE_IMAGES: '[{"openshift_version":"4.9","cpu_architecture":"x86_64","cpu_architectures":["x86_64"],"url":"quay.io/openshift-release-dev/ocp-release:4.9.59-x86_64","version":"4.9.59"},{"openshift_version":"4.10","cpu_architecture":"x86_64","cpu_architectures":["x86_64"],"url":"quay.io/openshift-release-dev/ocp-release:4.10.67-x86_64","version":"4.10.67"},{"openshift_version":"4.10","cpu_architecture":"arm64","cpu_architectures":["arm64"],"url":"quay.io/openshift-release-dev/ocp-release:4.10.67-aarch64","version":"4.10.67"},{"openshift_version":"4.11","cpu_architecture":"x86_64","cpu_architectures":["x86_64"],"url":"quay.io/openshift-release-dev/ocp-release:4.11.59-x86_64","version":"4.11.59"},{"openshift_version":"4.11","cpu_architecture":"arm64","cpu_architectures":["arm64"],"url":"quay.io/openshift-release-dev/ocp-release:4.11.59-aarch64","version":"4.11.59"},{"openshift_version":"4.11.0-multi","cpu_architecture":"multi","cpu_architectures":["x86_64","arm64","ppc64le","s390x"],"url":"quay.io/openshift-release-dev/ocp-release:4.11.0-multi","version":"4.11.0-multi"},{"openshift_version":"4.12","cpu_architecture":"x86_64","cpu_architectures":["x86_64"],"url":"quay.io/openshift-release-dev/ocp-release:4.12.60-x86_64","version":"4.12.60"},{"openshift_version":"4.12","cpu_architecture":"arm64","cpu_architectures":["arm64"],"url":"quay.io/openshift-release-dev/ocp-release:4.12.60-aarch64","version":"4.12.60"},{"openshift_version":"4.12-multi","cpu_architecture":"multi","cpu_architectures":["x86_64","arm64","ppc64le","s390x"],"url":"quay.io/openshift-release-dev/ocp-release:4.12.60-multi","version":"4.12.60-multi"},{"openshift_version":"4.13","cpu_architecture":"x86_64","cpu_architectures":["x86_64"],"url":"quay.io/openshift-release-dev/ocp-release:4.13.44-x86_64","version":"4.13.44"},{"openshift_version":"4.13","cpu_architecture":"arm64","cpu_architectures":["arm64"],"url":"quay.io/openshift-release-dev/ocp-release:4.13.44-aarch64","version":"4.13.44"},{"openshift_version":"4.13-multi","cpu_architecture":"multi","cpu_architectures":["x86_64","arm64","ppc64le","s390x"],"url":"quay.io/openshift-release-dev/ocp-release:4.13.44-multi","version":"4.13.44-multi"},{"openshift_version":"4.14","cpu_architecture":"x86_64","cpu_architectures":["x86_64"],"url":"quay.io/openshift-release-dev/ocp-release:4.14.32-x86_64","version":"4.14.32"},{"openshift_version":"4.14","cpu_architecture":"arm64","cpu_architectures":["arm64"],"url":"quay.io/openshift-release-dev/ocp-release:4.14.32-aarch64","version":"4.14.32"},{"openshift_version":"4.14-multi","cpu_architecture":"multi","cpu_architectures":["x86_64","arm64","ppc64le","s390x"],"url":"quay.io/openshift-release-dev/ocp-release:4.14.32-multi","version":"4.14.32-multi"},{"openshift_version":"4.15","cpu_architecture":"x86_64","cpu_architectures":["x86_64"],"url":"quay.io/openshift-release-dev/ocp-release:4.15.21-x86_64","version":"4.15.21"},{"openshift_version":"4.15","cpu_architecture":"arm64","cpu_architectures":["arm64"],"url":"quay.io/openshift-release-dev/ocp-release:4.15.21-aarch64","version":"4.15.21"},{"openshift_version":"4.15-multi","cpu_architecture":"multi","cpu_architectures":["x86_64","arm64","ppc64le","s390x"],"url":"quay.io/openshift-release-dev/ocp-release:4.15.21-multi","version":"4.15.21-multi"},{"openshift_version":"4.16","cpu_architecture":"x86_64","cpu_architectures":["x86_64"],"url":"quay.io/openshift-release-dev/ocp-release:4.16.2-x86_64","version":"4.16.2","default":true},{"openshift_version":"4.16","cpu_architecture":"arm64","cpu_architectures":["arm64"],"url":"quay.io/openshift-release-dev/ocp-release:4.16.2-aarch64","version":"4.16.2"},{"openshift_version":"4.16-multi","cpu_architecture":"multi","cpu_architectures":["x86_64","arm64","ppc64le","s390x"],"url":"quay.io/openshift-release-dev/ocp-release:4.16.2-multi","version":"4.16.2-multi"},{"openshift_version":"4.17","cpu_architecture":"x86_64","cpu_architectures":["x86_64"],"url":"quay.io/openshift-release-dev/ocp-release:4.17.0-ec.1-x86_64","support_level":"beta","version":"4.17.0-ec.1"},{"openshift_version":"4.17","cpu_architecture":"arm64","cpu_architectures":["arm64"],"url":"quay.io/openshift-release-dev/ocp-release:4.17.0-ec.1-aarch64","support_level":"beta","version":"4.17.0-ec.1"},{"openshift_version":"4.17-multi","cpu_architecture":"multi","cpu_architectures":["x86_64","arm64","ppc64le","s390x"],"url":"quay.io/openshift-release-dev/ocp-release:4.17.0-ec.1-multi","support_level":"beta","version":"4.17.0-ec.1-multi"}]'
SERVICE_BASE_URL: http://127.0.0.1:8090
STORAGE: filesystem
ENABLE_UPGRADE_AGENT: "true"
Expand Down
2 changes: 1 addition & 1 deletion deploy/podman/okd-configmap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ data:
POSTGRESQL_DATABASE: installer
POSTGRESQL_PASSWORD: admin
POSTGRESQL_USER: admin
PUBLIC_CONTAINER_REGISTRIES: 'quay.io'
PUBLIC_CONTAINER_REGISTRIES: 'quay.io,registry.ci.openshift.org'
SERVICE_BASE_URL: http://127.0.0.1:8090
STORAGE: filesystem
OS_IMAGES: '[{"openshift_version":"4.16","cpu_architecture":"x86_64","url":"https://builds.coreos.fedoraproject.org/prod/streams/stable/builds/39.20240322.3.1/x86_64/fedora-coreos-39.20240322.3.1-live.x86_64.iso","version":"39.20240322.3.1"}]'
Expand Down
Loading