forked from mc2-project/mc2
-
Notifications
You must be signed in to change notification settings - Fork 1
/
azure.yaml
119 lines (102 loc) · 4.7 KB
/
azure.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
# An unique identifier for the head node and workers of this cluster.
cluster_name: default
# The total number of workers nodes to launch in addition to the head
# node. This number should be >= 0.
num_workers: 0
# Cloud-provider specific configuration.
provider:
type: azure
# https://docs.microsoft.com/en-us/azure/confidential-computing/virtual-machine-solutions
location: eastus
resource_group: mc2-client-dev
storage_name: mc2storage
container_name: blob-container-1
# If left blank, the subscription ID from the Azure CLI will be used
# subscription_id:
# How MC2 will authenticate with newly launched nodes.
auth:
# TODO: remoe this field and make it the same as the username specified in config.yaml
ssh_user: mc2
# you must specify paths to matching private and public key pair files
# use `ssh-keygen -t rsa -b 4096` to generate a new ssh key pair
ssh_private_key: ~/.ssh/id_rsa
ssh_public_key: ~/.ssh/id_rsa.pub
# More specific customization to node configurations can be made using the ARM template azure-vm-template.json file
# See documentation here: https://docs.microsoft.com/en-us/azure/templates/microsoft.compute/2019-03-01/virtualmachines
# Changes to the local file will be used during deployment of the head node, however worker nodes deployment occurs
# on the head node, so changes to the template must be included in the wheel file used in setup_commands section below
# Provider-specific config for the head node, e.g. instance type.
head_node:
azure_arm_parameters:
# https://docs.microsoft.com/en-us/azure/confidential-computing/virtual-machine-solutions
vmSize: Standard_DC2s_v2
# If launching a minimal Ubuntu machine
# (and manually installing using setup commands)
imagePublisher: Canonical
imageOffer: UbuntuServer
imageSku: 18_04-lts-gen2
imageVersion: latest
# Provider-specific config for worker nodes, e.g. instance type.
worker_nodes:
azure_arm_parameters:
# https://docs.microsoft.com/en-us/azure/confidential-computing/virtual-machine-solutions
vmSize: Standard_DC2s_v2
# If launching a minimal Ubuntu machine
# (and manually installing using setup commands)
imagePublisher: Canonical
imageOffer: UbuntuServer
imageSku: 18_04-lts-gen2
imageVersion: latest
##############################################################################
# Everything below this can be ignored - you likely won't have to #
# modify it. #
##############################################################################
# Files or directories to copy to the head and worker nodes. The format is a
# dictionary from REMOTE_PATH: LOCAL_PATH, e.g.
file_mounts: {
# This script installs Open Enclave
"~/install_oe.sh" : "scripts/install_oe.sh",
# This script builds Spark 3.1.1 from source
"~/build_spark.sh" : "scripts/build_spark.sh",
# This script downloads a pre-built Spark 3.1.1 binary
"~/install_spark.sh" : "scripts/install_spark.sh",
# This script builds Opaque from source
"~/build_opaque.sh" : "scripts/build_opaque.sh",
# This script installs Secure XGBoost from source
"~/install_secure_xgboost.sh" : "scripts/install_secure_xgboost.sh"
}
# List of commands that will be run before `setup_commands`. If docker is
# enabled, these commands will run outside the container and before docker
# is setup.
initialization_commands:
# get rid of annoying Ubuntu message
- touch ~/.sudo_as_admin_successful
# List of shell commands to run to set up nodes.
# Note: Use empty list if using image
setup_commands:
# This script installs Open Enclave on the node
- chmod +x ~/install_oe.sh
- source ~/install_oe.sh
# This script installs Apache Spark on the node
- chmod +x ~/install_spark.sh
- source ~/install_spark.sh
# This script installs Opaque on the node
- chmod +x ~/build_opaque.sh
- source ~/build_opaque.sh
# This script installs Secure XGBoost on the node
- chmod +x ~/install_secure_xgboost.sh
- source ~/install_secure_xgboost.sh
# Custom commands that will be run on the head node after common setup.
# Set to empty list if using image
head_setup_commands: []
# Custom commands that will be run on worker nodes after common setup.
# Set to empty list if using image
worker_setup_commands: []
# Command to start MC2 on the head node.
# Set to empty list if using image
head_start_mc2_commands:
- cd $SPARK_HOME; ./sbin/start-master.sh
# Command to start MC2 on worker nodes.
# Set to empty list if using image
worker_start_mc2_commands:
- cd $SPARK_HOME; ./sbin/start-slave.sh $MC2_HEAD_IP:7077