This commit is contained in:
parent
ec984ef8ad
commit
57d24a1ba3
5 changed files with 34 additions and 10 deletions
16
README.md
16
README.md
|
|
@ -2,7 +2,21 @@
|
|||
|
||||
# Deploy Weave stack in kubernetes cluster with ansible
|
||||
|
||||
This repo is deploy weave scope with ansible.
|
||||
This repo deploy weave net and weave scope with ansible.
|
||||
|
||||
## tags in role
|
||||
|
||||
- weave ( Deploy Net and Scope )
|
||||
|
||||
- weave-scope ( Deploy Scope )
|
||||
|
||||
- weave-net ( Deploy Net )
|
||||
|
||||
- k8s-network ( Deploy Net )
|
||||
|
||||
|
||||
## Links
|
||||
|
||||
source scope: https://github.com/weaveworks/scope/tree/master/examples/k8s
|
||||
|
||||
source net: https://github.com/weaveworks/weave/tree/master/prog/weave-kube
|
||||
|
|
@ -6,6 +6,7 @@ ingress_domain: "local.cluster"
|
|||
# - 192.168.140.0/24
|
||||
basic_auth: false
|
||||
#traefik_version: "2.0"
|
||||
traefik_namespace: tools
|
||||
#traefik_namespace: traefik
|
||||
weave_net_password: "SuperMotDePasseDeLaMortQuiTue4012!"
|
||||
|
||||
scope_version: 1.13.0
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
---
|
||||
- name: Weave Net setup
|
||||
block:
|
||||
- name: Include Weave Net vars
|
||||
include_vars: net-files.yaml
|
||||
- name: Weave Net files
|
||||
k8s:
|
||||
state: present
|
||||
|
|
@ -9,8 +11,6 @@
|
|||
resource_definition: "{{ lookup('file', item) | from_yaml }}"
|
||||
with_items:
|
||||
- "{{ weave_net_files }}"
|
||||
when:
|
||||
- kubernetes_network == "weave-net"
|
||||
- name: Weave Net password
|
||||
k8s:
|
||||
state: present
|
||||
|
|
@ -21,10 +21,15 @@
|
|||
- weave-net-secret.yml.j2
|
||||
when:
|
||||
- kubernetes_network == "weave-net"
|
||||
tags: weave
|
||||
tags:
|
||||
- weave
|
||||
- weave-net
|
||||
- k8s-network
|
||||
|
||||
- name: Weave Scope setup
|
||||
block:
|
||||
- name: Include Weave Scope vars
|
||||
include_vars: scope-files.yaml
|
||||
- name: namespace
|
||||
k8s:
|
||||
context: "{{ my_context }}"
|
||||
|
|
@ -88,5 +93,8 @@
|
|||
resource_definition: "{{ lookup('file', item) | from_yaml }}"
|
||||
with_items:
|
||||
- "{{ weave_scope_files }}"
|
||||
tags: weave
|
||||
|
||||
when:
|
||||
- weave_scope|bool
|
||||
tags:
|
||||
- weave
|
||||
- weave-scope
|
||||
|
|
|
|||
|
|
@ -5,4 +5,4 @@ metadata:
|
|||
namespace: kube-system
|
||||
type: Opaque
|
||||
data:
|
||||
weave-passwd: {{ data | base64 }}
|
||||
weave-passwd: {{ weave_net_password | b64encode }}
|
||||
|
|
|
|||
|
|
@ -1 +1,2 @@
|
|||
user: "{{ ansible_user_id }}"
|
||||
weave_scope: false
|
||||
Loading…
Add table
Add a link
Reference in a new issue