CloudTik is a cloud scale platform for distributed analytics and AI on public cloud providers including AWS, Azure, GCP, and so on. CloudTik enables any users or enterprises to easily create and manage analytics and AI platform on public clouds, with out-of-box optimized functionalities and performance, and to go quickly to focus on running the business workloads in minutes or hours instead of spending months to construct and optimize the platform. We target to:
- Support major public Cloud providers (AWS, Azure and GCP, ...)
- Out of box and optimized runtime for Analytics and AI (Spark, Presto, ...)
- Easy and unified operation experiences across all clouds
- Open architecture and user in full control
- A full open-sourced solution
CloudTik requires a Python environment on Linux. We recommend using Conda to manage Python environments and packages.
If you don't have Conda installed, please refer to dev/install-conda.sh
to install Conda on Linux.
git clone https://github.com/oap-project/cloudtik.git && cd cloudtik
bash dev/install-conda.sh
Once Conda is installed, create an environment with a specific Python version as below. CloudTik currently supports Python 3.7, 3.8, 3.9. Here we take Python 3.7 as an example.
conda create -n cloudtik -y python=3.7
conda activate cloudtik
Execute the following pip
commands to install CloudTik on your working machine for specific cloud providers.
Here we take AWS as an example.
# if running CloudTik on aws
pip install -U "cloudtik[aws] @ https://d30257nes7d4fq.cloudfront.net/downloads/cloudtik/cloudtik-0.9.0-cp37-cp37m-manylinux2014_x86_64.whl"
Replace cloudtik[aws]
with clouditk[azure]
or cloudtik[gcp]
if you want to create clusters on Azure or GCP.
Use cloudtik[all]
if you want to manage clusters with all supported Cloud providers.
You can install the latest CloudTik wheels via the following links. These daily releases do not go through the full release process.
Linux | Installation |
---|---|
Python 3.9 | pip install -U "cloudtik[aws] @ https://d30257nes7d4fq.cloudfront.net/downloads/cloudtik/cloudtik-0.9.0-cp39-cp39-manylinux2014_x86_64.whl" |
Python 3.8 | pip install -U "cloudtik[aws] @ https://d30257nes7d4fq.cloudfront.net/downloads/cloudtik/cloudtik-0.9.0-cp38-cp38-manylinux2014_x86_64.whl" |
Python 3.7 | pip install -U "cloudtik[aws] @ https://d30257nes7d4fq.cloudfront.net/downloads/cloudtik/cloudtik-0.9.0-cp37-cp37m-manylinux2014_x86_64.whl" |
After CloudTik is installed on your working machine, you need to configure or log into your Cloud account to authenticate the cloud provider CLI on this machine.
First, install AWS CLI (command line interface) on your working machine. Please refer to Installing AWS CLI for detailed instructions.
After AWS CLI is installed, you need to configure AWS CLI about credentials. The quickest way to configure it
is to run aws configure
command, and you can refer to
Managing access keys
to get AWS Access Key ID and AWS Secret Access Key.
More details for AWS CLI can be found in AWS CLI Getting Started.
After CloudTik is installed on your working machine, login to Azure using az login
.
Refer to Sign in with Azure CLI for more details.
First, follow Creating a service account to create a service account on Google Cloud.
A JSON file should be safely downloaded to your local computer, and then set the GOOGLE_APPLICATION_CREDENTIALS
environment
variable as described in the Setting the environment variable
on your working machine.
CloudTik uses Workspace concept to easily manage shared Cloud resources such as VPC, network, identity resources, firewall or security groups. In a Workspace, you can start one or more clusters.
Create a configuration workspace yaml file to specify the unique workspace name, cloud provider type and a few cloud provider properties.
Take AWS as an example.
# A unique identifier for the workspace.
workspace_name: example-workspace
# Cloud-provider specific configuration.
provider:
type: aws
region: us-west-2
security_group:
# Use IpPermissions to allow SSH access from your working node
# Remember to restrict IpRanges for security
IpPermissions:
- FromPort: 22
ToPort: 22
IpProtocol: TCP
IpRanges:
- CidrIp: 0.0.0.0/0
NOTE: Remember to change CidrIp
from 0.0.0.0/0
to restricted IpRanges for TCP port 22 security.
Use the following command to create and provision a Workspace:
cloudtik workspace create /path/to/your-workspace-config.yaml
Check example/cluster
folder for more Workspace configuration file examples.
If you choose cloud storage as file system or to store stage and event data, a cloud storage account is needed.
Every object in Amazon S3 is stored in a bucket. Before you can store data in Amazon S3, you must create a bucket.
Please refer to the S3 User Guide Creating bucket for instructions. The name of S3 bucket will be used in the next step.
You will also need AWS Access Key ID and AWS Secret Access Key in the next step which allow the access to the created S3 bucket. Refer to Managing access keys for the details.
Create an Azure storage account and a storage container within this storage account. Please refer to Creating Azure Storage Account for instructions.
Azure Blob storage or Data Lake Storage Gen2 are both supported by CloudTik. Storage account name and storage container name will be used when configuring Azure cluster yaml.
You will also need Azure account access key in the next step when configuring an Azure configuration yaml file, which grants the access to the created Azure storage.
If you do not already have a GCS bucket, create one by following the Creating buckets.
To control access to the bucket, please refer to Google cloud bucket for instructions. The name of bucket will be used when configuring GCP cluster yaml.
You will also need the previously downloaded Json file's project_id
, client_email
, private_key_id
and
gcs.service.account.private.key
for the next step when configuring a GCP cluster yaml, which grants the access to the created GCP bucket.
Now you can start a cluster:
cloudtik start /path/to/your-cluster-config.yaml
A typical cluster configuration file is usually very simple thanks to design of CloudTik's templates with inheritance.
Here we take AWS as an example. This example can be found from CloudTik's example/cluster/aws/example-standard.yaml
.
# An example of standard 1 + 3 nodes cluster with standard instance type
from: aws/standard
# Workspace into which to launch the cluster
workspace_name: example-workspace
# A unique identifier for the cluster.
cluster_name: example-docker
# Enable container
docker:
enabled: True
# Cloud-provider specific configuration.
provider:
type: aws
region: us-west-2
# S3 configurations for storage
aws_s3_storage:
s3.bucket: your_s3_bucket
s3.access.key.id: your_s3_access_key_id
s3.secret.access.key: your_s3_secret_access_key
auth:
ssh_user: ubuntu
# Set proxy if you are in corporation network. For example,
# ssh_proxy_command: "ncat --proxy-type socks5 --proxy your_proxy_host:your_proxy_port %h %p"
available_node_types:
worker.default:
# The minimum number of worker nodes to launch.
min_workers: 3
You need the cloud storage access information in Step 5 and only a few additional key settings in the configuration file to launch a cluster.
As for auth
above, please set proxy if your working node is using corporation network.
auth:
ssh_user: ubuntu
ssh_proxy_command: "ncat --proxy-type socks5 --proxy <your_proxy_host>:<your_proxy_port> %h %p"
Refer to example/cluster
directory for more cluster configurations examples.
CloudTik provides very powerful capability to monitor and manage the cluster.
Use the following commands to show various cluster information.
# Check cluster status with:
cloudtik status /path/to/your-cluster-config.yaml
# Show cluster summary information and useful links to connect to cluster web UI.
cloudtik info /path/to/your-cluster-config.yaml
cloudtik head-ip /path/to/your-cluster-config.yaml
cloudtik worker-ips /path/to/your-cluster-config.yaml
Connect to a terminal of cluster head node.
cloudtik attach /path/to/your-cluster-config.yaml
Execute a command via SSH on cluster head node or a specified node.
cloudtik exec /path/to/your-cluster-config.yaml [command]
Upload files or directories to cluster.
cloudtik rsync-up /path/to/your-cluster-config.yaml [source] [target]
Download files or directories from cluster.
cloudtik rsync-down /path/to/your-cluster-config.yaml [source] [target]
Stop and delete the cluster.
cloudtik stop /path/to/your-cluster-config.yaml
Delete the workspace and all the network resources within it.
cloudtik workspace delete /path/to/your-workspace-config.yaml
For more information as to the commands, you can use cloudtik --help
or cloudtik [command] --help
to get detailed instructions.