Only the administrator account in the security center has permission to operate, which includes queue management, tenant management, user management, alarm group management, worker group management, token management and other functions. In the user management module, you can authorize resources, data sources, projects, etc.
Administrator login, default username/password: admin/dolphinscheduler123
Security Center->Queue Management page and clicks the “Create Queue” button to create a new queue.worker.properties configuration file. The parameter will require that the worker can run the command worker.tenant.auto.create = true; worker.tenant.auto.create = truesudoSecurity Center->Tenant Management page, and clicks the Create Tenant button to create a tenant.Users are divided into administrator users and ordinary users
Go to the Security Center -> User Management page and click the Create User button to create a user, administrator only.
The administrator enters the Security Center->User Management page and clicks the Edit button to edit user information.
After logging in as an ordinary user, click the user information in the drop-down box of the user name to enter the user information page, and click the Edit button to edit the user information.
The administrator enters the Security Center -> User Management page and clicks the Edit button. When editing user information, enter the new password to modify the user password.
After logging in as an ordinary user, click the user information in the user name drop-down box to enter the password modification page, enter the password and confirm the password and click the Edit button, then the password modification is successful.
The alarm group is a parameter set at startup. After the process ends, the status of the process and other information will be sent to the alarm group by email.
The administrator enters the Security Center -> Alarm Group Management page and clicks the Create Alarm Group button to create an alarm group.
Since the back-end interface has a login check, token management provides a way to perform various operations on the system by calling the interface.
The administrator enters the Security Center -> Token Management page, clicks the Create Token button, selects the expiration time and user, clicks the Generate Token button, and clicks the Submit button, then create the selected user's token successfully.
After a normal user logs in, click the user information in the username drop-down box, enter the token management page, select the expiration time, click the Generate Token button, and click the Submit button, then the user creates a token successfully.
Example of calling:
/** * test token */ public void doPOSTParam()throws Exception{ // create HttpClient CloseableHttpClient httpclient = HttpClients.createDefault(); // create http post request HttpPost httpPost = new HttpPost("http://127.0.0.1:12345/escheduler/projects/create"); httpPost.setHeader("token", "123"); // set parameters List<NameValuePair> parameters = new ArrayList<NameValuePair>(); parameters.add(new BasicNameValuePair("projectName", "qzw")); parameters.add(new BasicNameValuePair("desc", "qzw")); UrlEncodedFormEntity formEntity = new UrlEncodedFormEntity(parameters); httpPost.setEntity(formEntity); CloseableHttpResponse response = null; try { // execute response = httpclient.execute(httpPost); // response status code 200 if (response.getStatusLine().getStatusCode() == 200) { String content = EntityUtils.toString(response.getEntity(), "UTF-8"); System.out.println(content); } } finally { if (response != null) { response.close(); } httpclient.close(); } }
Security Center -> User Management page, and clicks the “Authorize” button of the user to be authorized, as shown in the following figure:revoke all permissions, grant read permissions, and grant all permissions (which including both read and write permissions).Each worker node belongs to some worker groups, and the default group is default.
When DolphinScheduler executes a task, it will assign the task to the configured worker group and the worker nodes in the group will execute the task.
worker-server/conf/application.yaml on the worker node where you want to configure the groups and modify the groups parameter in worker section.groups parameter are the names of the groups where the worker node belong. The default value is default.worker: ...... groups: - default - group-1 - group-2 ......
application.yaml as below: Security Center -> Worker Group Manage -> Create Worker Group -> fill in Group Name and Worker Addresses -> click confirm.dolphinscheduler_env.sh file.dolphinscheduler_env.sh file.The environment configuration is equivalent to the configuration in the dolphinscheduler_env.sh file.
Create a task node in the workflow definition, select the worker group and the environment corresponding to the worker group. When executing the task, the Worker will execute the environment first before executing the task.
NOTE: Please make sure you have associated the
Environmentswith yourworker groupsif you can not select theEnvironment Namein workflow definition page or when triggering workflows.
Add or update cluster
- Each process can be related to zero or several clusters to support multiple environment, now just support k8s.
Usage cluster
- After creation and authorization, k8s namespaces and processes will associate clusters. Each cluster will have separate workflows and task instances running independently.
Add or update k8s cluster
t_ds_k8s in the database for batch job and will removed later, the creation of the namespace now selects the cluster by drop-down options.Add or update namespace
ds_null_k8s means test mode which will not operate the cluster actually.