Varnish Controller can be used with only one system admin in a basic setup. The system admin have automatically full access to all resources and actions via the REST API.
An system admin can only be created via the
brainz process, which can be automated.
Create/modify/add a system admin in interactive mode:
# Create a new system admin # The arguments(or env variables) db-name, db-pass, db-user, db-port, db-host may also # be required in order to access the database for the below command. $ varnish-controller-brainz -mod-admin-user Create new Varnish Controller system admin user. Enter username: test Enter password: Created new system admin: test. # Update existing user password $ varnish-controller-brainz -mod-admin-user Create new Varnish Controller system admin user. Enter username: test User already exists. Updating password. Enter password: Updated system admin password for user "test".
This process can be automated by either specifying the environment variables for user and password. Brainz will automatically start after updating/creating the user(if not
-quit is specified):
$ export VARNISH_CONTROLLER_SYSTEM_ADMIN_USER=test $ export VARNISH_CONTROLLER_SYSTEM_ADMIN_PASS=test $ export VARNISH_CONTROLLER_MOD_ADMIN_USER=true $ varnish-controller-brainz User already exists. Updating password. Updated system admin password for user "test" ...
Database credentials is required for the above command to execute successfully.
Once a system admin user has been created, the
-mod-admin-user is not required. Brainz can be executed with
-quit argument which
will make brainz exit after user creation.
Note Be sure to set a secure password for the system admin account(s).