blob: e6a138e7024b883d16a567083fa6154773e62e28 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
---
# SPDX-license-identifier: Apache-2.0
##############################################################################
# Copyright (c) 2018
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
- hosts: localhost
become: yes
pre_tasks:
- name: Load krd variables
include_vars:
file: krd-vars.yml
roles:
- role: andrewrothstein.kubectl
kubectl_ver: "v{{ kubectl_version }}"
- role: andrewrothstein.kubernetes-helm
kubernetes_helm_ver: "v{{ helm_client_version }}"
tasks:
- name: create istio folder
file:
state: directory
path: "{{ istio_dest }}"
- name: getting istio CRDs
block:
- name: download istio tarball
get_url:
url: "{{ istio_url }}"
dest: "/tmp/istio.tar.gz"
- name: extract istio source code
unarchive:
src: "/tmp/istio.tar.gz"
dest: "{{ istio_dest }}"
remote_src: yes
- name: copy istioctl binary to usr/local/bin folder
command: "mv {{ istio_dest }}/istio-{{ istio_version }}/bin/istioctl /usr/local/bin/"
when: istio_source_type == "tarball"
- name: create network objects
shell: "/usr/local/bin/kubectl apply -f {{ istio_dest }}/istio-{{ istio_version }}/install/kubernetes/helm/istio/templates/crds.yaml"
- name: render istio's core components
shell: "/usr/local/bin/helm template {{ istio_dest }}/istio-{{ istio_version }}/install/kubernetes/helm/istio --name istio --namespace istio-system > /tmp/istio.yaml"
- name: create istio manifest
shell: "/usr/local/bin/kubectl create namespace istio-system"
ignore_errors: True
- name: install the components via the manifest
shell: "/usr/local/bin/kubectl apply -f /tmp/istio.yaml"
ignore_errors: True
|