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

cran support in nexus #2694

Merged
merged 28 commits into from
Oct 18, 2022
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
63f9442
add cran support
Sep 29, 2022
d9a2cb2
linux vm config
Sep 29, 2022
b555354
linux vm config edit
Sep 29, 2022
91a397a
Base type r
JaimieWi Oct 3, 2022
c66b69b
fix vm scripts
JaimieWi Oct 3, 2022
e3170b2
windows powershell edit
JaimieWi Oct 3, 2022
9ac8d94
ps file content config
JaimieWi Oct 3, 2022
736c064
corrected naming for allowed workspace fqdns
JaimieWi Oct 3, 2022
e460043
Merge branch 'main' into JaimieWi/cran_support
JaimieWi Oct 3, 2022
7fc6511
edit to nexus firewall config
JaimieWi Oct 5, 2022
5e66243
nsg fix and firewall config
JaimieWi Oct 6, 2022
e11b42e
moving firewall addition to workspace so that the rule is added on cr…
JaimieWi Oct 6, 2022
40de44b
fix references
JaimieWi Oct 6, 2022
477d772
revert base and add to nexus
JaimieWi Oct 6, 2022
50cb958
alter output config
JaimieWi Oct 6, 2022
8b9fe78
add acr parameter
JaimieWi Oct 7, 2022
8867c1c
source address to array missing output
JaimieWi Oct 7, 2022
9750d8f
porter version
JaimieWi Oct 7, 2022
5920df8
fixing final issues
JaimieWi Oct 10, 2022
1afcf2a
Final windows config changes
JaimieWi Oct 11, 2022
a11e37f
versions
JaimieWi Oct 11, 2022
58ba38b
Merge branch 'main' into JaimieWi/cran_support
JaimieWi Oct 11, 2022
40dc3ba
remove mgmt_acr and certain CRLs
JaimieWi Oct 17, 2022
2479289
Merge branch 'main' into JaimieWi/cran_support
damoodamoo Oct 18, 2022
b84c966
terraform configuration
JaimieWi Oct 18, 2022
37a7c1b
TFlint fixes
JaimieWi Oct 18, 2022
517dca1
outputs.tf
JaimieWi Oct 18, 2022
f7336e4
Merge branch 'main' into JaimieWi/cran_support
JaimieWi Oct 18, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion templates/shared_services/sonatype-nexus-vm/porter.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: tre-shared-service-sonatype-nexus
version: 2.1.7
version: 2.1.8
description: "A Sonatype Nexus shared service"
registry: azuretre
dockerfile: Dockerfile.tmpl
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"name": "r-proxy",
"online": true,
"storage": {
"blobStoreName": "default",
"strictContentTypeValidation": true,
"write_policy": "ALLOW"
},
"proxy": {
"remoteUrl": "https://cran.r-project.org/",
"contentMaxAge": 1440,
"metadataMaxAge": 1440
},
"negativeCache": {
"enabled": true,
"timeToLive": 1440
},
"httpClient": {
"blocked": false,
"autoBlock": false,
"connection": {
"retries": 0,
"userAgentSuffix": "string",
"timeout": 60,
"enableCircularRedirects": false,
"enableCookies": false,
"useTrustStore": false
}
},
"baseType": "r",
"repoType": "proxy"
}
15 changes: 15 additions & 0 deletions templates/shared_services/sonatype-nexus-vm/terraform/firewall.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,19 @@ resource "azurerm_firewall_application_rule_collection" "shared_subnet_sonatype_
target_fqdns = local.nexus_allowed_fqdns_list
source_addresses = data.azurerm_subnet.shared.address_prefixes
}

rule {
name = "windows-vm-crl"
protocol {
port = "443"
type = "Https"
}
protocol {
port = "80"
type = "Http"
}

target_fqdns = local.workspace_vm_allowed_fqdns_list
source_addresses = data.azurerm_subnet.services.address_prefixes
}
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
locals {
core_vnet = "vnet-${var.tre_id}"
core_resource_group_name = "rg-${var.tre_id}"
nexus_allowed_fqdns = "*pypi.org,files.pythonhosted.org,security.ubuntu.com,archive.ubuntu.com,keyserver.ubuntu.com,repo.anaconda.com,*.docker.com,*.docker.io,conda.anaconda.org,azure.archive.ubuntu.com,packages.microsoft.com,repo.almalinux.org,download-ib01.fedoraproject.org"
nexus_allowed_fqdns = "*pypi.org,files.pythonhosted.org,security.ubuntu.com,archive.ubuntu.com,keyserver.ubuntu.com,repo.anaconda.com,*.docker.com,*.docker.io,conda.anaconda.org,azure.archive.ubuntu.com,packages.microsoft.com,repo.almalinux.org,download-ib01.fedoraproject.org,cran.r-project.org,cloud.r-project.org"
nexus_allowed_fqdns_list = distinct(compact(split(",", replace(local.nexus_allowed_fqdns, " ", ""))))
workspace_vm_allowed_fqdns = "r3.o.lencr.org,x1.c.lencr.org,*.digicert.com,ocsp.godaddy.com,crl.godaddy.com"
stuartleeks marked this conversation as resolved.
Show resolved Hide resolved
workspace_vm_allowed_fqdns_list = distinct(compact(split(",", replace(local.windows_nexus_allowed_fqdns, " ", ""))))
storage_account_name = lower(replace("stg-${var.tre_id}", "-", ""))
tre_shared_service_tags = {
tre_id = var.tre_id
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,3 +90,6 @@ sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-compose-plu
jq -n --arg proxy "${NEXUS_PROXY_URL}:8083" '{"registry-mirrors": [$proxy]}' > /etc/docker/daemon.json
sudo systemctl daemon-reload
sudo systemctl restart docker

# R config
sudo echo -e "local({\n r <- getOption(\"repos\")\n r[\"Nexus\"] <- ""${NEXUS_PROXY_URL}\"/repository/r-proxy/\"\n options(repos = r)\n})" | sudo tee /etc/R/Rprofile.site
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,7 @@ $DaemonConfig = @"
}
"@
$DaemonConfig | Out-File -Encoding Ascii ( New-Item -Path $env:ProgramData\docker\config\daemon.json -Force )

# R config
$RconfigFilePathWindows = C:\Progra~1\R\R-4.2.1\etc\Rprofile.site
Add-Content $RconfigFilePathWindows "local({`n r <- getOption(`"repos`")`n r[`"Nexus`"] <- `"${NEXUS_PROXY_URL}/repository/r-proxy/`"`n options(repos = r)`n})"
2 changes: 1 addition & 1 deletion templates/workspaces/base/porter.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: tre-workspace-base
version: 0.3.31
version: 0.3.32
description: "A base Azure TRE workspace"
dockerfile: Dockerfile.tmpl
registry: azuretre
Expand Down
13 changes: 13 additions & 0 deletions templates/workspaces/base/terraform/network/security.tf
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,19 @@ resource "azurerm_network_security_rule" "allow_outbound_from_webapp_to_core_web
source_port_range = "*"
}

resource "azurerm_network_security_rule" "allow_outbound_from_subnet" {
access = "Allow"
destination_port_range = "80"
source_address_prefixes = azurerm_subnet.services.address_prefixes
direction = "Outbound"
name = "outbound-workspace-subnets-to-internet-for-crl"
network_security_group_name = azurerm_network_security_group.ws.name
priority = 101
protocol = "Tcp"
resource_group_name = var.ws_resource_group_name
source_port_range = "*"
}

resource "azurerm_network_security_rule" "allow_outbound_webapps_to_services" {
access = "Allow"
destination_port_ranges = [
Expand Down