Infos:
- Used Zammad version: 6.4.1-1741242594.f05e641e.sles15
- Used Zammad installation type: Package
- Operating system: OpenSuse Leap 15.6
- Browser + version: Chromium 134.0.6998.45
Question:
I’m trying to figure out what rails commands I can use to set up Mail Notifications in the Email Channel, create a Microsoft 365 Channel configuration, and add the Elasticsearch Certificate to the SSL Configurations.
I need rails commands for this because I’d like to set up explicitly defined infrastructure within my company. The only remaining hurdle for reliably and repeatably setting up Zammad for different departments or a testing instance for custom add-on development is that we cannot programmatically complete the application setup.
Is there a way to query for the commands I need, or can someone point me in the correct direction?
Hi @ccampbell-bup. Setting up e.g. a M365 channel without GUI is not really possible at the moment I guess. Creating a certificate should be possible via Rest API.
Hello @fliebe92
How would I go about adding the certificate with the API? I can’t find any documentation for an endpoint regarding system configuration.
Hi @ccampbell-bup. There is a SSLCertificate
model available as well as a controller.
@fliebe92 Where would I find the documentation or endpoint for this? I’m not as familiar as I’d like to be with how Zammad implements its APIs so I don’t know if I could figure it out just with trial and error.
There’s no documentation for channel management. Neither for API nor for console level.
Both is easier if you do it guided via the UI.
I’m fine if I have to set up the channels manually, I can pre-configure the OIDC/OAUTH applications Microsoft-side so I just need to copy paste data.
But what I do need to be able to automate is adding the Elasticsearch certificate. When you host a VM on Azure you can’t SSH into it without setting up a Bastion Host, adding a Public IP directly to the VM NIC, or exposing port 22 directly to the internet. So I can’t get the information about the SSH cert for Elasticsearch in order to add it to the SSL Certificates config manually in an easy way, without incurring security risk or extra cost. So being able to automate at least that would be ideal.
You seem to be mixing a lot of stuff.
Elasticsearch, just as SSH, have nothing to do with your request.
You may want to consider to begin using Zammad termology if you want help.
To clarify what I mean.
I am trying to automate setting up a self-hosted Zammad instance.
As part of setting up Elasticsearch 8.x, you need to configure a Username and Password and then add the Elasticsearch self-signed certificate to Zammad to connect to the Elasticsearch instance. Per Set Up Elasticsearch — Zammad System Documentation documentation
As it stands, I need to SSH into the VM to get that certificate information to add it to the SSL Certificates config within Zammad. I want to avoid that step by automatically adding it to Zammad either through the API or Rails console.
At the same time, I am also trying to automatically set up the Email Notifications SMTP configuration within the Email Channel. The note at the bottom of the M365 Account setup page indicates that you should use this setting for System Notifications.
Additionally, I would like to set up the M365 Channel itself. I expected I would not be able to add the actual account since that requires an OAUTH flow. Still, I wanted to configure the parameters such as Client ID, Client Secret, and Tenant ID beforehand to reduce the number of manual steps. Again, by using the API or Rails console.
At the top of the page about using querying and setting Zammad settings via the Rails console, there is a note about asking the community about the existence or lack thereof of any commands not explicitly documented on that page.
Hence, I am here to ask how I can do what I want to do.
I’m working on creating a similar setup automation for my Org and am having the same issue were you able to Figure out the problem