Skip to content

Commit

Permalink
Merge pull request grycap#84 from grycap/devel
Browse files Browse the repository at this point in the history
Devel
  • Loading branch information
micafer authored Dec 22, 2020
2 parents 39b95f5 + 11ce77a commit 4cae7d4
Show file tree
Hide file tree
Showing 15 changed files with 268 additions and 7 deletions.
Binary file added app/static/images/sqaaas.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions app/templates/addresource.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{% extends "base.html" %}
{% block title %}Add Resouces{% endblock %}
{% block content %}

<div class="container">
Expand Down
1 change: 1 addition & 0 deletions app/templates/base.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<html>

<head>
<title>{% block title %}{% endblock %}</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- BS4-->
Expand Down
10 changes: 8 additions & 2 deletions app/templates/createdep.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% extends "base.html" %}

{% block title %}Configure Deployment{% endblock %}
{% block content %}

<div class="container">
Expand All @@ -19,7 +19,7 @@ <h4 class="font-weight-bold text-primary">
<strong>Description:</strong> {{template['description']}}
</div>

<form id="depSubmit" action="{{ url_for('createdep', template=selectedTemplate) }}" method="post">
<form id="depSubmit" action="{{ url_for('createdep', template=selectedTemplate) }}" method="post" onsubmit="return onSubmit();">
<div class="form-group">
<label for="additional_description">Infrastructure Name</label>
<input type="text" class="form-control" id="infra_name" name="infra_name" placeholder="description" value="" maxlength="20" required>
Expand Down Expand Up @@ -47,6 +47,12 @@ <h4 class="font-weight-bold text-primary">
-->

<script>
function onSubmit() {
{% if g.analytics_tag %}
ga('send', 'event', 'submit', '{{selectedTemplate}}');
{% endif %}
return true;
}
$(document).ready(function() {
$('.js-example-basic-single').select2({
width: '100%' // https://github.com/select2/select2/issues/4220
Expand Down
2 changes: 1 addition & 1 deletion app/templates/deptemplate.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% extends "base.html" %}

{% block title %}Template{% endblock %}
{% block content %}

<div class="container">
Expand Down
2 changes: 1 addition & 1 deletion app/templates/home.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% extends "base.html" %}

{% block title %}Home{% endblock %}
{% block content %}
<style>
hr.style-seven {
Expand Down
2 changes: 1 addition & 1 deletion app/templates/inflog.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% extends "base.html" %}

{% block title %}Infrastructure Log{% endblock %}
{% block content %}

<div class="container">
Expand Down
1 change: 1 addition & 0 deletions app/templates/infrastructures.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{% extends "base.html" %}
{% block title %}Infrastructure List{% endblock %}
{% block content %}


Expand Down
2 changes: 1 addition & 1 deletion app/templates/outputs.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% extends "base.html" %}

{% block title %}TOSCA Outputs{% endblock %}
{% block content %}

<div class="container">
Expand Down
1 change: 1 addition & 0 deletions app/templates/portfolio.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{% extends "base.html" %}
{% block title %}Portfolio{% endblock %}
{% block content %}
<div class="container mt-2" id="cardsContainer" xmlns="http://www.w3.org/1999/html">
<div class="input-group mb-4">
Expand Down
1 change: 1 addition & 0 deletions app/templates/service_creds.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{% extends "base.html" %}
{% block title %}Service Credentials{% endblock %}
{% block content %}

<div class="container-fluid">
Expand Down
1 change: 1 addition & 0 deletions app/templates/settings.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{% extends "base.html" %}
{% block title %}Settings{% endblock %}
{% block content %}

<div class="container-fluid">
Expand Down
2 changes: 1 addition & 1 deletion app/templates/vminfo.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% extends "base.html" %}

{% block title %}VM Info{% endblock %}
{% block content %}

<div class="container">
Expand Down
50 changes: 50 additions & 0 deletions tosca-templates/sqaaas.parameters.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
inputs:
wn_num:
tab: HW Data

fe_cpus:
tab: HW Data

fe_mem:
tab: HW Data

fe_instance_type:
tab: HW Data

wn_cpus:
tab: HW Data

wn_mem:
tab: HW Data

wn_instance_type:
tab: HW Data

disk_size:
tab: HW Data

volume_id:
tab: HW Data

admin_token:
tab: Kubernetes Data

kube_version:
tab: Kubernetes Data

kube_cert_manager:
tab: Kubernetes Data

kube_cert_user_email:
tab: Kubernetes Data

sqaaas_jk_token:
tab: SQAaaS Data

sqaaas_gh_token:
tab: SQAaaS Data

tabs:
- HW Data
- Kubernetes Data
- SQAaaS Data
199 changes: 199 additions & 0 deletions tosca-templates/sqaaas.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,199 @@
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 EOSC-Synergy SQAaaS platform on top of a Kubernetes Virtual Cluster
icon: images/sqaaas.png
tag: beta

description: TOSCA template for launching the EOSC-Synergy SQAaaS platform on top of a Kubernetes Virtual 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 ]
fe_instance_type:
type: string
description: Flavor name of the front-end node
default: ""
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 ]
wn_instance_type:
type: string
description: Flavor name for the WNs
default: ""
disk_size:
type: scalar-unit.size
description: Size of the disk to be attached to the FE instance
default: 10 GB
constraints:
- valid_values: [ 10 GB, 20 GB, 50 GB, 100 GB, 200 GB, 500 GB, 1 TB, 2 TB ]
volume_id:
type: string
description: "Or URL of the disk to be attached to the instance (format: ost://api.cloud.ifca.es/<vol_id>"
default: ""

admin_token:
type: string
description: Access Token for the Kubernetes admin user
default: not_very_secret_token
kube_version:
type: string
description: Version of Kubernetes to install
default: "1.19.5"
constraints:
- valid_values: [ "1.19.5", "1.18.13", "1.17.15" ]
kube_cert_manager:
type: boolean
description: Flag to install Cert-Manager and manage the generation of TLS certificas with Let's Encrypt
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]"

sqaaas_jk_token:
type: string
description: Jenkins API token
default: ""
required: yes
sqaaas_gh_token:
type: string
description: GitHub API token
default: ""


node_templates:

sqaaas:
type: tosca.nodes.SoftwareComponent
requirements:
- host: front
- dependency: lrms_front_end
interfaces:
Standard:
configure:
implementation: https://raw.githubusercontent.com/grycap/ec3/tosca/tosca/artifacts/sqaaas_install.yml
inputs:
sqaaas_jk_token: { get_input: sqaaas_jk_token }
sqaaas_gh_token: { get_input: sqaaas_gh_token }

lrms_front_end:
type: tosca.nodes.indigo.LRMS.FrontEnd.Kubernetes
capabilities:
endpoint:
properties:
ports:
https_port:
protocol: tcp
source: 443
kube_port:
protocol: tcp
source: 6443
properties:
admin_username: kubeuser
install_nfs_client: true
admin_token: { get_input: admin_token }
install_kubeapps: false
version: { get_input: kube_version }
nvidia_support: false
cert_manager: { get_input: kube_cert_manager }
cert_user_email: { get_input: kube_cert_user_email }
requirements:
- host: front

front:
type: tosca.nodes.indigo.Compute
capabilities:
endpoint:
properties:
dns_name: kubeserver
network_name: PUBLIC
host:
properties:
num_cpus: { get_input: fe_cpus }
mem_size: { get_input: fe_mem }
instance_type: { get_input: fe_instance_type }
os:
properties:
distribution: ubuntu
type: linux
requirements:
- local_storage:
node: fe_block_storage
relationship:
type: AttachesTo
properties:
location: /pv

fe_block_storage:
type: tosca.nodes.BlockStorage
properties:
size: { get_input: disk_size }
volume_id: { get_input: volume_id }

wn_node:
type: tosca.nodes.indigo.LRMS.WorkerNode.Kubernetes
properties:
front_end_ip: { get_attribute: [ front, private_address, 0 ] }
version: { get_input: kube_version }
nvidia_support: false
requirements:
- host: wn

wn:
type: tosca.nodes.indigo.Compute
capabilities:
scalable:
properties:
count: { get_input: wn_num }
host:
properties:
num_cpus: { get_input: wn_cpus }
mem_size: { get_input: wn_mem }
instance_type: { get_input: wn_instance_type }
os:
properties:
distribution: ubuntu
type: linux

outputs:
dashboard_endpoint:
value: { concat: [ 'https://', get_attribute: [ front, public_address, 0 ], '/dashboard/' ] }
api_endpoint:
value: { concat: [ 'https://', get_attribute: [ front, public_address, 0 ], ':6443' ] }
kubeapps_endpoint:
value: { concat: [ 'https://', get_attribute: [ front, public_address, 0 ], '/kubeapps/' ] }

0 comments on commit 4cae7d4

Please sign in to comment.