From ee769195c38253ddff8ed8092d38474da8505090 Mon Sep 17 00:00:00 2001 From: Adish M <44204658+adishM98@users.noreply.github.com> Date: Tue, 8 Jul 2025 16:23:03 +0530 Subject: [PATCH 1/2] feat: Update Packer configuration to use Ubuntu Jammy and adjust instance types and AMI settings (#13259) --- .github/workflows/packer-build.yml | 6 +++--- deploy/ec2/ee/setup_machine.sh | 1 + deploy/ec2/ee/tooljet_ubuntu_focal.pkr.hcl | 6 +++--- deploy/ec2/ee/variables.pkr.hcl | 4 ++-- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/packer-build.yml b/.github/workflows/packer-build.yml index 81fb71f11f..7c1dfbb583 100644 --- a/.github/workflows/packer-build.yml +++ b/.github/workflows/packer-build.yml @@ -69,7 +69,7 @@ jobs: with: command: build #The the below argument is specific for building EE AMI image - arguments: -color=false -on-error=abort -var ami_name=tooljet_${{ env.RELEASE_VERSION }}.ubuntu_focal + arguments: -color=false -on-error=abort -var ami_name=tooljet_${{ env.RELEASE_VERSION }}.ubuntu_jammy target: . working_directory: deploy/ec2/ee env: @@ -78,9 +78,9 @@ jobs: - name: Send Slack Notification run: | if [[ "${{ job.status }}" == "success" ]]; then - message="ToolJet enterprise AWS AMI published:\\n\`tooljet_${{ env.RELEASE_VERSION }}.ubuntu_focal\`" + message="ToolJet enterprise AWS AMI published:\\n\`tooljet_${{ env.RELEASE_VERSION }}.ubuntu-jammy\`" else - message="ToolJet enterprise AWS AMI release failed! \\n\`tooljet_${{ env.RELEASE_VERSION }}.ubuntu_focal\`" + message="ToolJet enterprise AWS AMI release failed! \\n\`tooljet_${{ env.RELEASE_VERSION }}.ubuntu-jammy\`" fi curl -X POST -H 'Content-type: application/json' --data "{\"text\":\"$message\"}" ${{ secrets.SLACK_WEBHOOK_URL }} \ No newline at end of file diff --git a/deploy/ec2/ee/setup_machine.sh b/deploy/ec2/ee/setup_machine.sh index 0173bd45c6..5dd6c635fd 100644 --- a/deploy/ec2/ee/setup_machine.sh +++ b/deploy/ec2/ee/setup_machine.sh @@ -118,4 +118,5 @@ npm install -g npm@10.9.2 # Building ToolJet app npm install -g @nestjs/cli +export NODE_OPTIONS='--max-old-space-size=8000' TOOLJET_EDTION=ee npm run build diff --git a/deploy/ec2/ee/tooljet_ubuntu_focal.pkr.hcl b/deploy/ec2/ee/tooljet_ubuntu_focal.pkr.hcl index 144803d55c..675c67f4b5 100644 --- a/deploy/ec2/ee/tooljet_ubuntu_focal.pkr.hcl +++ b/deploy/ec2/ee/tooljet_ubuntu_focal.pkr.hcl @@ -16,7 +16,7 @@ source "amazon-ebs" "ubuntu" { source_ami_filter { filters = { - name = "ubuntu/images/hvm-ssd/ubuntu-focal-20.04-amd64-server-*" + name = "ubuntu/images/hvm-ssd/ubuntu-jammy-22.04-amd64-server-*" root-device-type = "ebs" virtualization-type = "hvm" } @@ -30,7 +30,7 @@ source "amazon-ebs" "ubuntu" { launch_block_device_mappings { device_name = "/dev/sda1" - volume_size = 10 + volume_size = 30 delete_on_termination = true } @@ -47,7 +47,7 @@ build { } provisioner "file" { - source = "../../frontend/config/nginx.conf.template" + source = "../../../frontend/config/nginx.conf.template" destination = "/tmp/nginx.conf" } diff --git a/deploy/ec2/ee/variables.pkr.hcl b/deploy/ec2/ee/variables.pkr.hcl index 39dcdfd3cd..df994b2599 100644 --- a/deploy/ec2/ee/variables.pkr.hcl +++ b/deploy/ec2/ee/variables.pkr.hcl @@ -4,7 +4,7 @@ variable "ami_name" { variable "instance_type" { type = string - default = "t2.medium" + default = "t2.large" } variable "ami_region" { @@ -19,7 +19,7 @@ variable "ami_groups" { variable "ami_regions" { type = list(string) - default = ["us-west-1","us-east-1", "us-east-2", "eu-central-1", "ap-northeast-1", "ca-central-1"] + default = ["us-west-1"] } variable "PACKER_BUILDER_TYPE" { From ac5f3816de77842cad3e9136c3ce6387cdd34c19 Mon Sep 17 00:00:00 2001 From: Adish M Date: Tue, 8 Jul 2025 17:31:07 +0530 Subject: [PATCH 2/2] feat: Update ami_regions variable to include additional AWS regions --- deploy/ec2/ee/variables.pkr.hcl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy/ec2/ee/variables.pkr.hcl b/deploy/ec2/ee/variables.pkr.hcl index df994b2599..f18073b73b 100644 --- a/deploy/ec2/ee/variables.pkr.hcl +++ b/deploy/ec2/ee/variables.pkr.hcl @@ -19,7 +19,7 @@ variable "ami_groups" { variable "ami_regions" { type = list(string) - default = ["us-west-1"] + default = ["us-west-1","us-east-1", "us-east-2", "eu-central-1", "ap-northeast-1", "ca-central-1"] } variable "PACKER_BUILDER_TYPE" {