@@ -63,202 +63,11 @@ will be set automatically.
6363
6464.. include :: /reuse/reference/extensions/non_optional_config.rst
6565
66+ .. |base_url | replace :: ``DJANGO_BASE_URL ``
67+ .. |juju_integrate_postgresql | replace :: ``juju integrate <django charm> postgresql ``
68+ .. |framework | replace :: Django
6669
67- ``peers ``, ``provides ``, and ``requires `` keys
68- ----------------------------------------------
69-
70- Your charm already has some ``peers ``, ``provides ``, and ``requires ``
71- integrations, for internal purposes.
72-
73- .. dropdown :: Pre-populated integrations
74-
75- .. code-block :: yaml
76-
77- peers :
78- secret-storage :
79- interface : secret-storage
80- provides :
81- metrics-endpoint :
82- interface : prometheus_scrape
83- grafana-dashboard :
84- interface : grafana_dashboard
85- requires :
86- logging :
87- interface : loki_push_api
88- ingress :
89- interface : ingress
90- limit : 1
91-
92- In addition to these integrations, in each ``provides `` and ``requires ``
93- block you may specify further integration endpoints, to integrate with
94- the following charms and bundles:
95-
96- - Ingress: `traefik <https://charmhub.io/traefik-k8s >`__ and `nginx
97- ingress integrator <https://charmhub.io/nginx-ingress-integrator> `__
98- - MySQL: `machine <https://charmhub.io/mysql >`__ and
99- `k8s <https://charmhub.io/mysql-k8s >`__ charm
100- - PostgreSQL: `machine <https://charmhub.io/postgresql >`__ and
101- `k8s <https://charmhub.io/postgresql-k8s >`__ charm
102- - `MongoDB <https://charmhub.io/mongodb >`__
103- - `Canonical Observability Stack
104- (COS) <https://charmhub.io/cos-lite> `__
105- - `Redis <https://charmhub.io/redis-k8s >`__
106- - `SAML <https://charmhub.io/saml-integrator >`__
107- - `S3 <https://charmhub.io/s3-integrator >`__
108- - RabbitMQ: `machine <https://charmhub.io/rabbitmq-server >`__ and
109- `k8s <https://charmhub.io/rabbitmq-k8s >`__ charm
110- - `Tempo <https://charmhub.io/topics/charmed-tempo-ha >`__
111-
112- These endpoint definitions are as below:
113-
114- .. code-block :: yaml
115-
116- requires :
117- mysql :
118- interface : mysql_client
119- optional : True
120- limit : 1
121-
122- .. code-block :: yaml
123-
124- requires :
125- postgresql :
126- interface : postgresql_client
127- optional : True
128- limit : 1
129-
130- .. code-block :: yaml
131-
132- requires :
133- mongodb :
134- interface : mongodb_client
135- optional : True
136- limit : 1
137-
138- .. code-block :: yaml
139-
140- requires :
141- redis :
142- interface : redis
143- optional : True
144- limit : 1
145-
146- .. code-block :: yaml
147-
148- requires :
149- saml :
150- interface : saml
151- optional : True
152- limit : 1
153-
154- .. code-block :: yaml
155-
156- requires :
157- s3 :
158- interface : s3
159- optional : True
160- limit : 1
161-
162- .. code-block :: yaml
163-
164- requires :
165- rabbitmq :
166- interface : rabbitmq
167- optional : True
168- limit : 1
169-
170- .. code-block :: yaml
171-
172- requires :
173- tracing :
174- interface : tracing
175- optional : True
176- limit : 1
177-
178- .. note ::
179-
180- The key ``optional `` with value ``False `` means that the charm will
181- get blocked and stop the services if the integration is not provided.
182-
183- To add one of these integrations, e.g., PostgreSQL, in the
184- project file, include the appropriate requires block and
185- integrate with ``juju integrate <django charm> postgresql `` as usual.
186-
187- After the integration has been established, the connection string will
188- be available as an environment variable. Integration with PostgreSQL,
189- MySQL, MongoDB or Redis provides the string as the
190- ``POSTGRESQL_DB_CONNECT_STRING ``, ``MYSQL_DB_CONNECT_STRING ``,
191- ``MONGODB_DB_CONNECT_STRING `` or ``REDIS_DB_CONNECT_STRING `` environment
192- variables respectively. Furthermore, the following environment variables
193- will be provided to your Django application for integrations with
194- PostgreSQL, MySQL, MongoDB or Redis:
195-
196- - ``<integration>_DB_SCHEME ``
197- - ``<integration>_DB_NETLOC ``
198- - ``<integration>_DB_PATH ``
199- - ``<integration>_DB_PARAMS ``
200- - ``<integration>_DB_QUERY ``
201- - ``<integration>_DB_FRAGMENT ``
202- - ``<integration>_DB_USERNAME ``
203- - ``<integration>_DB_PASSWORD ``
204- - ``<integration>_DB_HOSTNAME ``
205- - ``<integration>_DB_PORT ``
206- - ``<integration>_DB_NAME ``
207-
208- Here, ``<integration> `` is replaced by ``POSTGRESQL ``, ``MYSQL ``
209- ``MONGODB `` or ``REDIS `` for the relevant integration. The key
210- ``optional `` with value ``False `` means that the charm will get blocked
211- and stop the services if the integration is not provided.
212-
213- The provided SAML environment variables are as follows:
214-
215- - ``SAML_ENTITY_ID `` (required)
216- - ``SAML_METADATA_URL `` (required)
217- - ``SAML_SINGLE_SIGN_ON_REDIRECT_URL `` (required)
218- - ``SAML_SIGNING_CERTIFICATE `` (required)
219-
220- The S3 integration creates the following environment variables that you
221- may use to configure your Flask application:
222-
223- - ``S3_ACCESS_KEY `` (required)
224- - ``S3_SECRET_KEY `` (required)
225- - ``S3_BUCKET `` (required)
226- - ``S3_REGION ``
227- - ``S3_STORAGE_CLASS ``
228- - ``S3_ENDPOINT ``
229- - ``S3_PATH ``
230- - ``S3_API_VERSION ``
231- - ``S3_URI_STYLE ``
232- - ``S3_ADDRESSING_STYLE ``
233- - ``S3_ATTRIBUTES ``
234- - ``S3_TLS_CA_CHAIN ``
235-
236- The RabbitMQ integration creates the connection string in the
237- environment variable ``RABBITMQ_CONNECT_STRING ``. Furthermore, the
238- following environment variables may be provided, derived from the
239- connection string:
240-
241- - ``RABBITMQ_SCHEME ``
242- - ``RABBITMQ_NETLOC ``
243- - ``RABBITMQ_PATH ``
244- - ``RABBITMQ_PARAMS ``
245- - ``RABBITMQ_QUERY ``
246- - ``RABBITMQ_FRAGMENT ``
247- - ``RABBITMQ_USERNAME ``
248- - ``RABBITMQ_PASSWORD ``
249- - ``RABBITMQ_HOSTNAME ``
250- - ``RABBITMQ_PORT ``
251- - ``RABBITMQ_VHOST ``
252-
253- The Tracing integration creates the following environment variables
254- that you can use to configure your application:
255-
256- - ``OTEL_EXPORTER_OTLP_ENDPOINT ``
257- - ``OTEL_SERVICE_NAME ``
258-
259- The environment variable ``DJANGO_BASE_URL `` provides the Ingress URL
260- for an Ingress integration or the Kubernetes service URL if there is no
261- Ingress integration.
70+ .. include :: /reuse/reference/extensions/integrations.rst
26271
26372
26473HTTP Proxy
0 commit comments