Skip to content
This repository has been archived by the owner on Jan 30, 2024. It is now read-only.

Commit

Permalink
Problem: installer depends on non-existing pulp-manager
Browse files Browse the repository at this point in the history
Solution: use django-admin directly

This patch updates the installer to use djang-admin binary instead of pulp-manager.

re: #4450
https://pulp.plan.io/issues/4450
  • Loading branch information
dkliban committed Mar 18, 2019
1 parent 69dbf3e commit e1e5d04
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions roles/pulp3-devel/templates/alias.bashrc.j2
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ _pstatus_help="Report the status of all pulp-related services"

pclean() {
workon pulp
pulp-manager reset_db --noinput
pulp-manager migrate
pulp-manager reset-admin-password --password {{ pulp_default_admin_password }}
django-admin reset_db --noinput
django-admin migrate
django-admin reset-admin-password --password {{ pulp_default_admin_password }}
}
_pclean_help="Restore pulp to a clean-installed state"
# can get away with not resetting terminal settings here since it gets reset in phelp
Expand Down
8 changes: 4 additions & 4 deletions roles/pulp3-postgresql/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,23 +63,23 @@
when: pulp_install_plugins[item].source_dir is undefined

- name: Create database migrations for plugins
command: '{{ pulp_install_dir }}/bin/pulp-manager makemigrations {{ pulp_install_plugins[item].app_label}}'
command: '{{ pulp_install_dir }}/bin/django-admin makemigrations {{ pulp_install_plugins[item].app_label}}'
with_items: "{{ pulp_install_plugins }}"
register: result
changed_when: "'No changes detected in app' not in result.stdout"

- name: Run database auth migrations
command: '{{ pulp_install_dir }}/bin/pulp-manager migrate auth --no-input'
command: '{{ pulp_install_dir }}/bin/django-admin migrate auth --no-input'
register: migrate_auth
changed_when: "'No migrations to apply' not in migrate_auth.stdout"

- name: Run database migrations
command: '{{ pulp_install_dir }}/bin/pulp-manager migrate --no-input'
command: '{{ pulp_install_dir }}/bin/django-admin migrate --no-input'
register: result
changed_when: "'No migrations to apply' not in result.stdout"

- name: Set the Pulp admin user's password
command: '{{ pulp_install_dir }}/bin/pulp-manager reset-admin-password --password {{ pulp_default_admin_password }}'
command: '{{ pulp_install_dir }}/bin/django-admin reset-admin-password --password {{ pulp_default_admin_password }}'
no_log: true
when: pulp_default_admin_password is defined and migrate_auth.changed

Expand Down
2 changes: 1 addition & 1 deletion roles/pulp3/handlers/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
become: true

- name: Collect static content
command: '{{ pulp_install_dir }}/bin/pulp-manager collectstatic --noinput --link'
command: '{{ pulp_install_dir }}/bin/django-admin collectstatic --noinput --link'
register: staticresult
changed_when: "staticresult.stdout is not search('\n0 static files')"
become: true
Expand Down

0 comments on commit e1e5d04

Please sign in to comment.