Skip to content

Commit

Permalink
[Fluidstack] Support opening ports and service (#3294)
Browse files Browse the repository at this point in the history
* Allow ports for fluidstack

* expose open_ports

* fix api for cleanup_ports

* fix
  • Loading branch information
Michaelvll authored Mar 10, 2024
1 parent 28c3b78 commit a1c6f27
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.
3 changes: 0 additions & 3 deletions sky/clouds/fluidstack.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions sky/provision/fluidstack/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 11 additions & 0 deletions sky/provision/fluidstack/instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.')
1 change: 1 addition & 0 deletions sky/utils/controller_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit a1c6f27

Please sign in to comment.