Add Mistral workbook to deploy Skydive using ansible
Skydive (https://github.com/skydive-project/skydive) is already available through Kolla. This commit adds a Mistral workbook to deploy it using ansible. Change-Id: I0442d2a75a4931a4bd8399c58ff6b016d5486945
This commit is contained in:
parent
44d7f8221b
commit
a81864dab1
@ -81,6 +81,8 @@ container_images:
|
||||
- imagename: tripleoupstream/centos-binary-sahara-api:latest
|
||||
- imagename: tripleoupstream/centos-binary-sahara-engine:latest
|
||||
- imagename: tripleoupstream/centos-binary-sensu-client:latest
|
||||
- imagename: tripleoupstream/centos-binary-skydive-agent:latest
|
||||
- imagename: tripleoupstream/centos-binary-skydive-analyzer:latest
|
||||
- imagename: tripleoupstream/centos-binary-swift-account:latest
|
||||
- imagename: tripleoupstream/centos-binary-swift-container:latest
|
||||
- imagename: tripleoupstream/centos-binary-swift-object:latest
|
||||
|
@ -613,6 +613,18 @@ container_images_template:
|
||||
services:
|
||||
- OS::TripleO::Services::SensuClient
|
||||
|
||||
- imagename: "{{namespace}}/{{name_prefix}}skydive-agent{{name_suffix}}:{{tag}}"
|
||||
params:
|
||||
- DockerSkydiveAgentImage
|
||||
services:
|
||||
- OS::TripleO::Services::SkydiveAgent
|
||||
|
||||
- imagename: "{{namespace}}/{{name_prefix}}skydive-analyzer{{name_suffix}}:{{tag}}"
|
||||
params:
|
||||
- DockerSkydiveAnalyzerImage
|
||||
services:
|
||||
- OS::TripleO::Services::SkydiveAnalyzer
|
||||
|
||||
- imagename: "{{namespace}}/{{name_prefix}}swift-account{{name_suffix}}:{{tag}}"
|
||||
params:
|
||||
- DockerSwiftAccountImage
|
||||
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
Add support for troubleshooting network issues using `Skydive
|
||||
<http://skydive.network>`_.
|
68
workbooks/skydive-ansible.yaml
Normal file
68
workbooks/skydive-ansible.yaml
Normal file
@ -0,0 +1,68 @@
|
||||
---
|
||||
version: '2.0'
|
||||
name: tripleo.skydive_ansible.v1
|
||||
description: TripleO manages Skydive with skydive-ansible
|
||||
|
||||
workflows:
|
||||
skydive_install:
|
||||
# allows for additional extra_vars via workflow input
|
||||
input:
|
||||
- ansible_playbook_verbosity: 0
|
||||
- ansible_extra_env_variables:
|
||||
ANSIBLE_ROLES_PATH: /usr/share/skydive-ansible/roles/
|
||||
ANSIBLE_RETRY_FILES_ENABLED: 'False'
|
||||
ANSIBLE_LOG_PATH: /var/log/mistral/skydive-install-workflow.log
|
||||
- skydive_ansible_extra_vars: {}
|
||||
- skydive_ansible_playbook: /usr/share/skydive-ansible/playbook.yml.sample
|
||||
tags:
|
||||
- tripleo-common-managed
|
||||
tasks:
|
||||
enable_ssh_admin:
|
||||
workflow: tripleo.access.v1.enable_ssh_admin
|
||||
on-success: get_private_key
|
||||
get_private_key:
|
||||
action: tripleo.validations.get_privkey
|
||||
publish:
|
||||
private_key: <% task().result %>
|
||||
on-success: set_ip_lists
|
||||
set_ip_lists:
|
||||
publish:
|
||||
agent_ips: <% env().get('service_ips', {}).get('skydive_agent_ctlplane_node_ips', []) %>
|
||||
analyzer_ips: <% env().get('service_ips', {}).get('skydive_analyzer_ctlplane_node_ips', []) %>
|
||||
on-success: set_fork_count
|
||||
set_fork_count:
|
||||
publish: # unique list of all IPs: make each list a set, take unions and count
|
||||
fork_count: <% min($.agent_ips.toSet().union($.analyzer_ips.toSet()).count(), 100) %> # don't use >100 forks
|
||||
on-success: set_role_vars
|
||||
set_role_vars:
|
||||
publish:
|
||||
# NOTE(sbaubeau): collect role settings from all tht roles
|
||||
agent_vars: <% env().get('role_merged_configs', {}).values().select($.get('skydive_agent_ansible_vars', {})).aggregate($1 + $2) %>
|
||||
analyzer_vars: <% env().get('role_merged_configs', {}).values().select($.get('skydive_analyzer_ansible_vars', {})).aggregate($1 + $2) %>
|
||||
on-success: build_extra_vars
|
||||
build_extra_vars:
|
||||
publish:
|
||||
# NOTE(sbaubeau): merge vars from all ansible roles
|
||||
extra_vars: <% $.agent_vars + $.analyzer_vars + $.skydive_ansible_extra_vars %>
|
||||
on-success: skydive_install
|
||||
skydive_install:
|
||||
action: tripleo.ansible-playbook
|
||||
input:
|
||||
inventory:
|
||||
agents:
|
||||
hosts: <% $.agent_ips.toDict($, {}) %>
|
||||
analyzers:
|
||||
hosts: <% $.analyzer_ips.toDict($, {}) %>
|
||||
playbook: <% $.skydive_ansible_playbook %>
|
||||
remote_user: tripleo-admin
|
||||
become: true
|
||||
become_user: root
|
||||
verbosity: <% $.ansible_playbook_verbosity %>
|
||||
forks: <% $.fork_count %>
|
||||
ssh_private_key: <% $.private_key %>
|
||||
ssh_common_args: '-o StrictHostKeyChecking=no'
|
||||
ssh_extra_args: '-o UserKnownHostsFile=/dev/null'
|
||||
extra_env_variables: <% $.ansible_extra_env_variables %>
|
||||
extra_vars: <% $.extra_vars %>
|
||||
publish:
|
||||
output: <% task().result %>
|
Loading…
Reference in New Issue
Block a user