diff --git a/app/static/images/nomad.png b/app/static/images/nomad.png new file mode 100644 index 000000000..08cfcaf06 Binary files /dev/null and b/app/static/images/nomad.png differ diff --git a/tosca-templates/kubernetes.parameters.yml b/tosca-templates/kubernetes.parameters.yml index fa6666a03..1e430ff46 100644 --- a/tosca-templates/kubernetes.parameters.yml +++ b/tosca-templates/kubernetes.parameters.yml @@ -38,6 +38,12 @@ inputs: kube_nvidia_support: tab: Kubernetes Data + kube_cert_manager: + tab: Kubernetes Data + + kube_cert_user_email: + tab: Kubernetes Data + tabs: - HW Data - - Kubernetes Data \ No newline at end of file + - Kubernetes Data diff --git a/tosca-templates/kubernetes.yaml b/tosca-templates/kubernetes.yaml index 236c04fda..76c530290 100644 --- a/tosca-templates/kubernetes.yaml +++ b/tosca-templates/kubernetes.yaml @@ -85,6 +85,16 @@ topology_template: default: false constraints: - valid_values: [ false, true ] + kube_cert_manager: + type: boolean + description: Flag to install Cert-Manager + default: false + constraints: + - valid_values: [ false, true ] + kube_cert_user_email: + type: string + description: Email to be used in the Let's Encrypt issuer + default: "jhondoe@server.com" node_templates: @@ -102,11 +112,13 @@ topology_template: source: 6443 properties: admin_username: kubeuser - install_nfs_client: false + install_nfs_client: true admin_token: { get_input: admin_token } install_kubeapps: { get_input: install_kubeapps } version: { get_input: kube_version } nvidia_support: { get_input: kube_nvidia_support } + cert_manager: { get_input: kube_cert_manager } + cert_user_email: { get_input: kube_cert_user_email } requirements: - host: front diff --git a/tosca-templates/nomad.yaml b/tosca-templates/nomad.yaml new file mode 100644 index 000000000..af69bc57c --- /dev/null +++ b/tosca-templates/nomad.yaml @@ -0,0 +1,120 @@ +tosca_definitions_version: tosca_simple_yaml_1_0 + +imports: + - ec3_custom_types: https://raw.githubusercontent.com/grycap/ec3/tosca/tosca/custom_types.yaml + +metadata: + display_name: Launch a Nomad Virtual Cluster + icon: images/nomad.png + + +description: TOSCA template for launching a Nomad Virtual Elastic Cluster. + +topology_template: + inputs: + wn_num: + type: integer + description: Number of WNs in the cluster + default: 1 + required: yes + fe_cpus: + type: integer + description: Number of CPUs for the front-end node + default: 2 + required: yes + constraints: + - valid_values: [ 2, 4, 8, 16, 32, 64 ] + fe_mem: + type: scalar-unit.size + description: Amount of Memory for the front-end node + default: 4 GB + required: yes + constraints: + - valid_values: [ 4 GB, 8 GB, 16 GB, 32 GB, 64 GB, 128 GB, 256 GB, 512 GB ] + wn_cpus: + type: integer + description: Number of CPUs for the WNs + default: 2 + required: yes + constraints: + - valid_values: [ 2, 4, 8, 16, 32, 64 ] + wn_mem: + type: scalar-unit.size + description: Amount of Memory for the WNs + default: 4 GB + required: yes + constraints: + - valid_values: [ 4 GB, 8 GB, 16 GB, 32 GB, 64 GB, 128 GB, 256 GB, 512 GB ] + + + node_templates: + + lrms_front_end: + type: tosca.nodes.indigo.LRMS.FrontEnd.Nomad + capabilities: + endpoint: + properties: + ports: + port_4646: + protocol: tcp + source: 4646 + port_4647: + protocol: tcp + source: 4647 + port_4648: + protocol: tcp + source: 4648 + port_8500: + protocol: tcp + source: 8500 + requirements: + - host: front + + front: + type: tosca.nodes.indigo.Compute + capabilities: + endpoint: + properties: + dns_name: nomadserver + network_name: PUBLIC + host: + properties: + instance_type: { get_input: fe_instance_type } + num_cpus: { get_input: fe_cpus } + mem_size: { get_input: fe_mem } + os: + properties: + distribution: ubuntu + type: linux + + + wn_node: + type: tosca.nodes.indigo.LRMS.WorkerNode.Nomad + properties: + front_end_ip: { get_attribute: [ front, private_address, 0 ] } + requirements: + - host: wn + + wn: + type: tosca.nodes.indigo.Compute + capabilities: + scalable: + properties: + count: { get_input: wn_num } + host: + properties: + instance_type: { get_input: wn_instance_type } + num_cpus: { get_input: wn_cpus } + mem_size: { get_input: wn_mem } + os: + properties: + distribution: ubuntu + type: linux + + outputs: + cluster_ip: + value: { get_attribute: [ front, public_address, 0 ] } + cluster_creds: + value: { get_attribute: [ front, endpoint, credential, 0 ] } + +