Skip to content

Commit 77e968e

Browse files
committed
deploy: 284c358
1 parent 4e4cf8f commit 77e968e

File tree

312 files changed

+65222
-7
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

312 files changed

+65222
-7
lines changed

README.html

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,64 @@
265265
<li class="toctree-l1"><a class="reference internal" href="courses/01_examples/output/04_Ray_Train_distributed_training_05.html">5. Main Training Function</a></li>
266266
<li class="toctree-l1"><a class="reference internal" href="courses/01_examples/output/04_Ray_Train_distributed_training_06.html">6. Start Training</a></li>
267267
</ul>
268+
<p aria-level="2" class="caption" role="heading"><span class="caption-text">02 Anyscale Admin</span></p>
269+
<ul class="nav bd-sidenav">
270+
<li class="toctree-l1"><a class="reference internal" href="courses/02_Anyscale_Admin/02_00_Anyscale_Admin_Overview/output/anyscale_administrator_overview_01.html">Anyscale Administrator Overview</a></li>
271+
<li class="toctree-l1"><a class="reference internal" href="courses/02_Anyscale_Admin/02_00_Anyscale_Admin_Overview/output/anyscale_administrator_overview_02.html">1. What is an Anyscale Cloud?</a></li>
272+
<li class="toctree-l1"><a class="reference internal" href="courses/02_Anyscale_Admin/02_00_Anyscale_Admin_Overview/output/anyscale_administrator_overview_03.html">2. Cloud Deployment Types</a></li>
273+
<li class="toctree-l1"><a class="reference internal" href="courses/02_Anyscale_Admin/02_00_Anyscale_Admin_Overview/output/anyscale_administrator_overview_04.html">3. A Demonstrative Example of Resource Creation with AWS EC2</a></li>
274+
<li class="toctree-l1"><a class="reference internal" href="courses/02_Anyscale_Admin/02_00_Anyscale_Admin_Overview/output/anyscale_administrator_overview_05.html">3.1 IAM Role Definition</a></li>
275+
<li class="toctree-l1"><a class="reference internal" href="courses/02_Anyscale_Admin/02_00_Anyscale_Admin_Overview/output/anyscale_administrator_overview_06.html">4. Register Anyscale Cloud to Your Cloud Provider</a></li>
276+
<li class="toctree-l1"><a class="reference internal" href="courses/02_Anyscale_Admin/02_01_VM_vs_K8s/output/anyscale_vm_vs_k8s_01.html">Deployment Options: Virtual Machines vs. Kubernetes</a></li>
277+
<li class="toctree-l1"><a class="reference internal" href="courses/02_Anyscale_Admin/02_01_VM_vs_K8s/output/anyscale_vm_vs_k8s_02.html">2. Virtual Machines (VM) vs. Kubernetes (K8s)</a></li>
278+
<li class="toctree-l1"><a class="reference internal" href="courses/02_Anyscale_Admin/02_01_VM_vs_K8s/output/anyscale_vm_vs_k8s_03.html">3. (Optional) More Kubernetes Deployments Components</a></li>
279+
<li class="toctree-l1"><a class="reference internal" href="courses/02_Anyscale_Admin/02_02a_Deploy_to_VM_AWS_EC2/output/deploy_to_ec2_01.html">Introduction: Deploy Anyscale Ray on AWS EC2 Instances</a></li>
280+
<li class="toctree-l1"><a class="reference internal" href="courses/02_Anyscale_Admin/02_02a_Deploy_to_VM_AWS_EC2/output/deploy_to_ec2_02.html">1. Create Anyscale Resources with Terraform</a></li>
281+
<li class="toctree-l1"><a class="reference internal" href="courses/02_Anyscale_Admin/02_02a_Deploy_to_VM_AWS_EC2/output/deploy_to_ec2_03.html">2. Register the Anyscale Cloud</a></li>
282+
<li class="toctree-l1"><a class="reference internal" href="courses/02_Anyscale_Admin/02_02a_Deploy_to_VM_AWS_EC2/output/deploy_to_ec2_04.html">3. Test</a></li>
283+
<li class="toctree-l1"><a class="reference internal" href="courses/02_Anyscale_Admin/02_02a_Deploy_to_VM_AWS_EC2/output/deploy_to_ec2_05.html">4. Cleanup</a></li>
284+
<li class="toctree-l1"><a class="reference internal" href="courses/02_Anyscale_Admin/02_02a_Deploy_to_VM_AWS_EC2/output/deploy_to_ec2_06.html">5. Conclusion</a></li>
285+
<li class="toctree-l1"><a class="reference internal" href="courses/02_Anyscale_Admin/02_02b_Deploy_to_VM_GCP_GCE/output/deploy_to_GCE_01.html">Introduction: Deploy Anyscale Ray on GCP Compute Engine Instances (GCE)</a></li>
286+
<li class="toctree-l1"><a class="reference internal" href="courses/02_Anyscale_Admin/02_02b_Deploy_to_VM_GCP_GCE/output/deploy_to_GCE_02.html">Prerequisites</a></li>
287+
<li class="toctree-l1"><a class="reference internal" href="courses/02_Anyscale_Admin/02_02b_Deploy_to_VM_GCP_GCE/output/deploy_to_GCE_03.html">1. Installation</a></li>
288+
<li class="toctree-l1"><a class="reference internal" href="courses/02_Anyscale_Admin/02_02b_Deploy_to_VM_GCP_GCE/output/deploy_to_GCE_04.html">2. Create Anyscale Resources with Terraform</a></li>
289+
<li class="toctree-l1"><a class="reference internal" href="courses/02_Anyscale_Admin/02_02b_Deploy_to_VM_GCP_GCE/output/deploy_to_GCE_05.html">3. Register the Anyscale Cloud</a></li>
290+
<li class="toctree-l1"><a class="reference internal" href="courses/02_Anyscale_Admin/02_02b_Deploy_to_VM_GCP_GCE/output/deploy_to_GCE_06.html">4. Test</a></li>
291+
<li class="toctree-l1"><a class="reference internal" href="courses/02_Anyscale_Admin/02_02b_Deploy_to_VM_GCP_GCE/output/deploy_to_GCE_07.html">5. Cleanup</a></li>
292+
<li class="toctree-l1"><a class="reference internal" href="courses/02_Anyscale_Admin/02_03a_Deploy_to_K8s_New_AWS_EKS/output/deploy_to_a_new_EKS_01.html">Introduction: Deploy Anyscale Ray on A New AWS EKS Cluster</a></li>
293+
<li class="toctree-l1"><a class="reference internal" href="courses/02_Anyscale_Admin/02_03a_Deploy_to_K8s_New_AWS_EKS/output/deploy_to_a_new_EKS_02.html">1. Create Anyscale Resources with Terraform</a></li>
294+
<li class="toctree-l1"><a class="reference internal" href="courses/02_Anyscale_Admin/02_03a_Deploy_to_K8s_New_AWS_EKS/output/deploy_to_a_new_EKS_03.html">2. Install Kubernetes Components</a></li>
295+
<li class="toctree-l1"><a class="reference internal" href="courses/02_Anyscale_Admin/02_03a_Deploy_to_K8s_New_AWS_EKS/output/deploy_to_a_new_EKS_04.html">3. Register the Anyscale Cloud</a></li>
296+
<li class="toctree-l1"><a class="reference internal" href="courses/02_Anyscale_Admin/02_03a_Deploy_to_K8s_New_AWS_EKS/output/deploy_to_a_new_EKS_05.html">4. Install the Anyscale Operator</a></li>
297+
<li class="toctree-l1"><a class="reference internal" href="courses/02_Anyscale_Admin/02_03a_Deploy_to_K8s_New_AWS_EKS/output/deploy_to_a_new_EKS_06.html">5. Verify the Installation</a></li>
298+
<li class="toctree-l1"><a class="reference internal" href="courses/02_Anyscale_Admin/02_03a_Deploy_to_K8s_New_AWS_EKS/output/deploy_to_a_new_EKS_07.html">6. Test</a></li>
299+
<li class="toctree-l1"><a class="reference internal" href="courses/02_Anyscale_Admin/02_03a_Deploy_to_K8s_New_AWS_EKS/output/deploy_to_a_new_EKS_08.html">7. Clean up</a></li>
300+
<li class="toctree-l1"><a class="reference internal" href="courses/02_Anyscale_Admin/02_03a_Deploy_to_K8s_New_AWS_EKS/output/deploy_to_a_new_EKS_09.html">8. Conclusion</a></li>
301+
<li class="toctree-l1"><a class="reference internal" href="courses/02_Anyscale_Admin/02_03b_Deploy_to_K8s_Existing_AWS_EKS/output/deploy_to_an_existing_EKS_01.html">Introduction: Deploy Anyscale Ray on An Existing AWS EKS Cluster</a></li>
302+
<li class="toctree-l1"><a class="reference internal" href="courses/02_Anyscale_Admin/02_03b_Deploy_to_K8s_Existing_AWS_EKS/output/deploy_to_an_existing_EKS_02.html">Prerequisites</a></li>
303+
<li class="toctree-l1"><a class="reference internal" href="courses/02_Anyscale_Admin/02_03b_Deploy_to_K8s_Existing_AWS_EKS/output/deploy_to_an_existing_EKS_03.html">1. Create Anyscale Resources with Terraform</a></li>
304+
<li class="toctree-l1"><a class="reference internal" href="courses/02_Anyscale_Admin/02_03b_Deploy_to_K8s_Existing_AWS_EKS/output/deploy_to_an_existing_EKS_04.html">2. Attach Required IAM Policies to Your existing EKS’s Node Role</a></li>
305+
<li class="toctree-l1"><a class="reference internal" href="courses/02_Anyscale_Admin/02_03b_Deploy_to_K8s_Existing_AWS_EKS/output/deploy_to_an_existing_EKS_05.html">3. Install Kubernetes Components</a></li>
306+
<li class="toctree-l1"><a class="reference internal" href="courses/02_Anyscale_Admin/02_03b_Deploy_to_K8s_Existing_AWS_EKS/output/deploy_to_an_existing_EKS_06.html">4. Register the Anyscale Cloud</a></li>
307+
<li class="toctree-l1"><a class="reference internal" href="courses/02_Anyscale_Admin/02_03b_Deploy_to_K8s_Existing_AWS_EKS/output/deploy_to_an_existing_EKS_07.html">5. Install the Anyscale Operator</a></li>
308+
<li class="toctree-l1"><a class="reference internal" href="courses/02_Anyscale_Admin/02_03b_Deploy_to_K8s_Existing_AWS_EKS/output/deploy_to_an_existing_EKS_08.html">6. Verify the Installation</a></li>
309+
<li class="toctree-l1"><a class="reference internal" href="courses/02_Anyscale_Admin/02_03b_Deploy_to_K8s_Existing_AWS_EKS/output/deploy_to_an_existing_EKS_09.html">7. Test</a></li>
310+
<li class="toctree-l1"><a class="reference internal" href="courses/02_Anyscale_Admin/02_03b_Deploy_to_K8s_Existing_AWS_EKS/output/deploy_to_an_existing_EKS_10.html">8. Troubleshooting</a></li>
311+
<li class="toctree-l1"><a class="reference internal" href="courses/02_Anyscale_Admin/02_03b_Deploy_to_K8s_Existing_AWS_EKS/output/deploy_to_an_existing_EKS_11.html">9. Clean up</a></li>
312+
<li class="toctree-l1"><a class="reference internal" href="courses/02_Anyscale_Admin/02_03b_Deploy_to_K8s_Existing_AWS_EKS/output/deploy_to_an_existing_EKS_12.html">10. Conclusion</a></li>
313+
<li class="toctree-l1"><a class="reference internal" href="courses/02_Anyscale_Admin/02_03c_Deploy_to_K8s_New_GCP_GKE/output/deploy_to_new_GKE_01.html">Introduction: Deploy Anyscale Ray on A New Google Kubernetes Engine (GKE) Cluster</a></li>
314+
<li class="toctree-l1"><a class="reference internal" href="courses/02_Anyscale_Admin/02_03c_Deploy_to_K8s_New_GCP_GKE/output/deploy_to_new_GKE_02.html">Prerequisites</a></li>
315+
<li class="toctree-l1"><a class="reference internal" href="courses/02_Anyscale_Admin/02_03c_Deploy_to_K8s_New_GCP_GKE/output/deploy_to_new_GKE_03.html">1. Installation</a></li>
316+
<li class="toctree-l1"><a class="reference internal" href="courses/02_Anyscale_Admin/02_03c_Deploy_to_K8s_New_GCP_GKE/output/deploy_to_new_GKE_04.html">2. Create Anyscale Resources with Terraform</a></li>
317+
<li class="toctree-l1"><a class="reference internal" href="courses/02_Anyscale_Admin/02_03c_Deploy_to_K8s_New_GCP_GKE/output/deploy_to_new_GKE_05.html">3. Troubleshooting GPU Availability</a></li>
318+
<li class="toctree-l1"><a class="reference internal" href="courses/02_Anyscale_Admin/02_03c_Deploy_to_K8s_New_GCP_GKE/output/deploy_to_new_GKE_06.html">4. kubectl Configuration</a></li>
319+
<li class="toctree-l1"><a class="reference internal" href="courses/02_Anyscale_Admin/02_03c_Deploy_to_K8s_New_GCP_GKE/output/deploy_to_new_GKE_07.html">5. Install NGINX Ingress Controller</a></li>
320+
<li class="toctree-l1"><a class="reference internal" href="courses/02_Anyscale_Admin/02_03c_Deploy_to_K8s_New_GCP_GKE/output/deploy_to_new_GKE_08.html">6. (Optional) Upgrade Anyscale Dependencies</a></li>
321+
<li class="toctree-l1"><a class="reference internal" href="courses/02_Anyscale_Admin/02_03c_Deploy_to_K8s_New_GCP_GKE/output/deploy_to_new_GKE_09.html">7. Register the Anyscale Cloud</a></li>
322+
<li class="toctree-l1"><a class="reference internal" href="courses/02_Anyscale_Admin/02_03c_Deploy_to_K8s_New_GCP_GKE/output/deploy_to_new_GKE_10.html">8. Install the Anyscale Operator</a></li>
323+
<li class="toctree-l1"><a class="reference internal" href="courses/02_Anyscale_Admin/02_03c_Deploy_to_K8s_New_GCP_GKE/output/deploy_to_new_GKE_11.html">8. Test</a></li>
324+
<li class="toctree-l1"><a class="reference internal" href="courses/02_Anyscale_Admin/02_03c_Deploy_to_K8s_New_GCP_GKE/output/deploy_to_new_GKE_12.html">9. Cleanup</a></li>
325+
</ul>
268326
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Gettingstarted</span></p>
269327
<ul class="nav bd-sidenav">
270328
<li class="toctree-l1"><a class="reference internal" href="courses/GettingStarted/output/101_01_anyscale_intro_workspace_01.html">101 — Introduction to Anyscale Workspaces</a></li>
Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
# ---------------------------------------------------------------------------------------------------------------------
2+
# Example Anyscale K8s Resources - Public Networking
3+
# This template creates EKS resources for Anyscale
4+
# It creates:
5+
# - VPC
6+
# - EFS
7+
# - S3 Bucket
8+
# - IAM policies
9+
# ---------------------------------------------------------------------------------------------------------------------
10+
11+
locals {
12+
public_subnets = ["172.24.101.0/24", "172.24.102.0/24"]
13+
private_subnets = ["172.24.20.0/24", "172.24.21.0/24"]
14+
}
15+
16+
module "anyscale_vpc" {
17+
#checkov:skip=CKV_TF_1: Example code should use the latest version of the module
18+
#checkov:skip=CKV_TF_2: Example code should use the latest version of the module
19+
source = "github.com/anyscale/terraform-aws-anyscale-cloudfoundation-modules//modules/aws-anyscale-vpc"
20+
21+
anyscale_vpc_name = "anyscale-${var.eks_cluster_name}"
22+
cidr_block = "172.24.0.0/16"
23+
24+
public_subnets = local.public_subnets
25+
private_subnets = local.private_subnets
26+
27+
public_subnet_tags = {
28+
"kubernetes.io/role/elb" = "1"
29+
}
30+
private_subnet_tags = {
31+
"kubernetes.io/role/internal-elb" = "1"
32+
}
33+
}
34+
35+
#trivy:ignore:avd-aws-0132
36+
module "anyscale_s3" {
37+
#checkov:skip=CKV_TF_1: Example code should use the latest version of the module
38+
#checkov:skip=CKV_TF_2: Example code should use the latest version of the module
39+
source = "github.com/anyscale/terraform-aws-anyscale-cloudfoundation-modules//modules/aws-anyscale-s3"
40+
41+
module_enabled = true
42+
43+
anyscale_bucket_name = "${var.eks_cluster_name}-${var.aws_region}"
44+
45+
tags = var.tags
46+
}
47+
48+
#trivy:ignore:avd-aws-0104
49+
resource "aws_security_group" "allow_all_vpc" {
50+
#checkov:skip=CKV2_AWS_5: "Ensure that Security Groups are attached to another resource"
51+
name = "allow-all-vpc"
52+
description = "Allow all traffic within the VPC"
53+
vpc_id = module.anyscale_vpc.vpc_id
54+
55+
ingress {
56+
description = "Allow all traffic from within the VPC"
57+
from_port = 0
58+
to_port = 0
59+
protocol = "-1"
60+
cidr_blocks = [module.anyscale_vpc.vpc_cidr_block]
61+
}
62+
63+
egress {
64+
description = "Allow all traffic to the internet"
65+
from_port = 0
66+
to_port = 0
67+
protocol = "-1"
68+
cidr_blocks = ["0.0.0.0/0"]
69+
}
70+
71+
tags = var.tags
72+
}
73+
74+
module "anyscale_efs" {
75+
#checkov:skip=CKV_TF_1: Example code should use the latest version of the module
76+
#checkov:skip=CKV_TF_2: Example code should use the latest version of the module
77+
source = "github.com/anyscale/terraform-aws-anyscale-cloudfoundation-modules//modules/aws-anyscale-efs"
78+
79+
module_enabled = var.enable_efs
80+
81+
anyscale_efs_name = "anyscale-${var.eks_cluster_name}"
82+
mount_targets_subnet_count = length(local.private_subnets)
83+
mount_targets_subnets = module.anyscale_vpc.private_subnet_ids
84+
85+
associated_security_group_ids = [aws_security_group.allow_all_vpc.id]
86+
87+
tags = var.tags
88+
}
89+
90+
#trivy:ignore:avd-aws-0342
91+
module "anyscale_iam_roles" {
92+
#checkov:skip=CKV_TF_1: Example code should use the latest version of the module
93+
#checkov:skip=CKV_TF_2: Example code should use the latest version of the module
94+
source = "github.com/anyscale/terraform-aws-anyscale-cloudfoundation-modules//modules/aws-anyscale-iam"
95+
96+
module_enabled = true
97+
98+
create_anyscale_access_role = false
99+
create_cluster_node_instance_profile = false
100+
101+
create_iam_s3_policy = true
102+
anyscale_s3_bucket_arn = module.anyscale_s3.s3_bucket_arn
103+
104+
tags = var.tags
105+
}
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
# ---------------------------------------------------------------------------------------------------------------------
2+
# ENVIRONMENT VARIABLES
3+
# Define these secrets as environment variables
4+
# ---------------------------------------------------------------------------------------------------------------------
5+
6+
# AWS_ACCESS_KEY_ID
7+
# AWS_SECRET_ACCESS_KEY
8+
9+
# ---------------------------------------------------------------------------------------------------------------------
10+
# REQUIRED VARIABLES
11+
# These variables must be set when using this module.
12+
# ---------------------------------------------------------------------------------------------------------------------
13+
14+
# ---------------------------------------------------------------------------------------------------------------------
15+
# OPTIONAL VARIABLES
16+
# These variables have defaults but must be included when using this module.
17+
# ---------------------------------------------------------------------------------------------------------------------
18+
19+
variable "aws_region" {
20+
description = <<-EOT
21+
(Optional) The AWS region in which all resources will be created.
22+
23+
ex:
24+
```
25+
aws_region = "us-east-2"
26+
```
27+
EOT
28+
type = string
29+
default = "us-west-2"
30+
}
31+
32+
variable "tags" {
33+
description = <<-EOT
34+
(Optional) A map of tags to all resources that accept tags.
35+
36+
ex:
37+
```
38+
tags = {
39+
Environment = "dev"
40+
Repo = "terraform-kubernetes-anyscale-foundation-modules",
41+
}
42+
```
43+
EOT
44+
type = map(string)
45+
default = {
46+
Test = "true"
47+
Environment = "dev"
48+
Repo = "terraform-kubernetes-anyscale-foundation-modules",
49+
Example = "aws/eks-private"
50+
}
51+
}
52+
53+
variable "eks_cluster_name" {
54+
description = <<-EOT
55+
(Optional) The name of the EKS cluster.
56+
57+
This will be used for naming resources created by this module including the EKS cluster and the S3 bucket.
58+
59+
ex:
60+
```
61+
eks_cluster_name = "anyscale-eks-private"
62+
```
63+
EOT
64+
type = string
65+
default = "anyscale-eks-private"
66+
}
67+
68+
variable "eks_cluster_version" {
69+
description = <<-EOT
70+
(Optional) The Kubernetes version of the EKS cluster.
71+
72+
ex:
73+
```
74+
eks_cluster_version = "1.32"
75+
```
76+
EOT
77+
type = string
78+
default = "1.32"
79+
}
80+
81+
variable "node_group_gpu_types" {
82+
description = <<-EOT
83+
(Optional) The GPU types of the EKS nodes.
84+
Possible values: ["T4", "A10G"]
85+
EOT
86+
type = list(string)
87+
default = ["T4"]
88+
}
89+
90+
variable "enable_efs" {
91+
description = <<-EOT
92+
(Optional) Enable the creation of an EFS instance.
93+
94+
This is optional for Anyscale deployments. EFS is used for shared storage between nodes.
95+
96+
ex:
97+
```
98+
enable_efs = true
99+
```
100+
EOT
101+
type = bool
102+
default = false
103+
}

0 commit comments

Comments
 (0)