Skip to main content

Migrations to Astro Cloud

Project description

Apache Airflow Plugin meant to assist customers migrating Variables, Connections, and Environment Variables from a source Airflow environment to an Astronomer environment.

Initial Setup

  1. Add the following line to your requirements.txt in your source environment:

astronomer-starship
  1. Once your source environment installs astronomer-starship via the requirements.txt, you will see a new Astronomer menu. Hover over that menu and select the Migration Tool 🚀 option

https://github.com/astronomer/starship/raw/master/astronomer-starship/images/menu-item.png
  1. After opening the plugin page, you will need to authenticate to Astronomer. To do this, please:

    1. Click the Get Token button

    2. If you are prompted to sign-in to cloud.astronomer.io please do so

    3. Copy the access token that appears in the new tab

    4. Paste the access token into the Authentication Token field

    5. Click the Sign In button

  2. After authenticating to Astronomer, you will need to select the deployment that you are sending metadata to. To do this, select a deployment from the Target Deployment dropdown and click the Select button

Migrating Airflow Connections

To migrate connections from your source Airflow meta-database:

  1. Click on the Connections tab:

https://github.com/astronomer/starship/raw/master/astronomer-starship/images/connections-tab.png
  1. In the table displaying the connections that can be migrated, click the Migrate button for each connection that needs to be sent to the Target Deployment:

https://github.com/astronomer/starship/raw/master/astronomer-starship/images/connections-migrate.png
  1. Once the Migrate button is clicked, the connection will be sent to the Target Deployment and will show as Migrated ✅ in the plugin UI:

https://github.com/astronomer/starship/raw/master/astronomer-starship/images/connections-migrate-complete.png

Migrating Airflow Variables

To migrate variables from your source Airflow meta-database:

  1. Click on the Variables tab:

https://github.com/astronomer/starship/raw/master/astronomer-starship/images/variables-tab.png
  1. In the table displaying the variables that can be migrated, click the Migrate button for each connection that needs to be sent to the Target Deployment

https://github.com/astronomer/starship/raw/master/astronomer-starship/images/variables-migrate.png
  1. Once the Migrate button is clicked, the variable will be sent to the Target Deployment and will show as Migrated ✅ in the plugin UI:

https://github.com/astronomer/starship/raw/master/astronomer-starship/images/variables-migrate-complete.png

Migrating Environment Variables

To migrate environment variables from your source Airflow:

  1. Click on the Environment Variables tab:

https://github.com/astronomer/starship/raw/master/astronomer-starship/images/env-tab.png
  1. In the table displaying the environment variables that can be migrated, ensure the checkbox is ticked for each environment variable that needs to be sent to the Target Deployment

https://github.com/astronomer/starship/raw/master/astronomer-starship/images/env-migrate.png
  1. Once all of the desired environment variable checkboxes have been selected, click the Migrate button in the table header

https://github.com/astronomer/starship/raw/master/astronomer-starship/images/env-migrate-button.png
  1. After clicking the Migrate button in the table header, each selected environment variable will be sent to the Target Deployment and the ticked checkbox will display Migrated ✅

https://github.com/astronomer/starship/raw/master/astronomer-starship/images/env-migrate-complete.png

Utilizing DAGs Cutover Tab

The DAGs Cutover Tab can be utilized to pause DAGs in the source environment and unpause DAGs in the target environment (as long as the DAG id in both the source and target environment match). To do so, please:

  1. Click on the DAGs Cutover tab:

https://github.com/astronomer/starship/raw/master/astronomer-starship/images/cutover-tab.png
  1. In the table displaying the DAGs present in both the source and target environments, click the Pause icon under Local

https://github.com/astronomer/starship/raw/master/astronomer-starship/images/cutover-pause-local.png
  1. In the table displaying the DAGs present in both the source and target environments, click the Start icon under Remote

https://github.com/astronomer/starship/raw/master/astronomer-starship/images/cutover-start-remote.png
  1. After completing this process, you will see the DAG is paused in the Local environment (so you will see a Start Icon) and is unpaused in the Remote environment (so you will see a Pause icon)

https://github.com/astronomer/starship/raw/master/astronomer-starship/images/cutover-complete.png

License

License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

astronomer-starship-0.2.4.tar.gz (46.2 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page