Skip to content

Commit 85a7acb

Browse files
khluuaslonnie
andauthored
[release] Hello world test for Azure (#57597)
First test running on AKS cloud! --------- Signed-off-by: kevin <kevin@anyscale.com> Signed-off-by: Kevin H. Luu <kevin@anyscale.com> Co-authored-by: Lonnie Liu <95255098+aslonnie@users.noreply.github.com>
1 parent 5b426c7 commit 85a7acb

File tree

10 files changed

+52
-6
lines changed

10 files changed

+52
-6
lines changed

ci/docker/forge.Dockerfile

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,25 @@ apt-get install -y \
5555
python3-pip openjdk-8-jre wget jq \
5656
azure-cli="${AZ_VER}"-1~"${AZ_DIST}"
5757

58+
# Install uv
59+
wget -qO- https://astral.sh/uv/install.sh | sudo env UV_UNMANAGED_INSTALL="/usr/local/bin" sh
60+
61+
mkdir -p /usr/local/python
62+
# Install Python 3.9 using uv
63+
uv python install --install-dir /usr/local/python 3.9
64+
uv python pin 3.9
65+
66+
export UV_PYTHON_INSTALL_DIR=/usr/local/python
67+
# Make Python 3.9 from uv the default by creating symlinks
68+
PYTHON39_PATH=$(uv python find 3.9)
69+
echo $PYTHON39_PATH
70+
ln -s $PYTHON39_PATH /usr/local/bin/python3.9
71+
ln -s $PYTHON39_PATH /usr/local/bin/python3
72+
ln -s $PYTHON39_PATH /usr/local/bin/python
73+
5874
# As a convention, we pin all python packages to a specific version. This
5975
# is to to make sure we can control version upgrades through code changes.
60-
python -m pip install pip==25.0 cffi==1.16.0
76+
uv pip install --system pip==25.0 cffi==1.16.0
6177

6278
# Needs to be synchronized to the host group id as we map /var/run/docker.sock
6379
# into the container.

ci/lint/lint.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,10 @@ banned_words() {
7070
./ci/lint/check-banned-words.sh
7171
}
7272

73+
# Use system python to avoid conflicts with uv python in forge image
7374
doc_readme() {
74-
pip install -c python/requirements_compiled.txt docutils
75-
cd python && python setup.py check --restructuredtext --strict --metadata
75+
/usr/bin/python -m pip install -c python/requirements_compiled.txt docutils
76+
cd python && /usr/bin/python setup.py check --restructuredtext --strict --metadata
7677
}
7778

7879
dashboard_format() {

ci/ray_ci/oss_config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ release_byod:
77
byod_ecr_region: us-west-2
88
aws_cr: 029272617770.dkr.ecr.us-west-2.amazonaws.com
99
gcp_cr: us-west1-docker.pkg.dev/anyscale-oss-ci
10+
azure_cr: rayreleasetest.azurecr.io
1011
aws2gce_credentials: release/aws2gce_iam.json
1112
ci_pipeline:
1213
premerge:
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
cloud_id: {{env["ANYSCALE_CLOUD_ID"]}}
2+
region: us-west-2
3+
4+
head_node_type:
5+
name: head_node
6+
instance_type: 4CPU-16GB
7+
8+
worker_node_types: []

release/ray_release/buildkite/step.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@
1212
get_test_project_id,
1313
)
1414
from ray_release.env import DEFAULT_ENVIRONMENT, load_environment
15+
from ray_release.template import get_test_env_var
16+
from ray_release.util import DeferredEnvVar
1517
from ray_release.custom_byod_build_init_helper import (
1618
generate_custom_build_step_key,
1719
get_prerequisite_step,
1820
)
19-
from ray_release.template import get_test_env_var
20-
from ray_release.util import DeferredEnvVar
2121

2222
DEFAULT_ARTIFACTS_DIR_HOST = "/tmp/ray_release_test_artifacts"
2323

release/ray_release/command_runner/_anyscale_job_wrapper.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
from urllib.parse import urlparse
1919
from typing import Optional, List, Tuple
2020

21+
AZURE_STORAGE_ACCOUNT = "rayreleasetests"
2122
OUTPUT_JSON_FILENAME = "output.json"
2223
AWS_CP_TIMEOUT = 300
2324
TIMEOUT_RETURN_CODE = 124 # same as bash timeout
@@ -69,6 +70,8 @@ def run_storage_cp(source: str, target: str):
6970
return False
7071

7172
storage_service = urlparse(target).scheme
73+
if target.startswith(f"https://{AZURE_STORAGE_ACCOUNT}.dfs.core.windows.net"):
74+
storage_service = "azure_blob"
7275
cp_cmd_args = []
7376
if storage_service == "s3":
7477
cp_cmd_args = [
@@ -88,7 +91,7 @@ def run_storage_cp(source: str, target: str):
8891
source,
8992
target,
9093
]
91-
elif storage_service == "abfss":
94+
elif storage_service == "azure_blob":
9295
subprocess.run(["azcopy", "login", "--identity"], check=True)
9396
cp_cmd_args = [
9497
"azcopy",

release/ray_release/configs/global_config.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ class GlobalConfig(TypedDict):
1313
byod_ecr_region: str
1414
byod_aws_cr: str
1515
byod_gcp_cr: str
16+
byod_azure_cr: str
1617
state_machine_pr_aws_bucket: str
1718
state_machine_branch_aws_bucket: str
1819
state_machine_disabled: bool
@@ -82,6 +83,10 @@ def _init_global_config(config_file: str):
8283
config_content.get("byod", {}).get("gcp_cr")
8384
or config_content.get("release_byod", {}).get("gcp_cr")
8485
),
86+
byod_azure_cr=(
87+
config_content.get("byod", {}).get("azure_cr")
88+
or config_content.get("release_byod", {}).get("azure_cr")
89+
),
8590
aws2gce_credentials=(
8691
config_content.get("credentials", {}).get("aws2gce")
8792
or config_content.get("release_byod", {}).get("aws2gce_credentials")
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
ANYSCALE_HOST=https://console.anyscale-staging.com
2+
RELEASE_AWS_ANYSCALE_SECRET_ARN="arn:aws:secretsmanager:us-west-2:029272617770:secret:release-automation/anyscale-staging-token20231008005227440600000001-JTgxb0"
3+
RELEASE_DEFAULT_CLOUD_ID="cld_5nnv7pt2jn2312x2e5v72z53n2"
4+
RELEASE_DEFAULT_PROJECT="prj_y8syktydl7ltabhz5axdelwnce"
5+
ANYSCALE_CLOUD_STORAGE_PROVIDER=abfss

release/ray_release/test.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -607,6 +607,8 @@ def get_byod_ecr(self) -> str:
607607
"""
608608
if self.is_gce() or self.is_kuberay():
609609
return get_global_config()["byod_gcp_cr"]
610+
if self.is_azure():
611+
return get_global_config()["byod_azure_cr"]
610612
byod_ecr = get_global_config()["byod_aws_cr"]
611613
if byod_ecr:
612614
return byod_ecr

release/release_tests.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,11 @@
9595

9696
variations:
9797
- __suffix__: aws
98+
- __suffix__: azure
99+
env: azure
100+
frequency: manual
101+
cluster:
102+
cluster_compute: hello_world_compute_config_azure.yaml
98103
- __suffix__: released
99104
cluster:
100105
ray_version: 2.50.0

0 commit comments

Comments
 (0)