# Single Container Planning # Sept 16, 2022 **Goal:** Enable users of `pulp/pulp` container image to scale their Pulp deployment from a single container running all the services to many containers running individual services. Problems with specialized images: - it's hard to ensure that you are running the same code in all of the specialized containers ### AI * the operator to rework the container build process to not have ansible be used, instead a documented docker file * document the dockerfile for the single container image * https://github.com/pulp/pulp-oci-images/issues/269 * move the operator container build files to the pulp-oci-images repo ### Possible Followon Steps * bmbouter to file issue to remove "not production ready" language and list single container as a usage method for pulp * rename the single container image to be 'all-in-one' * rename the operator image to be the 'pulp' image # Oct 20, 2022 PRs & Successful CI runs: * Modify the images: https://github.com/pulp/pulp-oci-images/pull/311/checks * Modify the images and upload to quay.io/mikedep333/ : https://github.com/mikedep333/pulp-oci-images/pull/2/checks * Run the modified images with pulp-operator: https://github.com/pulp/pulp-operator/pull/698/checks * Complication: * single container "pulp:latest" has stable set of plugins, at stable versions * "pulp:nightly" is the alternate * Instructions default to "pulp:latest" * Operated "pulp:latest" have development set of plugins, at development versions * "pulp:stable" is the alternate * default of the operator is "pulp:stable" solution: Both pulp and pulp-minimal will be tagged as "stable", which will also be called "latest". The alternative will be "nightly" # Sept 29, 2022 ## Proposed plan ### Current image layers (operated): * pulp/base (1. installs RPMs for pulp 2. pip installs pulpcore + optional deps for certguard 3. creates dirs/symlinks 4. collects static 5. **copies scripts (ENTRYPOINT + commands + helpers)** 6. **sets ENTRYPOINT to pulp-common-entrypoint.sh**) * pulp/pulp (1. pip installs plugins) * pulp/pulp-web (1. copies snippets and UI from "pulp" onto the image "docker.io/centos/nginx-116-centos7:1.16" 2. sets CMD to nginx) * pulp/galaxy (1. pip installs plugins 2. collects static) * pulp/galaxy-web (1. copies snippets and UI from "galaxy" onto the image "docker.io/centos/nginx-116-centos7:1.16" 2. sets CMD to nginx) ### Current image layers (S6) * pulp/pulp_ci_centos (1. installs/configures S6 2. installs RPMs for pulp + nginx + postgres + redis 3. pip installs setproctitle 4. configures podman 5. creates dirs/symlinks 6. **copies files (helper scripts, s6 config/scripts, nginx.conf, ssl config)** 7. **sets ENTRYPOINT to S6** 8. **exposes port 80**) * pulp/pulp (1. pip installs pulpcore + plugins + requests 2. symlinks snippets) * pulp/pulp-galaxy-ng (1. pip installs pulpcore + galaxy_ng + requests 2. symlinks snippets) ### Proposed image layers * pulp/base (1. installs RPMs for pulp 2. pip installs setproctitle + optional deps for certguard 3. creates dirs/symlinks 4. configures podman 5. **copies operated scripts** 6. **sets ENTRYPOINT to pulp-common-entrypoint.sh**)) * pulp/pulp-minimal (1. pip installs pulpcore + plugins, 2. collects static) * pulp/pulp-web (1. copies snippets from "pulp-minimal" onto the image "docker.io/centos/nginx-116-centos7:1.16" 2. sets CMD to nginx) * pulp/galaxy-minimal (also pulp/galaxy) (1. pulp installs galaxy 2. collects static) * pulp/galaxy-web (1. copies snippets and UI from "galaxy" onto the image "docker.io/centos/nginx-116-centos7:1.16" 2. sets CMD to nginx) * pulp/pulp_ci_centos (1. installs/configures S6 2. installs RPMs for nginx + postgres + redis 3. **Copies s6-used files (helper scripts, s6 config/scripts, nginx.conf, ssl config)** **4. Sets CMD to S6** 5. **exposes port 80**) * pulp/pulp (1. pip installs pulpcore + plugins + requests 2. symlinks snippets 3. collects static) * pulp/pulp-galaxy-ng (1. pip installs pulpcore + galaxy_ng + requests 2. symlinks snippets 3. collects static) # Sept 28, 2022 * Mike will contribute the S6 layer to the "operator image" as part of this ticket * https://github.com/pulp/pulp-oci-images/issues/287 * ^ has prio-list on it * Will have a followup call tomorrow to align with @fao and @humberto too