Skip to content

Commit

Permalink
[IA-4679] Move some AKS helm chart pull out of leo dockerfile (#3987)
Browse files Browse the repository at this point in the history
  • Loading branch information
LizBaldo authored Dec 11, 2023
1 parent 0ffcc2c commit 12ea795
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 30 deletions.
21 changes: 4 additions & 17 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ EXPOSE 5050

ENV GIT_HASH $GIT_HASH
ENV HELM_DEBUG 1

# WARNING: If you are changing any versions here, update it in the reference.conf
ENV TERRA_APP_SETUP_VERSION 0.1.0
ENV TERRA_APP_VERSION 0.5.0
Expand All @@ -30,17 +31,9 @@ ENV GALAXY_VERSION 2.8.1
ENV NGINX_VERSION 4.3.0
# If you update this here, make sure to also update reference.conf:
ENV CROMWELL_CHART_VERSION 0.2.397
ENV CROWELL_ON_AZURE_CHART_VERSION 0.2.397
# These two are the new Workflows and Cromwell Runner apps to eventually replace COA (and maybe one day Cromwell):
ENV CROMWELL_RUNNER_APP_VERSION 0.52.0
# WORKFLOWS APP comment to prevent merge conflicts
ENV WORKFLOWS_APP_VERSION 0.91.0
# WDS CHART comment to prevent merge conflicts
ENV WDS_CHART_VERSION 0.59.0
ENV HAIL_BATCH_CHART_VERSION 0.1.9
ENV RSTUDIO_CHART_VERSION 0.3.0
ENV SAS_CHART_VERSION 0.3.0
ENV LISTENER_CHART_VERSION 0.2.0

RUN mkdir /leonardo
COPY ./leonardo*.jar /leonardo
Expand All @@ -61,26 +54,20 @@ RUN helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx && \
helm repo add terra-helm https://terra-helm.storage.googleapis.com && \
helm repo update


# .Files helm helper can't access files outside a chart. Hence in order to populate cert file properly, we're
# pulling `terra-app-setup` locally and add cert files to the chart.
# Leonardo will install the chart from local version.
# We are also caching charts so they are not downloaded with every helm-install
# pulling `terra-app-setup` locally and add cert files to the chart. As a result we need to pull all GKE
# charts locally as well so they can acess the local cert files during the helm install step, see https://helm.sh/docs/chart_template_guide/accessing_files/
# Helm does not seem to support the direct installation of a chart located in OCI so let's pull it to a local directory for now.
RUN cd /leonardo && \
helm repo update && \
helm pull terra-app-setup-charts/terra-app-setup --version $TERRA_APP_SETUP_VERSION --untar && \
helm pull galaxy/galaxykubeman --version $GALAXY_VERSION --untar && \
helm pull terra/terra-app --version $TERRA_APP_VERSION --untar && \
helm pull ingress-nginx/ingress-nginx --version $NGINX_VERSION --untar && \
helm pull cromwell-helm/cromwell --version $CROMWELL_CHART_VERSION --untar && \
helm pull cromwell-helm/cromwell-on-azure --version $CROWELL_ON_AZURE_CHART_VERSION --untar && \
helm pull terra-helm/wds --version $WDS_CHART_VERSION --untar && \
helm pull terra-helm/workflows-app --version $WORKFLOWS_APP_VERSION --untar && \
helm pull terra-helm/cromwell-runner-app --version $CROMWELL_RUNNER_APP_VERSION --untar && \
helm pull terra-helm/rstudio --version $RSTUDIO_CHART_VERSION --untar && \
helm pull terra-helm/sas --version $SAS_CHART_VERSION --untar && \
helm pull oci://terradevacrpublic.azurecr.io/hail/hail-batch-terra-azure --version $HAIL_BATCH_CHART_VERSION --untar && \
helm pull terra-helm/listener --version $LISTENER_CHART_VERSION --untar && \
cd /

# Install https://github.com/apangin/jattach to get access to JDK tools
Expand Down
10 changes: 5 additions & 5 deletions http/src/main/resources/reference.conf
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ azure {

coa-app-config {
instrumentation-enabled = false
chart-name = "/leonardo/cromwell-on-azure"
chart-name = "cromwell-helm/cromwell-on-azure"
chart-version = "0.2.397"
release-name-suffix = "coa-rls"
namespace-name-suffix = "coa-ns"
Expand Down Expand Up @@ -304,7 +304,7 @@ azure {

workflows-app-config {
instrumentation-enabled = false
chart-name = "/leonardo/workflows-app"
chart-name = "terra-helm/workflows-app"
chart-version = "0.91.0"
release-name-suffix = "wfa-rls"
namespace-name-suffix = "wfa-ns"
Expand All @@ -327,7 +327,7 @@ azure {

cromwell-runner-app-config {
instrumentation-enabled = false
chart-name = "/leonardo/cromwell-runner-app"
chart-name = "terra-helm/cromwell-runner-app"
chart-version = "0.52.0"
release-name-suffix = "cra-rls"
namespace-name-suffix = "cra-ns"
Expand All @@ -349,7 +349,7 @@ azure {
environment = "dev"
environment-base = "live"
instrumentation-enabled = false
chart-name = "/leonardo/wds"
chart-name = "terra-helm/wds"
chart-version = "0.59.0"
release-name-suffix = "wds-rls"
namespace-name-suffix = "wds-ns"
Expand Down Expand Up @@ -413,7 +413,7 @@ azure {
]

listener-chart-config {
chart-name = "/leonardo/listener"
chart-name = "terra-helm/listener"
chart-version = "0.2.0"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,7 @@ class GKEInterpreter[F[_]](
)

helmAuthContext <- getHelmAuthContext(googleCluster, dbCluster, namespaceName)

_ <- helmClient
.installChart(
getTerraAppSetupChartReleaseName(app.release),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ object KubernetesTestData {
val ingressChartVersion = ChartVersion("1.41.3")
val ingressChart = Chart(ingressChartName, ingressChartVersion)

val coaChartName = ChartName("/leonardo/cromwell-on-azure")
val coaChartName = ChartName("cromwell-helm/cromwell-on-azure")
val coaChartVersion = ChartVersion("0.2.397")

val coaChart = Chart(coaChartName, coaChartVersion)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class ConfigReaderSpec extends AnyFlatSpec with Matchers {
HttpWsmDaoConfig(Uri.unsafeFromString("https://localhost:8000")),
AzureAppRegistrationConfig(ClientId(""), ClientSecret(""), ManagedAppTenantId("")),
CoaAppConfig(
ChartName("/leonardo/cromwell-on-azure"),
ChartName("cromwell-helm/cromwell-on-azure"),
ChartVersion("0.2.397"),
ReleaseNameSuffix("coa-rls"),
NamespaceNameSuffix("coa-ns"),
Expand Down Expand Up @@ -137,7 +137,7 @@ class ConfigReaderSpec extends AnyFlatSpec with Matchers {
)
),
CromwellRunnerAppConfig(
ChartName("/leonardo/cromwell-runner-app"),
ChartName("terra-helm/cromwell-runner-app"),
ChartVersion("0.52.0"),
ReleaseNameSuffix("cra-rls"),
NamespaceNameSuffix("cra-ns"),
Expand All @@ -153,7 +153,7 @@ class ConfigReaderSpec extends AnyFlatSpec with Matchers {
chartVersionsToExcludeFromUpdates = List.empty
),
WorkflowsAppConfig(
ChartName("/leonardo/workflows-app"),
ChartName("terra-helm/workflows-app"),
ChartVersion("0.91.0"),
ReleaseNameSuffix("wfa-rls"),
NamespaceNameSuffix("wfa-ns"),
Expand All @@ -171,7 +171,7 @@ class ConfigReaderSpec extends AnyFlatSpec with Matchers {
chartVersionsToExcludeFromUpdates = List.empty
),
WdsAppConfig(
ChartName("/leonardo/wds"),
ChartName("terra-helm/wds"),
ChartVersion("0.59.0"),
ReleaseNameSuffix("wds-rls"),
NamespaceNameSuffix("wds-ns"),
Expand Down Expand Up @@ -220,7 +220,7 @@ class ConfigReaderSpec extends AnyFlatSpec with Matchers {
),
List(AppType.Wds, AppType.WorkflowsApp),
TdrConfig("https://jade.datarepo-dev.broadinstitute.org"),
ListenerChartConfig(ChartName("/leonardo/listener"), ChartVersion("0.2.0"))
ListenerChartConfig(ChartName("terra-helm/listener"), ChartVersion("0.2.0"))
),
OidcAuthConfig(
Uri.unsafeFromString("https://fake"),
Expand Down
2 changes: 1 addition & 1 deletion project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ object Dependencies {
val workbenchOauth2V = s"0.5-$workbenchLibsHash"
val workbenchAzureV = s"0.6-$workbenchLibsHash"

val helmScalaSdkV = "0.0.20"
val helmScalaSdkV = "0.0.8.5"

val excludeAkkaHttp = ExclusionRule(organization = "com.typesafe.akka", name = s"akka-http_${scalaV}")
val excludeAkkaStream = ExclusionRule(organization = "com.typesafe.akka", name = s"akka-stream_${scalaV}")
Expand Down

0 comments on commit 12ea795

Please sign in to comment.