- We have provission a set of getting started Infrastucture As Code(IAC) scripts to help you get started with the infrastructure setup.
- You can find the scripts inside the
infra
directory. - Currently we offer:
- AWS EC2 Instance under
infra/aws_dvsm.tf
- Google Cloud Compute Engine under
infra/gcp_dvsm.tf
- Azure Data Science Virtual Machine under
infra/azure_dvsm.tf
. This machine is pre-configured with the necessary NVIDIA GPU drivers and packages required for most deep learning frameworks.
- AWS EC2 Instance under
Before deploying the infrastructure to AWS using Terraform, ensure you have the following pre-requisites:
- Terraform installed on your local machine.
- An AWS account with the necessary permissions to create and manage EC2 instances.
- AWS CLI installed and configured with the necessary credentials.
- Clone the repository to your local machine:
# NB: SKIP THIS STEP if you have already cloned the repository
git clone https://github.com/ndamulelonemakh/zabantu-beta.git
- Navigate to the
infra
directory:
cd zabantu-beta/infra
- Configure your AWS credentials using the AWS CLI:
aws configure
Note: You will need to create an IAM user with programmatic access and attach the necessary permissions to create and manage EC2 instances. The access key and secret key generated for the IAM user will be used to configure the AWS CLI.
- Review and modify the
aws_dvsm.tf
file according to your requirements. Update the instance type, region, and any other relevant configurations. - Initialize the Terraform working directory:
terraform init
- Preview the changes that Terraform will make:
terraform plan
- If the plan looks good, apply the changes to provision the EC2 instance:
terraform apply
Confirm the changes by typing "yes" when prompted.
- Once the provisioning is complete, Terraform will output the public IP address of the EC2 instance. Use this IP address to connect to the instance via SSH.
ssh ubuntu@<public-ip-from-terraform-output>
Before deploying the infrastructure to Google Cloud using Terraform, ensure you have the following pre-requisites:
- Terraform installed on your local machine.
- A Google Cloud account with the necessary permissions to create and manage Compute Engine instances.
- Google Cloud Service Account and a JSON Key File for authentication.
- Clone the repository to your local machine:
# NB: SKIP THIS STEP if you have already cloned the repository
git clone https://github.com/ndamulelonemakh/zabantu-beta.git
- Navigate to the
infra
directory:
cd zabantu-beta/infra
- Configure your Google Cloud credentials by setting the path to the service account key file in the
GOOGLE_APPLICATION_CREDENTIALS
environment variable, or by using thegcloud
command-line tool to authenticate.
# Example for authenticatiing using gcould
gcloud auth activate-service-account --key-file=service-account-key.json
- Review and modify the
gcp_dvsm.tf
file according to your requirements. Update the instance type, region, and any other relevant configurations. - Initialize the Terraform working directory:
terraform init
- Preview the changes that Terraform will make:
terraform plan
- If the plan looks good, apply the changes to provision the Compute Engine instance:
terraform apply
Confirm the changes by typing "yes" when prompted.
- Once the provisioning is complete, Terraform will output the public IP address of the Compute Engine instance. Use this IP address to connect to the instance via SSH.
Bicep is a Domain Specific Language (DSL) for deploying Azure resources declaratively. It aims to drastically simplify the authoring experience with a cleaner syntax and better support for modularity and code re-use compared to ARM templates.
Before you can use the provided Bicep scripts to deploy your infrastructure on Azure, you need to have the following pre-requisites:
-
Azure Account: You need to have an Azure account. If you don't have one, you can create it from the Azure portal.
-
Azure CLI: You need to have the Azure CLI installed on your local machine. You can download it from the official website. Make sure to install a version that is compatible with the scripts provided in this repository.
-
Bicep CLI: You need to have the Bicep CLI installed on your local machine. You can download it from the official GitHub repository.
To authenticate with Azure, you can use the Azure CLI. Run the following command and follow the instructions:
az login
# If you are using a managed identity, you can run the following command
#az login --identity
# Or if you want to opt for device login
#az login --use-device-code
- This will open a new window in your default web browser where you can log in with your Azure credentials. Once you're logged in, the CLI will be able to manage resources in your Azure account.
- To deploy your infrastructure with Bicep, run the following command:
az group create --name myrg100 --location westeurope
az deployment group create --name MyGPUVmDeplyment0010 \
--resource-group myrg100 \
--template-file infra/azure_dvsm.bicep \
--parameters location=westeurope adminUsername=ubuntu vmName=myT4Vm010
- Replace
myrg100
,MyGPUVmDeplyment0010
,westeurope
,ubuntu
, andmyT4Vm010
with your desired settings.
- You can also deploy the infrastructure directly from the GitHub repository using the "Deploy to Azure" button.
- Click on the button below to deploy the infrastructure to Azure:
- Similarly, for AWS:
[![Deploy to AWS](https://
- And GCP:
[![Deploy to GCP](https://