Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 21 additions & 30 deletions examples/gen-ai-xeon-opea-chatqna-falcon3/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,26 @@ Use https://whatismyipaddress.com/ to find your Public IP.
# Variable for Huggingface Token
variable "huggingface_token" {
description = "Huggingface Token"
default = "<YOUR HUGGINGFACE TOKEN>" #UPDATE
default = "<YOUR HUGGINGFACE TOKEN>" #UPDATE with your Huggingface Token
type = string
}

variable "region" {
description = "Target AWS region to deploy EC2 in."
type = string
default = "us-east-1" #UPDATE if needed
default = "us-east-1"
}

variable "availability_zone" {
description = "Target AWS availability zone to deploy EC2 in."
type = string
default = "us-east-1d"
}

variable "instance_type" {
description = "Instance type to deploy."
type = string
default = "c7i.24xlarge"
}

# Variable to add ingress rules to the security group. Replace the default values with the required ports and CIDR ranges.
Expand All @@ -72,33 +84,6 @@ variable "ingress_rules" {
}
```

### main.tf

If there is a need to to modify the EC2 Instance, modify main.tf:

`instance_type = "c7i.24xlarge"`

```hcl
module "ec2-vm" {
source = "intel/aws-vm/intel"
key_name = aws_key_pair.TF_key.key_name
instance_type = "c7i.24xlarge"
availability_zone = "us-east-1a"
ami = data.aws_ami.ubuntu-linux-2204.id
user_data = data.cloudinit_config.ansible.rendered

root_block_device = [{
volume_size = "500"
}]

tags = {
Name = "my-test-vm-${random_id.rid.dec}"
Owner = "OwnerName-${random_id.rid.dec}",
Duration = "2"
}
}
```

## Usage from command line - Assumes you have Git, AWS CLI, and Terraform installed

```bash
Expand All @@ -108,6 +93,10 @@ git clone https://github.com/intel/terraform-intel-aws-vm.git
# Change into the example folder
cd terraform-intel-aws-vm/examples/gen-ai-xeon-opea-chatqna-falcon3

########################################################
# MODIFY VARIABLES.tf before continuing
########################################################

# Run the Terraform Commands below to deploy the demo.
terraform init
terraform plan
Expand Down Expand Up @@ -136,7 +125,9 @@ git clone https://github.com/intel/terraform-intel-aws-vm.git
# Change into the example folder
cd terraform-intel-aws-vm/examples/gen-ai-xeon-opea-chatqna-falcon3

# MODIFY VARIABLES.tf before continuining
########################################################
# MODIFY VARIABLES.tf before continuing
########################################################

# Run the Terraform Commands below to deploy the demo.
terraform init
Expand Down
4 changes: 2 additions & 2 deletions examples/gen-ai-xeon-opea-chatqna-falcon3/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ module "ec2-vm" {
count = var.vm_count
source = "intel/aws-vm/intel"
key_name = aws_key_pair.TF_key.key_name
instance_type = "c7i.24xlarge"
availability_zone = "us-east-1d"
instance_type = var.instance_type
availability_zone = var.availability_zone
ami = data.aws_ami.ubuntu-linux-2204.id
user_data = data.cloudinit_config.ansible.rendered

Expand Down
14 changes: 13 additions & 1 deletion examples/gen-ai-xeon-opea-chatqna-falcon3/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
variable "huggingface_token" {
description = "Huggingface Token"
#default = "hf_token"
type = string
type = string
}

variable "region" {
Expand All @@ -11,6 +11,18 @@ variable "region" {
default = "us-east-1"
}

variable "availability_zone" {
description = "Target AWS availability zone to deploy EC2 in."
type = string
default = "us-east-1d"
}

variable "instance_type" {
description = "Instance type to deploy."
type = string
default = "c7i.24xlarge"
}

# Variable to add ingress rules to the security group. Replace the default values with the required ports and CIDR ranges.
variable "ingress_rules" {
type = list(object({
Expand Down
Loading