Skip to content

Commit

Permalink
Merge pull request #1892 from alan-turing-institute/workspace_software
Browse files Browse the repository at this point in the history
Add workspace packages
  • Loading branch information
JimMadge authored Jul 23, 2024
2 parents 59538a9 + dfda85d commit bc6664f
Show file tree
Hide file tree
Showing 30 changed files with 716 additions and 352 deletions.
1 change: 1 addition & 0 deletions data_safe_haven/infrastructure/common/ip_ranges.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ class SREIpRanges:
application_gateway = vnet.next_subnet(256)
apt_proxy_server = vnet.next_subnet(8)
data_configuration = vnet.next_subnet(8)
data_desired_state = vnet.next_subnet(8)
data_private = vnet.next_subnet(8)
firewall = vnet.next_subnet(64) # 64 address minimum
firewall_management = vnet.next_subnet(64) # 64 address minimum
Expand Down
6 changes: 0 additions & 6 deletions data_safe_haven/infrastructure/components/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
PostgresqlDatabaseComponent,
PostgresqlDatabaseProps,
VMComponent,
WindowsVMComponentProps,
)
from .dynamic import (
BlobContainerAcl,
Expand All @@ -16,8 +15,6 @@
EntraApplicationProps,
FileShareFile,
FileShareFileProps,
FileUpload,
FileUploadProps,
SSLCertificate,
SSLCertificateProps,
)
Expand All @@ -32,8 +29,6 @@
"EntraApplicationProps",
"FileShareFile",
"FileShareFileProps",
"FileUpload",
"FileUploadProps",
"LinuxVMComponentProps",
"LocalDnsRecordComponent",
"LocalDnsRecordProps",
Expand All @@ -44,6 +39,5 @@
"SSLCertificate",
"SSLCertificateProps",
"VMComponent",
"WindowsVMComponentProps",
"WrappedLogAnalyticsWorkspace",
]
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
MicrosoftSQLDatabaseProps,
)
from .postgresql_database import PostgresqlDatabaseComponent, PostgresqlDatabaseProps
from .virtual_machine import LinuxVMComponentProps, VMComponent, WindowsVMComponentProps
from .virtual_machine import LinuxVMComponentProps, VMComponent

__all__ = [
"LinuxVMComponentProps",
Expand All @@ -15,5 +15,4 @@
"PostgresqlDatabaseComponent",
"PostgresqlDatabaseProps",
"VMComponent",
"WindowsVMComponentProps",
]
Original file line number Diff line number Diff line change
Expand Up @@ -66,37 +66,6 @@ def os_profile(self) -> compute.OSProfileArgs | None:
return self.os_profile_args


class WindowsVMComponentProps(VMComponentProps):
"""Properties for WindowsVMComponent"""

def __init__(
self,
*args: Any,
**kwargs: Any,
) -> None:
super().__init__(*args, **kwargs)
self.image_reference_args = compute.ImageReferenceArgs(
offer="WindowsServer",
publisher="MicrosoftWindowsServer",
sku="2022-Datacenter",
version="latest",
)
self.os_profile_args = compute.OSProfileArgs(
admin_password=self.admin_password,
admin_username=self.admin_username,
computer_name=Output.from_input(self.vm_name).apply(lambda n: n[:15]),
windows_configuration=compute.WindowsConfigurationArgs(
enable_automatic_updates=True,
patch_settings=compute.PatchSettingsArgs(
patch_mode=compute.WindowsVMGuestPatchMode.AUTOMATIC_BY_PLATFORM,
),
provision_vm_agent=True,
),
)
self.azure_monitor_extension_name = "AzureMonitorWindowsAgent"
self.azure_monitor_extension_version = "1.0"


class LinuxVMComponentProps(VMComponentProps):
"""Properties for LinuxVMComponent"""

Expand Down
3 changes: 0 additions & 3 deletions data_safe_haven/infrastructure/components/dynamic/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from .blob_container_acl import BlobContainerAcl, BlobContainerAclProps
from .entra_application import EntraApplication, EntraApplicationProps
from .file_share_file import FileShareFile, FileShareFileProps
from .file_upload import FileUpload, FileUploadProps
from .ssl_certificate import SSLCertificate, SSLCertificateProps

__all__ = [
Expand All @@ -11,8 +10,6 @@
"EntraApplicationProps",
"FileShareFile",
"FileShareFileProps",
"FileUpload",
"FileUploadProps",
"SSLCertificate",
"SSLCertificateProps",
]
149 changes: 0 additions & 149 deletions data_safe_haven/infrastructure/components/dynamic/file_upload.py

This file was deleted.

2 changes: 2 additions & 0 deletions data_safe_haven/infrastructure/programs/declarative_sre.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ def __call__(self) -> None:
networking_resource_group=networking.resource_group,
sre_fqdn=networking.sre_fqdn,
subnet_data_configuration=networking.subnet_data_configuration,
subnet_data_desired_state=networking.subnet_data_desired_state,
subnet_data_private=networking.subnet_data_private,
subscription_id=self.config.azure.subscription_id,
subscription_name=self.context.subscription_name,
Expand Down Expand Up @@ -354,6 +355,7 @@ def __call__(self) -> None:
maintenance_configuration_id=monitoring.maintenance_configuration.id,
software_repository_hostname=user_services.software_repositories.hostname,
sre_name=self.config.name,
storage_account_data_desired_state_name=data.storage_account_data_desired_state_name,
storage_account_data_private_user_name=data.storage_account_data_private_user_name,
storage_account_data_private_sensitive_name=data.storage_account_data_private_sensitive_name,
subnet_workspaces=networking.subnet_workspaces,
Expand Down
Loading

0 comments on commit bc6664f

Please sign in to comment.