Skip to content

Commit

Permalink
V4.0.0 (#301)
Browse files Browse the repository at this point in the history
* Devel (#290)

* Set mesos_ip to 0.0.0.0

* Fix mesos elastic cluster

* Set marathon_hostname

* Add hybrid elastic cluster

* Comment extra placement policies

* Use vrouter role

* Use vrouter role

* Use dev-micafer branch

* Fix typo

* use master

* Use VPN IPs

* Use VPN IPs

* Add setup task

* Fix steps

* Add VR example

* Add Hybrid Kube example

* Set indigovr role

* Fix issues

* Fix errors

* Add hybrid elastic mesos cluster

* Add hybrid elastic mesos cluster

* Add hybrid elastic mesos cluster

* Add hybrid elastic mesos cluster

* Fix mesos artifacs

* Fix mesos

* Add VR dependencies

* Add VR kube elastic cluster

* Update custom_types.yaml

* set token_type

* set token_type

* Change sla type

* Add L2 nets examples

* Add dhclient refresh step

* Use mtu branch in indigovr

* Use mtu branch in indigovr

* Simplify version

* Added support for marathon secrets and qcg job

* Fixing artifacts branch

* Add artifacts to Marathon type (#292)

* Set indigovr master branch and set INDIGOVR_MTU param (#294)

* Set indigovr master branch and set INDIGOVR_MTU param

* Fix galaxy examples

* Added metadata

* Add DEEPaaS App

* Added property enable_https in Marathon App type

* Set DEEPaaS in the correct section (#298)

* Fixing policy definitions

Co-authored-by: Miguel Caballer <[email protected]>
  • Loading branch information
maricaantonacci and micafer authored Jan 7, 2020
1 parent 2a26c1a commit a2083cf
Show file tree
Hide file tree
Showing 31 changed files with 1,949 additions and 267 deletions.
7 changes: 7 additions & 0 deletions artifacts/indigovr/central_point_install.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
- hosts: localhost
connection: local
roles:
- role: indigo-dc.indigovr
INDIGOVR_NODE_TYPE: centralpoint
INDIGOVR_MTU: 1400
7 changes: 7 additions & 0 deletions artifacts/indigovr/standalone_install.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
- hosts: localhost
connection: local
roles:
- role: indigo-dc.indigovr
INDIGOVR_NODE_TYPE: standalone
INDIGOVR_MTU: 1400
7 changes: 7 additions & 0 deletions artifacts/indigovr/vrouter_install.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
- hosts: localhost
connection: local
roles:
- role: indigo-dc.indigovr
INDIGOVR_NODE_TYPE: vrouter
INDIGOVR_MTU: 1400
54 changes: 42 additions & 12 deletions artifacts/lrms/kubernetes/kube_fe_install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,46 @@
- name: Create auth data file with an admin user
copy: content='{{kube_admin_token}},{{kube_admin_username}},100,"users,system:masters"' dest=/etc/kubernetes/pki/auth mode=600

roles:
- role: indigo-dc.openvpn
openvpn_type_of_node: 'front'
openvpn_frontname: 'kubeserver'
tasks:
- block:
- name: Call IndigoVR role as Centralpoint
include_role:
name: indigo-dc.indigovr
vars:
INDIGOVR_NODE_TYPE: centralpoint
INDIGOVR_MTU: 1400

- name: Add Master VPN IP in host
replace:
dest: /etc/hosts
regexp: ".*kubeserver.localdomain.*$"
replace: "192.168.255.1 kubeserver.localdomain kubeserver"

when: fe_hybrid_cluster

- name: Call NFS role as Server
include_role:
name: indigo-dc.nfs
vars:
nfs_mode: 'server'
nfs_exports: [{path: "/pv", export: "{{ vnode_prefix }}*.localdomain(fsid=0,rw,async,no_root_squash,no_subtree_check,insecure)"}]

- name: Call Kubernetes role as front
include_role:
name: indigo-dc.kubernetes
vars:
kube_server: '192.168.255.1'
kube_api_server: '192.168.255.1'
kube_apiserver_options: [{option: "--service-node-port-range", value: "8000-35000"}, {option: "--insecure-port", value: "8080"}, {option: "--token-auth-file", value: "/etc/kubernetes/pki/auth"}]
kube_deploy_dashboard: true
when: fe_hybrid_cluster
- role: indigo-dc.nfs
nfs_mode: 'server'
nfs_exports: [{path: "/pv", export: "{{ vnode_prefix }}*.localdomain(fsid=0,rw,async,no_root_squash,no_subtree_check,insecure)"}]
- role: indigo-dc.kubernetes
kube_server: '{{ kube_front_end_ip }}'
kube_api_server: '{{ kube_front_end_ip }}'
kube_apiserver_options: [{option: "--service-node-port-range", value: "8000-35000"}, {option: "--insecure-port", value: "8080"}, {option: "--token-auth-file", value: "/etc/kubernetes/pki/auth"}]
kube_deploy_dashboard: true

- name: Call Kubernetes role as front
include_role:
name: indigo-dc.kubernetes
vars:
kube_server: '{{ kube_front_end_ip }}'
kube_api_server: '{{ kube_front_end_ip }}'
kube_apiserver_options: [{option: "--service-node-port-range", value: "8000-35000"}, {option: "--insecure-port", value: "8080"}, {option: "--token-auth-file", value: "/etc/kubernetes/pki/auth"}]
kube_deploy_dashboard: true
when: not fe_hybrid_cluster
72 changes: 57 additions & 15 deletions artifacts/lrms/kubernetes/kube_wn_install.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,62 @@
---
- hosts: localhost
connection: local
roles:
- role: indigo-dc.openvpn
openvpn_type_of_node: 'wn'
openvpn_frontname: 'kubeserver'
tasks:
- block:
- name: Call IndigoVR role as standalone
include_role:
name: indigo-dc.indigovr
vars:
INDIGOVR_NODE_TYPE: standalone
INDIGOVR_CENTRALPOINT_IP: '{{ kube_public_front_end_ip }}'
INDIGOVR_MTU: 1400

- name: Refresh setup data to get new ansible_tun0 item
setup:

- name: Add host VPN IP in master
replace:
dest: /etc/hosts
regexp: ".*{{ansible_hostname}}.localdomain.*$"
replace: "{{ansible_tun0.ipv4.address}} {{ansible_hostname}}.localdomain {{ansible_hostname}}"
delegate_facts: True
delegate_to: '{{ kube_public_front_end_ip }}'

- name: Add Master VPN IP in host
replace:
dest: /etc/hosts
regexp: ".*kubeserver.localdomain.*$"
replace: "192.168.255.1 kubeserver.localdomain kubeserver"

- name: Call NFS role as client in hybrid
include_role:
name: indigo-dc.nfs
vars:
nfs_mode: 'client'
nfs_client_imports: [{ local: "/pv", remote: "/pv", server_host: "192.168.255.1" }]

- name: Call Kubernetes role as WN
include_role:
name: indigo-dc.kubernetes
vars:
kube_type_of_node: 'wn'
kube_server: '192.168.255.1'
kube_api_server: '192.168.255.1'
when: wn_hybrid_cluster
- role: indigo-dc.nfs
nfs_mode: 'client'
nfs_client_imports: [{ local: "/pv", remote: "/pv", server_host: "10.8.0.1" }]
when: wn_hybrid_cluster
- role: indigo-dc.nfs
nfs_mode: 'client'
nfs_client_imports: [{ local: "/pv", remote: "/pv", server_host: "{{ kube_front_end_ip }}" }]

- block:
- name: Call NFS role as client
include_role:
name: indigo-dc.nfs
vars:
nfs_mode: 'client'
nfs_client_imports: [{ local: "/pv", remote: "/pv", server_host: "{{ kube_front_end_ip }}" }]

- name: Call Kubernetes role as WN
include_role:
name: indigo-dc.kubernetes
vars:
kube_type_of_node: 'wn'
kube_server: '{{kube_front_end_ip}}'
kube_api_server: '{{kube_front_end_ip}}'
when: not wn_hybrid_cluster
- role: 'indigo-dc.kubernetes'
kube_type_of_node: 'wn'
kube_server: '{{kube_front_end_ip}}'
kube_api_server: '{{ kube_front_end_ip }}'
46 changes: 32 additions & 14 deletions artifacts/lrms/slurm/slurm_fe_install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,37 @@
with_indexed_items: '{{ wn_ips }}'
- name: "Add master mapping in hosts file"
lineinfile: dest=/etc/hosts regexp='.*{{ front_end_ip }}.*$' line="{{ front_end_ip }} slurmserver slurmserver.localdomain" state=present
roles:
- role: indigo-dc.openvpn
openvpn_type_of_node: 'front'
openvpn_frontname: 'slurmserver'

tasks:
- block:
- name: Call IndigoVR role as Centralpoint
include_role:
name: indigo-dc.indigovr
vars:
INDIGOVR_NODE_TYPE: centralpoint
INDIGOVR_MTU: 1400

- name: Add Master VPN IP in host
replace:
dest: /etc/hosts
regexp: ".*slurmserver.localdomain.*$"
replace: "192.168.255.1 slurmserver.localdomain slurmserver"

when: fe_hybrid_cluster
- role: indigo-dc.nfs
nfs_mode: 'server'
nfs_exports: [{path: "/home", export: "{{ vnode_prefix }}*.localdomain(fsid=0,rw,async,no_root_squash,no_subtree_check,insecure)"}]
- role: indigo-dc.slurm
slurm_type_of_node: 'front'
slurm_wn_num: '{{ wn_num }}'
slurm_wn_ips: '{{ wn_ips }}'
slurm_vnode_prefix: '{{ vnode_prefix }}'
slurm_wn_nodenames: '{{ groups["lrms_wn"]|map("extract", hostvars, "ansible_hostname")|list if "lrms_wn" in groups else [] }}'
slurm_server_ip: '{{ slurm_front_end_ip }}'

- name: Call NFS role as Server
include_role:
name: indigo-dc.nfs
vars:
nfs_mode: 'server'
nfs_exports: [{path: "/home", export: "{{ vnode_prefix }}*.localdomain(fsid=0,rw,async,no_root_squash,no_subtree_check,insecure)"}]

- name: Call SLURM role as front
include_role:
name: indigo-dc.slurm
vars:
slurm_type_of_node: 'front'
slurm_wn_num: '{{ wn_num }}'
slurm_wn_ips: '{{ wn_ips }}'
slurm_vnode_prefix: '{{ vnode_prefix }}'
slurm_wn_nodenames: '{{ groups["lrms_wn"]|map("extract", hostvars, "ansible_hostname")|list if "lrms_wn" in groups else [] }}'
78 changes: 60 additions & 18 deletions artifacts/lrms/slurm/slurm_wn_install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,65 @@
pre_tasks:
- name: "Add private ip master mapping in hosts file"
lineinfile: dest=/etc/hosts regexp='.*slurmserver.localdomain.*$' line="{{ slurm_front_end_ip }} slurmserver slurmserver.localdomain" state=present
when: not wn_hybrid_cluster or IM_NODE_PUBLIC_IP is undefined or IM_NODE_PUBLIC_IP != IM_NODE_PRIVATE_IP
- name: "Add public ip master mapping in hosts file"
lineinfile: dest=/etc/hosts regexp='.*slurmserver.localdomain.*$' line="{{ slurm_public_front_end_ip }} slurmserver slurmserver.localdomain" state=present
when: wn_hybrid_cluster and IM_NODE_PUBLIC_IP is defined and IM_NODE_PUBLIC_IP == IM_NODE_PRIVATE_IP
roles:
- role: indigo-dc.openvpn
openvpn_type_of_node: 'wn'
openvpn_frontname: 'slurmserver'
tasks:
# to avoid issues en L2 hybrid clusters
- name: renew DHCP data
command: dhclient -v
ignore_errors: yes

- block:
- name: Call IndigoVR role as standalone
include_role:
name: indigo-dc.indigovr
vars:
INDIGOVR_NODE_TYPE: standalone
INDIGOVR_CENTRALPOINT_IP: '{{ slurm_public_front_end_ip }}'
INDIGOVR_MTU: 1400

- name: Refresh setup data to get new ansible_tun0 item
setup:

- name: Add host VPN IP in master
replace:
dest: /etc/hosts
regexp: ".*{{ansible_hostname}}.localdomain.*$"
replace: "{{ansible_tun0.ipv4.address}} {{ansible_hostname}}.localdomain {{ansible_hostname}}"
delegate_facts: True
delegate_to: '{{ slurm_front_end_ip }}'

- name: Add Master VPN IP in host
replace:
dest: /etc/hosts
regexp: ".*slurmserver.localdomain.*$"
replace: "192.168.255.1 slurmserver.localdomain slurmserver"

- name: Call NFS role as client in hybrid
include_role:
name: indigo-dc.nfs
vars:
nfs_mode: 'client'
nfs_client_imports: [{ local: "/home", remote: "/home", server_host: "192.168.255.1" }]

- name: Call SLURM role as WN
include_role:
name: indigo-dc.slurm
vars:
slurm_type_of_node: 'wn'
slurm_server_ip: '192.168.255.1'
when: wn_hybrid_cluster
- role: indigo-dc.nfs
nfs_mode: 'client'
nfs_client_imports: [{ local: "/home", remote: "/home", server_host: "10.8.0.1" }]
when: wn_hybrid_cluster
- role: indigo-dc.nfs
nfs_mode: 'client'
nfs_client_imports: [{ local: "/home", remote: "/home", server_host: "{{ slurm_front_end_ip }}" }]

- block:
- name: Call NFS role as client
include_role:
name: indigo-dc.nfs
vars:
nfs_mode: 'client'
nfs_client_imports: [{ local: "/home", remote: "/home", server_host: "{{ slurm_front_end_ip }}" }]

- name: Call SLURM role as WN
include_role:
name: indigo-dc.slurm
vars:
slurm_type_of_node: 'wn'
slurm_server_ip: '{{ slurm_front_end_ip }}'
when: not wn_hybrid_cluster
- role: indigo-dc.slurm
slurm_type_of_node: 'wn'
slurm_server_ip: '{{ slurm_front_end_ip }}'
66 changes: 51 additions & 15 deletions artifacts/mesos/mesos_lb_install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,59 @@
connection: local
vars:
docker_bridge_ip_cidr: "172.0.17.1/24"
pre_tasks:
tasks:
- name: Call Docker role
include_role:
name: indigo-dc.docker

- block:

- name: Call IndigoVR role as standalone
include_role:
name: indigo-dc.indigovr
vars:
INDIGOVR_NODE_TYPE: standalone
# I use the master_ips, that is the private IPs
# we should use the public one, but we will launch the
# LB allways in the same site as the mesos master
INDIGOVR_CENTRALPOINT_IP: '{{ master_ips[0] }}'
INDIGOVR_MTU: 1400

- name: Refresh setup data to get new ansible_tun0 item
setup:

- name: Set facts in case of Hybrid cluster
set_fact:
master_ips: "{{ groups['mesos_master_server']|map('extract', hostvars,'ansible_tun0')|list|map(attribute='ipv4.address')|list }}"
consul_address: '{{ ansible_tun0.ipv4.address }}'

when: lb_hybrid_cluster

- name: Set facts
set_fact:
consul_address: '{{ IM_NODE_PRIVATE_IP if IM_NODE_PRIVATE_IP is defined else ansible_default_ipv4.address }}'
when: not lb_hybrid_cluster

- name: Call consul role as agent
include_role:
name: indigo-dc.consul
vars:
consul_mode: "agent"
consul_servers: "{{ master_ips }}"
consul_advertise: '{{ consul_address }}'
consul_bind_addr: '{{ consul_address }}'
when: (enable_consul_sd == true)

- set_fact:
marathon_lb_marathon_url: "https://{{ master_ips[0] }}:8443"
marathon_lb_service_discovery: "none"
when: (enable_consul_sd == false)
roles:
- role: indigo-dc.docker

- role: indigo-dc.consul
consul_mode: "agent"
consul_servers: "{{ master_ips }}"
consul_advertise: '{{ IM_NODE_PRIVATE_IP if IM_NODE_PRIVATE_IP is defined else ansible_default_ipv4.address }}'
consul_bind_addr: '{{ IM_NODE_PRIVATE_IP if IM_NODE_PRIVATE_IP is defined else ansible_default_ipv4.address }}'
when: (enable_consul_sd == true)

- role: indigo-dc.marathon-lb
marathon_lb_auth_creds: "{{marathon_username}}:{{marathon_password}}"
marathon_lb_marathon_servers: "{{ master_ips }}"
marathon_lb_chronos_servers: "{{ master_ips }}"
marathon_lb_mesos_servers: "{{ master_ips }}"
- name: Call consul role as agent
include_role:
name: indigo-dc.marathon-lb
vars:
marathon_lb_auth_creds: "{{marathon_username}}:{{marathon_password}}"
marathon_lb_marathon_servers: "{{ master_ips }}"
marathon_lb_chronos_servers: "{{ master_ips }}"
marathon_lb_mesos_servers: "{{ master_ips }}"
Loading

0 comments on commit a2083cf

Please sign in to comment.