Hosting Kiwi TCMS in our ECS cluster with RDS

FROM kiwitcms/kiwi:latest
COPY --chown=1001 tcms/settings/local_settings.py /venv/lib64/python3.8/site-packages/tcms/settings/local_settings.py
RUN pip install django_ses
RUN pip install boto3
import os
import boto3
boto_session = boto3.Session()
ssm_client = boto_session.client('ssm')
db_parameter = ssm_client.get_parameter(Name="/kiwi/KIWI_DB_NAME", WithDecryption=True)
username_parameter = ssm_client.get_parameter(Name="/kiwi/KIWI_DB_USER", WithDecryption=True)
password_parameter = ssm_client.get_parameter(Name="/kiwi/KIWI_DB_PASSWORD", WithDecryption=True)
host_parameter = ssm_client.get_parameter(Name="/kiwi/KIWI_DB_HOST", WithDecryption=True)
# Database settings
DATABASES = {
"default": {
"ENGINE": os.environ.get("KIWI_DB_ENGINE", "django.db.backends.mysql"),
"NAME": db_parameter['Parameter']['Value'],
"USER": username_parameter['Parameter']['Value'],
"PASSWORD": password_parameter['Parameter']['Value'],
"HOST": host_parameter['Parameter']['Value'],
"PORT": 3306,
"OPTIONS": {},
},
}
# Email settings
# DEFAULT_FROM_EMAIL must be defined if you want Kiwi TCMS to send emails.
# You also need to configure the email backend. For more information see:
# https://docs.djangoproject.com/en/3.0/topics/email/
# SERVER_EMAIL is used by the logging backend to send exceptions to ADMINS
SERVER_EMAIL = DEFAULT_FROM_EMAIL = "kiwitcms@sequoia.com"
EMAIL_SUBJECT_PREFIX = "[Kiwi-TCMS] "
EMAIL_BACKEND = 'django_ses.SESBackend'
AWS_SES_REGION_NAME = 'us-west-2'
AWS_SES_REGION_ENDPOINT = 'email.us-west-2.amazonaws.com'
environment: [
{ name : "KIWI_DONT_ENFORCE_HTTPS", value : "true" }
]

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store