|
1 | 1 | """JupyterHub application deployment for MIT Open Learning.""" |
2 | 2 |
|
3 | | -from pathlib import Path |
4 | | - |
5 | 3 | from pulumi import Config, StackReference |
6 | 4 | from pulumi_aws import ec2 |
7 | 5 |
|
|
157 | 155 | ) |
158 | 156 | jupyterhub_db = OLAmazonDB(jupyterhub_db_config) |
159 | 157 |
|
| 158 | +# Use same physical DB instance |
160 | 159 | jupyterhub_authoring_db_config = OLPostgresDBConfig( |
161 | | - instance_name=f"jupyterhub-db-{stack_info.env_suffix}", # Use same physical DB instance |
| 160 | + instance_name=f"jupyterhub-db-{stack_info.env_suffix}", |
162 | 161 | password=rds_password, |
163 | 162 | subnet_group_name=target_vpc["rds_subnet"], |
164 | 163 | security_groups=[jupyterhub_db_security_group], |
|
183 | 182 | cluster_stack.require_output("namespaces").apply( |
184 | 183 | lambda ns, namespace=namespace: check_cluster_namespace(namespace, ns) |
185 | 184 | ) |
186 | | - # Need to decide if this is the best way to handle |
187 | | - # these overrides/revisit values merged into helm charts |
188 | | - # Can pull into function and remove params |
189 | | - menu_override = ( |
190 | | - Path(__file__) |
191 | | - .parent.joinpath(deployment_config["menu_override_file"]) |
192 | | - .read_text() |
193 | | - ) |
194 | | - disabled_extensions = ( |
195 | | - Path(__file__) |
196 | | - .parent.joinpath(deployment_config["disabled_extension_file"]) |
197 | | - .read_text() |
198 | | - ) |
199 | | - dynamic_image_config = ( |
200 | | - Path(__file__) |
201 | | - .parent.joinpath(deployment_config["extra_config_file"]) |
202 | | - .read_text() |
203 | | - ) |
204 | 185 | jupyterhub_deployment = provision_jupyterhub_deployment( |
205 | 186 | stack_info=stack_info, |
206 | 187 | jupyterhub_deployment_config=deployment_config, |
|
211 | 192 | application_labels=application_labels, |
212 | 193 | k8s_global_labels=k8s_global_labels, |
213 | 194 | extra_images=EXTRA_IMAGES, |
214 | | - menu_override_json=menu_override, |
215 | | - disabled_extensions_json=disabled_extensions, |
216 | | - extra_config=dynamic_image_config, |
217 | 195 | ) |
0 commit comments