-
Notifications
You must be signed in to change notification settings - Fork 18
Creating Users In Test Development Environment
While testing the server in a non-production environment you may notice a lack of support for user login / logout capability. Modern browsers will not function properly with a "localhost"-based URL.
To test the user account management functionality you will need to run the production application on a server like heroku or a digital ocean droplet. There will be an update when the software can be made to work in a docker container.
Creating a user from the command line is done with paster.
paster --plugin=ckan user add admin
You will be prompted for a e-mail address and password.
Once the admin user is created, they may be granted sysadmin privileges with the following paster command.
paster --plugin=ckan sysadmin add admin
The documentation states that the command line interface allows for creation of the user account and the granting of sysadmin privileges simultaneously as in the following example.
paster sysadmin add seanh email=seanh@localhost name=seanh -c production.ini
Much of the functionality surrounding user administration is not functional in the 'localhost' configuration. For that reason it will be necessary to implement the production environment on a test or development server. When that is necessary, the method to start the server is different than for the development environment.
Before starting the server the following change will need to be made to the production.ini file.
ckan.site_url = http://{IPV4 address}:5000
with the IPV4 address of the host domain inserted into the above entry.
Use the following command to start the ckan server on a cloud server:
paster --plugin=ckan serve production.ini port=5000 database_url=postgresql://ckan_default:{password}@0.0.0.0/ckan_default