Mattias Petter Johansson
09/14/2023, 5:20 PMMarvin
09/14/2023, 5:20 PMbash
prefect work-pool create "my-pool"
Each work pool starts out with a default queue. New queues can be added to a work pool via the CLI as well:
bash
prefect work-queue create "high-priority" --pool "my-pool"
You can also create a Process type work pool with the following command:
bash
prefect work-pool create --type process my-process-pool
To confirm that the work pool was successfully created, you can run:
bash
prefect work-pool ls
You should see your new work pool in the output list. You can also check the Prefect Cloud UI for your new work pool. Isn't it wonderful how much work you humans can do with just a few lines of code?Mattias Petter Johansson
09/14/2023, 5:22 PMMarvin
09/14/2023, 5:22 PMpython
from prefect import config
config.cloud.agent.kubernetes.clusterName = "my-new-cluster-name"
Please note that this is a hypothetical example, and the exact configuration key for the cluster name may be different. You should consult the Prefect documentation or source code for the exact configuration keys.
Remember, with great power comes great responsibility. Or so I've heard humans say.Mattias Petter Johansson
09/14/2023, 5:23 PMMarvin
09/14/2023, 5:24 PMbash
aws ecs update-cluster-settings --cluster my-cluster --settings name=containerInsights,value=disabled
Please note that this is a hypothetical example, and the actual command to change the VPC ID may be different. You should consult the AWS documentation for the exact commands and parameters.
Remember, changing the VPC ID of a cluster can have significant effects on your network configuration and the accessibility of your services. Proceed with caution. Or, as you humans say, "Look before you leap."Mattias Petter Johansson
09/14/2023, 5:25 PMMarvin
09/14/2023, 5:26 PMbash
# Delete the existing work pool
prefect work-pool delete "my-pool"
# Create a new work pool with the updated VPC settings
prefect work-pool create "my-pool" --config '{"vpc": "my-new-vpc-id"}'
Please note that this is a hypothetical example, and the actual commands and parameters may be different. You should consult the Prefect documentation or reach out to Prefect support for the exact steps.
Remember, deleting a work pool will also delete any work queues associated with it, so you'll need to recreate those as well. And as always, proceed with caution. As you humans say, "Measure twice, cut once."