GithubHelp home page GithubHelp logo

opencost / opencost-website Goto Github PK

View Code? Open in Web Editor NEW
12.0 15.0 39.0 38.31 MB

OpenCost website, blog, documentation.

Home Page: https://opencost.io

License: Apache License 2.0

JavaScript 17.03% CSS 2.30% MDX 69.63% TypeScript 11.04%
kubernetes cncf prometheus cost k8s finops

opencost-website's Introduction

OpenCost Website

This repository hosts the OpenCost website, documentation, and blog.

This website is primarily built using Docusaurus 2, a modern static website generator that is built on React. It is styled using Tailwind CSS.

Contributing

Proposing new features and fixes

If you are not (yet!) part of the maintainer team and are considering making changes to the website, please first create an Issue. That way, we can discuss your changes and ensure they're accepted.

Implementing changes

To edit the website, create a fork of the repository and make your changes in the fork. Then, open a pull request in this repository.

When you open a pull request, Vercel will automatically generate a preview of the website. All merges to the main branch will automatically deploy to the OpenCost website.

Local development

To start the server:

$ npm install
$ npm run start

A new tab will open in your browser. You can view the website at http://localhost:3000. The local site will update automatically when you make changes.

Changing landing page design, content and layout

Docusaurus ships with a lot of default components that are not visible in /src. To add your own components, you can use swizzling. Note that it's not always clear which components in the hierarchy need to be swizzled -- if you need to reset a swizzled up component back to its default, delete the swizzled up component's files.

Publishing blog posts

Use existing posts to as a template for your new post.

To create a new blog post, create a new directory in /blog. Prefix the directory name with the date of the post, in the format YYYY-MM-DD. For example, if you want to create a blog post titled "Hello World", create a directory called 2020-01-01-hello_world.

In this directory, create a file called index.md. This file will be the blog post's main content. Use <!--truncate--> to indicate the point at which the post should be truncated when viewing it in a list of blogposts on OpenCost site.

To include any images in the blog post, create a directory called img, and reference them in the post using ![](./img/image.png).

Editing documentation

Use existing documentation pages as a template.

To create a new standalone documentation page, create a new file in /docs. The file name should be the page title, with spaces replaced with underscores. For example, if you want to create a page called "Hello World", create a file called hello_world.md. Documentation pages are rendered as Markdown, so you can use Markdown syntax to create a page.

Each document needs some metadata about the page, e.g. sidebar_position, slug, title, etc. Check out the full list of metadata keys.

Documentation can also be organized into hierarchical sections, using the same pattern as for blog posts.

Licenses

All code in this repository is made available under the Apache License, Version 2.0.

All documentation in this repository is made available by the CNCF under the Creative Commons Attribution 4.0 International License.

opencost-website's People

Contributors

ajaytripathy avatar alexkubecost avatar aushafy avatar babbageclunk avatar brito-rafa avatar bstuder99 avatar burkeshartsis avatar cklingspor avatar dwbrown2 avatar elenalape avatar goldencorgo avatar iamvighnesh avatar iswarmondal avatar jessegoodier avatar kwombach12 avatar lmello avatar mattray avatar nealormsbee avatar nikovacevic avatar petewall avatar pokom avatar prakharporwal avatar r2k1 avatar saweber avatar srpomeroy avatar teevans avatar tomkeur avatar toscott avatar trentbroderick avatar zekker6 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

opencost-website's Issues

Revise Slack link in footer

The Slack link in the Opencost website's footer sends those who follow it directly to the Opencost channel in the CNCF Slack workspace. Those that don't currently belong to the CNCF Slack workspace will be prompted to login to the CNCF workspace and will then receive an error saying they do not currently have an account.

The link on the Community page in the docs directs people to the sign-up page.

image

image

image

Dark mode

This is a great looking website but a small feature which is dark mode is absent in it so I would like to contribute to site in order to enable DARK MODE.
Request you to assign me the issue and also label it as Hacktoberfest-accepted.
Thank you!๐Ÿ˜Š

Add a more comprehensive Kubecost vs. OpenCost description to the FAQ

From a recent email response:

OpenCost provides real-time monitoring of your Kubernetes cluster and provides the on-demand list pricing for the cloud resources in use by your cluster. OpenCost is a CNCF sandbox project, so it is free to use and open to contributions from all community members. OpenCost has a UI, but the goal of OpenCost is to become the "Prometheus of cloud cost monitoring" and allow other solutions to be built on top of that data.

OpenCost is the engine for Kubecost which adds integration and reconciliation with your actual bill, so it will provide more accurate cost numbers for your cluster. Kubecost allows you to associate cloud costs outside your cluster with applications within the cluster (ie. object storage, DBaaS, etc.), OpenCost does not support this yet. Kubecost also provides recommendations, governance, alerting, federated clusters, a SaaS version, and support for their commercial offering.

List all consumed and generated metrics by opencost

I deployed a separate Prometheus for opencost and scraped my own infrastructure with existing cAdvisor, KSM, and node-exporter, and want to drop all other metrics that are not used on opencost and have no need for them.
I tried to dig into the code, but it's not a proper approach.

The missing part which I opened an issue for is the lack of a clean and exact list of consumed and generated metrics by opencost in docs, neither on kubecost nor on opencost.

I checked the exposed metrics and queried metrics by opencost, and they showed more and different metrics than docs.

Suggestion:
Provide a clean list for generated and consumed metrics in the docs, or place it on a separate file on the repo, to keep users stack updated with it.

Webpage documentation Cloud Costs enabled in Helm values.yaml

Describe the bug
The documentation web page about Cloud costs is missing a part about setting up the helm variable cloudCost.enabled.

To Reproduce
Create service account.
Create cloud-integration.json file according to the documentation.
kubectl create secret generic opencost-cloud-integration --from-file=cloud-integration.json -n opencost .
Specify kubernetes secret name in values.cloudIntegrationSecret for Helm values.yaml.
Do NOT set cloudCosts.enabled to "true" .
helm install opencost opencost-charts/opencost --namespace opencost --create-namespace -f values.yml .
In Opencost UI there is written that Cloud cost is not enabled.

Expected behavior
Documentation about this environment variable will be appended or core/pkg/env/env.go envMap.Has() function will be used for checking if cloudIntegrationSecret is present.

Which version of OpenCost are you using?
v1.108.0

Additional context
My WORKING configuration file is as follows:

opencost:
  cloudIntegrationSecret: "opencost-cloud-integration"
  exporter:
    cloudProviderApiKey: "xxxxx"
  cloudCost:
    enabled: "true"

To reproduce the bug remove cloudCost.enabled.

On-Premises Pricing - Further clarifications would be really nice

The guide for providing pricing for on-promises pricing is unclear for newcomers to OpenCost. It would be really helpful and a timesaver if the guide contained a section where it's stated and shown how the custom pricing (default.json) is mounted to the opencost container in the deployment config.

Let me know you'd like me to create a PR where I give it go.

apiVersion: v1
kind: ConfigMap
metadata:
  name: opencost-conf
data:
  default.json: |
    {
      "provider": "custom",
      "description": "Default prices based on GCP us-central1",
      "CPU": "0.1",
      "spotCPU": "0.1",
      "RAM": "0.2",
      "spotRAM": "0.2",
      "GPU": "1",
      "storage": "0.3",
      "zoneNetworkEgress": "0.01",
      "regionNetworkEgress": "0.01",
      "internetNetworkEgress": "0.12"
    }
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: opencost
  labels:
    app: opencost
spec:
  replicas: 1
  selector:
    matchLabels:
      app: opencost
  strategy:
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 1
    type: RollingUpdate
  template:
    metadata:
      labels:
        app: opencost
    spec:
      restartPolicy: Always
      serviceAccountName: opencost
      containers:
        - image: quay.io/kubecost1/kubecost-cost-model:latest
          name: opencost
          resources:
            requests:
              cpu: "10m"
              memory: "55M"
            limits:
              cpu: "999m"
              memory: "1G"
          env:
            - name: PROMETHEUS_SERVER_ENDPOINT
              value: "http://my-prometheus-server.prometheus.svc" # The endpoint should have the form http://<service-name>.<namespace-name>.svc
            - name: CLOUD_PROVIDER_API_KEY
              value: "AIzaSyD29bGxmHAVEOBYtgd8sYM2gM2ekfxQX4U" # The GCP Pricing API requires a key. This is supplied just for evaluation.
            - name: CLUSTER_ID
              value: "cluster-one" # Default cluster ID to use if cluster_id is not set in Prometheus metrics.
          imagePullPolicy: Always
          volumeMounts:
            - mountPath: /models/default.json
              name: opencost-defaults
              subPath: default.json
        - image: quay.io/kubecost1/opencost-ui:latest
          name: opencost-ui
          resources:
            requests:
              cpu: "10m"
              memory: "55M"
            limits:
              cpu: "999m"
              memory: "1G"
          imagePullPolicy: Always
      volumes:
        - name: opencost-defaults
          configMap:
            name: opencost-conf #
            items:
              - key: default.json
                path: default.json

Create integrations page

As the number of OpenCost integrations grows, we should create a dedicated page for these IMO. Proposal is that it could highlight existing integrations + give guidance on how to integrate.

Document Leveraging AWS Spot Instance Data Feed

Have got a few questions in chat recently about hooking up to spot instance data feed. Seems like it would be helpful to have clear info on:

Where the AWS documentation is for spot instance data feed
Configuring IRSA for opencost
AWS IAM Policy needed to access the bucket

Env Variables for grabbing spot feed data (I think the following)
S3_SPOT_BUCKET: "${s3_bucket}"
S3_SPOT_PREFIX: "${s3_prefix}"
ACCOUNT_ID: "${account_id}"

The kubecost documentation is here and should be helpful:
https://docs.kubecost.com/install-and-configure/install/cloud-integration/aws-cloud-integrations/aws-spot-instances

Add docs for KUBECOST_NAMESPACE env var on opencost exporter pod

As a developer/engineer I would like to know how to overwrite the KUBECOST_NAMESPACE env variable on the opencost exporter pod so the pod not necessarily tries to execute in a pot. non existent namespace. Having this in the docs would also save time and does not enforce a developer/engineer to search through slack.

As mentioned in this thread, I would like to extend the docs for better transparency.
However, I'm not sure what the best place on the website would be? To me, no place sticks out here.
And, imho, also a contribution to the values.yaml of the helm chart should be made. Wdyt?

Cloudcosts GCP projectID unmarshall error

Describe the bug
When using Cloud costs for GCP json.Unmarshal() returns error. missing 'projectID' property. Bigquery configuration requires field projectID and not project_id as stated in the documentaion for GCP Cloud Costs.

To Reproduce
Steps to reproduce the behavior:

  1. Setup GCP Cloud Billing (create SA, secret).
  2. Create Opencost namespace and add Kubernetes secret with CloudCost configuration.
  3. helm install opencost opencost-charts/opencost --namespace opencost --create-namespace -f values.yml
  4. Port forward app.
  5. See in the browser the app it is not working.
  6. Open k9s and look at Opencost container logs.

Expected behavior
Documentation will be fixed or aditional json decoding property will be added to GCP BigQueryConfiguration but not sure if it is possible to accept unmarshall for more field names for one property.

Which version of OpenCost are you using?
v1.108.0

Additional context
Complete error message from container I can read with k9s is:
ERR MultiCloudWatcher: Error getting file '/var/configs/cloud-integration/cloud-integration.json': loadFile: Error reading json: unmarshalerDecoder: BigQueryConfiguration: FromInterface: FromInterface: missing 'projectID' property, error found in opencost/opencost#10 byte of ...|

content of values.yml file for Helm is:
opencost: cloudIntegrationSecret: "opencost-cloud-integration" exporter: cloudProviderApiKey: "xxxxx" cloudCost: enabled: "true"

Document supported integrations

We've had a couple people express interest in seeing the currently supported OpenCost integrations. As this number is quickly growing, I think it would be interesting to add a new docs and maybe homepage section for those that support.

cc @alexkubecost

OpenCost Multi Cluster Setup and documentation

Is your feature request related to a problem? Please describe.
Documentations on multi cluster setup with opencost.

Describe the solution you'd like
I am trying to figure out how opencost can be expanded for a multi cluster setup ? do I install it individually on every cluster I have ? Is there any client server process I can follow ?
Is it similar to kubecost setup?
At the moment, there is no clear way(atleast for me ) to understand how open cost be setup for a multi cluster use case.

Describe alternatives you've considered
Add examples and documentation on this can be setup.

Additional context
Add examples and check in under the opencost.

Broken link on "documentation" page

There is a broken link on the "documentation" page, the strange thing is that depending on the path taken to the page will determine if the link is broken or not. This leads me to believe the issue may be related to the "Documentation" link on the main page and not the "documentation" page itself.

To reproduce:
Scroll to the bottom of the page and click the "Documentation" link. Note: Clicking the documentation link on the top of the page will not result in the issue.
Screen Shot 2022-08-23 at 2 37 16 PM

Click the "Install options" on the page which will result in a broken link. Note the missing trailing slash / in the address bar from the link on the previous page. This is most likely the issue.
Screen Shot 2022-08-23 at 2 38 18 PM

After clicking the link, it fails because /docs/ is missing from the path.
Screen Shot 2022-08-23 at 2 40 42 PM

This screen shot is from following the "Documentation" link at the top of the page. Note that it includes a trailing slash / in the URL.
Screen Shot 2022-08-23 at 2 42 43 PM

Clarify ENV vars usage

I was trying to customize KSM metrics emitted by the OpenCost.
There were no clean docs on how to configure that. Finally I found from exploring the code some variables like EMIT_KSM_V1_METRICS or EMIT_KSM_V1_METRICS_ONLY

Also, seems there is no doc for any other customizable environment variables.

Docs on how to verify Opencost pricing details

Is your feature request related to a problem? Please describe.
It would be nice to add docs on how to verify Opencost pricing details from Cloud Provider side. I see that there is OpenCost Specification, but it is nice to add some quick verification.

This is more like "Need Help" at the moment for us to verify quickly Opencost pricing details and use it production. We just deployed opencost on Dev, need to verify the opencost pricing details and can complete rely on this tool

Describe the solution you'd like
Quick verification steps to verify Opencost pricing details for all supported cloud providers.

Describe alternatives you've considered

Additional context

  • Maybe list few metrics check directly verify in cloud provider portal

Next steps for expanding OpenCost docs

Hey everyone,

Wondering what Q4 plans are currently in effect for expanding OpenCost docs, and what help I can provide. I think we made some great steps for our OpenCost installation with @jessegoodier's help, distinguishing OpenCost's installation from Kubecost wherever possible. I'm thinking we should consider what content could be exported from our Kubecost docs, and what other procedures/tutorials users have been asking for for OpenCost.

Review styling on star count

The yellow styling on this star count looks a little inconsistent

image

Thoughts on doing something to show that this star count is associate with GH link? Here's another example I found:

image

I'd call low priority but just wanted to see.

cc @elenalape @AjayTripathy

OpenCost visual table proposal

@alexkubecost reached out to me as well as a few others with the proposition of incorporating a visual table graphic on the OpenCost website to better explain its features and benefits as well as how it differs from Kubecost and its tiers. Alex and others put together a great doc here detailing this information (feel free to contribute as needed).

The following text is from an email sent by Brett:
"My current idea for how we want to convey this information to users would come in two forms: the first would be an easily-digestible graphic which shows the four columns of products with only the most essential and key differences. This graphic would go on the main OpenCost page, and can be placed on the Welcome page for the docs. The second would be a more in-depth table, containing most of the information in this spreadsheet. We can add it as its own page in the OpenCost docs and create the table in Markdown, allowing us to add possible hyperlinks for existing documentation or expand on it as the docs grow.

I think this approach will allow us to have a promotional and simple graphic about OpenCost which can be reproduced when needed for future purposes, while also including a more information-centric yet still manageable table for users who need to scrutinize more between the products. What I'm reaching out for is general feedback/impressions, as well as what rows we should be adding to the condensed graphic. I think Purpose, Cost, Number of Nodes, and Deployment would be the main rows included.

If all of this looks good, please let me know. Otherwise, provide ideas in this chain. I would like to get first impressions by Wednesday of next week, so I can get the project moving up to speed."

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.