{"id":22138257,"url":"https://github.com/z0mbix/screeningtest-infrastructure","last_synced_at":"2025-03-24T10:26:18.750Z","repository":{"id":139776715,"uuid":"55923208","full_name":"z0mbix/screeningtest-infrastructure","owner":"z0mbix","description":"Screening Test Infrastructure Configuration","archived":false,"fork":false,"pushed_at":"2016-04-10T21:27:59.000Z","size":49,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-29T15:50:43.567Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","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/z0mbix.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}},"created_at":"2016-04-10T21:22:39.000Z","updated_at":"2016-04-10T21:23:25.000Z","dependencies_parsed_at":null,"dependency_job_id":"e0c3aff1-5308-41de-9c51-74516dbc8f66","html_url":"https://github.com/z0mbix/screeningtest-infrastructure","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/z0mbix%2Fscreeningtest-infrastructure","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/z0mbix%2Fscreeningtest-infrastructure/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/z0mbix%2Fscreeningtest-infrastructure/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/z0mbix%2Fscreeningtest-infrastructure/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/z0mbix","download_url":"https://codeload.github.com/z0mbix/screeningtest-infrastructure/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245251104,"owners_count":20584828,"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-01T20:09:15.244Z","updated_at":"2025-03-24T10:26:18.722Z","avatar_url":"https://github.com/z0mbix.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"Screening Test Infrastructure\n-----------------------------\n\nThis repo sets up the following infrastructure on DigitalOcean:\n\n- 1 x nginx web/load balancer server (web-1)\n- 2 x golang app servers (app-{1,2})\n\nAll servers are Ubuntu 14.04.\n\nTerraform is used to provision the servers, and uses cloud-init to install, configure and run chef-client, so the servers can register with the Chef server and configure themselves according to their role.\n\nChef uses the git resource to clone the [screeningtest-app](https://github.com/z0mbix/screeningtest-app) GitHub repo, and uses a simple Makefile to build the go binary. It then creates an upstart init script to manage the service. Chef will pull the latest master branch of this repo, and if there are any changes, it will rebuild the binary and restart the process.\n\n\n## Requirements\n\n - Linux or Mac OS\n - Terraform\n - ChefDK\n - Hosted Chef account (Including validation key)\n\nCreate the file **modules/common/terraform.tf** containing your validation key e.g.:\n\n    output \"validation_key\" {\n        value = \u003c\u003cEOF\n        -----BEGIN RSA PRIVATE KEY-----\n        ...\n        -----END RSA PRIVATE KEY-----\n    EOF\n    }\n\nYou can use the sample file **modules/common/terraform.tf.sample** to help create this.\n\n## Chef\n\nThis repo uses the following supermarket cookbooks:\n\n - apt\n - golang\n\nIt also requires the custom 'screeningtest' cookbook with the following two recpies:\n\n - screeningtest::web\n - screeningtest::app\n\nThese need to be uploaded to the Hosted Chef server using knife. Knife is configured to use the organisation 'screeningtest' in the **chef-repo/.chef/knife.rb** file.\n\n    $ cd chef-repo\n    $ chef exec knife cookbook upload -a\n\nThere are two roles:\n\n - web\n - app\n\n\n## DigitalOcean\n\nFor Terraform to be able to use the DigitalOcean API, you need to export\nyour API token with:\n\n    $ export DIGITALOCEAN_TOKEN=XXXX\n\n\n## Creating the infrastructure\n\nYou can perform a dry-run of what Terraform will do by running:\n\n    $ make plan\n\nWhen you are ready to create everything just run:\n\n    $ make apply\n\n\n## Destroying the infrastructure\n\nOnce you are finished with all the resources, simply destroy them with:\n\n    $ make destroy\n\n\n## Help\n\nThe **Makefile** is self-documenting so you can see the available targets with:\n\n    $ make help\n    apply                          Create the infrastructure/resources\n    destroy                        Destroy all resources\n    help                           See all the Makefile targets\n    plan                           Perform a terraform dry-run\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fz0mbix%2Fscreeningtest-infrastructure","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fz0mbix%2Fscreeningtest-infrastructure","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fz0mbix%2Fscreeningtest-infrastructure/lists"}