docs-content
docs-content copied to clipboard
👩💻 Documentation Request: Improve the cost of your instances
Summary
When you are using Scaleway as your main cloud provider solution, you obviously host more than only production machines. Such as pre-production or others for a different usage that don't need a 100% availability. The goal of that documentation page would be to:
- Propose a viable solution plan to optimize the turn-on/off from the machines who don't request a 7/7d-24/24h availability
- Explain technically how you can do that by using the Terraform solution.
Why is it needed?
- A Scaleway account with instance already created
- Rights to modify your scaleway account in order to access Terraform solution (API keys)
- Terraform installed on your local machine.
Want to write this documentation yourself?
Yes
Related PR(s)
No response
(Optional) Scaleway Organization ID
5050540446
Email address
Hi @thib-info
Did you write any draft? I am also interested in this automation. If you have not started yet, I can collaborate or write on myself.
Hello back @aecceyhan
I didn't have the time yet to start the documentation, but It's something I would like to start, yes. I don't know if you prefer to read a draft I'll initiate or collaborate with me on this documentation.
Keep me update about this
@thib-info hi
If you already start something lets look the draft first.
Then let me 2 weeks to start writing this. I'll do a POC at the same time, so I can verify the method we're going to introduce.
Apologies, I think I misunderstood what you said earlier. So, if I understand correctly now, there is no draft?
Regarding this document (https://registry.terraform.io/providers/scaleway/scaleway/latest/docs/resources/instance_server#examples), I'm not certain if it's possible to stop instances using the Terraform 'apply' command.
However, if it is feasible to do so manually (but in a generic way) with the Terraform 'apply' command, we could potentially schedule it using the new jobs feature.
Additionally, scheduling SCW CLI commands might be a better approach, though I'm not completely sure; it's just a thought.
Hey @thib-info! Glad to hear that you wanna contribute to Scaleway docs. Let us know when you're ready to a PR!
Hi back @aecceyhan, I was kind of busy this last month and had to wait for this documentation.
After looking deeper on it and used Terraform during this last month, I don't think handling the state is the best solution indeed cause it means that we have to modify automatically terraform file content and apply the modification.
As you told, we could use the SCW CLI commands, but I was thinking of using the API instead. It might be simpler to use a python image inside a pipeline instead of building a custom one, including the SCW CLI.
I was thinking of doing that. Using a small Python script to get all the instances with the needed tag and turn them on/off inside a pipeline. We could use a scheduled pipeline inside GitLab and don't know yet if it's also possible on GitHub (I guess it is).
What do you think of that ?
Hello back @ofranc. Can you check the last message I've written 3 weeks ago? I've been able to develop that process to handle the computation of our instances on Scaleway in order to develop our business and more respect our environmental impact. Does this tutorial documentation interest you or not ? Otherwise, I will invest time to furnish a well written documentation. :+1:
Hello @thib-info, let me get back to you before the end of the week. Thanks!
Re @thib-info, it's a yes. You can go ahead and open a PR! Thanks!
Hello @thib-info, If you don't mind we will close this issue. Feel free to open a new one when the content is ready.