Astronomer Deployment names

Is there possibility to rename of the Deployment, which has been created by

astro deployment create [ID]

Or maybe I can create Deployment with the specific name? I want to use CLI, manually changing in UI is not an option for me.

Hi @konik44! Deployment names on Astronomer (e.g. quasarian-orbit-1214) are randomly generated when you create a new Airflow environment and cannot be changed.

Under the hood, that release name is mapped to an isolated Kubernetes Namespace on an Astronomer Kubernetes Cluster (if you’re on Cloud) or on your own if you’re an Enterprise customer.

If you’d like to configure the deployment’s “Description” or “Label”, you’re free to do so in the Astro UI by going to Deployment > Configure > DeploymentInfo.

@konik44 Can I ask what you’re looking to do?

I found out, that this:

astro deployment create $DEPLOY_NAME

working properly, so I have what I need. I want to create on specific Workspace new Deployment every single time when I open new Branch and the Deployment should have the same name as Branch name. And I want to automate it, so I should use astro CLI commands, not just astro UI.

1 Like

@konik44 Ah yes, if you haven’t created a deployment yet you can create it via the CLI with that command and personalize the name at the onset.

For those following, a deployment has 3 attributes:

  1. Name (Customizable in your deployment’s Configure page or in the initial CLI command)
  2. Deployment Name (formerly Release Name - automatically generated)
  3. Deployment ID (automatically generated)

Deployment Name (lunar-meteoroid-6200) and Deployment ID cannot be changed, but Name can be. Here’s the output you can expect:

Paolas-MacBook-Pro:astro-trial paola$ astro deployment create PAOLA
 NAME      DEPLOYMENT NAME             ASTRO     DEPLOYMENT ID                            
 PAOLA     lunar-meteoroid-6200        0.7.5     8762af39-8b3a-4f0d-a77b-60a34d2698c0     

 Successfully created deployment. Deployment can be accessed at the following URLs 

 Airflow Dashboard:
 Flower Dashboard:
Paolas-MacBook-Pro:astro-trial paola$ astro deployment list
 NAME                  RELEASE NAME               ASTRO      DEPLOYMENT ID                            
 PAOLA                 lunar-meteoroid-6200       v0.7.5     8762af39-8b3a-4f0d-a77b-60a34d2698c0     
 test_alerts_three     frozen-ionization-5364     v0.7.5     f4f48aea-b016-4806-a877-c7544a872ce0     
1 Like

Thanks Paola for your support. I have 2 more question in this topic:

  1. How can I get the name of Deployment by astro CLI? By name i mean Release Name. I would push Name of Deployment and get back Release Name. In case of your example above, I want to get lunar-meteoroid-6200 name by giving PAOLA deployment name.
  2. When I create new Deployment by astro CLI, it will have default settings/resources. Can I set Executor of Deployment of my choice? Celery is the default Executor and I would set it as Local.

Hi @konik44! Good questions.

  1. If you run astro deployment list, you’ll get a dropdown of the deployments you have access to within your current workspace. That command will show both the NAME and RELEASE NAME in tandem, but you cannot input one to pull for the other via the CLI.

  2. When you create a deployment via the Astronomer CLI, it will like you said be given the Celery Executor with default resources. From there, you’ll have to go to the Astronomer UI to adjust those resources (and executor if you’d like). We might be able to submit a feature request there (to choose your executor upon deployment creation from the CLI). I’ll throw back the corresponding GitHub issue if so!

Thanks @paola for your answers. In case of RELEASE NAME I can handle it with grep and awk. However, create a new deployment with specified executor and resources will be very helpful because we want to automate our solution and Celery Executor as a default is too much.
So please, submit the feature request.

@konik44 Ah, that’s great. Do you mind sharing those commands here for wider reference?

As for the executor config via the CLI, you got it. Feature request here:

I do not mind sharing these comments at all. Thanks a lot @paola, really appreciate it :slight_smile: