kurokobo / awx-on-k3s

An example implementation of AWX on single node K3s using AWX Operator, with easy-to-use simplified configuration with ownership of data and passwords.
MIT License
560 stars 159 forks source link

Any guide on connecting this to existing or old tower instance for data migration? #329

Closed fahadshery closed 4 months ago

fahadshery commented 6 months ago

Hi,

First of all, your guides are a life saver! Can't thank you enough... :)

I have an old tower instance running in docker. What's the best way to connect to it for data migration?

Thanks,

kurokobo commented 6 months ago

Hi, try following the official migration docs: https://ansible.readthedocs.io/projects/awx-operator/en/latest/migration/migration.html

fahadshery commented 6 months ago

this guide is useless tbh... My old AWX was deployed using docker... I would love to see a section of connecting your AWX instance to the old AWX (docker) version and transfer data.

kurokobo commented 6 months ago

@fahadshery The official docs is the very docs to migrate data from docker based installation to kubernetes based installation.

You should:

Then:

fahadshery commented 5 months ago

Thanks for this, I will try it... is there an easier method to transfer data from a different awx running on K3S? The thing is I deployed one of my own awx instances using the official guide... Then I tried your guide which enables me to access it using DNS. What's the best way to connect the new awx instance and do a data migration in this instance?

thanks again

kurokobo commented 5 months ago

What's the best way to connect the new awx instance and do a data migration in this instance?

It is impossible to say for sure what is best way, as it depends on the environment, usage, and your expertise, but the migration guide is still valid option for you.

Technically, of course, there are several ways to migrate PSQL, but the process is a bit more complicated, as AWX will not work as expected unless not only the DB but also the SECRET_KEY is migrated, and the Operator and AWX Pods must be stopped before the migration is started. If you are not familiar with the architecture of AWX and Operator, and Kubernetes, the migration guide is the easiest to follow, I think.

fahadshery commented 5 months ago
  • Create secret that includes your old SECRET_KEY
  • Create secret that includes credentials and connection information about your old PSQL
  • Specify above secrets via old_postgres_configuration_secret and secret_key_secret in base/awx.yaml

So I created 2 files within the base directory of your project. one was having the secret key from the old PSQL and the other one had the PSQL info for the old Postgres.

I am getting this error constantly:

{"level":"info","ts":"2024-04-17T19:25:54Z","logger":"proxy","msg":"cache miss: /v1, Kind=PodList err-Index with name field:status.phase does not exist"}
{"level":"info","ts":"2024-04-17T19:26:00Z","logger":"proxy","msg":"cache miss: /v1, Kind=PodList err-Index with name field:status.phase does not exist"}
{"level":"info","ts":"2024-04-17T19:26:06Z","logger":"proxy","msg":"cache miss: /v1, Kind=PodList err-Index with name field:status.phase does not exist"}
{"level":"info","ts":"2024-04-17T19:26:12Z","logger":"proxy","msg":"cache miss: /v1, Kind=PodList err-Index with name field:status.phase does not exist"}
{"level":"info","ts":"2024-04-17T19:26:17Z","logger":"proxy","msg":"cache miss: /v1, Kind=PodList err-Index with name field:status.phase does not exist"}
{"level":"info","ts":"2024-04-17T19:26:23Z","logger":"proxy","msg":"cache miss: /v1, Kind=PodList err-Index with name field:status.phase does not exist"}
{"level":"info","ts":"2024-04-17T19:26:29Z","logger":"proxy","msg":"cache miss: /v1, Kind=PodList err-Index with name field:status.phase does not exist"}
{"level":"info","ts":"2024-04-17T19:26:35Z","logger":"proxy","msg":"cache miss: /v1, Kind=PodList err-Index with name field:status.phase does not exist"}
{"level":"info","ts":"2024-04-17T19:26:41Z","logger":"proxy","msg":"cache miss: /v1, Kind=PodList err-Index with name field:status.phase does not exist"}
{"level":"info","ts":"2024-04-17T19:26:47Z","logger":"proxy","msg":"cache miss: /v1, Kind=PodList err-Index with name field:status.phase does not exist"}
{"level":"info","ts":"2024-04-17T19:26:53Z","logger":"proxy","msg":"cache miss: /v1, Kind=PodList err-Index with name field:status.phase does not exist"}
{"level":"info","ts":"2024-04-17T19:26:58Z","logger":"proxy","msg":"cache miss: /v1, Kind=PodList err-Index with name field:status.phase does not exist"}
{"level":"info","ts":"2024-04-17T19:27:04Z","logger":"proxy","msg":"cache miss: /v1, Kind=PodList err-Index with name field:status.phase does not exist"}
kurokobo commented 5 months ago

@fahadshery Gather Operator's logs and determine which task is failed and why. Also Gather the status, events, and logs of your failed pods. Refer to: https://github.com/kurokobo/awx-on-k3s/blob/main/tips/troubleshooting.md

github-actions[bot] commented 5 months ago

This issue is stale because it has been open 10 days with no activity. Remove stale label or comment or this will be closed in 4 days.

fahadshery commented 5 months ago

I have tried again and the issue was that docker host was not accessible properly to the new awx instance. But the issue now is that the new awx instance can connect to the Postgres running in the docker container. It finishes with no errors. But there is no new data ported over from the old Postgres. It creates a brand new database and that;s it!

kurokobo commented 5 months ago

@fahadshery Could you please provide step-by-step how did you perform migration?

kurokobo commented 5 months ago

Also complete logs from Operator is helpful to see if migration works as expected or not.

github-actions[bot] commented 4 months ago

This issue is stale because it has been open 10 days with no activity. Remove stale label or comment or this will be closed in 4 days.

github-actions[bot] commented 4 months ago

This issue was closed because it has been open 2 weeks with no activity.