Skip to content

Commit

Permalink
Doc for configuration spot instances (oap-project#638)
Browse files Browse the repository at this point in the history
* Add documentation for configuring spot instances

* Add quick guide as to the cluster key in quick start

* Add instruction to genetate ssh key pair
  • Loading branch information
jerrychenhf authored Jul 5, 2022
1 parent 0559afd commit 976b740
Show file tree
Hide file tree
Showing 5 changed files with 65 additions and 0 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,16 @@ auth:
ssh_proxy_command: "ncat --proxy-type socks5 --proxy <your_proxy_host>:<your_proxy_port> %h %p"
```

The cluster key will be created automatically for AWS and GCP if not specified.
For Azure, you need to generate an RSA key pair manually (use `ssh-keygen -t rsa -b 4096` to generate a new ssh key pair).
and configure the public and private key as following,

```
auth:
ssh_private_key: ~/.ssh/my_cluster_rsa_key
ssh_public_key: ~/.ssh/my_cluster_rsa_key.pub
```

Refer to `example/cluster` directory for more cluster configurations examples.

### 6. Managing clusters
Expand Down
10 changes: 10 additions & 0 deletions docs/source/GettingStarted/quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,16 @@ auth:
ssh_proxy_command: "ncat --proxy-type socks5 --proxy <your_proxy_host>:<your_proxy_port> %h %p"
```

The cluster key will be created automatically for AWS and GCP if not specified.
For Azure, you need to generate an RSA key pair manually (use `ssh-keygen -t rsa -b 4096` to generate a new ssh key pair).
and configure the public and private key as following,

```
auth:
ssh_private_key: ~/.ssh/my_cluster_rsa_key
ssh_public_key: ~/.ssh/my_cluster_rsa_key.pub
```

Refer to `example/cluster` directory for more cluster configurations examples.

### 6. Managing clusters
Expand Down
28 changes: 28 additions & 0 deletions docs/source/UserGuide/AdvancedTasks/configuring-spot-instances.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Configuring Spot Instances
Cloud providers usually provide user an option to create spot instances.
Spot Instances are available at a discount compared to On-Demand prices. Cloud provider may terminate a spot instance without notification due to capacity reasons.
You can use Spot Instances for various stateless, fault-tolerant, or flexible applications such as big data, containerized workloads, CI/CD, web servers, high-performance computing (HPC), and test & development workloads.

By default, CloudTik head node will be created with non-spot instance.
And prefers spot instances for worker nodes.
You can override worker node preference on spot instances or non-spot instances.

## Disable spot instance for worker nodes
If you want to disable spot instance for worker node, you can set prefer_spot_instance to false
under the provider section. For example,

```buildoutcfg
provider:
prefer_spot_instance: false
```

## Prefer spot instance for worker nodes
If you want to explicitly prefer spot instance for worker node, you can set prefer_spot_instance to true
under the provider section. For example,

```buildoutcfg
provider:
prefer_spot_instance: true
```
1 change: 1 addition & 0 deletions docs/source/UserGuide/advanced-tasks.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ Advanced Tasks
AdvancedTasks/using-for-on-premise.md
AdvancedTasks/understanding-cluster-key.md
AdvancedTasks/switching-client-machine.md
AdvancedTasks/configuring-spot-instances.md
16 changes: 16 additions & 0 deletions docs/source/UserGuide/creating-cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,22 @@ under the cloudtik pip installation.
For more details as to templates, please refer to [Advanced Tasks: Using Templates](./AdvancedTasks/using-templates.md)


## Configuring Cluster Key
If you don't specify cluster key information under auth section of configuration file,
The cluster key will be created automatically for AWS and GCP.
For Azure, you need to generate an RSA key pair manually (use `ssh-keygen -t rsa -b 4096` to generate a new ssh key pair).
and configure the public and private key as following,

```
auth:
ssh_private_key: ~/.ssh/my_cluster_rsa_key
ssh_public_key: ~/.ssh/my_cluster_rsa_key.pub
```

For more details as to cluster key configuration, refer to [Advanced Tasks: Understanding Cluster Key](./AdvancedTasks/understanding-cluster-key.md)

## Starting the cluster

Once the cluster configuration is defined and CloudTik is installed, you can use the following commands to create a cluster with CloudTik

```
Expand Down

0 comments on commit 976b740

Please sign in to comment.