Configure Templates
Compute and Service profiles are based on environment templates powered by Rafay's Environment Manager.
We will be using Rafay's curated and pre-created system templates available from the catalog in our compute and service profiles. The Org Admin for the user's Rafay Org has the privileges to share the system templates from Rafay's Catalog to specific/all projects.
Compute Template¶
As an Org Admin, navigate to "System->Template Catalog". On the "Multi-tenancy on K8s" item/card,
- Click on "Get Started" and follow the wizard
- Provide a name, version and select the name of the project you created in the previous step (e.g. gpu-paas)
- Save as Draft
Agent Details¶
- Under the "Agents" tab, click on "Add Agent"
- Select the name of the agent you configured in the prior step
- Save your changes
Input Variables¶
In this step, the administrator will configure and specify input variables. These will not be visible to downstream users and they cannot be over-written as well.
Host Cluster Name¶
In our case, the compute instance will be deployed as a virtual cluster on the shared, host cluster. We need to point the template to it.
- Click on the "Input Variables" tab and in the search box, enter "Host Cluster Name"
- Click on Edit for the identified row
- Enter the name of the cluster you provisioned in the prior step. An example is shown below where our host cluster has the name "gpu"
- Save your changes
Compute Flavors¶
We will reuse the default "small/medium/large" flavors of compute.
- Click on the "Input Variables" tab and in the search box, enter "Namespace Quota Size"
- Click on Edit for the identified row
- Notice the three flavors and the default value being small
In the step below, we will specify resources for the small, medium and large flavors.
Compute Flavor Sizing¶
In our case, the compute instances will be deployed as a virtual cluster on the shared, host cluster. These virtual clusters will be deployed into a Kubernetes namespace for which we need to specify resource quotas. We will update the default values for the resources to suit our requirements.
- Click on the "Input Variables" tab and in the search box, enter "Namespace Quota's"
- Click on Edit and update the default sizing for Small, Medium and Large
Info
Since users are likely testing this in an extremely resource constrained environment, we will specify low values.
- Delete the JSON in the textbox completely
- Copy/Paste the json below
- Save your changes
{
small = {
cpu_requests = "4"
memory_requests = "8Gi"
cpu_limits = "4"
memory_limits = "8Gi"
gpu_requests = "1"
gpu_limits = "1"
}
medium = {
cpu_requests = "8"
memory_requests = "16Gi"
cpu_limits = "8"
memory_limits = "16Gi"
gpu_requests = "2"
gpu_limits = "2"
}
large = {
cpu_requests = "16"
memory_requests = "32Gi"
cpu_limits = "16"
memory_limits = "32Gi"
gpu_requests = "4"
gpu_limits = "4"
}
}
Jupyter Notebook Template¶
Jupyter Notebooks are web based applications. When these are deployed on your cluster, they will be exposed to users via Kubernetes based Ingress. So, please ensure that you have a properly configured Ingress Controller in your host cluster by following the infrastructure related instructions. The Ingress for the notebook will be exposed via a https URL on a domain.
As an Org Admin, navigate to "System->Template Catalog". On the "Jupyter Notebook" item/card,
- Click on "Get Started" and follow the wizard
- Provide a name, version and select the name of the project you created in the previous step (e.g. gpu)
- Save as Draft
Info
To aid with testing and evaluation, the Rafay platform provides the option to automatically publish the DNS and inject a certificate for the https URL on a Rafay managed domain. We will use this option for our exercise.
Agent Details¶
- In your project, navigate to Environments->Environment Templates
- Click on Edit for your new Jupyter Notebook template
- Under the "Agents" tab, click on "Add Agent"
- Select the name of the agent you configured in the prior step
- Save as Draft