diff --git a/scripts/deployment/generateClusters.sh b/scripts/deployment/generateClusters.sh old mode 100644 new mode 100755 index 1cc6afe..daec723 --- a/scripts/deployment/generateClusters.sh +++ b/scripts/deployment/generateClusters.sh @@ -1,4 +1,4 @@ for i in $(seq 1 1 1) do pcluster create-cluster --region us-east-1 --cluster-name srwv2-cluster-$i --cluster-configuration srwcluster_nodeconfig_v1.yaml --rollback-on-failure false --debug - done \ No newline at end of file + done diff --git a/scripts/deployment/srwcluster_nodeconfig_v1.yaml b/scripts/deployment/srwcluster_nodeconfig_v1.yaml index 2d84705..c975fce 100644 --- a/scripts/deployment/srwcluster_nodeconfig_v1.yaml +++ b/scripts/deployment/srwcluster_nodeconfig_v1.yaml @@ -3,11 +3,11 @@ Region: us-east-1 Image: Os: ubuntu2004 - CustomAmi: ami-054e4bb4e3d9dc95e #Must modify + CustomAmi: ami-030cf29e6d5d8724a #Must modify HeadNode: InstanceType: c5.2xlarge Networking: - SubnetId: subnet-07bd52a747ba1e525 #Must modify + SubnetId: subnet-078043a467c391dfd #Must modify (public subnet) Ssh: KeyName: EPIC_RSA LocalStorage: @@ -21,7 +21,7 @@ HeadNode: - Policy: arn:aws:iam::aws:policy/AmazonS3FullAccess CustomActions: OnNodeConfigured: - Script: s3://epic-sandbox-srw/cluster_start_script_v3.sh #Must modify + Script: s3://epic-srw-sandbox/cluster_start_script_v3.sh #Must modify Scheduling: Scheduler: slurm SlurmSettings: @@ -45,13 +45,13 @@ Scheduling: MaxCount: 2 Networking: SubnetIds: - - subnet-07bd52a747ba1e525 #Must modify - AssignPublicIp: true + - subnet-078043a467c391dfd #Must modify + AssignPublicIp: false PlacementGroup: Enabled: true CustomActions: OnNodeConfigured: - Script: s3://epic-sandbox-srw/cluster_start_script_v3.sh #Must modify + Script: s3://epic-srw-sandbox/cluster_start_script_v3.sh #Must modify SharedStorage: - MountDir: /scratch Name: ebs diff --git a/srw-cluster.pkr.hcl b/srw-cluster.pkr.hcl index ea2fb04..20b29f8 100644 --- a/srw-cluster.pkr.hcl +++ b/srw-cluster.pkr.hcl @@ -2,6 +2,10 @@ # Variables for AWS builders ### +locals { + now = formatdate("YYYYMMDD-hhmmss", timestamp()) +} + #Add multiple regions: default = ["us-east-1","us-east-2"] variable "aws_ami_regions" { description = "List of regions to copy the AMIs to. Tags and attributes are copied along with the AMIs" @@ -46,9 +50,9 @@ variable "aws_source_ami_filter_ubuntu_2004_hvm" { owners = list(string) }) default = { - name = "ubuntu/images/hvm-ssd/ubuntu-focal-20.04-amd64-server-*" + name = "aws-parallelcluster-3.7.1-ubuntu-2004-lts-hvm-x86_64-202309151532 2023-09-15T15-36-35.608Z" owners = [ - "099720109477" + "247102896272" ] } } @@ -59,6 +63,7 @@ variable "aws_temporary_security_group_source_cidrs" { default = ["0.0.0.0/0"] } + ### # Variables for Azure builders ### @@ -88,7 +93,7 @@ variable "root_volume_size" { ### source "amazon-ebs" "base" { - ami_name = "srw-cluster-{{date}}.x86_64-gp3" + ami_name = "srw-cluster-${local.now}.x86_64-gp3" ami_regions = var.aws_ami_regions ami_users = var.aws_ami_users ami_groups = var.aws_ami_groups @@ -111,8 +116,8 @@ source "amazon-ebs" "base" { ssh_pty = true ssh_timeout = "60m" ssh_username = var.aws_ssh_username - subnet_id = "subnet-04bae583ce498ab48" - tags = { Name = "SRW-Cluster-{{date}}" } + subnet_id = "subnet-04d911e4b55853ef7" + tags = { Name = "SRW-Cluster-${local.now}" } temporary_security_group_source_cidrs = var.aws_temporary_security_group_source_cidrs }