{"id":15304439,"url":"https://github.com/mensaah/reka","last_synced_at":"2025-04-14T23:12:51.993Z","repository":{"id":54764122,"uuid":"275106869","full_name":"MeNsaaH/reka","owner":"MeNsaaH","description":"A Cloud Resource management Tool to destroy, stop, resume, or clean up unsed resources","archived":false,"fork":false,"pushed_at":"2023-05-05T02:25:23.000Z","size":20658,"stargazers_count":53,"open_issues_count":12,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-14T23:12:46.757Z","etag":null,"topics":["aws","cloud","gcp","infrastructure","infrastructure-management"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MeNsaaH.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":"docs/supported-resources.md","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-06-26T08:17:56.000Z","updated_at":"2024-06-22T23:12:08.000Z","dependencies_parsed_at":"2024-06-19T01:35:34.243Z","dependency_job_id":"6a7e0616-4795-482a-8f7b-890aecb1c3a7","html_url":"https://github.com/MeNsaaH/reka","commit_stats":{"total_commits":44,"total_committers":2,"mean_commits":22.0,"dds":"0.045454545454545414","last_synced_commit":"594c056f7023ac3a53ad0e9530e0ae399f56e1c5"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MeNsaaH%2Freka","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MeNsaaH%2Freka/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MeNsaaH%2Freka/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MeNsaaH%2Freka/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MeNsaaH","download_url":"https://codeload.github.com/MeNsaaH/reka/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248975328,"owners_count":21192210,"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":["aws","cloud","gcp","infrastructure","infrastructure-management"],"created_at":"2024-10-01T07:56:08.771Z","updated_at":"2025-04-14T23:12:51.978Z","avatar_url":"https://github.com/MeNsaaH.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# reka \n\u003e Never forget that instance running again\n\n\u003cbr\u003e\n\n[![Build Status](https://github.com/mensaah/reka/workflows/Test/badge.svg)](https://github.com/mensaah/reka/actions)\n[![deploy](https://github.com/MeNsaaH/reka/workflows/deploy/badge.svg)](https://github.com/mensaah/reka/actions)\n\n\nA Cloud Infrastructure Management Tool to stop, resume, clean and destroy resources based on tags. Reka uses a config to determine what actions should be taken on resources. It can prove to be a cost management tool where you can stop your tests environments during breaks, holidays and non-working hours. It can also be a nuke tool to nuke an account. It currently supports both AWS and GCP. A full list of supported resources can be found [here](./docs/supported-resources.md) \n\n#### What It can do\n- Stop/Resume resources for example stopping an EC2 instance or resizing an EKS cluster to 0.\n- Destroy/Terminate resources \n- Clean Up unused resources (such as EBS volumes, Elastic IPs)\n\n#### Project Name\n`REKA` is derived from a Native Nigerian Language, Igbo, meaning `Reap`|`Tear Down`.\n\n### BEWARE!\n\nThis tool is **HIGHLY DESTRUCTIVE** and deletes cloud resources! This should be used in environments with **WITH CAUTION**.\n\n\n## Table of Contents\n- [Getting Started](#getting-started)\n  - [Installation](#installation)\n- [Usage](#usage)\n  - [Authentication](#authentication)\n  - [Rules](#rules)\n  - [Excluding Resources](#excluding-resources)\n- [RoadMap](#roadmap)\n- [Contributing](#contributing)\n\n\n\n## Getting Started\n### Installation\n#### Binary\n\nThe Reka binary can be downloaded from the [Releases](https://github.com/mensaah/reka/releases) and executed directly on its respective OS.\n\n#### Docker\n\nThe reka image is also available on DockerHub. \n```bash\n    docker pull mensaah/reka\n```\nIf `config.yaml` is in the current directory, reka can be executed as:\n\n```bash\n    docker run -it -e AWS_ACCESS_KEY -e AWS_SECRET_ACCESS_KEY\\\n        -v `pwd`:/config mensaah/reka --config /config/config.yaml\n```\n\n#### Go\nReka can also be installed like a regular golang Binary if go is installed\n\n```bash\ngo get -u github.com/mensaah/reka\n```\n\n## Usage\n\nReka uses a config file to know what resources to target and the actions to be taken for such resources. [Here](./docs/config.example.yaml) is an example configuration file that Reka uses.\n\n```bash\n    reka --config config.yaml\n\n    # To run without destroying any instance, basically just stops, resumes resources\n    reka --config config.yaml --disable-destroy\n\n    # To see full range of commands that can executed with reka\n    reka help\n\n    # View supported resources\n    reka resources\n```\n###  Authentication\n- AWS\nTo use AWS Provider, you need to either have your aws credentials setup or export `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY` and optionally `AWS_SESSION_TOKEN` (optional).\n\n- GCP\nYou can authenticate to GCP Provider by providing by setting the environment variable `GOOGLE_APPLICATION_CREDENTIALS` which is the path to the service account credentials. If `gcloud` is configured, the `gcloud` profile can also be used\n\n### Rules\nReka supports different resource rules. These are usually in the form:\n\n```yaml\nrules:\n  - name: \u003cRULE_NAME\u003e\n    # Target specific resource types\n    target:\n      - resource-targets\n    tags:\n      tagKey1: tagValue1\n      tagKey2: tagValue2\n    condition:\n        CONDITIONS\n```\nConditions needs to be met before the action is taken on the resource.\n- #### Stopping and Resuming instances within active Hours\nThis configuration sets that EC2 and EKS resources with tag `env = staging` needs to be active only within 7am - 7pm from Mondays to Fridays. When reka runs in any time outside that, the resource is stopped if stoppable and resumed once the condition is met.\n\n```yaml\nrules:\n  - name: stop all staging instances after work and during weekends \n    tags:\n      env: staging\n    resources:\n    - aws.ec2\n    - aws.eks\n    region: \"us-east-2\"\n    condition:\n      activeDuration: \n        startTime: \"7:00\"\n        stopTime: \"19:00\"\n        startDay: Monday\n        stopDay: Friday\n```\nSpecifying the `resources` list in any rule only applies the rules to those resources alone.\n\n- #### Destroying instances after a particular time\n\n```yaml\nrules:\n  - name: nuke all demo instances 2 weeks after demo october 9th (staging)\n    tags:\n      env: test\n      project: proj-demo\n    condition:\n      terminationDate: \"2021-10-23 01:00\"\n```\n\n- #### Deleting unused Resources\n\n```yaml\nrules:\n  - name: Delete all unused instances\n    condition:\n     terminationPolicy: unused\n```\n\n\n### Excluding Resources\nYou can additionally exclude resources which will make Reka not to act on those resources even when the satisfy a condition and a rule.\n```yaml\n\nexclude:\n  - name: Exclude resources with prod tags in us-east-2\n    region: \"us-east-2\"\n    tags:\n        env: prod\n\n  - name: Exclude CI EC2 Instances on staging\n    tags:\n      env: staging\n      ci-runner: true\n    resources:\n      - aws.ec2\n```\n\n\n## RoadMap\n- [x] Schedule resource refreshing\n- [x] generate Sample Yaml config and load config\n- [x] [Persist state to remote sources](https://github.com/MeNsaaH/reka/issues/4)\n- [ ] [Add More AWS Resources](https://github.com/MeNsaaH/reka/issues/1)\n- [ ] [Add More GCP Resources](https://github.com/MeNsaaH/reka/issues/2)\n- [ ] [Add MoreAzure Resources](https://github.com/MeNsaaH/reka/issues/6)\n- [ ] [Create Web Dashboard to ease running reka](https://github.com/MeNsaaH/reka/issues/3)\n- [ ] Tests 😆😆😆\n\n\n## Contributing\nPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmensaah%2Freka","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmensaah%2Freka","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmensaah%2Freka/lists"}