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

Add script, templates and manifests to make RHOBS deployable on test clusters #112

Merged
merged 11 commits into from
Feb 2, 2022

Conversation

matej-g
Copy link
Contributor

@matej-g matej-g commented Jan 11, 2022

This PR intends to allow deployment of the RHOBS stack outside of our typical depolyment scenario, which is using this repository in conjunction with the AppSRE Interface.

In order to allow for easier deployment for testing purposes, this PR contains additional resources that allow for the RHOBS to be deployed on any OpenShift cluster by replacing external dependencies (objects provided by AppSRE Interface - secrets, service accounts, object storage, OIDC provider). The additional resources are included in the tests directory, which includes:

  • Secrets (e.g. object storage), service accounts and role bindings which replace objects normally provided by AppSRE or are obtained from Vault
  • New templates to generate manifests to replace external dependencies with local alternatives (Minio to replace S3, Dex to replace Red Hat's SSO)
  • Files with template parameter overrides (also usually handled by AppSRE Interface)

On top of the additional manifests, there is a convenience script provided to easily deploy (and tear down) all manifests and templates.

Not included

Presently, the change set does include only 'core' parts of the RHOBS, meaning some templates / namespaces / objects are not part of the test deployment:

  • Logs related namespaces are not included, as the aim is to first allow testing for metrics
  • Jaeger-related deployments are also excluded, as they functionally are not part of the RHOBS
  • MST namespace is not included, since virtually it is a copy of the Observatorium namespace(s) with modified configuration
  • Services are not exposed, meaning OpenShift routes are not part of the deployment - these need to be added by the user, depending on particular test case - either oc expose can be use or a directly port forwarding with oc port-forward is possible as well

Copy link
Contributor

@moadz moadz left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for this.

Comment on lines +8 to +11
authorize_url: aHR0cHM6Ly9hcGkuc3RhZ2Uub3BlbnNoaWZ0LmNvbS9hcGkvYWNjb3VudHNfbWdtdC92MS9jbHVzdGVyX3JlZ2lzdHJhdGlvbnM=
client_id: dGVzdA==
client_secret: WlhoaGJYQnNaUzFoY0hBdGMyVmpjbVYw
oidc_issuer: aHR0cDovL2RleC5kZXguc3ZjLmNsdXN0ZXIubG9jYWw6NTU1Ni9kZXg=
Copy link
Contributor

Choose a reason for hiding this comment

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

Are these placeholders? If not we probably shouldn't check these in.

Copy link
Contributor

Choose a reason for hiding this comment

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

They are the base64 encodings of...
authorize_url is https://api.stage.openshift.com/api/accounts_mgmt/v1/cluster_registrations
oidc_issuer is http://dex.dex.svc.cluster.local:5556/dex

So I guess the actual values

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's either test credentials which should not be really sensitive or publicly known / accessible resources like the OCM staging endpoint to register cluster.

stringData+: {
'client-id': 'test',
'client-secret': 'ZXhhbXBsZS1hcHAtc2VjcmV0',
'issuer-url': 'http://dex.dex.svc.cluster.local:5556/dex',
Copy link
Contributor

Choose a reason for hiding this comment

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

        'issuer-url': 'http://dex.dex.svc.cluster.local:5556/dex',

dupe or just weird local address?

Copy link
Contributor

Choose a reason for hiding this comment

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

lol what's weird about this address?

Copy link
Contributor

Choose a reason for hiding this comment

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

double dex :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think one is namespace and other is service name, right?

The parameter files can be edited accordingly to accomodate your specific testing scenario.

### How to
To deploy the RHOBS stack on a cluster, use the `launch.sh` script from within this directory. Run:
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: is it worth including links to docs/instructions on how best to requisition a cluster. (I know we already have this documented elsewhere)

Also, is the plan to have a long-lived cluster for rhobs testing, or to create one transiently?

Copy link
Contributor

Choose a reason for hiding this comment

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

+1 to that!

I would guess that this is for transient clusters as a long-lived test cluster would be deployed via app-interface just like stage and prod are.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll add links to more resources, good idea! 👍

@@ -0,0 +1,33 @@
## Deploying RHOBS for testing
Copy link
Contributor

Choose a reason for hiding this comment

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

This limits us to a single test 'instance' per project/cluster right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

At the moment yes but we can add support for more instance I guess in the next iteration if we'd like to

@matej-g matej-g force-pushed the rhobs-deploy-latest branch 2 times, most recently from bc1882e to 4569ccb Compare January 12, 2022 10:44
Signed-off-by: Matej Gera <[email protected]>
@matej-g matej-g force-pushed the rhobs-deploy-latest branch from 4569ccb to 00aa258 Compare January 12, 2022 10:58
Copy link
Contributor

@bill3tt bill3tt left a comment

Choose a reason for hiding this comment

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

This is great stuff @matej-g - I'm looking forward to being able to run a testing cluster to poke around with 🤗

Comment on lines +8 to +11
authorize_url: aHR0cHM6Ly9hcGkuc3RhZ2Uub3BlbnNoaWZ0LmNvbS9hcGkvYWNjb3VudHNfbWdtdC92MS9jbHVzdGVyX3JlZ2lzdHJhdGlvbnM=
client_id: dGVzdA==
client_secret: WlhoaGJYQnNaUzFoY0hBdGMyVmpjbVYw
oidc_issuer: aHR0cDovL2RleC5kZXguc3ZjLmNsdXN0ZXIubG9jYWw6NTU1Ni9kZXg=
Copy link
Contributor

Choose a reason for hiding this comment

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

They are the base64 encodings of...
authorize_url is https://api.stage.openshift.com/api/accounts_mgmt/v1/cluster_registrations
oidc_issuer is http://dex.dex.svc.cluster.local:5556/dex

So I guess the actual values

stringData+: {
'client-id': 'test',
'client-secret': 'ZXhhbXBsZS1hcHAtc2VjcmV0',
'issuer-url': 'http://dex.dex.svc.cluster.local:5556/dex',
Copy link
Contributor

Choose a reason for hiding this comment

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

lol what's weird about this address?

The parameter files can be edited accordingly to accomodate your specific testing scenario.

### How to
To deploy the RHOBS stack on a cluster, use the `launch.sh` script from within this directory. Run:
Copy link
Contributor

Choose a reason for hiding this comment

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

+1 to that!

I would guess that this is for transient clusters as a long-lived test cluster would be deployed via app-interface just like stage and prod are.

@bill3tt
Copy link
Contributor

bill3tt commented Jan 12, 2022

My only comment would be to hold off merging until members of the team have had the chance to go through the whole flow so we can find and catch any bugs at source.

@bill3tt
Copy link
Contributor

bill3tt commented Jan 25, 2022

@matej-g I would say that this is ready to merge 💪

@matej-g
Copy link
Contributor Author

matej-g commented Jan 25, 2022

@matej-g I would say that this is ready to merge muscle

I'm on this today, just need to go through comments to see what's up and I'm merging 👍

Co-authored-by: Moad Zardab <[email protected]>
@matej-g matej-g marked this pull request as ready for review January 26, 2022 14:21
@matej-g
Copy link
Contributor Author

matej-g commented Feb 2, 2022

This has been marinating long enough, it's good to be merged and we can potentially iterate on this further in future PRs.

@matej-g matej-g merged commit 9601c75 into rhobs:main Feb 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants