-
Notifications
You must be signed in to change notification settings - Fork 20
Add Foreman development environment #259
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
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| --- | ||
| - name: Deploy Foreman Development Environment | ||
| hosts: "{{ target_host if target_host is defined and target_host != '' else 'quadlet' }}" | ||
| become: true | ||
| vars_files: | ||
| - "../../../src/vars/defaults.yml" | ||
| - "../../../src/vars/{{ certificate_source }}_certificates.yml" | ||
| - "../../../src/vars/images.yml" | ||
| - "../../../src/vars/database.yml" | ||
| - "../../../src/vars/foreman.yml" | ||
| - "../../../src/vars/base.yaml" | ||
| vars: | ||
| httpd_foreman_backend: "http://localhost:3000" | ||
| roles: | ||
| - role: pre_install | ||
| - role: certificates | ||
| - role: postgresql | ||
| vars: | ||
| postgresql_databases: | ||
| - name: "{{ candlepin_database_name }}" | ||
| owner: "{{ candlepin_database_user }}" | ||
| - name: "{{ foreman_development_database_name }}" | ||
| owner: "{{ foreman_database_user }}" | ||
| - name: "{{ foreman_development_database_name }}_test" | ||
| owner: "{{ foreman_database_user }}" | ||
| - name: "{{ pulp_database_name }}" | ||
| owner: "{{ pulp_database_user }}" | ||
| postgresql_users: | ||
| - name: "{{ candlepin_database_user }}" | ||
| password: "{{ candlepin_database_password }}" | ||
| - name: "{{ foreman_database_user }}" | ||
| password: "{{ foreman_database_password }}" | ||
| role_attr_flags: SUPERUSER | ||
| - name: "{{ pulp_database_user }}" | ||
| password: "{{ pulp_database_password }}" | ||
| - role: redis | ||
| - role: candlepin | ||
| - role: httpd | ||
| - role: pulp | ||
| - role: foreman_development | ||
| post_tasks: | ||
| - name: Display development environment information | ||
| ansible.builtin.debug: | ||
| msg: | | ||
| Foreman development environment deployed successfully! | ||
|
|
||
| Access URLs: | ||
| - Foreman UI: https://{{ foreman_development_url }} | ||
| - Direct Rails: http://localhost:3000 (when running) | ||
|
|
||
| Credentials: | ||
| - Username: {{ foreman_development_admin_user }} | ||
| - Password: {{ foreman_development_admin_password }} | ||
|
|
||
| Next steps: | ||
| - SSH into the system | ||
| when using Vagrant: vagrant ssh quadlet | ||
| when using a remote system: ssh {{ foreman_development_user }}@{{ ansible_facts['fqdn'] }} | ||
| - Navigate to {{ foreman_development_foreman_dir }} | ||
| - Run: bundle exec foreman start | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| --- | ||
| help: | | ||
| Deploy and manage Foreman development environment with git-based Foreman and containerized backend services. | ||
|
|
||
| variables: | ||
| foreman_development_enabled_plugins: | ||
| help: Plugin to enable (can be used multiple times) | ||
| action: append | ||
| parameter: --foreman-development-enabled-plugin | ||
| target_host: | ||
| help: Target hostname or IP address for deployment | ||
| action: store | ||
ehelms marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| foreman_development_user: | ||
| help: Username for the development user account | ||
| action: store | ||
| foreman_development_github_username: | ||
| help: GitHub username to add as additional remote for git checkouts | ||
| action: store | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,12 @@ | ||
| --- | ||
| collections: | ||
| - ansible.posix | ||
| - community.crypto | ||
| - community.postgresql | ||
| - community.general | ||
| - name: containers.podman | ||
| version: ">=1.16.4" | ||
| - name: https://github.com/theforeman/forklift | ||
| type: git | ||
| - name: theforeman.foreman | ||
| - name: theforeman.operations |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,77 @@ | ||
| --- | ||
| foreman_development_user: "vagrant" | ||
| foreman_development_group: "{{ foreman_development_user }}" | ||
| foreman_development_deployment_dir: "/home/{{ foreman_development_user }}" | ||
| foreman_development_foreman_dir: "{{ foreman_development_deployment_dir }}/foreman" | ||
| foreman_development_cert_dir: "{{ foreman_development_deployment_dir }}/foreman-certs" | ||
|
|
||
| foreman_development_ca_certificate: "{{ foreman_ca_certificate }}" | ||
| foreman_development_client_certificate: "{{ foreman_client_certificate }}" | ||
| foreman_development_client_key: "{{ foreman_client_key }}" | ||
|
|
||
| foreman_development_admin_user: "admin" | ||
| foreman_development_admin_password: "changeme" | ||
|
|
||
| foreman_development_git_repo: "https://github.com/theforeman/foreman.git" | ||
| foreman_development_git_revision: "develop" | ||
| foreman_development_github_username: "" | ||
|
|
||
| foreman_development_rails_port: 3000 | ||
| foreman_development_rails_command: "puma -w 2 -p {{ foreman_development_rails_port }} --preload -b tcp://0.0.0.0" | ||
|
|
||
| foreman_development_url: "http://{{ ansible_facts['fqdn'] }}:{{ foreman_development_rails_port }}" | ||
|
|
||
| foreman_development_database_host: "localhost" | ||
| foreman_development_database_port: 5432 | ||
| foreman_development_database_name: "foreman_development" | ||
| foreman_development_database_user: "foreman" | ||
| foreman_development_database_password: "foreman" | ||
|
|
||
| foreman_development_nodejs_stream: "22" | ||
|
|
||
| foreman_development_plugin_registry: | ||
| katello: | ||
| name: "katello/katello" | ||
| settings_template: "katello.yaml.j2" | ||
| manage_repo: true | ||
| extra_gemfiles: | ||
| - "gemfile.d/test.rb" | ||
| foreman_remote_execution: | ||
| name: "theforeman/foreman_remote_execution" | ||
| manage_repo: true | ||
| foreman_ansible: | ||
| name: "theforeman/foreman_ansible" | ||
| settings_template: "foreman_ansible.yaml.j2" | ||
| manage_repo: true | ||
| foreman_rh_cloud: | ||
| name: "theforeman/foreman_rh_cloud" | ||
| manage_repo: true | ||
| foreman_discovery: | ||
| name: "theforeman/foreman_discovery" | ||
| manage_repo: true | ||
| foreman_openscap: | ||
| name: "theforeman/foreman_openscap" | ||
| manage_repo: true | ||
| foreman_bootdisk: | ||
| name: "theforeman/foreman_bootdisk" | ||
| manage_repo: true | ||
|
|
||
| foreman_development_default_plugins: | ||
| - katello | ||
| - foreman_remote_execution | ||
|
|
||
| foreman_development_enabled_plugins: [] | ||
|
|
||
| foreman_development_packages: | ||
| - git | ||
| - ruby-devel | ||
| - npm | ||
| - postgresql-devel | ||
| - libxml2-devel | ||
| - libxslt-devel | ||
| - libcurl-devel | ||
| - gcc-c++ | ||
| - make | ||
| - rubygem-bundler | ||
| - rubygem-irb | ||
| - postgresql |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.