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

dbaas: external integrations #636

Merged
merged 30 commits into from
Oct 11, 2024

Conversation

simisoft-exo
Copy link
Contributor

@simisoft-exo simisoft-exo commented Sep 11, 2024

https://github.com/exoscale/dbaas-api/pull/296

Description

Checklist

(For exoscale contributors)

  • Changelog updated (under Unreleased block)
  • Testing

Testing

go run . dbaas external-endpoint create datadog cli-test-name-6 \
--datadog-api-key asdfasdfsadfasd \
--datadog-site datadoghq.eu \
--datadog-tags '[{"comment": "blabla","tag":"sometag"}]'
 ✔ Creating DBaaS Datadog external Endpoint "cli-test-name-6" 0s
┼────────────────────────────────┼──────────────────────────────────────┼
│   DATADOG EXTERNAL ENDPOINT    │                                      │
┼────────────────────────────────┼──────────────────────────────────────┼
│ Endpoint ID                    │ c15f1766-2321-4684-b9a8-c7bcca22949c │
│ Endpoint Name                  │ cli-test-name-6                      │
│ Endpoint Type                  │ datadog                              │
│ Datadog API Key                │ asdfasdfsadfasd                      │
│ Site                           │ datadoghq.eu                         │
│ Disable Consumer Stats         │ false                                │
│ Kafka Consumer Check Instances │ 0                                    │
│ Kafka Consumer Stats Timeout   │ 0                                    │
│ Max Partition Contexts         │ 0                                    │
│ Datadog Tags                   │ sometag (blabla)                     │
┼────────────────────────────────┼──────────────────────────────────────┼
go run . dbaas external-endpoint show datadog e87cdc43-a902-4e46-80d1-22e2bc97931a
┼────────────────────────────────┼──────────────────────────────────────┼
│   DATADOG EXTERNAL ENDPOINT    │                                      │
┼────────────────────────────────┼──────────────────────────────────────┼
│ Endpoint ID                    │ e87cdc43-a902-4e46-80d1-22e2bc97931a │
│ Endpoint Name                  │ cli-test-name-4                      │
│ Endpoint Type                  │ datadog                              │
│ Datadog API Key                │ asdfasdfsadfasd                      │
│ Site                           │ datadoghq.eu                         │
│ Disable Consumer Stats         │ false                                │
│ Kafka Consumer Check Instances │ 0                                    │
│ Kafka Consumer Stats Timeout   │ 0                                    │
│ Max Partition Contexts         │ 0                                    │
│ Datadog Tags                   │ sometag (blabla)                     │
┼────────────────────────────────┼──────────────────────────────────────┼
go run . dbaas external-endpoint create opensearch cli-test-name-opensearch \
--opensearch-ca "-----BEGIN CERTIFICATE-----
....
-----END CERTIFICATE-----" \
--opensearch-index-days-max 30 \
--opensearch-index-prefix "logs-" \
--opensearch-timeout 30 \
--opensearch-url "https://some-opensearch-cluster.com:9200"
 ✔ Creating DBaaS OpenSearch external Endpoint "cli-test-name-opensearch" 0s
┼──────────────────────────────┼──────────────────────────────────────────┼
│ OPENSEARCH EXTERNAL ENDPOINT │                                          │
┼──────────────────────────────┼──────────────────────────────────────────┼
│ Endpoint ID                  │ a1b175a4-27eb-4c9a-8bbd-5b03cd5d5c6f     │
│ Endpoint Name                │ cli-test-name-opensearch                 │
│ Endpoint Type                │ opensearch                               │
│ OpenSearch URL               │ https://some-opensearch-cluster.com:9200 │
│ Index Prefix                 │ logs-                                    │
│ CA Certificate               │ -----BEGIN CERTIFICATE-----              │
│                              │ MIICnTCCAiSgAwIBAgIMCL...                │
│ Index Days Max               │ 30                                       │
│ Timeout                      │ 30                                       │
┼──────────────────────────────┼──────────────────────────────────────────┼
go run . dbaas external-endpoint create prometheus cli-prometheus \
--prometheus-basic-auth-username prom-username \
--prometheus-basic-auth-password super-strong-secret
 ✔ Creating DBaaS Prometheus external Endpoint "cli-prometheus" 0s
┼──────────────────────────────┼──────────────────────────────────────┼
│ PROMETHEUS EXTERNAL ENDPOINT │                                      │
┼──────────────────────────────┼──────────────────────────────────────┼
│ Endpoint ID                  │ eab185cf-8adc-4a72-9dec-39a01c08df7e │
│ Endpoint Name                │ cli-prometheus                       │
│ Endpoint Type                │ prometheus                           │
│ Basic Auth Username          │ prom-username                        │
│ Basic Auth Password          │ super-strong-secret                  │
┼──────────────────────────────┼──────────────────────────────────────┼
go run . dbaas external-endpoint show prometheus 0ffa5b3c-bde4-4888-b9f2-1bcdbf0f8c9f
┼──────────────────────────────┼──────────────────────────────────────┼
│ PROMETHEUS EXTERNAL ENDPOINT │                                      │
┼──────────────────────────────┼──────────────────────────────────────┼
│ Endpoint ID                  │ 0ffa5b3c-bde4-4888-b9f2-1bcdbf0f8c9f │
│ Endpoint Name                │ prom-settings                        │
│ Endpoint Type                │ prometheus                           │
│ Basic Auth Username          │ something                            │
│ Basic Auth Password          │ fantastickkk                         │
┼──────────────────────────────┼──────────────────────────────────────┼
go run . dbaas external-endpoint create rsyslog create-rsyslog-demo \
  --rsyslog-ca "$(openssl req -x509 -newkey rsa:4096 -keyout /dev/null -out /dev/stdout -days 365 -nodes -subj '/CN=DemoCA' 2>/dev/null)" \
  --rsyslog-cert "$(openssl req -x509 -newkey rsa:4096 -keyout /dev/null -out /dev/stdout -days 365 -nodes -subj '/CN=DemoClient' 2>/dev/null)" \
  --rsyslog-format "rfc5424" \
  --rsyslog-key "$(openssl genpkey -algorithm RSA -out /dev/stdout 2>/dev/null)" \
  --rsyslog-logline "%<PRIORITY>%<VERSION> %<TIMESTAMP> %<HOSTNAME> %<APP-NAME> %<PROCID> %<MSGID> %<MESSAGE>" \
  --rsyslog-max-message-size 1000000000 \
  --rsyslog-port 40404 \
  --rsyslog-sd "something" \
  --rsyslog-server "192.168.55.5" \
  --rsyslog-tls
 ✔ Creating DBaaS Rsyslog external Endpoint "create-rsyslog-demo" 0s
┼───────────────────────────┼──────────────────────────────────────────────────────────────────────────────────────────┼
│ RSYSLOG EXTERNAL ENDPOINT │                                                                                          │
┼───────────────────────────┼──────────────────────────────────────────────────────────────────────────────────────────┼
│ Endpoint ID               │ ae4af2ae-7367-462d-a0ad-bdbde9153f28                                                     │
│ Endpoint Name             │ create-rsyslog-demo                                                                      │
│ Endpoint Type             │ rsyslog                                                                                  │
│ Server                    │ 192.168.55.5                                                                             │
│ Port                      │ 40404                                                                                    │
│ Tls                       │ true                                                                                     │
│ CA Certificate            │ -----BEGIN CERTIFICATE-----                                                              │
│                           │ MIIE0TCCArmgAwIBAgIUZc...                                                                │
│ Client Certificate        │ -----BEGIN CERTIFICATE-----                                                              │
│                           │ MIIE2TCCAsGgAwIBAgIUS1...                                                                │
│ Client Key                │ -----BEGIN PRIVATE KEY-----                                                              │
│                           │ MIIEvAIBADANBgkqhkiG9w...                                                                │
│ Max Message Size          │ 1000000000                                                                               │
│ Structured data block     │ something                                                                                │
│ Custom logline format     │ %<PRIORITY>%<VERSION> %<TIMESTAMP> %<HOSTNAME> %<APP-NAME> %<PROCID> %<MSGID> %<MESSAGE> │
│ Custom logline format     │ %<PRIORITY>%<VERSION> %<TIMESTAMP> %<HOSTNAME> %<APP-NAME> %<PROCID> %<MSGID> %<MESSAGE> │
┼───────────────────────────┼──────────────────────────────────────────────────────────────────────────────────────────┼

@simisoft-exo simisoft-exo force-pushed the simion/sc-94705/dbaas-external-integrations branch from 4a0ff72 to 946301c Compare September 19, 2024 13:24
@simisoft-exo simisoft-exo changed the title [wip] dbaas: external integrations dbaas: external integrations Oct 7, 2024
@simisoft-exo simisoft-exo marked this pull request as ready for review October 7, 2024 14:03
@pierre-emmanuelJ pierre-emmanuelJ requested a review from a team October 10, 2024 12:58
Copy link
Member

@pierre-emmanuelJ pierre-emmanuelJ left a comment

Choose a reason for hiding this comment

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

Great work!! @simisoft-exo :)

@simisoft-exo simisoft-exo merged commit 66c40e4 into master Oct 11, 2024
1 check passed
@simisoft-exo simisoft-exo deleted the simion/sc-94705/dbaas-external-integrations branch October 11, 2024 10:31
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