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

Clean up dependency installation in stf-run-ci #455

Merged
merged 5 commits into from
Sep 13, 2023

Conversation

leifmadsen
Copy link
Member

Clean up the dependency installation when not using index images (which
installs dependencies via dependencies.yaml). Adjust installation of
cert-manager for versions of OCP 4.10 vs 4.12 and later.

Clean up the dependency installation when not using index images (which
installs dependencies via dependencies.yaml). Adjust installation of
cert-manager for versions of OCP 4.10 vs 4.12 and later.
@leifmadsen
Copy link
Member Author

Deployment was successful using following command:

ansible-playbook -e __local_build_enabled=true build/run-ci.yaml
TASK [stf-run-ci : Create ServiceTelemetry instance] **********************************************************************************************************************************************************
changed: [localhost]

TASK [stf-run-ci : Validate system is operational] ************************************************************************************************************************************************************
changed: [localhost]

TASK [stf-run-ci : debug] *************************************************************************************************************************************************************************************
ok: [localhost] => {
    "validate_deployment.stdout_lines": [
        "Already on project \"service-telemetry\" on server \"https://console-openshift-console.apps.stf15comm.rhos-d.infra.prod.upshift.rdu2.redhat.com:6443\".",
        "",
        "* [info] Waiting for QDR deployment to complete",
        "",
        "Waiting for deployment \"default-interconnect\" rollout to finish: 0 of 1 updated replicas are available...",
        "deployment \"default-interconnect\" successfully rolled out",
        "",
        "* [info] Waiting for prometheus deployment to complete",
        "",
        "Waiting for 1 pods to be ready...",
        "statefulset rolling update complete 1 pods at revision prometheus-default-8547b66858...",
        "",
        "* [info] Waiting for alertmanager deployment to complete",
        "",
        "statefulset rolling update complete 1 pods at revision alertmanager-default-56cd4b979...",
        "",
        "* [info] Waiting for smart-gateway deployment to complete",
        "",
        "Waiting for deployment \"default-cloud1-coll-meter-smartgateway\" rollout to finish: 0 of 1 updated replicas are available...",
        "deployment \"default-cloud1-coll-meter-smartgateway\" successfully rolled out",
        "deployment \"default-cloud1-ceil-meter-smartgateway\" successfully rolled out",
        "deployment \"default-cloud1-sens-meter-smartgateway\" successfully rolled out",
        "",
        "* [info] Waiting for all pods to show Ready/Complete",
        "",
        "",
        "* [info] CI Build complete. You can now run tests."
    ]
}

PLAY RECAP ****************************************************************************************************************************************************************************************************
localhost                  : ok=124  changed=43   unreachable=0    failed=0    skipped=15   rescued=0    ignored=0   
oc get sub,csv,pod
NAME                                                                                                                 PACKAGE                                SOURCE                CHANNEL
subscription.operators.coreos.com/amq7-interconnect-operator                                                         amq7-interconnect-operator             redhat-operators      1.10.x
subscription.operators.coreos.com/elasticsearch-eck-operator-certified                                               elasticsearch-eck-operator-certified   certified-operators   stable
subscription.operators.coreos.com/openshift-cert-manager-operator-stable-v1-redhat-operators-openshift-marketplace   openshift-cert-manager-operator        redhat-operators      stable-v1

NAME                                                                                     DISPLAY                                       VERSION          REPLACES                                      PHASE
clusterserviceversion.operators.coreos.com/amq7-interconnect-operator.v1.10.17           Red Hat Integration - AMQ Interconnect        1.10.17          amq7-interconnect-operator.v1.10.4            Succeeded
clusterserviceversion.operators.coreos.com/cert-manager-operator.v1.11.4                 cert-manager Operator for Red Hat OpenShift   1.11.4                                                         Succeeded
clusterserviceversion.operators.coreos.com/elasticsearch-eck-operator-certified.v2.9.0   Elasticsearch (ECK) Operator                  2.9.0            elasticsearch-eck-operator-certified.v2.8.0   Succeeded
clusterserviceversion.operators.coreos.com/observability-operator.v0.0.25                Observability Operator                        0.0.25                                                         Succeeded
clusterserviceversion.operators.coreos.com/service-telemetry-operator.v1.5.1694550744    Service Telemetry Operator                    1.5.1694550744                                                 Succeeded
clusterserviceversion.operators.coreos.com/smart-gateway-operator.v5.0.1694550736        Smart Gateway Operator                        5.0.1694550736                                                 Succeeded

NAME                                                           READY   STATUS      RESTARTS       AGE
pod/alertmanager-default-0                                     3/3     Running     0              172m
pod/cert-manager-operator-controller-manager-bc5697c44-wplm9   2/2     Running     0              3h5m
pod/default-cloud1-ceil-event-smartgateway-c64889859-qrwpd     2/2     Running     0              172m
pod/default-cloud1-ceil-meter-smartgateway-7d54b48686-7gnzx    3/3     Running     0              172m
pod/default-cloud1-coll-event-smartgateway-95978bf8c-qltns     2/2     Running     0              172m
pod/default-cloud1-coll-meter-smartgateway-59bb9fc985-wx9dh    3/3     Running     0              172m
pod/default-cloud1-sens-meter-smartgateway-6d56f55bf4-nc8qr    3/3     Running     0              172m
pod/default-interconnect-7cc45b86c5-phtf8                      1/1     Running     0              173m
pod/default-snmp-webhook-5c7c44d97c-62r49                      1/1     Running     0              172m
pod/elastic-operator-77cdc8754c-s89rf                          1/1     Running     4 (107m ago)   3h5m
pod/elasticsearch-es-default-0                                 1/1     Running     0              3h5m
pod/interconnect-operator-7bb99c5ff4-5xv4x                     1/1     Running     0              3h5m
pod/prometheus-default-0                                       3/3     Running     0              172m
pod/prometheus-webhook-snmp-2-build                            0/1     Completed   0              175m
pod/service-telemetry-operator-2-build                         0/1     Completed   0              3h4m
pod/service-telemetry-operator-7fc6c94bb8-kb2gf                1/1     Running     0              173m
pod/sg-bridge-2-build                                          0/1     Completed   0              179m
pod/sg-core-2-build                                            0/1     Completed   0              3h2m
pod/smart-gateway-operator-2-build                             0/1     Completed   0              3h3m
pod/smart-gateway-operator-dbdb9fb94-gssdv                     1/1     Running     0              173m
oc get sub,csv -nopenshift-operators
NAME                                                       PACKAGE                  SOURCE                CHANNEL
subscription.operators.coreos.com/observability-operator   observability-operator   community-operators   stable

NAME                                                                        DISPLAY                  VERSION   REPLACES   PHASE
clusterserviceversion.operators.coreos.com/observability-operator.v0.0.25   Observability Operator   0.0.25               Succeeded

- disabled: "{{ false if __service_telemetry_observability_strategy in ['use_community', 'use_hybrid'] else true }}"
- disabled: false
Copy link
Member Author

Choose a reason for hiding this comment

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

I moved this conditional so that ObO could be installed. There are priority rules on the CatalogSources which will dictate order of installation preference with dependency resolution. With local builds (non-index based) we specify the source Catalog.

Ideally in the future we'll be able to update the ObO installation source to redhat-operators vs community-operators.

@@ -66,6 +80,28 @@
source: redhat-operators
sourceNamespace: openshift-marketplace

# deploy cert-manager from stable-v1 in 4.12 and later using namespace scoped operator
- when: not __deploy_from_index_enabled | bool and ocp_ver.stdout is version ('4.12', '>=')
Copy link
Member Author

Choose a reason for hiding this comment

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

I took a bit of liberties in this file and refactored this so that in installations of OCP 4.10 (and 4.11) we use the tech-preview channel as a cluster scoped Operator, and in 4.12 and later using the stable-v1 channel in a namespace scoped Operator to simulate how dependency resolution would work in an OCP without cert-manager already installed at the cluster scope.

build/stf-run-ci/tasks/setup_base.yml Outdated Show resolved Hide resolved
@@ -28,7 +41,8 @@
targetNamespaces:
- "{{ namespace }}"

- when: not __deploy_from_index_enabled | bool
# deploy cert-manager from tech-preview when using versions of OCP < 4.12
- when: not __deploy_from_index_enabled | bool and ocp_ver.stdout is version ('4.12', '<')
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍

@leifmadsen leifmadsen merged commit f490a9f into master Sep 13, 2023
8 checks passed
@leifmadsen leifmadsen deleted the stf-1483/clean-up-obo-install branch September 13, 2023 21:53
vkmc pushed a commit that referenced this pull request Sep 14, 2023
* Clean up dependency installation in stf-run-ci

Clean up the dependency installation when not using index images (which
installs dependencies via dependencies.yaml). Adjust installation of
cert-manager for versions of OCP 4.10 vs 4.12 and later.

* Move ObO CatalogSource removal to pre-clean stage
vkmc added a commit that referenced this pull request Sep 14, 2023
Rebased and fixed linting in the changes introduced
as part of the PR#455

#455
leifmadsen added a commit that referenced this pull request Sep 14, 2023
Fix a static namespace reference introduced in #455
elfiesmelfie pushed a commit that referenced this pull request Sep 14, 2023
Fix a static namespace reference introduced in #455
elfiesmelfie added a commit that referenced this pull request Sep 14, 2023
* [ansible-lint] Use fqcn for modules

* command -> ansible.builtin.command
* debug -> ansible.builtin.debug
* file -> ansible.builtin.file
* k8s -> kubernetes.core.k8s
* k8s_info -> kubernetes.core.k8s_info
* set_fact -> ansible.builtin.set_fact
* shell -> ansible.builtin.shell
* template -> ansible.builtin.template


#455

* Add lint testing for stf-run-ci fqcn (#462)

---------

Co-authored-by: Leif Madsen <lmadsen@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants