Managing Accounts
Creating User Accounts
The first time you open the BeetleboxCI application in a web browser, you will be prompted to create an account. The first account you create through this mechanism will be a superuser account.
You can create additional team member accounts within BeetleboxCI for members of your organisation. All the users will still have access to all the pipelines that belong to your organisation.
To create new user accounts, you need to have admin permissions on your existing user account.
- Access the settings using the symbol in the top right hand corner of the BeetleboxCI web app in your browser.
- Under Team Management, click Add User.
- Enter the details for the new user.
- Select whether or not the new account will be an admin or a normal user.
Admin permissions give these new accounts the ability to create and delete additional users. It does not however, give access to the admin control panel, which only superuser accounts have.
Providing Superuser Permissions
Superuser permissions can only be given to standard user accounts by existing superusers.
- Browse to the admin control panel at http://[server_address]:32767/customised_admin/
- Under Authentication and Authorization, click Users to see the list of existing users.
- Select the user account that you want to edit.
- Check the Staff status and Superuser status options.
- Click SAVE on the bottom right of the page.
BeetleboxCI supports multi-tenancy, which allows different departments to use the same application while each tenant has their own individual pipelines which do not interfere with each other. When a new tenant is created, it will need at least one user account with admin (but not necessarily superuser) permissions.
- Browse to the admin control panel at http://[server_address]:32767/customised_admin/
- Under Automation, click Tenants to see the list of existing tenants.
- Click Add Tenant on the top right.
- Enter a name for the tenant under organisation name. This is the only field that is mandatory, the other fields are optional.
- Click SAVE on the bottom right.
- Click Users on the left hand column.
- Click Add User.
- Enter the email address of the user as the username and set a suitable password.
- Click "Save and continue editing".
- If you want to make this account a superuser, check sthe Staff status and Superuser status options and click SAVE on the bottom right.
- Click User_profiles on the left hand column.
- Click ADD USER_PROFILE on the top right.
- For the User, select the User account that you just created and check the "Root user" box. This option prevents the user account from being accidentally deleted from the Team Management of the application (though it can still be deleted from the admin control panel)
- For the Tenant, select the Tenant that you just created.
- For the role, select Admin. This gives permission for this account to create additional accounts for this tenant from the Team Management section of the application.
- Click SAVE.
Creating Superuser Accounts Programmatically
If you are a superuser and you forget the login details of the superuser account, you will need to create a new superuser account to regain access to the admin control panel of the application. This requires running a command on the container which hosts the web server.
On the (virtual) machine where BeetleboxCI is installed, you will need to do the following steps:
Firstly, we need to retrieve the name of the container that is running the web application. The following command retrieves the name and saves it in a variable named WEBPOD.
WEBPOD=$(kubectl get pods --selector=io.kompose.service=web --output=jsonpath='{.items[*].metadata.name}')
Then we run the following command, which runs a script inside the container:
kubectl exec -it $WEBPOD -c web -- python3 manage.pyc createsu
You will be prompted to enter your details to create a new superuser account.
Afterwards, you can log in to the admin control panel of BeetleboxCI again, where you may choose to reset the password of the original superuser account.