How to change default root user in helm deployment? I follow the doc, but when log in, user doesn’t have Admin role.
Hey there!
<@U06TM7M40RK> Can you help with the questions in this thread?
Please continue to tag RunLLM (e.g <@U06TM7M40RK>) to have it continue generating responses!
To change the default root user in a Helm deployment and ensure that the user has Admin role, you can follow these steps:
-
Create a
user.props
File: This file should contain the username and password for the DataHub user. For example:datahub:SomePassword123
-
Create a Kubernetes Secret: Use the
user.props
file to create a Kubernetes secret. This secret will be used to configure the DataHub frontend.kubectl create secret generic datahub-users-secret --from-file=user.props=./path-to-your-user.props
-
Update the
values.yaml
File: Modify yourvalues.yaml
file to mount the secret as a volume in thedatahub-frontend
container. This ensures that the DataHub frontend uses the credentials from theuser.props
file.datahub-frontend: ... extraVolumes: - name: datahub-users secret: defaultMode: 0444 secretName: datahub-users-secret extraVolumeMounts: - name: datahub-users mountPath: /datahub-frontend/conf/user.props subPath: user.props
-
Apply the Updated Helm Chart: Use the following command to upgrade your Helm deployment with the updated
values.yaml
:helm upgrade datahub datahub/datahub --values path-to-values.yaml
-
Assign Admin Role: After logging in with the
datahub
user, you can assign the Admin role to other users. Navigate to Settings > Users & Groups > Users, and assign the Admin role to the desired user.
If the datahub
user does not have Admin permissions, you may need to manually update the role membership in the MySQL database where DataHub stores its metadata. You can do this by inserting the roleMembership
aspect for the datahub
user with the Admin role.
For more detailed instructions, you can refer to the <https://datahubproject.io/docs/0.13.1/authentication/changing-default-credentials|Changing the default user credentials> guide.
Would you like more detailed steps or further assistance on this?
Sources:
- <https://datahubproject.io/docs/0.13.1/authentication/changing-default-credentials|Changing the default user credentials> 0 button 0 button Hint: Mention @runllm in the thread for followups.
can I change the user to something else except “datahub”?
<@U06TM7M40RK> can I change the user to something else except “datahub”?
Yes, you can change the default user to something other than “datahub” by modifying the user.props
file. However, it’s important to ensure that the new user has the necessary permissions and roles assigned. Here’s how you can do it:
-
Create a
user.props
File: Define the new username and password in theuser.props
file. For example, if you want to change the user to “newuser”:newuser:NewPassword123
-
Create a Kubernetes Secret: Use the
user.props
file to create a Kubernetes secret.kubectl create secret generic datahub-users-secret --from-file=user.props=./path-to-your-user.props
-
Update the
values.yaml
File: Modify yourvalues.yaml
file to mount the secret as a volume in thedatahub-frontend
container.datahub-frontend: ... extraVolumes: - name: datahub-users secret: defaultMode: 0444 secretName: datahub-users-secret extraVolumeMounts: - name: datahub-users mountPath: /datahub-frontend/conf/user.props subPath: user.props
-
Apply the Updated Helm Chart: Upgrade your Helm deployment with the updated
values.yaml
.helm upgrade datahub datahub/datahub --values path-to-values.yaml
-
Assign Admin Role: After logging in with the new user, ensure that the user has the Admin role. You may need to manually update the role membership in the MySQL database if the new user does not automatically have Admin permissions.
It’s crucial to ensure that the new user is correctly configured with the necessary roles and permissions. If you encounter issues with permissions, you may need to manually adjust the role assignments in the backend database.
Would you like more detailed instructions on any specific part of this process?
Sources:
- <https://datahubproject.io/docs/0.13.1/authentication/changing-default-credentials|Changing the default user credentials> 0 button 0 button Hint: Mention @runllm in the thread for followups.
<@U06TM7M40RK> how to change role membership in database?