{"id":20445706,"url":"https://github.com/mcstanley/efi-recruitment","last_synced_at":"2026-04-07T08:01:33.274Z","repository":{"id":242764231,"uuid":"810485805","full_name":"McStanley/efi-recruitment","owner":"McStanley","description":"Eficode DevOps challenge task","archived":false,"fork":false,"pushed_at":"2024-06-05T11:56:51.000Z","size":176,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-05T08:45:21.613Z","etag":null,"topics":["ansible","aws","aws-ec2","devops","docker","docker-compose","nginx","terraform"],"latest_commit_sha":null,"homepage":"http://18.195.35.90","language":"JavaScript","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/McStanley.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":"2024-06-04T19:39:55.000Z","updated_at":"2024-06-05T12:19:35.000Z","dependencies_parsed_at":"2024-06-04T22:20:10.192Z","dependency_job_id":"aaa9462d-f8d6-4608-89c1-ef23225990dc","html_url":"https://github.com/McStanley/efi-recruitment","commit_stats":null,"previous_names":["mcstanley/efi-recruitment"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/McStanley/efi-recruitment","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/McStanley%2Fefi-recruitment","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/McStanley%2Fefi-recruitment/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/McStanley%2Fefi-recruitment/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/McStanley%2Fefi-recruitment/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/McStanley","download_url":"https://codeload.github.com/McStanley/efi-recruitment/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/McStanley%2Fefi-recruitment/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31504897,"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","aws","aws-ec2","devops","docker","docker-compose","nginx","terraform"],"created_at":"2024-11-15T10:13:39.179Z","updated_at":"2026-04-07T08:01:33.251Z","avatar_url":"https://github.com/McStanley.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# EFI DevOps Recruitment Task\n\nThis project is a solution to the Eficode DevOps [challenge task](https://github.com/mf-efi/recruitment-2024).\n\n## Environment Variables\n\nTo run this project, you will need to add the following environment variables to your **.env** file:\n\n- `ENDPOINT`\n\n- `APPID`\n\n- `TARGET_CITY` (optional)\n\nRefer to **.env.example** for more information.\n\n## Deployment\n\nTo deploy this project follow below instructions:\n\n### Prerequisites\n\n- Create AWS account\n- Install [AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html) and [AWS Vault](https://github.com/99designs/aws-vault#readme)\n- Install [Docker](https://docs.docker.com/engine/install/)\n- Install [Terraform](https://developer.hashicorp.com/terraform/tutorials/aws-get-started/install-cli)\n- Install [Ansible](https://docs.ansible.com/ansible/latest/installation_guide/installation_distros.html)\n\n### Configure AWS CLI and AWS Vault\n\n1. In AWS Console: **Services \u003e IAM \u003e Users \u003e Create user**\n2. User name: **efi-recruitment-user**, then next.\n3. Create group **efi-recruitment-group** with **AdministratorAccess** permission policy, then select it from the list and click next.\n4. Review user details, then **Create user**.\n5. Click on newly created user to open it.\n6. In summary section click **Create access key**.\n7. Select **Command Line Interface (CLI)** as use case and check the confirmation box, then next.\n8. Set description tag to **efi-recruitment-key**, then create access key.\n9. Open the terminal and run the following command:\n\n   ```bash\n   aws configure\n   --------------\n   AWS Access Key ID: # paste from AWS console\n   AWS Secret Access Key: # paste from AWS console\n   Default region name: # eu-central-1\n   Default output format: # yaml\n   ```\n\n10. Run the following command:\n\n    ```bash\n    aws-vault add efi-recruitment-user\n    --------------\n    Enter Access Key ID: # paste from AWS console\n    Enter Secret Access Key: # paste from AWS console\n    ```\n\n11. Run the following command:\n\n    ```bash\n    aws-vault exec efi-recruitment-user\n    ```\n\n### Create a key pair\n\n1. In AWS Console: **Services \u003e EC2 \u003e Key pairs \u003e Create key pair**\n2. Set name to **efi-recruitment-key** and leave default settings (RSA, .pem), then **Create key pair**.\n3. Download the key and note its location for later use.\n\n### Provision EC2 instance with Terraform\n\n1. Open the terminal and `cd` into `./terraform`.\n2. Make sure you are authenticated by running the command:\n\n   ```bash\n   aws-vault exec efi-recruitment-user\n   ```\n\n3. Run the following command to initialize:\n\n   ```bash\n   terraform init\n   ```\n\n4. Run the following command to set up infrastructure:\n\n   ```bash\n   terraform apply\n   ```\n\n   ... then specify values of the required variables (region, key_name, instance_name, sg_name). You may follow the given suggestions for each of them.\n\n5. Enter `yes` to confirm the operation.\n\n### Configure environment with Ansible\n\n1. Update `ENDPOINT` environment variable in `.env` to reflect your instance's public IPv4 address.\n2. Create `hosts.ini`inside `./ansible`. Refer to `hosts.ini.example` and remember to replace placeholder values with your EC2 instance's public IPv4 address and a path to your key.\n3. Run the following command inside `./ansible` to execute the playbook:\n\n   ```bash\n   sudo ansible-playbook provision_efi.yaml -i hosts.ini\n   ```\n\n4. Specify path to local project directory when prompted.\n\n### Enjoy your deployment\n\nTo see your deployment live, copy the public IPv4 address of your EC2 instance and open it in the browser.\n\n## Run locally\n\n1. Install and start [Docker Desktop](https://docs.docker.com/desktop/).\n2. From project root directory run:\n\n   ```bash\n   docker compose up --build\n   ```\n\n3. Open \u003chttp://localhost:8000\u003e to see it live.\n\n## Inspect my deployment\n\n1. Find the current IP address of my deployment inside the _About_ section at the top of this repository.\n2. Execute the following command:\n\n   ```bash\n   ssh -i /path/to/id_rsa_internship.pem ubuntu@\u003cIPv4\u003e\n   ```\n\n   ... replacing the placeholder with the appropriate IP address.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmcstanley%2Fefi-recruitment","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmcstanley%2Fefi-recruitment","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmcstanley%2Fefi-recruitment/lists"}