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

Deploy Openmetadata CI environment #2680

Closed
Ardiea opened this issue Sep 24, 2024 · 2 comments · Fixed by #2593
Closed

Deploy Openmetadata CI environment #2680

Ardiea opened this issue Sep 24, 2024 · 2 comments · Fixed by #2593
Assignees

Comments

@Ardiea
Copy link
Member

Ardiea commented Sep 24, 2024

Description/Context

Once I get a data-ci K8S cluster up and running, we need to look at creating an application stack(s) for OpenMetadata.

We need two actual stacks based on the docs:

  • infrastructure.aws.opensearch.openmetadata.CI (I think this is already done or near done?)
  • applications.openmetadata.CI
    • Logically divide this one into x parts
      • RDS stuff (MySQL/Maria I think?)
      • K8S Resources
      • Other stuff (IAM, networking, whatever comes up as you go)

RDS should have vault dynamic credentials configured like we normally do.
K8S Resources (helm charts and anything else) can be defined entirely with pulumi.

infrastructure.aws.eks.data.CI stack:

  • will export a kube_config file that you will need for this creating k8s resources via pulumi.
  • will create the openmetadata namespace for you.
  • Will, eventually, be running a set of treafik pods in the operations namespace that will hook into the various "gateway api" resources we will need in addition to the openmetadata helm chart
  • Will, eventually, be running the vault-secrets-operator that can be used to load the dynamic database creds into kubernetes Secrets that the app can pull into the pods.
  • Will, eventually, be running exteranl-dns to automatically make openmetadata-ci.odl.mit.edu (or whatever).
  • Will, eventually, be running cert-manager to go out to lets encrypt and get certificates for whatever URLs you create.

Many of those things are advanced topics, to start with focus on creating:

- RDS instace + Vault Auth stuff for it

  • There may be firewall/SG challenges here, to start with just open the entire pod address space -> RDS instance.

  • k8s resources with pulumi (refer to my branch / code that creates the cluster for examples of how to do this. It is very easy)

    • Just helm release to start, other stuff to follow.
    • You can create DB creds from the vault UI and load them in as Secrets manually to start, we can figure out the vault-secrets-operator stuff together later. I'm still struggling with it a bit myself.
    • I don't know how you did the open search stack, but the easiest thing might be to just connect to it over the internet to start with. The config would look a lot like the one for Learn. Then just load the username and pass into a Secret like you do with the database above.
  • Once those are working, lets talk.

    • The best way to decide that the helm release has installed and is working is to check the pods and ensure they are all up and running without reboot cycling.

Other stuff:

@feoh
Copy link
Contributor

feoh commented Sep 25, 2024

OMD CI opensearch is actually up and running:

    cluster       : {
        arn        : "arn:aws:es:us-east-1:610119931565:domain/opensearch-omdci"
        domain_id  : "610119931565/opensearch-omdci"
        domain_name: "opensearch-omdci"
        endpoint   : "vpc-opensearch-omdci-fizakvw3jvi575yxlvhdktlacq.us-east-1.es.amazonaws.com"
        urn        : "urn:pulumi:infrastructure.aws.opensearch.open_metadata.CI::ol-infrastructure-opensearch::aws:opensearch/domain:Domain::opensearch-v2-domain-cluster"
    }
    security_group: "sg-07078b7fd6d36aa5c"

Resources:
    + 8 created

feoh added a commit that referenced this issue Sep 25, 2024
feat: Initial skeleton for MIT OL Open Metadata application Pulumi code.
Ardiea pushed a commit that referenced this issue Oct 1, 2024
feat: Initial skeleton for MIT OL Open Metadata application Pulumi code.
@feoh
Copy link
Contributor

feoh commented Oct 3, 2024

Sooo close!

Was getting errors accessing the various API groups and realized I needed to add AWSEKSClusterAdministrator IAM policy to my IAM identity to make it work.

I'd mistakenly added AWSEKSAdministrator first, so we may need to do another spin down/up to get past this:

Diagnostics:
  kubernetes:helm.sh/v3:Release (open-metadata-CI-application-helm-release):
    error: 1 error occurred:
        * Helm release "open-metadata/open-metadata" failed to initialize completely. Use Helm CLI to investigate: failed to become available within allocated timeout. Error: Helm Release open-metadata/open-metadata: context deadline exceeded

  pulumi:pulumi:Stack (ol-infrastructure-open_metadata-application-applications.open_metadata.CI):
    error: update failed

Resources:
    ~ 1 updated
    41 unchanged

Duration: 5m20s

Ardiea added a commit that referenced this issue Oct 4, 2024
* feat: initial stack configuration for opensearch - OpenMetaData.

* Fix: use data platform consul for openmetadata opensearch.

* #2680

feat: Initial skeleton for MIT OL Open Metadata application Pulumi code.

* feat: Add Pulumi code for rds, consul and supporting configs

* fix: Remove unneeded IAM role, allow ingress from k8s subnet.

* Very WIP

* feat: Add Open Metadata helm chart, values, plumbing for db, es

* added namespace validation and reorg'd things a little. Added a vault auth backend role.

* Created a component resource for managing the vault secrets operator overhead. Added dynamic secrets to the openmetadata chart and made some experimental changes for the values.

* Bump pgsql engine major version to 16

* Fix reference to db name used in secret name. Also silence ludicrous TODO linting rules

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Fix ResourceOpts to ResourceOptions

* Fixed bugs to get a clean preview.

* Fixed bugs to get a clean preview.

* Tweaks to get a clean install.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fix: Use MariaDB not pg

* Revert "fix: Use MariaDB not pg"

This reverts commit bf7f3ae.

* Fixed configuration of env vars for db creds. Set up to use postgresql. Removed two version configs that snuck back in during rebase.

* Added additional grants to the application user.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Fixed opensearch, fixed some formatting.

* feat: add traefik gateway ConfigGroup - broken

* Adding keycloak configurations for open-metadata.

* Fix errant reference to cluster name

* Added missing http httproute, other tweaks to gateway stuff.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Added missing http httproute, other tweaks to gateway stuff.

* Updated

* Fix Callback URL

* Extra dependencies for vault+rds instances.

* Fixing the database role creation process and defined some more dependencies between resources. Set delete_before_replace on all k8s resources.

---------

Co-authored-by: Ardiea <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants