diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..dd84ea7 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,38 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: '' +assignees: '' + +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior: +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Desktop (please complete the following information):** + - OS: [e.g. iOS] + - Browser [e.g. chrome, safari] + - Version [e.g. 22] + +**Smartphone (please complete the following information):** + - Device: [e.g. iPhone6] + - OS: [e.g. iOS8.1] + - Browser [e.g. stock browser, safari] + - Version [e.g. 22] + +**Additional context** +Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..bbcbbe7 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,20 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: '' +assignees: '' + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..ba63efd --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,45 @@ +## Description + + +## What type of PR(Pull Request) is this? +- [ ] 🐛 Bug Fix +- [ ] 🍕 New Feature +- [ ] 🔥 Performance Improvement +- [ ] 📝 Documentation update +- [ ] ✅ Test +- [ ] 🤖 Build +- [ ] 📦 Release +- [ ] 🔁 CI/CD +## Added to documentation? +- [ ] 📜 README.md +- [ ] 🤝 CONTRIBUTING.md +- [ ] 🙅 no documentation needed + +## Bug Fix +1. [ ] Explain how you addressed the issue. +2. [ ] Ensure the issue is linked in your description using "Fixes #XXXX." +## New Feature +1. [ ] Provide a clear explanation of your new feature. +2. [ ] Include relevant tests for the new feature. +3. [ ] Confirm successful local testing of your changes. +4. [ ] Update the relevant documentation (if applicable). +## Performance Improvement +1. [ ] Confirm successful local testing of the performance improvement. +2. [ ] If possible, include metrics demonstrating the improvement. + +## General Notes +1. Ensure your PR is not a duplicate. +2. If not, make sure that: + 1. Changes are in a separate branch with a descriptive name (e.g., `fix-cost-command` or `feature-add-newCommand`). + 2. Commit message has a short, descriptive title. +3. **After** these steps,open a pull request. + 1. Target the `contributor` branch, not `main`. + 2. Resolve any GitHub workflow test errors before committing. + 3. Include "closes #XXXX" in your comment to auto-close the relevant issue (if applicable). + 3. Describe your changes. + 4. Put the "closest #XXXX" text in your comment to auto-close the issue your PR is fixing (if such). + + +IMPORTANT: Please review the [CONTRIBUTING.md](../CONTRIBUTING.md) file for detailed contributing guidelines. + + diff --git a/.github/assets/Kaytu-New-Logo.svg b/.github/assets/Kaytu-New-Logo.svg new file mode 100644 index 0000000..9843c53 --- /dev/null +++ b/.github/assets/Kaytu-New-Logo.svg @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.github/assets/kaytu.gif b/.github/assets/kaytu.gif new file mode 100644 index 0000000..bb491b6 Binary files /dev/null and b/.github/assets/kaytu.gif differ diff --git a/.github/assets/kaytu.svg b/.github/assets/kaytu.svg new file mode 100644 index 0000000..6639ac4 --- /dev/null +++ b/.github/assets/kaytu.svg @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.github/assets/kaytuIcon.svg b/.github/assets/kaytuIcon.svg new file mode 100644 index 0000000..cb86a35 --- /dev/null +++ b/.github/assets/kaytuIcon.svg @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml new file mode 100644 index 0000000..8654c83 --- /dev/null +++ b/.github/workflows/main.yaml @@ -0,0 +1,71 @@ +name: Release + +on: + push: + branches: + - main + +jobs: + tag: + runs-on: ubuntu-latest + outputs: + latest_tag: ${{ steps.set_latest_tag.outputs.latest_tag }} + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + token: ${{ secrets.GH_TOKEN }} + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: stable + - name: Tag version + id: tag_version + uses: mathieudutour/github-tag-action@v6.1 + with: + github_token: ${{ secrets.GH_TOKEN }} + release_branches: main + tag_prefix: v + - name: Set latest tag output + id: set_latest_tag + run: | + if [[ -z "${{ steps.tag_version.outputs.new_tag }}" ]]; then + echo "latest_tag=${{ steps.tag_version.outputs.previous_tag }}" >> "$GITHUB_OUTPUT" + else + echo "latest_tag=${{ steps.tag_version.outputs.new_tag }}" >> "$GITHUB_OUTPUT" + fi + - name: Save new tag + id: save_new_tag + run: | + version=${{ steps.tag_version.outputs.new_tag }} + version=${version#v} + echo $version > new_tag.txt + - name: Upload new tag + uses: actions/upload-artifact@v2 + with: + name: new_tag + path: new_tag.txt + release: + runs-on: ubuntu-latest + needs: + - tag + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + token: ${{ secrets.GH_TOKEN }} + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: stable + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v5 + with: + distribution: goreleaser + version: latest + args: release --clean + env: + GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} + diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..423dc8d --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +.idea +.kaytu +cli \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..c19b47f --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,19 @@ +

Welcome! Thank you for your interest in contributing to Kaytu

+ +Thank you for considering contributing to our open source project! Taking a moment to review this document will not only streamline the contribution process but also foster a collaborative and effective environment for everyone involved. + +Adhering to these guidelines demonstrates your respect for the time and effort invested by the developers who manage and contribute to this project. By following these recommendations, you contribute to a smoother collaboration, and in return, you can expect the same level of respect when your issues are addressed or your patches and features are assessed. + +## Code guidelines +Client-Side Implementation with CLI (Cobra Packages) + +When working on the client side, which is implemented using CLI through Cobra packages, refer to [this link](https://github.com/spf13/cobra) for guidance on adding new commands. +for adding new command : + +1- cmd File Structure: + +Inside the cmd directory, you'll find two main files: cost and ingestion. These files are directly related to the cost and ingestion commands in the CLI. + +2- Cost and Ingestion Subsets: + +Within the cmd directory, you can extend functionality by adding desired commands or flags to the cost and ingestion subsets. Follow the structure provided by Cobra packages for seamless integration. \ No newline at end of file diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..4c12d2f --- /dev/null +++ b/LICENSE @@ -0,0 +1,28 @@ +Copyright (c) 2023-present Kaytu Inc. + +Portions of this software are licensed as follows: + +* All content residing under the "doc/" directory of this repository is licensed under "Creative Commons: CC BY-SA 4.0 license". +* All content that resides under the "ee/" directory of this repository, if that directory exists, is licensed under the license defined in "ee/LICENSE". +* All content that resides under the "jh/" directory of this repository, if that directory exists, is licensed under the license defined in "jh/LICENSE". +* All client-side JavaScript (when served directly or after being compiled, arranged, augmented, or combined), is licensed under the "MIT Expat" license. +* All third party components incorporated into the Kaytu Software are licensed under the original license provided by the owner of the applicable component. +* Content outside of the above mentioned directories or restrictions above is available under the "MIT Expat" license as defined below. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..66e088a --- /dev/null +++ b/README.md @@ -0,0 +1,54 @@ +

+Kaytu Logo + +

Kaytu enables engineering, DevOps, and SRE teams to reduce cloud costs by recommending optimal workload configurations based on actual-usage, ensuring savings without compromise. +

+ +![Kaytu Gif](.github/assets/kaytu.gif) + +## Overview + + +- **Ease of use**: One-line command. Use without modifying workloads or making configuration changes. +- **Base on actual Usage**: Analyzes the past seven days of usage from Cloud native monitoring (CloudWatch), including advanced AWS CloudWatch metrics (where available). +- **Customize**: Optimize for region, CPU, memory, network performance, storage, licenses, and more to match your specific requirements. +- **Secure** - no credentials to share; extracts required metrics from the client side +- **Open-core philosophy** Use without fear of lock-in. The CLI is open-sourced, and the Server side will be open-sourced soon. +- **Coming Soon**: Non-Interactive mode, Azure support, GPU Optimization, Credit utilization for Burst instances, and Observability data from Prometheus + +## Getting Started + +### 1. Install Kaytu CLI + +**MacOS** +```shell +brew tap kaytu-io/cli-tap && brew install kaytu +``` + +**Linux** +```shell +curl -fsSL https://raw.githubusercontent.com/kaytu-io/kaytu/main/scripts/install.sh | sh +``` + +**Windows (and all Binaries)** +Download Windows (Linux, and MacOS) binary from [releases](https://github.com/kaytu-io/kaytu/releases) + + +### 2. Login to AWS CLI + +Kaytu works with your existing AWS CLI profile (read-only access required) to gather metrics. + +To confirm your AWS CLI login is working correctly: + +``` +aws sts get-caller-identity +``` +[Click here to see how to log in to AWS CLI.](https://docs.aws.amazon.com/signin/latest/userguide/command-line-sign-in.html) + +We respect your privacy. Our open-source code guarantees that we never collect sensitive information like AWS credentials, IPs, tags, etc. + +### 3. Run Kaytu CLI + +```shell +kaytu +```