Skip to content

Commit

Permalink
Merge pull request grycap#82 from grycap/devel
Browse files Browse the repository at this point in the history
Devel
  • Loading branch information
micafer authored Dec 10, 2020
2 parents 2a3d6e0 + f0d2c0a commit d83a90e
Show file tree
Hide file tree
Showing 4 changed files with 140 additions and 2 deletions.
Binary file added app/static/images/nomad.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 7 additions & 1 deletion tosca-templates/kubernetes.parameters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
- Kubernetes Data
14 changes: 13 additions & 1 deletion tosca-templates/kubernetes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: "[email protected]"

node_templates:

Expand All @@ -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

Expand Down
120 changes: 120 additions & 0 deletions tosca-templates/nomad.yaml
Original file line number Diff line number Diff line change
@@ -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 ] }


0 comments on commit d83a90e

Please sign in to comment.