Skip to content

Remove step in CI that pin jammy version #794

Open
akram09 wants to merge 4 commits into2/edgefrom
disable-jammy-pin-ci
Open

Remove step in CI that pin jammy version #794
akram09 wants to merge 4 commits into2/edgefrom
disable-jammy-pin-ci

Conversation

@akram09
Copy link
Contributor

@akram09 akram09 commented Jan 30, 2026

Description of issue or feature:

Solution:

How was this change tested?

  • Manually
  • Unit tests
  • Integration tests

Checklist

  • I have added or updated any relevant documentation.
  • I have cleaned any remaining cloud resources from my accounts.

akram09 and others added 4 commits January 30, 2026 17:09
Implements
[DA231](https://docs.google.com/document/d/1LaMAF5_vuRhcmqam2LbUnOeq-Gy2Le7fKc3lXHJXGmY/edit?tab=t.0)

Fixes #777.

## Solution:
This PR adds SMTP notifications lifecycle in the OpenSearch charm.

The SMTP-related notification configs are created automatically by
Opensearch when the smtp-integrator relation is established.
- SMTP sender (smtp_account)
- Email group (email_group)
- Email channel (email)

## How it works
 Integrate Opensearch with smtp-integrator
 Configure the SMTP integrator with SMTP credentials:

```shell
juju config smtp-integrator \
  host="<smtp-host>" \
  port="587" \
  user="<smtp-username>" \
  password="<smtp-password>" \
  smtp-sender="<sender-email>" \
  recipients="a@example.com,b@example.com"
```

The smtp-sender, email-group and email-channel is automatically created.
The config-id is derived from relation-id.
```
 sudo curl --cacert /var/snap/opensearch/98/etc/opensearch/certificates/chain.pem   -u "admin:${ADMIN_PASSWORD}"   "https://10.127.127.111:9200/_plugins/_notifications/configs/" | jq .
{
  "start_index": 0,
  "total_hits": 3,
  "total_hit_relation": "eq",
  "config_list": [
    {
      "config_id": "smtp-85",
      "last_updated_time_ms": 1769774765184,
      "created_time_ms": 1769774765184,
      "config": {
        "name": "smtp-85",
        "description": "SMTP sender: (smtp-85)",
        "config_type": "smtp_account",
        "is_enabled": true,
        "smtp_account": {
          "host": "smtp.gmail.com",
          "port": 587,
          "method": "start_tls",
          "from_address": "h68805701@gmail.com"
        }
      }
    },
    {
      "config_id": "smtp-85_recipients",
      "last_updated_time_ms": 1769774767882,
      "created_time_ms": 1769774767882,
      "config": {
        "name": "smtp-85_recipients",
        "description": "Email group managed by (smtp-85_recipients)",
        "config_type": "email_group",
        "is_enabled": true,
        "email_group": {
          "recipient_list": [
            {
              "recipient": "gulsumatici@gmail.com"
            }
          ]
        }
      }
    },
    {
      "config_id": "smtp-85_email-channel",
      "last_updated_time_ms": 1769774768149,
      "created_time_ms": 1769774768149,
      "config": {
        "name": "smtp-85_email-channel",
        "description": "Email channel: (smtp-85_email-channel)",
        "config_type": "email",
        "is_enabled": true,
        "email": {
          "email_account_id": "smtp-85",
          "recipient_list": [],
          "email_group_id_list": [
            "smtp-85_recipients"
          ]
        }
      }
    }
  ]
}

```

<img width="1073" height="236" alt="image"
src="https://github.com/user-attachments/assets/24a45fb1-41ce-48b5-aff9-46c2060fda71"
/>

```
ADMIN_PASSWORD="xxxxx"
OS_IP="10.127.127.128"
CFG_ID="smtp-85_email-channel"

sudo curl --cacert /var/snap/opensearch/current/etc/opensearch/certificates/chain.pem \
  -u "admin:${ADMIN_PASSWORD}" \
  -X POST "https://${OS_IP}:9200/_plugins/_notifications/feature/test/${CFG_ID}" \
  -H "Content-Type: application/json" \
  -d '{"subject":"SMTP integration test","message":"Sent via smtp-integrator + OpenSearch"}'

{"event_source":{"title":"Test Message Title-smtp-85_email-channel","reference_id":"smtp-85_email-channel","severity":"info","tags":[]},"status_list":[{"config_id":"smtp-85","config_type":"email","config_name":"smtp-85_email-channel","email_recipient_status":[{"recipient":"gulsum.atici@canonical.com","delivery_status":{"status_code":"200","status_text":"Success"}}],"delivery_status":{"status_code":"200","status_text":"Success"}}]}
```

<img width="927" height="403" alt="image"
src="https://github.com/user-attachments/assets/36a72470-7b24-416c-9c43-85e236c8376f"
/>


## How was this change tested?
- [x] Manually
- [x] Unit tests
- [x] Integration tests

<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, and the tests you ran
to -->
<!--- see how your change affects other areas of the code, etc. -->


## Checklist
- [ ] I have added or updated any relevant documentation.
- [ ] I have cleaned any remaining cloud resources from my accounts.

---------

Signed-off-by: gatici <gulsum.atici@canonical.com>
Co-authored-by: Mehdi-Bendriss <45567724+Mehdi-Bendriss@users.noreply.github.com>
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.

2 participants