{"id":26136205,"url":"https://github.com/cpfriend1721994/foudationdb-deploy-aws","last_synced_at":"2026-04-24T04:33:50.845Z","repository":{"id":37704972,"uuid":"241261463","full_name":"cpfriend1721994/foudationdb-deploy-aws","owner":"cpfriend1721994","description":"Deploy FoundationDB on AWS using Terraform + Packer","archived":false,"fork":false,"pushed_at":"2020-02-18T03:18:05.000Z","size":88855,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-26T16:37:05.121Z","etag":null,"topics":["ami","aws","foundationdb","foundationdb-clusters","packer","terraform"],"latest_commit_sha":null,"homepage":"","language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cpfriend1721994.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-02-18T03:15:09.000Z","updated_at":"2025-05-09T06:31:37.000Z","dependencies_parsed_at":"2022-09-09T11:03:04.501Z","dependency_job_id":null,"html_url":"https://github.com/cpfriend1721994/foudationdb-deploy-aws","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cpfriend1721994/foudationdb-deploy-aws","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cpfriend1721994%2Ffoudationdb-deploy-aws","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cpfriend1721994%2Ffoudationdb-deploy-aws/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cpfriend1721994%2Ffoudationdb-deploy-aws/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cpfriend1721994%2Ffoudationdb-deploy-aws/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cpfriend1721994","download_url":"https://codeload.github.com/cpfriend1721994/foudationdb-deploy-aws/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cpfriend1721994%2Ffoudationdb-deploy-aws/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32209893,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-24T03:15:14.334Z","status":"ssl_error","status_checked_at":"2026-04-24T03:15:11.608Z","response_time":64,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ami","aws","foundationdb","foundationdb-clusters","packer","terraform"],"created_at":"2025-03-11T00:56:50.845Z","updated_at":"2026-04-24T04:33:50.830Z","avatar_url":"https://github.com/cpfriend1721994.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# About\n\nThe purpose of this project is to make it easy to run various load\ntests on systems with FoundationDB in the cloud.\n\nWe can achieve that by:\n\n1. \"Prebaking\" cloud-specific VM images for the FoundationDB cluster\n   nodes along with the tester nodes and machines for capturing the\n   telemetry.\n2. Using these images to quickly create FoundationDB clusters with the\n   specific configuration.\n\nThe first step is handled by the [Packer](https://www.packer.io), the\nsecond - by the [Terraform](https://www.terraform.io).\n\nWe want to start with a fixed topology:\n\n- foundationDB nodes in the same network, forming a cluster;\n- tester machines connected to the FDB.\n\nNumber and VM type for the node and load tester machines could be\nchanged within the configuration.\n\n\n# Creating AMIs\n\nFirst you need to create packer images for FDB and tester\nmachines. \n\nNote, that in this setup we actually create a temporary EC2 instance\nin the cloud, install all the dependencies there, make a snapshot\n(AMI) and kill the original machine. With these snapshots we could\nthen quickly launch a dozen of EC2 instances, connecting them into a\ncluster.\n\nYou can create a FoundationDB AMI like this (make sure to fill in your\nAWS credentials):\n\n```\n$ export AWS_ACCESS_KEY=\"\"\n$ export AWS_SECRET_KEY=\"\"\n$ cd packer-fdb\n$ packer build --only=aws packer.json\n```\n\nTester AMI can be created exactly like this but you enter\n`packer-tester` folder instead.\n\n## Creating Docker\n\nShould you want to create docker images instead of AMIs, you can do so\nvia:\n\n```\n$ cd packer-fdb\n$ packer build --only=docker packer.json\n```\n\n# Deploying Clusters\n\n## Setup Terraform\n\nBefore deploying pre-baked images into AWS you need to configure your\nworking copy first. Install Terraform, then go to the `terraform`\nfolder of this repository and execute:\n\n```\n$ terraform init\n```\n\nThen, you would need to create a file `.secret.aws.tfvars`, filling it\nwith your AWS credentials:\n\n```\naws_access_key = \"\"\naws_secret_key = \"\"\naws_account_id = \"\"\n```\n\nAfterwards you would also need to create a new ssh key called\n`terraform` and place it into your `~/.ssh/` folder. Terraform will\ninstall it into all the new machines, making it possible for you to\nconnect to them via ssh.\n\nYou can do that with:\n\n```\n$ ssh-keygen -t rsa -b 4096 -C \"terraform\" -f \"$HOME/.ssh/terraform\"\n```\n\n## Deploy a cluster\n\nIn order to deploy a cluster you would need to execute the following\nin the `terraform` folder:\n\n```\n# prepare terraform plan, using a separate file with the credentials\n$ terraform plan -var-file=.secret.aws.tfvars -out my.plan\n# carry out the plan\n$ terraform apply \"my.plan\"\n```\n\nThe process should take 3-4 minutes and print out in the end something\nlike this:\n\n```\naws_instance.fdb[0]: Creation complete after 3m32s (ID: i-0b90a62a90636c1ad)\n\nApply complete! Resources: 12 added, 0 changed, 0 destroyed.\n\nOutputs:\n\nfdb_address = [\n    fdb-01.amazonaws.com,\n    fdb-02.amazonaws.com,\n    fdb-03.amazonaws.com\n]\ntester_address = [\n    tester-01.amazonaws.com\n]\n```\n\nNote that the machine names would be different each time (and much\nlonger). This is just a sample output.\n\nCongratulations, you now have a FoundationDB cluster running in\nAWS. You can test it by connecting to the test machine with your\nterraform key:\n\n```\n$ ssh -i ~/.ssh/terraform ubuntu@tester-01.amazonaws.com\n```\n\nOn your first connection, the ssh might ask you about accepting the\nnew fingerprint. This happens because we have a brand new server\nrunning. Just type in 'yes'.\n\nOnce connected to the test machine, you could verify that the client\ntools are installed and the cluster is responding:\n\n```\n$ fdbcli\nUsing cluster file `/etc/foundationdb/fdb.cluster'.\n\nThe database is available.\n\nWelcome to the fdbcli. For help, type `help'.\nfdb\u003e status details\n\nUsing cluster file `/etc/foundationdb/fdb.cluster'.\n\nConfiguration:\n  Redundancy mode        - double\n  Storage engine         - ssd-2\n  Coordinators           - 3\n  \n...\n```\n\nCongratulations, FDB cluster is up and running!\n\n# Destroy the cluster\n\nKeeping AWS instances running costs money. So generally it is advised\nto destroy all the resources after the experiment.\n\nTerraform makes it easy:\n\n```\n$ terraform destroy -var-file=.secret.aws.tfvars\n\n....\n\nPlan: 0 to add, 0 to change, 12 to destroy.\n\nDo you really want to destroy?\n  Terraform will destroy all your managed infrastructure, as shown above.\n  There is no undo. Only 'yes' will be accepted to confirm.\n\n  Enter a value: yes\n  \n....\n\nDestroy complete! Resources: 12 destroyed.\n\n```\n\n\n# Modify the cluster\n\nYou can tune the cluster configuration by editing `variables.tf` file\nto your liking. Ideally, you would do that before creating a new\ncluster.\n\nThe most important options there are:\n\n```\nvariable \"aws_fdb_size\" {\n  default = \"t2.medium\"\n  description = \"machine type to run FoundationDB servers\"\n\n}\n# using only 1 machine will conflict with the default cluster config\n# 'configure new memory double'\nvariable \"aws_fdb_count\" {\n  default = 3\n  description = \"how many machines do we want in our cluster. Minimum 2\"\n}\n\nvariable \"aws_tester_size\" {\n  default = \"m4.xlarge\"\n  description = \"instance type for launching tester machines\"\n}\n```\n\n\n# Plans\n\nI plan to improve this repository a bit later by:\n\n1. Introducing a load tester tool (pre-installed to the tester image)\n   with common benchmarks.\n2. Adding a few scripts to visualize the results.\n3. Adding more Terraform configurations tuned for better performance.\n\n# Contact\n\nIf you have any questions, please don't hesitate to get in touch by\nsending an email to rinat at abdullin.com.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcpfriend1721994%2Ffoudationdb-deploy-aws","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcpfriend1721994%2Ffoudationdb-deploy-aws","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcpfriend1721994%2Ffoudationdb-deploy-aws/lists"}