-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
62 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,6 +22,7 @@ modules: | |
- ssms | ||
- utils | ||
- vscode | ||
- shared-services-config | ||
|
||
files: | ||
- src: conda-envs/example.yml | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Configure the workspace to access shared services | ||
|
||
if (-not $env:SHARED_SERVICES_DOMAIN) { | ||
$env:SHARED_SERVICES_DOMAIN = "tre.internal" | ||
} | ||
if (-not $env:SHARED_SERVICES_DNS) { | ||
$env:SHARED_SERVICES_DNS = "10.253.0.253" | ||
} | ||
|
||
$condarc = @" | ||
channels: | ||
- conda-forge | ||
channel_alias: http://conda.${env:SHARED_SERVICES_DOMAIN}/ | ||
"@ | ||
Set-Content -Path C:\Users\Administrator\.condarc $condarc | ||
|
||
$RConfig = @" | ||
# TRE CRAN repository | ||
local({r <- getOption("repos") | ||
r["CRAN"] <- "http://cran.${env:SHARED_SERVICES_DOMAIN}/" | ||
options(repos=r) | ||
}) | ||
"@ | ||
Get-ChildItem "C:\Program Files\R" -Directory | ForEach-Object { | ||
Add-Content "$($_.FullName)\etc\Rprofile.site" $RConfig | ||
} | ||
|
||
Add-DnsClientNrptRule -Namespace ".${env:SHARED_SERVICES_DOMAIN}" -NameServers $env:SHARED_SERVICES_DNS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/bin/bash | ||
|
||
set -eu | ||
|
||
if [ -z "$SHARED_SERVICES_DOMAIN" ]; then | ||
SHARED_SERVICES_DOMAIN="tre.internal" | ||
fi | ||
if [ -z "$SHARED_SERVICES_DNS" ]; then | ||
SHARED_SERVICES_DNS="10.253.0.253" | ||
fi | ||
|
||
cat <<EOF > "$HOME/.condarc" | ||
channels: | ||
- conda-forge | ||
channel_alias: "http://conda.${SHARED_SERVICES_DOMAIN}/" | ||
EOF | ||
|
||
cat <<EOF >> "$HOME/.Rprofile" | ||
# TRE CRAN repository | ||
local({r <- getOption("repos") | ||
r["CRAN"] <- "http://cran.${SHARED_SERVICES_DOMAIN}/" | ||
options(repos=r) | ||
}) | ||
EOF | ||
|
||
# The following sets the global DNS server which is used for entries in | ||
# the Domains key when prefixed with a tilde. The Link name server (set | ||
# by DHCP) is used for all other queries, allowing SSM endpoints etc to | ||
# still be resolved within the VPC. | ||
echo "DNS=${SHARED_SERVICES_DNS}" | sudo tee -a /etc/systemd/resolved.conf | ||
echo "Domains=~${SHARED_SERVICES_DOMAIN}" | sudo tee -a /etc/systemd/resolved.conf | ||
sudo systemctl restart systemd-resolved |