forked from ray-project/ray
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Serve][Nightly] Environment for Nightly K8s Tests (ray-project#27126)
Signed-off-by: Stefan van der Kleij <[email protected]>
- Loading branch information
Showing
5 changed files
with
105 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
base_image: {{ env["RAY_IMAGE_NIGHTLY_CPU"] | default("anyscale/ray:nightly-py37") }} | ||
env_vars: {} | ||
debian_packages: | ||
- curl | ||
- unzip | ||
- jq | ||
- apt-transport-https | ||
- ca-certificates | ||
- gnupg | ||
|
||
python: | ||
pip_packages: | ||
- kubernetes | ||
conda_packages: [] | ||
|
||
post_build_cmds: | ||
# Install gcloud tools | ||
- sudo apt-get remove -y google-cloud-sdk | ||
- echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list | ||
- curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key --keyring /usr/share/keyrings/cloud.google.gpg add - | ||
- sudo apt-get update && sudo apt-get install google-cloud-cli | ||
- sudo apt-get install google-cloud-sdk-gke-gcloud-auth-plugin |
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,29 @@ | ||
cloud_id: {{env["ANYSCALE_CLOUD_ID"]}} | ||
region: us-west-2 | ||
|
||
max_workers: 0 | ||
|
||
head_node_type: | ||
name: head_node | ||
instance_type: m5.2xlarge | ||
|
||
worker_node_types: | ||
- name: worker_node | ||
instance_type: m5.2xlarge | ||
min_workers: 0 | ||
max_workers: 0 | ||
use_spot: false | ||
|
||
aws: | ||
TagSpecifications: | ||
- ResourceType: "instance" | ||
Tags: | ||
- Key: anyscale-user | ||
Value: '{{env["ANYSCALE_USER"]}}' | ||
- Key: anyscale-expiration | ||
Value: '{{env["EXPIRATION_2D"]}}' | ||
|
||
BlockDeviceMappings: | ||
- DeviceName: /dev/sda1 | ||
Ebs: | ||
VolumeSize: 200 |
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,22 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -ex | ||
|
||
aws secretsmanager get-secret-value \ | ||
--secret-id oss-nightly-ci-gke-cluster-service-account \ | ||
--region us-west-2 | | ||
jq -r .SecretString | | ||
jq -r .json_text \ | ||
>gke_service_account.json | ||
|
||
gcloud auth activate-service-account \ | ||
[email protected] \ | ||
--key-file=gke_service_account.json | ||
|
||
USE_GKE_GCLOUD_AUTH_PLUGIN=True \ | ||
gcloud container clusters get-credentials \ | ||
serve-ha-nightly \ | ||
--zone us-central1-c \ | ||
--project oss-nightly-test | ||
|
||
kubectl get nodes |
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,10 @@ | ||
from kubernetes import client, config | ||
|
||
# Configs can be set in Configuration class directly or using helper utility | ||
config.load_kube_config() | ||
|
||
v1 = client.CoreV1Api() | ||
print("Listing pods with their IPs:") | ||
ret = v1.list_pod_for_all_namespaces(watch=False) | ||
for i in ret.items: | ||
print("%s\t%s\t%s" % (i.status.pod_ip, i.metadata.namespace, i.metadata.name)) |
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