Customizing PX instance
Instruction of customizing a PX instance and setting a custom UID.
You can install the settings to enable customizing the PX instance size and setting a custom UID. You can directly specify the amount of CPU and RAM for both the conductor and compute nodes. You can also specify the number of used compute nodes for creating a PX instance from the UI. You can specify the UID range and set a custom UID to run for the created PX instance from the same UI.
Installing process
If you want to install the settings, make the following steps:
- Refresh the DataStage on the cluster to the latest version.
- Edit the DataStage CR to include the new attributes for customized instance in the
spec field. Warning: Enabling this feature disables the possibility of use Remote Dataplane.
- Use the following command:
oc edit datastage -n ds - Change spec settings, they should look similar to the following
example:
spec: enableCustomSizing: true enableCustomUID: true uidMax: 1000699999 uidMin: 1000690000Table 1. Attributes for spec settings Attribute Description enableCustomSizing Use this attribute to specify the number of compute nodes and the CPU and RAM of the conductor and compute nodes. enableCustomUID This attribute applies only when enableCustomSizingis enabled. The new PX runtime instance can be run as a specified user ID.uidMin This attribute is the minimum user ID value for newly created PX runtime instances. Set it to the minimum of openshift.io/sa.scc.uid-rangevalue by default. IfenableCustomUIDis enabled, then this attribute is mandatory.uidMax This attribute is the maximum user ID value for newly created PX runtime instances. Set it to the (min_value + range -1) of openshift.io/sa.scc.uid-rangevalue by default. IfenableCustomUIDis enabled, then this attribute is mandatory.
- Use the following command:
- Wait for DataStage CR to reconcile and for the
datastage-px-provisioning-extensionconfigmap to create. After that you can see the customized settings and specified UID range in the configmap by using the following command:oc get configmap datastage-px-provisioning-extension -n ds -o yaml
Configuring the UID to be run as any user
You can configure the UID to be run as any user by making the following steps:
- Copy the contents of restricted-v2
scc.
oc get scc restricted-v2 -o yaml -n ds - Create a yaml file to paste the
contents.
vi restricted-v2-anyuid.yaml - Change the runAsUser entry to allow
RunAsAny. Save the new yaml file.runAsUser: type: RunAsAny - Create a scc.
oc create -f restricted-v2-anyuid.yaml - Grant the scc access to the service account used by
preruntime.
oc adm policy add-scc-to-user restricted-v2-anyuid system:serviceaccount:${PROJECT_CPD_INST_OPERANDS}:zen-norbac-sa
Creating the PX instance
You can create the PX instance by making the following steps:
- Go to the cluster UI and to the Instances page. Create a PX instance:
- Find an extra custom option for the hardware size of the PX instance. If you click it, then you can specify the new values of the PX instances. By default it is set to the same spec as large instance. The minimum value is limited to the value of the small instance.
- Another tab is added, where you can specify the UID to be run for the newly created PX instance. Click the checkbox, where you can find the UID value slider. Minimum and maximum value should be set to the uidMin and uidMax values, as you set in the DataStage CR.
- Confirm the settings. The should PX Instance be created with the specifications and UID, that you specified in the previous step.