bmclaughlin / galaxy-dev

Galaxy development tools

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Galaxy development tools

Getting started

  1. Clone galaxy-dev repository:

    $ git clone git@github.com:ansible/galaxy-dev.git
    
  2. Clone submodule:

    $ cd galaxy-dev/
    
    $ git submodule update --init --remote
    
  3. (Workaround) Checkout pulp_ansible version 0.2.0b3:

    $ cd pulp_ansible/
    
    $ git checkout 0.2.0b3
    
  4. Build development docker image:

    $ make docker/build
    
  5. Run migrations:

    $ make docker/run-migrations
    
  6. Run development environment:

    $ make docker/up
    
  7. Create galaxy admin user:

    $ docker-compose run --rm galaxy-api manage createsuperuser
    
    Username: admin
    Password: admin
    
  8. Create pulp admin user:

    $ docker-compose run --rm pulp-api manage createsuperuser
    
    Username: admin
    Password: admin
    

Note

If you want to use different user credentials, make sure pulp credentials are updated in galaxy-api/galaxy_api/settings.py.

  1. Create pulp repository and distribution:

    $ docker-compose run --rm pulp-api manage shell
    
    Python 3.6.8 (default, Aug  7 2019, 17:28:10)
    [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)] on linux
    Type "help", "copyright", "credits" or "license" for more information.
    (InteractiveConsole)
    
    >>> from pulpcore.app.models import Repository
    >>> from pulp_ansible.app.models import AnsibleDistribution
    
    >>> repo = Repository.objects.create(name='automation-hub')
    
    >>> AnsibleDistribution.objects.create(name='automation-hub', base_path='automation-hub', repository=repo)
    <AnsibleDistribution: automation-hub>
    
    >>> # Press <CTRL+D> to exit.
    

Note

If API is running without UI, authorization can be disabled for testing purposes but commenting default permission classes in galaxy-api/galaxy_api/settings.py:

REST_FRAMEWORK = {
    # ...
    'DEFAULT_PERMISSION_CLASSES': [
        # 'rest_framework.permissions.IsAuthenticated',
        # 'galaxy_api.auth.auth.RHEntitlementRequired',
    ],
    # ...
}

About

Galaxy development tools


Languages

Language:Shell 41.6%Language:Dockerfile 32.9%Language:Makefile 17.3%Language:Python 8.3%