Uploaded image for project: 'IGB'
  1. IGB
  2. IGBF-2364

Investigate: How to create Django super-user account using ansible

    Details

    • Type: Task
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
      None

      Description

      We need to create a Django admin user for each new App Store.

      When provisioning an App Store manually, we do this by running:

      • manage.py createsuperuser [adminuser]

      When we do this, manage.py asks you to enter a password manually.

      Currently, there does not appear to be an option to pass in the password as a command line option.

      However, when using manage.py from ansible (using the django_manage role), we cannot easily enter the password manually.

      Others have discussed this problem, and a couple of solutions were proposed here:

      For this task, design and develop a solution that will allow us to write and run a django_admin or other task that creates the superuser. Include a comment linking to the above StackOverflow post if you write a script or any other new code for this.

      See also documentation for the django_admin role:

      Describe the solution you think is best in the comments below. We'll implement it under a separate ticket.

        Attachments

          Issue Links

            Activity

            ann.loraine Ann Loraine created issue -
            ann.loraine Ann Loraine made changes -
            Field Original Value New Value
            Epic Link IGBF-2323 [ 18477 ]
            ann.loraine Ann Loraine made changes -
            Rank Ranked higher
            ann.loraine Ann Loraine made changes -
            Story Points 1 0.5
            ann.loraine Ann Loraine made changes -
            Description We need to create a Django admin user for each new App Store.

            When provisioning an App Store manually, we do this by running:

            * manage.py createsuperuser [adminuser]

            When we do this, manage.py asks you to enter a password manually.

            Currently, there does not appear to be an option to pass in the password as a command line option.

            However, when using manage.py from ansible (using the django_manage role), we cannot easily enter the password manually.

            Others have discussed this problem, and a couple of solutions were proposed here:

            * https://stackoverflow.com/questions/6244382/how-to-automate-createsuperuser-on-django

            For this task, design and develop a solution that will allow us to write and run a django_admin or other task that creates the superuser. Include a comment linking to the above StackOverflow post if you write a script or any other new code for this.

            See also documentation for the django_admin role:

            * https://docs.ansible.com/ansible/latest/modules/django_manage_module.html





            To start, investigate solution might be to write a python script that automates this, as suggested in this post:

            * https://stackoverflow.com/questions/6244382/how-to-automate-createsuperuser-on-django

            We need to create a Django admin user for each new App Store.

            When provisioning an App Store manually, we do this by running:

            * manage.py createsuperuser [adminuser]

            When we do this, manage.py asks you to enter a password manually.

            Currently, there does not appear to be an option to pass in the password as a command line option.

            However, when using manage.py from ansible (using the django_manage role), we cannot easily enter the password manually.

            Others have discussed this problem, and a couple of solutions were proposed here:

            * https://stackoverflow.com/questions/6244382/how-to-automate-createsuperuser-on-django

            For this task, design and develop a solution that will allow us to write and run a django_admin or other task that creates the superuser. Include a comment linking to the above StackOverflow post if you write a script or any other new code for this.

            See also documentation for the django_admin role:

            * https://docs.ansible.com/ansible/latest/modules/django_manage_module.html


            Describe the solution you think is best in the comments below. We'll implement it under a separate ticket.
            ann.loraine Ann Loraine made changes -
            Summary Investigate: How to create a super-user account using ansible Investigate: How to create Django super-user account using ansible
            ann.loraine Ann Loraine made changes -
            Link This issue blocks IGBF-2365 [ IGBF-2365 ]
            cdias1 Chester Dias (Inactive) made changes -
            Assignee Chester Dias [ cdias1 ]
            cdias1 Chester Dias (Inactive) made changes -
            Status To-Do [ 10305 ] In Progress [ 3 ]
            cdias1 Chester Dias (Inactive) made changes -
            Status In Progress [ 3 ] To-Do [ 10305 ]
            cdias1 Chester Dias (Inactive) made changes -
            Status To-Do [ 10305 ] In Progress [ 3 ]
            cdias1 Chester Dias (Inactive) made changes -
            Status In Progress [ 3 ] Needs 1st Level Review [ 10005 ]
            cdias1 Chester Dias (Inactive) made changes -
            Assignee Chester Dias [ cdias1 ] Ann Loraine [ aloraine ]
            ann.loraine Ann Loraine made changes -
            Sprint Spring 8 : 24 Apr to 8 May [ 93 ] Spring 8 : 24 Apr to 8 May, Spring 8 : 11 May to 25 May [ 93, 94 ]
            ann.loraine Ann Loraine made changes -
            Rank Ranked higher
            ann.loraine Ann Loraine made changes -
            Status Needs 1st Level Review [ 10005 ] First Level Review in Progress [ 10301 ]
            ann.loraine Ann Loraine made changes -
            Status First Level Review in Progress [ 10301 ] Ready for Pull Request [ 10304 ]
            ann.loraine Ann Loraine made changes -
            Status Ready for Pull Request [ 10304 ] Pull Request Submitted [ 10101 ]
            ann.loraine Ann Loraine made changes -
            Status Pull Request Submitted [ 10101 ] Reviewing Pull Request [ 10303 ]
            ann.loraine Ann Loraine made changes -
            Status Reviewing Pull Request [ 10303 ] Merged Needs Testing [ 10002 ]
            ann.loraine Ann Loraine made changes -
            Status Merged Needs Testing [ 10002 ] Post-merge Testing In Progress [ 10003 ]
            ann.loraine Ann Loraine made changes -
            Resolution Done [ 10000 ]
            Status Post-merge Testing In Progress [ 10003 ] Closed [ 6 ]

              People

              • Assignee:
                ann.loraine Ann Loraine
                Reporter:
                ann.loraine Ann Loraine
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: