This guide explains how to setup cronus to be used in rails action mailer.
-
The technical user
dashboard
hast to own the roleemail_user
in all the regions where cronus should be used and within the domainccadmin
and projectmaster
. We decide to use seeds in this case. See this commit for more information: https://github.com/sapcc/helm-charts/commit/c5b26a6244ddc3de953ff1a71b6ee00929af82e5 -
Deploy elektra in all regions where cronus should be used so the new seed configuration can be applyed.
-
To check if the seeder had any error when rolling out the changes check the logs from the seeder pod in the right region.
Example:
kubectl config use context qa-de-1 kubectl -n monsoon3 get pods kubectl -n monsoon3 logs openstack-seeder-76db46b59-dqjxc
-
Setup a webshell with following envs opening the dashboard in the right region:
Unset following env variable:
unset OS_AUTH_TYPE unset OS_AUTH_TOKEN unset OS_TOKEN
And be sure you have set following env variable:
export OS_PROJECT_DOMAIN_NAME=ccadmin export OS_USERNAME=dashboard export OS_USER_DOMAIN_NAME=default export OS_PROJECT_NAME=cloud_admin export OS_PASSWORD=<password>
-
Check that the dashboard user has the role
email_user
in each region where cronus will be used:os role assignment list --project=master --role=email_user
-
Create ec2 credentials for the dashboard user in each region where cronus will be used:
os ec2 credentials create --project=master
-
Retrieve the credentials to be saved in vault afterwards
OS_PROJECT_NAME=master cronuscli smtp credentials
-
Create a file with following content and following name
smtp-test-login.txt
EHLO cloud.sap AUTH LOGIN <ec2 user name> <ec2 user password> MAIL FROM: [email protected] RCPT TO: [email protected] DATA From: Sender name <[email protected]> To: [email protected] Subject: Telnet test This message was sent from elektra . QUIT
-
Run following command from your terminal
openssl s_client -crlf -quiet -connect smtp.server.address:465 < smtp-test-login.txt