Coder Social home page Coder Social logo

Start and stop commands about forge-sdk HOT 8 CLOSED

laravel avatar laravel commented on May 5, 2024
Start and stop commands

from forge-sdk.

Comments (8)

barryvdh avatar barryvdh commented on May 5, 2024 1

So basically:

https://developers.linode.com/api/v4#operation/bootLinodeInstance
https://developers.linode.com/api/v4#operation/shutdownLinodeInstance

https://developers.digitalocean.com/documentation/v2/#power-on-a-droplet
https://developers.digitalocean.com/documentation/v2/#shutdown-a-droplet

https://docs.aws.amazon.com/cli/latest/reference/ec2/start-instances.html
https://docs.aws.amazon.com/cli/latest/reference/ec2/stop-instances.html

from forge-sdk.

themsaid avatar themsaid commented on May 5, 2024

@barryvdh can you explain more?

from forge-sdk.

barryvdh avatar barryvdh commented on May 5, 2024

There is only action now: reboot. But you can't shutdown and boot droplets/servers, right?
For example in AWS, you don't pay for an instance that is shut down, so could be preferred to shut something down when it's not needed, and boot it when extra capacity is preferred.

from forge-sdk.

tim-peterson avatar tim-peterson commented on May 5, 2024

@barryvdh thanks. So is this the workflow?

  1. Stop server using AWS, Linode, or DigOcean API.
  2. Start server using AWS, Linode, or DigOcean API.
  3. Reboot server using Forge API

How does Forge know the new IP address if the stopping and starting changes it?

from forge-sdk.

barryvdh avatar barryvdh commented on May 5, 2024

For load-balanced servers, you only need the internal IP, right? And workers also don't need public IPs

from forge-sdk.

tim-peterson avatar tim-peterson commented on May 5, 2024

Regardless, the changed IP is metadata Forge needs, right?

Did you solve this problem for yourself? If so, would you mind sharing pseudo-code to help explain what works?

from forge-sdk.

barryvdh avatar barryvdh commented on May 5, 2024

Not yet, sorry. I think for scaling workload in workers/queue, I'm going for the Serverless route (waiting for Laracon for that ;) )

For webservers I'm not sure yet. I think it it would be something like this:

  • Start (pre-configured) server
  • Trigger deployment to server to match current state of other servers
  • Health check
  • Enable load balancing to that server with Forge API
    Scaling down would just be disabling load balancing to that server and stopping it.

But it would be probably not really flexible and if it's a big load then containers/kubernetes etc would be much better.

(Also, you could assign an elastic IP to that instance I think)

from forge-sdk.

driesvints avatar driesvints commented on May 5, 2024

Closing this issue because it's inactive, already solved, old or not relevant anymore. Feel free to reply if you're still experiencing this issue and we'll re-open this issue.

from forge-sdk.

Related Issues (20)

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.