Configuration via nsible Automated Installation and · 2019. 12. 11. · perfSONAR: Scheduled...

25
Automated Installation and Configuration via nsible Edward Colone < [email protected]> https://github.com/perfsonar/ansible-playbook-perfsonar

Transcript of Configuration via nsible Automated Installation and · 2019. 12. 11. · perfSONAR: Scheduled...

Page 1: Configuration via nsible Automated Installation and · 2019. 12. 11. · perfSONAR: Scheduled Testing Workflow TESTPOINT or TOOLKIT NET ADMINS W / PSCHED ULER TESTPOINT or TOOLKIT

Automated Installation and Configuration via nsible

Edward Colone <[email protected]>

https://github.com/perfsonar/ansible-playbook-perfsonar

Page 2: Configuration via nsible Automated Installation and · 2019. 12. 11. · perfSONAR: Scheduled Testing Workflow TESTPOINT or TOOLKIT NET ADMINS W / PSCHED ULER TESTPOINT or TOOLKIT
Page 3: Configuration via nsible Automated Installation and · 2019. 12. 11. · perfSONAR: Scheduled Testing Workflow TESTPOINT or TOOLKIT NET ADMINS W / PSCHED ULER TESTPOINT or TOOLKIT

perfSONAR: Scheduled Testing Workflow

TESTPOINT or TOOLKIT

NET ADMINS W / PSCHEDULER

TESTPOINT or TOOLKIT

pS WEB ADMIN1. Publish schedules

a. Raw JSON schedules b. pS Web Admin mesh config UI

2. Testpoints, Toolkits, and Dashboards poll schedule publishers

3. Testpoints and Tooklits run scheduled tests

4. Test results go to Archiver

5. Dashboards poll Archivera. Maddash polls directb. Nagios plugins

pS MADDASH

ARCHIVER

JSON PUBLISHER

1.a

1.b

2

2

2

2

2

3

4

4

5.a 5.b

2

Page 4: Configuration via nsible Automated Installation and · 2019. 12. 11. · perfSONAR: Scheduled Testing Workflow TESTPOINT or TOOLKIT NET ADMINS W / PSCHED ULER TESTPOINT or TOOLKIT

perfSONAR: Provisioning Components 1. Archivers

2. MadDash / Dashboards

3. Testpoints

4. Toolkits

5. pSconfig raw JSON publishers

6. pSconfig Web Admin

NET ADMINS W / PSCHEDULER

pS WEB ADMIN

pS MADDASH

ARCHIVER

JSON PUBLISHER

1

2

4

5

3

6

TESTPOINT or TOOLKIT

TESTPOINT or TOOLKIT

Page 5: Configuration via nsible Automated Installation and · 2019. 12. 11. · perfSONAR: Scheduled Testing Workflow TESTPOINT or TOOLKIT NET ADMINS W / PSCHED ULER TESTPOINT or TOOLKIT

ROLES

PLAYBOOK

INVENTORY

Ansible Modules

P

R

RI

Page 6: Configuration via nsible Automated Installation and · 2019. 12. 11. · perfSONAR: Scheduled Testing Workflow TESTPOINT or TOOLKIT NET ADMINS W / PSCHED ULER TESTPOINT or TOOLKIT

I

P

R

Ansible Inventory: variable precedence

INVENTORY

H

O

ST

FIL

E

H

O

S

T

V

A

R

IA

B

L

E

SG

RO

UP

V

AR

IA

BL

ES

Page 7: Configuration via nsible Automated Installation and · 2019. 12. 11. · perfSONAR: Scheduled Testing Workflow TESTPOINT or TOOLKIT NET ADMINS W / PSCHED ULER TESTPOINT or TOOLKIT

INVENTORY

H

O

ST

FIL

E

H

O

S

T

V

A

R

IA

B

L

E

SG

RO

UP

V

AR

IA

BL

ES

Ansible Inventory: hosts file

I

P

R

Page 8: Configuration via nsible Automated Installation and · 2019. 12. 11. · perfSONAR: Scheduled Testing Workflow TESTPOINT or TOOLKIT NET ADMINS W / PSCHED ULER TESTPOINT or TOOLKIT

Ansible Inventory: Group & Host variables

Directory structure

● inventory/group_vars/all/perfsonar/

● inventory/host_vars/example.hostname.org/

INVENTORY

H

O

ST

FIL

E

H

O

S

T

V

A

R

IA

B

L

E

SG

RO

UP

V

AR

IA

BL

ES

I

P

R

Page 9: Configuration via nsible Automated Installation and · 2019. 12. 11. · perfSONAR: Scheduled Testing Workflow TESTPOINT or TOOLKIT NET ADMINS W / PSCHED ULER TESTPOINT or TOOLKIT

ROLES

PLAYBOOK

H

O

ST

FIL

E

H

O

S

T

V

A

R

IA

B

L

E

S

GR

OU

P V

AR

IA

BL

ES

IN

V

E

N

T

O

R

Y

Ansible Inventory: Local

● Quick to implement

● Bundled with playbook’s git repository

I

P

R

Page 10: Configuration via nsible Automated Installation and · 2019. 12. 11. · perfSONAR: Scheduled Testing Workflow TESTPOINT or TOOLKIT NET ADMINS W / PSCHED ULER TESTPOINT or TOOLKIT

Ansible Inventory: Shared

● Multiple playbooks use single inventory

● Discreet git repository for inventory

● ansible.cfg inventory directive

perfSONAR

ROLES

perfSONAR

PLAYBOOK

BOOTSTRAP

ROLES

BOOTSTRAP

PLAYBOOK

INVENTORY

H

O

ST

FIL

E

H

O

S

T

V

A

R

IA

B

L

E

SG

RO

UP

V

AR

IA

BL

ES

I

P

R

Page 11: Configuration via nsible Automated Installation and · 2019. 12. 11. · perfSONAR: Scheduled Testing Workflow TESTPOINT or TOOLKIT NET ADMINS W / PSCHED ULER TESTPOINT or TOOLKIT

Ansible Task Delegation

TESTPOINT ROLE

ARCHIVE DELEGATION

perfSONAR TESTPOINTARCHIVE

CONTROLLER

perfSONAR Admins

P

RI

Page 12: Configuration via nsible Automated Installation and · 2019. 12. 11. · perfSONAR: Scheduled Testing Workflow TESTPOINT or TOOLKIT NET ADMINS W / PSCHED ULER TESTPOINT or TOOLKIT

Ansible Controller

ANSIBLE ROLE

perfSONAR INFRASTRUCTURE

CONTROLLER

perfSONAR Admins

P

RI

● Secure

○ VPN

○ 2-Factor

● Ansible installed

● ssh keys to target infrastructure

Page 13: Configuration via nsible Automated Installation and · 2019. 12. 11. · perfSONAR: Scheduled Testing Workflow TESTPOINT or TOOLKIT NET ADMINS W / PSCHED ULER TESTPOINT or TOOLKIT

Target Bootstrapping

Today’s Demo Target Environment:

● CentOS Minimal

○ Configured Networking & DNS

● Secured

○ Root account ssh disabled, user accounts added

○ ssh restricted to keys from a specific bastion host

P

RI

Page 14: Configuration via nsible Automated Installation and · 2019. 12. 11. · perfSONAR: Scheduled Testing Workflow TESTPOINT or TOOLKIT NET ADMINS W / PSCHED ULER TESTPOINT or TOOLKIT

perfSONAR Playbook Quickstart● git clone https://github.com/perfsonar/ansible-playbook-perfsonar

● ansible-galaxy install -i -r requirements.yml

● ./defaults.sh

● vi inventory/hosts

● vi inventory/groups/all/perfsonar/*

● For testpoints and toolkits:

○ cp inventory/lsregistration.yml inventory/host_vars/myhostname.yml

○ vi inventory/host_vars/myhostname.yml

● ansible-playbook --ask-become-pass perfsonar.ymlP

RI

Page 15: Configuration via nsible Automated Installation and · 2019. 12. 11. · perfSONAR: Scheduled Testing Workflow TESTPOINT or TOOLKIT NET ADMINS W / PSCHED ULER TESTPOINT or TOOLKIT

Roles● https://github.com/perfsonar/ansible-role-perfsonar-archive

● https://github.com/perfsonar/ansible-role-perfsonar-installer

● https://github.com/perfsonar/ansible-role-perfsonar-maddash

● https://github.com/perfsonar/ansible-role-perfsonar-testpoint

● https://github.com/perfsonar/ansible-role-perfsonar-toolkit

● https://github.com/perfsonar/ansible-role-perfsonar-psconfig-publisher

● https://github.com/perfsonar/ansible-role-perfsonar-psconfig-web-admin

I

P

IR

Page 16: Configuration via nsible Automated Installation and · 2019. 12. 11. · perfSONAR: Scheduled Testing Workflow TESTPOINT or TOOLKIT NET ADMINS W / PSCHED ULER TESTPOINT or TOOLKIT

perfSONAR Roles: Inheritance

psconfig - Web Admin

Installer

Testpoint

Toolkit

Archive MadDash psconfig - publisher

I

P

IR

Page 17: Configuration via nsible Automated Installation and · 2019. 12. 11. · perfSONAR: Scheduled Testing Workflow TESTPOINT or TOOLKIT NET ADMINS W / PSCHED ULER TESTPOINT or TOOLKIT

Role: Installerhttps://github.com/perfsonar/ansible-role-perfsonar-installer

● Install base OS updates

● Configure repos

● Install main software bundle

● Install any additional dependencies or optional packages

I

P

IR

Page 18: Configuration via nsible Automated Installation and · 2019. 12. 11. · perfSONAR: Scheduled Testing Workflow TESTPOINT or TOOLKIT NET ADMINS W / PSCHED ULER TESTPOINT or TOOLKIT

Role: Testpointhttps://github.com/perfsonar/ansible-role-perfsonar-testpoint

● Add optional packages:○ perfsonar-toolkit-ntp

○ perfsonar-toolkit-security

○ perfsonar-toolkit-servicewatcher

○ perfsonar-toolkit-sysctl

○ perfsonar-toolkit-systemenv-testpoint

● Ensure our FQDN isn’t pointing to localhost in /etc/hosts

● Configure additional NTP servers● Disable root ssh access● Add any defined remote psconfig schedules● Authorize IP Interfaces to Archivers● Check for running processes● Pscheduler troubleshoot to verify functionality

I

P

IR

Page 19: Configuration via nsible Automated Installation and · 2019. 12. 11. · perfSONAR: Scheduled Testing Workflow TESTPOINT or TOOLKIT NET ADMINS W / PSCHED ULER TESTPOINT or TOOLKIT

Role: Toolkithttps://github.com/perfsonar/ansible-role-perfsonar-toolkit

● All optional packages from testpoint are included by default

● Set up perfSONAR web user & passwd

I

P

IR

Page 20: Configuration via nsible Automated Installation and · 2019. 12. 11. · perfSONAR: Scheduled Testing Workflow TESTPOINT or TOOLKIT NET ADMINS W / PSCHED ULER TESTPOINT or TOOLKIT

Role: Archiverhttps://github.com/perfsonar/ansible-role-perfsonar-archive

● Configure esmond DB for perfSONAR

● Add static list of IP Addrs for write access auth

I

P

IR

Page 21: Configuration via nsible Automated Installation and · 2019. 12. 11. · perfSONAR: Scheduled Testing Workflow TESTPOINT or TOOLKIT NET ADMINS W / PSCHED ULER TESTPOINT or TOOLKIT

Role: MadDashhttps://github.com/perfsonar/ansible-role-perfsonar-maddash

● Start MadDash agent

● Manage remote meshes

I

P

IR

Page 22: Configuration via nsible Automated Installation and · 2019. 12. 11. · perfSONAR: Scheduled Testing Workflow TESTPOINT or TOOLKIT NET ADMINS W / PSCHED ULER TESTPOINT or TOOLKIT

Role: pSconfig JSON Publisherhttps://github.com/perfsonar/ansible-role-perfsonar-psconfig-publisher

● copy JSON schedules to publisher

● Publish schedules

● Update testpoints with psconfig add URL

I

P

IR

Page 23: Configuration via nsible Automated Installation and · 2019. 12. 11. · perfSONAR: Scheduled Testing Workflow TESTPOINT or TOOLKIT NET ADMINS W / PSCHED ULER TESTPOINT or TOOLKIT

Role: pSconfig Web Adminhttps://github.com/perfsonar/ansible-role-perfsonar-psconfig-web-admin

● Install & configure PWA Docker ecosystem

● User management

I

P

IR

Page 24: Configuration via nsible Automated Installation and · 2019. 12. 11. · perfSONAR: Scheduled Testing Workflow TESTPOINT or TOOLKIT NET ADMINS W / PSCHED ULER TESTPOINT or TOOLKIT

Future Development

● Process management for all roles● Improved PWA management

○ psconfig add meshes on testpoints○ User management

● Expanded MadDash configuration & management● Better Documentation

Page 25: Configuration via nsible Automated Installation and · 2019. 12. 11. · perfSONAR: Scheduled Testing Workflow TESTPOINT or TOOLKIT NET ADMINS W / PSCHED ULER TESTPOINT or TOOLKIT

Questions?

Thank you

Edward Colone <[email protected]>