{"id":16143156,"url":"https://github.com/johnbedeir/openeye_task","last_synced_at":"2026-03-18T18:04:28.573Z","repository":{"id":103782125,"uuid":"596595450","full_name":"johnbedeir/openeye_task","owner":"johnbedeir","description":null,"archived":false,"fork":false,"pushed_at":"2023-02-03T19:48:30.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-10T03:43:36.994Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/johnbedeir.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":"2023-02-02T14:29:19.000Z","updated_at":"2023-02-02T14:31:04.000Z","dependencies_parsed_at":null,"dependency_job_id":"abc2c03e-c559-4aab-bb31-b241c51b3743","html_url":"https://github.com/johnbedeir/openeye_task","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/johnbedeir/openeye_task","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnbedeir%2Fopeneye_task","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnbedeir%2Fopeneye_task/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnbedeir%2Fopeneye_task/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnbedeir%2Fopeneye_task/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/johnbedeir","download_url":"https://codeload.github.com/johnbedeir/openeye_task/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnbedeir%2Fopeneye_task/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29257764,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-09T04:11:57.159Z","status":"ssl_error","status_checked_at":"2026-02-09T04:11:56.117Z","response_time":56,"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":[],"created_at":"2024-10-10T00:08:45.278Z","updated_at":"2026-02-09T06:03:11.754Z","avatar_url":"https://github.com/johnbedeir.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Create Ubuntu EC2 on AWS using Terraform\n\n## Terraform Steps:\n\n### 1. Intsall [Terraform CLI](https://www.terraform.io/downloads)\n\n### 2. Create providers.tf file\n```bash\n# Which containes the provider information\n```\n### 3. Initialize the directory\n```bash\n# Make sure you are in the directory that contains the tf files then do the follosing:\nterraform init\n```\n\n### 4. Create main.tf file\n```bash\n# That containes the resources that you will build ex: EC2 instence specs\n```\n\n### 5. Create security.tf file\n```bash\n# That containes the security group attached to the ec2 instence \n# Also the keypair that will be used to connect on the ec2 instence\n```\n\n### 6. Create variables.tf file\n```bash\n# That containes all the variables with the data that will be shared on the version control\n```\n\n### 7. Create terraform.tfvars file \n```bash\n# That contains the variables that you will not share it on the version control\n# Add your public ssh key to the terraform.tfvars\n# Remember to add the tfvars file to .gitignore file\n```\n\n## 8. Check what will be created before applying \n```bash\n# This command is to check and show if there is an error before applying it \nterraform plan\n```\n\n### 9. Build the Infrastructure \n```bash\n# This command is start building the infrastructure on the cloud  \nterraform apply # It will first show your the plan then you have to type yes to build\n# OR \nterraform apply -auto-approve # To plan and apply changes without confirming\n```\n\n### 10. Connect to the created EC2 instence\n```bash\n# Make sure you are in the directory where the keypair was downloaded   \nssh -i \"file.pem\" \u003cubuntu@PublicIP\u003e\n```\n\n### 11. Destroy created resources\n```bash\n# This command will show you first what it will destroy then ask you to type yes to confirm\nterraform destroy\n# OR\nterraform destroy -auto-approve # To immediately destroy all the created resources without confirming \n```\n\n## EC2 Provisioning:\n\n### 1. Use the `script.sh`\nCreate a `script.sh` file on the EC2 which will install docker, add docker to sudo group and create docker volumes\n```\nvim scipt.sh\n```\nCopy and Past the data inside the `script.sh` in the current directory\n\nMake sure the created script has executable permission using the following command:\n```\nchmod +x script.sh\n```\nRun the Script:\n```\n./script.sh\n```\n## Run the Application\n### Option 1:\nUse either the following command to run a container without volumes exposing the application to port 8080:\n```\ndocker run -it -p 80:80 -p 3306:3306 appertaopeneyes/web-allin1\n```\n### Option 2:\nOr the following command using the created docker volumes:\n```\ndocker run -it --name \"openeyes\" -v oe-web:/var/www/openeyes -v oe-db:/var/lib/mysql -p 80:80 -p 3306:3306 appertaopeneyes/web-allin1\n```\n\n## Accessing Application\n`Replace the PublicIP with the real EC2 PublicIP you get from the following command:`\n```\nterraform output\n```\nNavigate to the browser and open the following URL : `http://EC2_PublicIP`\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnbedeir%2Fopeneye_task","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjohnbedeir%2Fopeneye_task","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnbedeir%2Fopeneye_task/lists"}