{"id":23364520,"url":"https://github.com/fission-codes/ipfs-cluster-aws","last_synced_at":"2025-07-13T17:34:11.655Z","repository":{"id":43701418,"uuid":"283869518","full_name":"fission-codes/ipfs-cluster-aws","owner":"fission-codes","description":null,"archived":false,"fork":false,"pushed_at":"2022-02-23T02:40:46.000Z","size":112,"stargazers_count":20,"open_issues_count":4,"forks_count":9,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-05-22T21:22:41.803Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fission-codes.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-07-30T20:22:27.000Z","updated_at":"2024-03-30T11:55:31.000Z","dependencies_parsed_at":"2022-08-22T19:20:18.400Z","dependency_job_id":null,"html_url":"https://github.com/fission-codes/ipfs-cluster-aws","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fission-codes%2Fipfs-cluster-aws","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fission-codes%2Fipfs-cluster-aws/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fission-codes%2Fipfs-cluster-aws/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fission-codes%2Fipfs-cluster-aws/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fission-codes","download_url":"https://codeload.github.com/fission-codes/ipfs-cluster-aws/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247354389,"owners_count":20925432,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-12-21T13:16:33.544Z","updated_at":"2025-04-07T22:27:45.344Z","avatar_url":"https://github.com/fission-codes.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"## [ipfs-cluster](https://cluster.ipfs.io/) on AWS\n\nDeploys a multi-region DNS-balanced TLS-enabled network of [ipfs-cluster](https://cluster.ipfs.io/) nodes running on [NixOS](https://nixos.org/) on AWS [EC2](https://aws.amazon.com/ec2/) cloud servers using [Terraform](https://www.terraform.io/).\n\nFirst, Install [nix](https://nixos.org/download.html), clone this repo and `cd` in.\n\n\n### Zero to Hero\n\nSet up or choose an existing, public [Route53 Hosted zone](https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/hosted-zones-working-with.html) to use for subdomains.\n\nGet or [create](https://docs.aws.amazon.com/IAM/latest/UserGuide/getting-started_create-admin-group.html) an AWS access key with appropriate permissions.\n\n[Configure](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#environment-variables) credentials and default region for Terraform's AWS provider. For example, using environment variables:\n\n```\nexport AWS_ACCESS_KEY_ID=\"...\"\nexport AWS_SECRET_ACCESS_KEY=\"...\"\nexport AWS_DEFAULT_REGION=\"us-west-2\"\n```\n\nSet Terraform [imput variable values](https://learn.hashicorp.com/terraform/getting-started/variables.html#assigning-variables), for example by copying [`terraform.tfvars.example`](terraform.tfvars.example) to `terraform.tfvars` and editing it. See `inputs.tf` for all variables and documentation. If you do not set variables, Terraform will ask you for the required ones on every run.\n\nStart the deployment:\n\n```\nnix-shell --run 'terraform apply'\n```\n\nRead the plan and accept it if you are satisfied. When the deployment is done, read the outputs. Access the gateway at https://__your-environment__-ipfs-cluster.__your-domain__/ .\n\nConnect to a server and run some commands:\n\n```\nssh root@\u003cyour-environment\u003e-ipfs-cluster-us-east-1-node0.\u003cyour-domain\u003e -i SECRET/private_key 'ipfs-cluster-ctl peers ls'\n```\n\nWhen you're done, don't forget to destroy the cloud resources so as not to waste power and money:\n\n```\nnix-shell --run 'terraform destroy'\n```\n\n\n### Develop\n\nStart the deployment shell to see a list of available commands:\n\n```\nnix-shell\n```\n\n\n### What? Where?\n\n- infrastructure\n  - [`main.tf`](main.tf) defines global cloud resources\n  - [`regions.tf`](regions.tf) instantiates resources per region\n  - [`ipfs-cluster-aws-region/main.tf`](ipfs-cluster-aws-region/main.tf) defines per-region AWS cloud resources (vpc, sg, acl, ec2, ebs, r53, etc.), ie. a network of cloud servers running NixOS\n- operating sysem configuration\n  - [`nixos/ipfs-cluster-aws.nix`](nixos/ipfs-cluster-aws.nix) is a NixOS profile for running an `ipfs-cluster` node on AWS EC2 with required services and configuration\n  - [`nixos/ipfs-cluster.nix`](nixos/ipfs-cluster.nix) is a NixOS module for configuring and running the `ipfs-cluster` service\n- deployment environment\n  - [`shell.nix`](shell.nix) is loaded by `nix-shell` and includes dependencies and scripts used for infrastructure deployment\n- [`nix/`](nix/) package definitions and dependencies\n  - [`sources.json`](nix/sources.json) locations and hashes managed by `niv`\n\n\n### Security\n\nThe Terraform state `terraform.tfstate` contains [sensitive data](https://www.terraform.io/docs/state/sensitive-data.html) such as the cluster secret. The state should be encrypted and may be [stored remotely](https://www.terraform.io/docs/state/remote.html).\n\nIf you don't specify a `public_key` variable, a private key without a passphrase is generated and saved to `SECRET/private_key`. For production use, generate a key with passphrase (stored in your keychain), specify this variable and let ssh find the private key, eg. via `.ssh/config`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffission-codes%2Fipfs-cluster-aws","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffission-codes%2Fipfs-cluster-aws","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffission-codes%2Fipfs-cluster-aws/lists"}