Skip to content
New issue

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

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

Already on GitHub? # to your account

feat(rpm): Adding support for building a discovery-installer rpm #7

Merged
merged 13 commits into from
Jun 7, 2024

Conversation

abellotti
Copy link
Contributor

@abellotti abellotti commented May 9, 2024

  • Add spec and supporting scripts to building a discovery-installer rpm
  • Version as 1.8 for installer
  • Pull 1.8 images (should be tagged with latest patch version)

Draft

  • update README.md for RPM based usage
  • add packit workflow
  • create-server-password should check for server password restrictions
  • support install time overrides (images, port, etc.)

NOTE:

@abellotti abellotti marked this pull request as draft May 9, 2024 19:23
@abellotti abellotti force-pushed the support_rpm_build branch 2 times, most recently from 3550fed to 5dc6db8 Compare May 10, 2024 00:25
@abellotti
Copy link
Contributor Author

abellotti commented May 10, 2024

Un-published Install time overrides can be provided with an optional configuration directory that the install will merge values when copying the container and env files.

The provided files will only include the values to overlay.

i.e.

discovery-installer install \
    --override-conf-dir ~/ci_quadlets_overlay.d

The optional directory will contain any of the files we need the installer to overlay (with just the data that needs changing), i.e:

- discovery-app.container
- discovery-celery-worker.container
- discovery-db.container
- discovery-redis.container
- discovery-server.container
- env-ansible.env
- env-app.env
- env-celery-worker.env
- env-db.env
- env-redis.env
- env-server.env

For example, specifying alternate images for versions to test or architecture, the override configuration directory would include:

discovery-server.container

[Container]
Image=quay.io/quipucords/quipucords:latest-arm64

discovery-app.container

[Container]
Image=quay.io/abellott/quipucords-ui:latest-arm64

@abellotti abellotti force-pushed the support_rpm_build branch 2 times, most recently from 07e7af8 to f5d8183 Compare May 13, 2024 19:45
abellotti added 5 commits May 14, 2024 13:20
- Add spec and supporting scripts to building a discovery-installer rpm
- Version as 1.7 for installer
- Pull 1.7 images (should be tagged with latest patch version)
- Preferring to use /usr/share/discovery-installer instead of
  /etc/discovery-installer as the RPM package installation directory
  as we're not a system/OS service.
- Added server password restriction checks.
  - password must be at least 10 characters long
  - password must include at least one letter a-z A-Z
  - password cannot be dscpassw0rd or qpcpassw0rd
- Supporting packit for upstream copr builds
…tall

- installer should check the existence of the server password
  and application secret only when running the install.
@abellotti abellotti force-pushed the support_rpm_build branch from f5d8183 to dd6c320 Compare May 14, 2024 18:13
abellotti added 2 commits May 14, 2024 17:16
- Updated the README.md and NOTES.md files to reflect the RPM
  based usage of the discovery-installer and managing services
  via systemctl.
- Removed the Environment= from the Ansible env file (those are unit
  file signatures)
- Removed the trailing lines from the container unit files
@abellotti abellotti force-pushed the support_rpm_build branch 5 times, most recently from 630e9d5 to 618fc63 Compare May 16, 2024 10:29
- Support -v or --verbose for debugging the overrides performed
- Support *.env file overrides from the --override-conf-dir directory.
- Support *.container file overrides from the --override-conf-dir directory.
@abellotti abellotti force-pushed the support_rpm_build branch from 618fc63 to da024ed Compare May 16, 2024 10:45
abellotti added 4 commits May 16, 2024 13:05
- Improved some variable names uses in the method.
- Missing copy of the container files in case there were no overrides.
- Keeping the installer's responsibility with just Discovery.
  opening up firewall port and such will be documented outside
  the scope of the installer.
- Now that we build x.y tags with releases (i.e. 1.8.1 and 1.8)
  updating the config container files to pull the x.y tag image
  so the 1.8 RPM always pulls the latest discovery 1.8 images.
- For consistency with upstream qpc and also, CentOS Stream 8
  image is no longer available for packit.
@abellotti abellotti marked this pull request as ready for review June 6, 2024 20:25
…n too.

- Updated the create-app-secret script to not default to development as
  it can be used for production too. Script now checks for empty inputs
  and prompts the user a second time for verification before creating
  the podman secret.

- Updated the NOTES.md file to include the Quadlet References we had
  in the old README.md
@abellotti abellotti merged commit 2507de0 into quipucords:main Jun 7, 2024
10 checks passed
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants