Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport: 96cd562 (#6344, PR #6585) cb830191 (#6347, PR #6589) #6588

Merged
merged 7 commits into from
Sep 21, 2024
50 changes: 50 additions & 0 deletions deployments/prod.browser/environment.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
from collections.abc import (
Mapping,
)
import json
from typing import (
Optional,
)


def env() -> Mapping[str, Optional[str]]:
"""
Returns a dictionary that maps environment variable names to values. The
values are either None or strings. String values can contain references to
other environment variables in the form `{FOO}` where FOO is the name of an
environment variable. See

https://docs.python.org/3.11/library/string.html#format-string-syntax

for the concrete syntax. These references will be resolved *after* the
overall environment has been compiled by merging all relevant
`environment.py` and `environment.local.py` files.

Entries with a `None` value will be excluded from the environment. They
can be used to document a variable without a default value in which case
other, more specific `environment.py` or `environment.local.py` files must
provide the value.
"""
return {
'azul_terraform_component': 'browser',
'azul_browser_sites': json.dumps({
'browser': {
'zone': 'explore.data.humancellatlas.org',
'domain': 'explore.data.humancellatlas.org',
'project': 'ucsc/data-browser',
'branch': 'ucsc/hca/prod',
'tarball_name': 'hca',
'tarball_path': 'out',
'real_path': ''
},
'lungmap': {
'zone': 'data-browser.lungmap.net',
'domain': 'data-browser.lungmap.net',
'project': 'ucsc/data-browser',
'branch': 'ucsc/lungmap/prod',
'tarball_name': 'lungmap',
'tarball_path': 'out',
'real_path': ''
}
})
}
4 changes: 3 additions & 1 deletion environment
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,9 @@ _hibernate() {
-target aws_ec2_client_vpn_endpoint.gitlab \
-target aws_instance.gitlab \
-target aws_nat_gateway.gitlab_0 \
-target aws_nat_gateway.gitlab_1
-target aws_nat_gateway.gitlab_1 \
-target aws_lb.gitlab_nlb \
-target aws_lb.gitlab_alb
}
}
else
Expand Down
Loading