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

Rework dev & prod container builds #7017

Merged
merged 7 commits into from
May 15, 2020
Merged

Rework dev & prod container builds #7017

merged 7 commits into from
May 15, 2020

Conversation

wenottingham
Copy link
Contributor

SUMMARY

Two main items:

  1. The easiest way to make sure changes to the container builds don't get out of sync between the dev environment and prod containers is to only have one (templated) Dockerfile. So do that.

  2. Move to two-stage container builds in order to save space in the final image.

By building in one container step, and then just copying the built artifacts into the final containers, we can save a lot of space.

Before:

gcr.io/ansible-tower-engineering/awx_devel   devel               f4050fdd3df4        3 days ago          2.62GB
ansible/awx_task                             latest              24f27e19bd06        2 weeks ago         2.47GB
ansible/awx_web                              latest              61c4d41939ca        2 weeks ago         2.44GB

After:

ansible/awx_devel                            latest              b4b3e6c4882f        18 minutes ago      1.8GB
awx_task                                     latest              f96e33ddcf6c        18 minutes ago      1.4GB
awx_web                                      latest              ac070ff7f7d0        18 minutes ago      1.37GB

Changes while here:

  • Dropped ansible nightly repo from dev env, as it has issues now - just install latest EPEL. This will need to change later, but when it does, we'll need to pull from pip or elsewhere - that nightly repo hasn't changed in 6+ months
  • Dropped rsyslog repo in favor of installing latest CentOS stream package (which is new enough). The CentOS stream enablement can be dropped whenever it lands in main CentOS.

Smoke tested with starting AWX & running demo playbook on Fedora 32 for both dev env and local docker prod. Definitely needs testing on OSX (dev env) and OCP/K8S (prod).

@softwarefactory-project-zuul
Copy link
Contributor

Build failed.

@wenottingham
Copy link
Contributor Author

Well, that's one way to break zuul.

@shanemcd
Copy link
Member

recheck

@softwarefactory-project-zuul
Copy link
Contributor

Build failed.

@softwarefactory-project-zuul
Copy link
Contributor

Build failed.

@shanemcd
Copy link
Member

recheck

@softwarefactory-project-zuul
Copy link
Contributor

Build failed.

@softwarefactory-project-zuul
Copy link
Contributor

Build failed.

@wenottingham
Copy link
Contributor Author

recheck

@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded.

@shanemcd
Copy link
Member

recheck

@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded.

@shanemcd
Copy link
Member

recheck

@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded.

@shanemcd
Copy link
Member

recheck

@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded.

@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded.

@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded.

Copy link
Member

@shanemcd shanemcd left a comment

Choose a reason for hiding this comment

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

I've tested this in OpenShift, the dev env on linux, and the dev env on docker for Mac.

@@ -35,6 +35,7 @@ rsyslog.pid
/tower-license
/tower-license/**
tools/prometheus/data
tools/docker-compose/Dockerfile
Copy link
Contributor

Choose a reason for hiding this comment

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

@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

@wenottingham
Copy link
Contributor Author

regate

Copy link
Member

@rooftopcellist rooftopcellist left a comment

Choose a reason for hiding this comment

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

I also tested this out locally and it works as expected

@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded (gate pipeline).

@softwarefactory-project-zuul softwarefactory-project-zuul bot merged commit d0270a1 into ansible:devel May 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants