{"id":26747119,"url":"https://github.com/hanchiang/market-data-notification-infra","last_synced_at":"2026-04-07T09:31:19.227Z","repository":{"id":114949135,"uuid":"584078120","full_name":"hanchiang/market-data-notification-infra","owner":"hanchiang","description":"Automate provision of cloud infrastructure and application deployment.","archived":false,"fork":false,"pushed_at":"2026-03-25T14:39:57.000Z","size":145,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-03-25T18:48:23.220Z","etag":null,"topics":["ansible","automation","aws","iac","packer","terraform"],"latest_commit_sha":null,"homepage":"https://www.yaphc.com/automating-infrastructure-provisioning-configuration-and-application-deployment","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hanchiang.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2023-01-01T08:40:03.000Z","updated_at":"2026-03-25T14:40:01.000Z","dependencies_parsed_at":"2023-11-21T14:01:10.284Z","dependency_job_id":"4f9650a6-7959-41c0-aeff-28cd4aade553","html_url":"https://github.com/hanchiang/market-data-notification-infra","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/hanchiang/market-data-notification-infra","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hanchiang%2Fmarket-data-notification-infra","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hanchiang%2Fmarket-data-notification-infra/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hanchiang%2Fmarket-data-notification-infra/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hanchiang%2Fmarket-data-notification-infra/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hanchiang","download_url":"https://codeload.github.com/hanchiang/market-data-notification-infra/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hanchiang%2Fmarket-data-notification-infra/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31507934,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T03:10:19.677Z","status":"ssl_error","status_checked_at":"2026-04-07T03:10:13.982Z","response_time":105,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["ansible","automation","aws","iac","packer","terraform"],"created_at":"2025-03-28T09:17:03.649Z","updated_at":"2026-04-07T09:31:19.223Z","avatar_url":"https://github.com/hanchiang.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Start workflow](https://github.com/hanchiang/market-data-notification-infra/actions/workflows/start_market_data_notification.yml/badge.svg)\n![Stop workflow](https://github.com/hanchiang/market-data-notification-infra/actions/workflows/stop_market_data_notification.yml/badge.svg)\n\nThis project is the infrastructure as code management for [Market data notification](https://github.com/hanchiang/market-data-notification) using AWS.\n\n# Structure\n* [`images/`](images): Packer files for building AMI\n    * `image.pkr.hcl`: Main packer script\n    * `scripts/`: Scripts to be run when provisioning AMI\n* [`instances/`](instances): Terraform files to provision EC2 in VPC\n    * `main.tf`: Main terraform script\n    * `ansible/`: Ansible scripts to run post-provisioning tasks such as mounting EBS volume, set up file system, copy postgres data, setup SSL for nginx \n    * `scripts/`: Scripts that automate the post-provisioning flow: EC2 start and stop, DNS updates, and backend deployment.\n\n\n# Workflow\n## 1. Provision EC2 AMI using packer\nProvisions a EBS-backed EC2 AMI, and install the necessary softwares for [Market data notification](https://github.com/hanchiang/market-data-notification):\n* redis\n* docker\n* nginx\n\ncd into [`images/`](images)  \nDefine variables that are declared in `image.pkr.hcl` in a new file `variables.auto.pkrvars.hcl`  \nBuild image: `packer build -machine-readable -var-file variables.auto.pkrvars.hcl image.pkr.hcl | tee build.log`\n\n## 2. Provision EC2 using terraform\ncd into [`instances/`](instances)  \nCopy the AMI ID from packer build, update it in `variables.tf`  \nProvision infra: `terraform apply`\n\nEverything from here onwards is handled in `instances/scripts/start.sh`\n\n## 3. Run ansible script\nRun post-provisioning configurations such as setting up DNS, configuring nginx SSL\n\n## 4. Deploy application\nRerun the latest deploy job in github action\n\n# Diagram\n![Workflow](readme-images/infra-workflow.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhanchiang%2Fmarket-data-notification-infra","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhanchiang%2Fmarket-data-notification-infra","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhanchiang%2Fmarket-data-notification-infra/lists"}