@@ -0,0 +1,42 @@
|
||||
######################################
|
||||
# Install linkerd service mesh #
|
||||
######################################
|
||||
---
|
||||
- name: install linkerd service mesh
|
||||
when: inventory_hostname in groups['controller']
|
||||
block:
|
||||
- name: Download linkerd install scrip
|
||||
get_url:
|
||||
url: https://run.linkerd.io/install
|
||||
dest: /tmp/linkerd.sh
|
||||
|
||||
- name: Install linkerd CLI
|
||||
shell:
|
||||
cmd: cat /tmp/linkerd.sh | sh
|
||||
|
||||
- name: Set linkerd .bashrc
|
||||
lineinfile:
|
||||
path: ~/.bashrc
|
||||
line: 'PATH=$PATH:/root/.linkerd2/bin'
|
||||
|
||||
- name: init linkerd on controller1
|
||||
when: inventory_hostname in groups['controller_init']
|
||||
block:
|
||||
- name: Install linkerd CRD in Cluster
|
||||
shell: "linkerd install --crds | kubectl apply -f -"
|
||||
|
||||
- name: Install linkerd in Cluster
|
||||
shell: "linkerd install | kubectl apply -f -"
|
||||
|
||||
- name: Wait for linkerd pods become ready
|
||||
command: "kubectl rollout status deployment linkerd-destination -n linkerd --timeout 150s"
|
||||
|
||||
- name: Wait for linkerd pods become ready
|
||||
command: "kubectl rollout status deployment linkerd-proxy-injector -n linkerd --timeout 150s"
|
||||
|
||||
- name: Install linkerd Dashboard
|
||||
shell: "linkerd viz install | kubectl apply -f -"
|
||||
|
||||
- name: Pause for 15 seconds and wait for linkerd installation
|
||||
pause:
|
||||
seconds: 15
|
||||
Reference in New Issue
Block a user