hystax / optscale

FinOps and cloud cost optimization tool. Supports AWS, Azure, GCP, Alibaba Cloud and Kubernetes.
https://hystax.com
Apache License 2.0
1.11k stars 156 forks source link

Request for Guidance on Setting Up Development Environment #310

Closed mahendrasinghbora closed 3 weeks ago

mahendrasinghbora commented 4 weeks ago

Discussed in https://github.com/hystax/optscale/discussions/305

Originally posted by **mahendrasinghbora** June 13, 2024 Hi, I've noticed that there isn't any documentation on how to set up optscale for development. Could anyone provide advice or instructions on how to properly configure the project for a development environment? Thanks in advance for your help!
nk-hystax commented 4 weeks ago

As a first step, you should deploy OptScale according to the documentation, prepare a virtual environment, and install packages from the requirements.txt file of the component you want to change. It's enough for the development.

When your code is ready, you may build the new docker images for the components you changed. Run build.sh from the root of the optscale folder with the name of the component you want to build. For example,build.sh rest_api will build a new image rest_api:local. Use this image instead of the existing one in your OptScale to apply the changes.

To run the tests locally, build your image with the tag "build" by running ./build.sh rest_api build, and then run the run_test.sh script from the component's folder: ./rest_api/run_test.sh.

DcWire commented 2 weeks ago

Hi, I am facing the same issue. I was able to deploy optscale by following the steps given in the documentation and setup the K8s cluster, but I wasn't able to find a way to develop. I am aware of the existence of test files and how to run them but it still hasn't cleared the question of setting up a dev environment.

However, I've been trying to use telepresence or some other tool that allows me to develop locally and deploy the other components over the cloud and see what changes are making a difference. Will update on that when I am successful.

Any additional information will be appreciated, thanks.