https://prefect.io logo
#prefect-server
Title
# prefect-server
y

YD

07/22/2021, 9:06 PM
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

Kevin Kho

07/22/2021, 9:07 PM
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

YD

07/22/2021, 9:31 PM
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

Kevin Kho

07/22/2021, 9:38 PM
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

YD

07/22/2021, 9:41 PM
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

Kevin Kho

07/22/2021, 9:44 PM
Just pip install with
pip install -U prefect
y

YD

07/22/2021, 9:47 PM
did that and it solved the issue
2 Views