You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now configure the AWS CLI with your access keys from **Step 0.4**:
155
214
```bash
156
215
aws configure
@@ -317,30 +376,88 @@ cat providers.tf
317
376
# Should show your bucket name, not ${BUCKET_NAME}
318
377
```
319
378
320
-
### Step 10: Create terraform.tfvars
321
-
Now we'll create the main configuration file with all your values.
322
-
> **IMPORTANT:** Choose the right AMI variable based on **Step 7**
323
-
If you have the Infinia AMI:
379
+
### Step 10: Choose Your Network Configuration
380
+
381
+
You have two options for network setup:
382
+
383
+
#### Option A: Use Existing VPC (Recommended for existing AWS accounts)
384
+
If you followed the previous steps and have existing VPC, subnets, and security groups.
385
+
386
+
#### Option B: Create New VPC (Recommended for new deployments)
387
+
Let Terraform create a new VPC, subnets, and security groups for you.
388
+
389
+
### Step 10.1: Create terraform.tfvars
390
+
391
+
**Option A - Using Existing Infrastructure:**
324
392
```bash
325
393
cat > terraform.tfvars << EOF
394
+
# Core configuration
326
395
aws_region = "us-west-2"
396
+
infinia_deployment_name = "infinia"
397
+
key_pair_name = "${KEY_NAME}"
398
+
399
+
# Use existing infrastructure
400
+
create_vpc = false
327
401
vpc_id = "${VPC_ID}"
402
+
subnet_ids = ["${SUBNET_ID}"]
328
403
security_group_id = "${SG_ID}"
329
-
key_pair_name = "${KEY_NAME}"
404
+
405
+
# Instance configuration
330
406
infinia_ami_id = "${INFINIA_AMI_ID}"
331
-
subnet_ids = ["${SUBNET_ID}"]
407
+
client_ami_id = "${INFINIA_AMI_ID}"
332
408
infinia_version = "${INFINIA_VERSION}"
333
-
enable_public_ip = "true"
334
-
root_device_size = 256
335
-
num_infinia_instances = "6"
409
+
num_infinia_instances = 6
410
+
num_client_instances = 1
336
411
instance_type_infinia = "m7a.2xlarge"
412
+
instance_type_client = "m7a.2xlarge"
413
+
414
+
# Storage configuration
415
+
use_ebs_volumes = true
416
+
ebs_volumes_per_vm = 4
337
417
ebs_volume_size = 128
338
-
infinia_deployment_name = "infinia-prod"
418
+
root_device_size = 256
419
+
420
+
# Other settings
421
+
enable_public_ip = true
339
422
bucket_name = "${BUCKET_NAME}"
340
-
ebs_volumes_per_vm = 4
423
+
EOF
424
+
```
425
+
426
+
**Option B - Create New VPC (Simpler setup):**
427
+
```bash
428
+
cat > terraform.tfvars << EOF
429
+
# Core configuration
430
+
aws_region = "us-west-2"
431
+
infinia_deployment_name = "infinia"
432
+
key_pair_name = "${KEY_NAME}"
433
+
434
+
# Create new VPC and subnets
435
+
create_vpc = true
436
+
vpc_cidr = "10.0.0.0/16"
437
+
subnet_cidrs = ["10.0.1.0/24", "10.0.2.0/24"]
438
+
439
+
# Instance configuration
440
+
infinia_ami_id = "${INFINIA_AMI_ID}"
441
+
client_ami_id = "${INFINIA_AMI_ID}"
442
+
infinia_version = "${INFINIA_VERSION}"
443
+
num_infinia_instances = 6
444
+
num_client_instances = 1
445
+
instance_type_infinia = "m7a.2xlarge"
446
+
instance_type_client = "m7a.2xlarge"
447
+
448
+
# Storage configuration
341
449
use_ebs_volumes = true
450
+
ebs_volumes_per_vm = 4
451
+
ebs_volume_size = 128
452
+
root_device_size = 256
453
+
454
+
# Other settings
455
+
enable_public_ip = false
456
+
bucket_name = "${BUCKET_NAME}"
342
457
EOF
343
458
```
459
+
460
+
>**Note:** Option B (create_vpc = true) is simpler as it handles all networking automatically. Option A gives you more control but requires pre-existing infrastructure.
0 commit comments