summaryrefslogtreecommitdiffstats
path: root/vagrant/playbooks
diff options
context:
space:
mode:
authorVictor Morales <victor.morales@intel.com>2018-11-14 09:15:36 -0800
committerVictor Morales <victor.morales@intel.com>2018-11-14 09:21:13 -0800
commitdaf3a00798ee77e469cd89cb16ade818c50968f9 (patch)
tree3ef383d90fd3a1fb588fedc65a4d6b5fe019cbf2 /vagrant/playbooks
parentcc05d4af8f082d8174bde5c43fc45b1acc61339f (diff)
Enable Istio
This commit includes the playbook that installs and configure Istio Service Mesh services. It also defines a draft script for testing its sample. Change-Id: I7f0049aae4ae0033356c370a0e86d583e7bf744f Signed-off-by: Victor Morales <victor.morales@intel.com> Issue-ID: MULTICLOUD-406
Diffstat (limited to 'vagrant/playbooks')
-rw-r--r--vagrant/playbooks/configure-istio.yml49
-rw-r--r--vagrant/playbooks/krd-vars.yml5
2 files changed, 54 insertions, 0 deletions
diff --git a/vagrant/playbooks/configure-istio.yml b/vagrant/playbooks/configure-istio.yml
new file mode 100644
index 00000000..25a343f0
--- /dev/null
+++ b/vagrant/playbooks/configure-istio.yml
@@ -0,0 +1,49 @@
+---
+# 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:
+ - andrewrothstein.kubectl
+ - role: andrewrothstein.kubernetes-helm
+ kubernetes_helm_ver: v2.9.1
+ 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
diff --git a/vagrant/playbooks/krd-vars.yml b/vagrant/playbooks/krd-vars.yml
index b8755a50..9c2de308 100644
--- a/vagrant/playbooks/krd-vars.yml
+++ b/vagrant/playbooks/krd-vars.yml
@@ -46,5 +46,10 @@ nfd_source_type: "source"
nfd_version: 175305b1ad73be7301ac94add475cec6fef797a9
nfd_url: "https://github.com/kubernetes-incubator/node-feature-discovery"
+istio_dest: "{{ base_dest }}/istio"
+istio_source_type: "tarball"
+istio_version: 1.0.3
+istio_url: "https://github.com/istio/istio/releases/download/{{ istio_version }}/istio-{{ istio_version }}-linux.tar.gz"
+
go_version: 1.11.1
kubespray_version: 2.7.0