Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace Local Docker Install with Community Docker-Compose #9289

Merged

Conversation

rooftopcellist
Copy link
Member

@rooftopcellist rooftopcellist commented Feb 10, 2021

Issue: #9125

Initial WIP PR for Replacing the Local Docker installation with a docker-compose method close to what we do for the development environment.

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME
  • Installer
AWX VERSION
AWX 50.0.0
ADDITIONAL INFORMATION

@rooftopcellist rooftopcellist changed the title Replace Local Docker Install with Community Docker-Compose [WIP] Replace Local Docker Install with Community Docker-Compose Feb 10, 2021
@unlikelyzero
Copy link

unlikelyzero commented Feb 11, 2021

@rooftopcellist let me know or @tiagodread when this is available to test.

INSTALL.md Outdated Show resolved Hide resolved
INSTALL.md Outdated Show resolved Hide resolved
@rooftopcellist rooftopcellist changed the title [WIP] Replace Local Docker Install with Community Docker-Compose Replace Local Docker Install with Community Docker-Compose Feb 18, 2021
@rooftopcellist rooftopcellist force-pushed the docker-community branch 5 times, most recently from 415ec22 to 90c66e2 Compare February 18, 2021 19:49
@ryanpetrello
Copy link
Contributor

image

@ryanpetrello
Copy link
Contributor

I gave this a whirl by wiping out my local Docker, installing a 17.0.1 and attempting an upgrade:

~ git fetch upstream && git checkout 17.0.1
~ git reset --hard upstream/17.0.1
~ (tags/17.0.1:●●) ~/dev/awx/installer ansible-playbook -i inventory install.yml

Next, I ran some playbooks in 17.0.1:

image
image

Next, I cloned @rooftopcellist's branch, and ran the migration script:

~/dev/awx/tools/docker-compose/ansible ansible-playbook migrate.yml -e "migrate_local_docker=true" -e "postgres_data_dir=~/.awx/pgdocker" -e "old_docker_compose_dir=~/.awx/awxcompose"

...and finally, I started the new development environment:

~/dev/awx COMPOSE_TAG=devel make docker-compose-test

@ryanpetrello
Copy link
Contributor

💥

image

@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded.

 - Also, do no explicitly name containers
@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded.

@ryanpetrello
Copy link
Contributor

ryanpetrello commented Feb 22, 2021

Okay @rooftopcellist I just tried again.

17.0.1 install w/ a job I ran:

image

(tags/17.0.1:●●) ~/dev/awx/installer docker ps -a
CONTAINER ID        IMAGE                COMMAND                  CREATED             STATUS              PORTS                  NAMES
d26c174de61d        ansible/awx:17.0.1   "/usr/bin/tini -- /u…"   11 minutes ago      Up 11 minutes       8052/tcp               awx_task
30443e803858        ansible/awx:17.0.1   "/usr/bin/tini -- /b…"   13 minutes ago      Up 11 minutes       0.0.0.0:80->8052/tcp   awx_web
2c66c1a88f45        postgres:12          "docker-entrypoint.s…"   13 minutes ago      Up 11 minutes       5432/tcp               awx_postgres
e62d29f57fb3        redis                "docker-entrypoint.s…"   13 minutes ago      Up 11 minutes       6379/tcp               awx_redis

Next, I cloned your branch and ran the migrate.yml as described in #9289 (comment)

Post-upgrade:

~ docker volume ls | grep awx_db && docker ps -a
local               tools_awx_db
CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS               NAMES
870dacb3c43e        postgres:12         "docker-entrypoint.s…"   38 seconds ago      Up 37 seconds       5432/tcp            tools_postgres_1

Now, after a make docker-compose-build && make docker-compose-test, it works (and I can use my pre-upgrade admin user + pass, and see my migrated data):

image

curl -k "https://admin:password@awx.example:8043/api/v2/ad_hoc_commands/1/stdout/?format=txt"
localhost | CHANGED | rc=0 >>
17.0.1

Copy link
Contributor

@ryanpetrello ryanpetrello left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested this and migration worked for me following the instructions from a 17.0.1 Docker install (as expected, I had to create an admin user and create preload data myself post-install).

I was also able to do a fresh image build and make docker-compose from this branch and see a fresh AWX install come up.

cc @shanemcd for any additional code review he may wish to do.

@softwarefactory-project-zuul
Copy link
Contributor

Build failed (gate pipeline). For information on how to proceed, see
http://docs.openstack.org/infra/manual/developers.html#automated-testing

@ryanpetrello
Copy link
Contributor

regate

@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded (gate pipeline).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants