Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

πŸ‘©β€πŸ’» Documentation Request: Improve the cost of your instances #2494

Open
thib-info opened this issue Dec 2, 2023 · 10 comments

Comments

@thib-info
Copy link

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:

  1. Propose a viable solution plan to optimize the turn-on/off from the machines who don't request a 7/7d-24/24h availability
  2. Explain technically how you can do that by using the Terraform solution.

Why is it needed?

  1. A Scaleway account with instance already created
  2. Rights to modify your scaleway account in order to access Terraform solution (API keys)
  3. 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

tbuze@steamulo.com

@aecceyhan
Copy link

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.

@thib-info
Copy link
Author

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

@aecceyhan
Copy link

@thib-info hi

If you already start something lets look the draft first.

@thib-info
Copy link
Author

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.

@aecceyhan
Copy link

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.

@ofranc
Copy link
Collaborator

ofranc commented Feb 8, 2024

Hey @thib-info! Glad to hear that you wanna contribute to Scaleway docs. Let us know when you're ready to a PR!

@thib-info
Copy link
Author

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 ?

@thib-info thib-info changed the title πŸ‘©β€πŸ’» Documentation Request: Use Terraform to optimize the cost of your instances πŸ‘©β€πŸ’» Documentation Request: Improve the cost of your instances Mar 11, 2024
@thib-info
Copy link
Author

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. πŸ‘

@ofranc
Copy link
Collaborator

ofranc commented Mar 13, 2024

Hello @thib-info, let me get back to you before the end of the week. Thanks!

@ofranc
Copy link
Collaborator

ofranc commented Mar 18, 2024

Re @thib-info, it's a yes. You can go ahead and open a PR! Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants