If I have a <prefect.io> running on a VM and I wan...
# prefect-server
y
If I have a prefect.io running on a VM and I want to test the cloud server, do I need to stop the agent running on my laptop first, or can I have the agent for the cloud server and the agent for the VM server running at the same time ?
k
Hey @YD, you need to stop the agent…but you can just start a different agent after doing
prefect backend cloud
and leave both on at the same time.
y
hi @Kevin Kho I do not see in https://docs.prefect.io/api/latest/cli/agent.html how to stop an agent. if I do
prefect backend cloud
prefect auth login --key <YOUR-KEY>
and if the agent that is registered on the VM Prefect server is still running, which server will be managing my flows ? I do not see an option in the
register
method, unless it is some keyword
Copy code
def register(
        self,
        project_name: str = None,
        build: bool = True,
        labels: List[str] = None,
        set_schedule_active: bool = True,
        version_group_id: str = None,
        no_url: bool = False,
        idempotency_key: str = None,
        **kwargs: Any,
    ) -> Union[str, None]:
I see... when I run
prefect backend cloud
I get a message
Backend switched to cloud
k
To stop an agent, just stop the process. If you use supervisor, just kill the process. The agent is unrelated to the registration. After you do
prefect backend cloud
, if you are authenticated, the registration will happen on the Cloud
Yeah and then you just do
prefect backend server
to make prefect commands run against server
y
I get an error when doing
prefect auth login --key <key>
Error: no such option: --key
maybe having older prefect... looking in the docs for how to update
k
Just pip install with
pip install -U prefect
y
did that and it solved the issue