From a1c6f27534b2f935a498b4c82b70e9c7d9217674 Mon Sep 17 00:00:00 2001 From: Zhanghao Wu Date: Sat, 9 Mar 2024 23:32:29 -0800 Subject: [PATCH] [Fluidstack] Support opening ports and service (#3294) * Allow ports for fluidstack * expose open_ports * fix api for cleanup_ports * fix --- sky/clouds/fluidstack.py | 3 --- sky/provision/fluidstack/__init__.py | 1 + sky/provision/fluidstack/instance.py | 11 +++++++++++ sky/utils/controller_utils.py | 1 + 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/sky/clouds/fluidstack.py b/sky/clouds/fluidstack.py index c08bcbbae53..30274c8b665 100644 --- a/sky/clouds/fluidstack.py +++ b/sky/clouds/fluidstack.py @@ -50,9 +50,6 @@ class Fluidstack(clouds.Cloud): clouds.CloudImplementationFeatures.CUSTOM_DISK_TIER: 'Custom disk tiers' f' is not supported in {_REPR}.', - clouds.CloudImplementationFeatures.OPEN_PORTS: - 'Opening ports' - f'is not supported in {_REPR}.', } # Using the latest SkyPilot provisioner API to provision and check status. PROVISIONER_VERSION = clouds.ProvisionerVersion.SKYPILOT diff --git a/sky/provision/fluidstack/__init__.py b/sky/provision/fluidstack/__init__.py index af070bd20b4..daf9cb4ee50 100644 --- a/sky/provision/fluidstack/__init__.py +++ b/sky/provision/fluidstack/__init__.py @@ -3,6 +3,7 @@ from sky.provision.fluidstack.config import bootstrap_instances from sky.provision.fluidstack.instance import cleanup_ports from sky.provision.fluidstack.instance import get_cluster_info +from sky.provision.fluidstack.instance import open_ports from sky.provision.fluidstack.instance import query_instances from sky.provision.fluidstack.instance import run_instances from sky.provision.fluidstack.instance import stop_instances diff --git a/sky/provision/fluidstack/instance.py b/sky/provision/fluidstack/instance.py index ca5b42f55a2..2c0d836fadc 100644 --- a/sky/provision/fluidstack/instance.py +++ b/sky/provision/fluidstack/instance.py @@ -342,6 +342,17 @@ def query_instances( def cleanup_ports( cluster_name_on_cloud: str, + ports: List[str], + provider_config: Optional[Dict[str, Any]] = None, +) -> None: + del cluster_name_on_cloud, ports, provider_config + + +def open_ports( + cluster_name_on_cloud: str, + ports: List[str], provider_config: Optional[Dict[str, Any]] = None, ) -> None: del cluster_name_on_cloud, provider_config + logger.debug(f'Skip opening ports {ports} for Fluidstack instances, as all ' + 'ports are open by default.') diff --git a/sky/utils/controller_utils.py b/sky/utils/controller_utils.py index 6d9ecf04cce..034531879ac 100644 --- a/sky/utils/controller_utils.py +++ b/sky/utils/controller_utils.py @@ -144,6 +144,7 @@ def _get_cloud_dependencies_installation_commands( 'pip install google-api-python-client>=2.69.0 google-cloud-storage ' '> /dev/null 2>&1', f'{gcp.GOOGLE_SDK_INSTALLATION_COMMAND}', + # fluidstack does not need to install any cloud dependencies. ] # k8s and ibm doesn't support open port and spot instance yet, so we don't # install them for either controller.