-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #100 from snowdrop/wip-3.10
Update project to Openshift 3.10
- Loading branch information
Showing
35 changed files
with
321 additions
and
195 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
- hosts: "{{ openshift_node | default('masters') }}" | ||
gather_facts: true | ||
|
||
roles: | ||
- { role: dns } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
- name: Generate dnsmasq template | ||
template: | ||
src: local.conf.j2 | ||
dest: /etc/dnsmasq.d/local.conf | ||
|
||
- name: restart dnsmasq | ||
systemd: | ||
state: restarted | ||
name: dnsmasq |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
address=/{{ ansible_hostname }}/{{ ansible_default_ipv4.address }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
# Release version of Openshift origin to be installed. IT will be used to configure the inventory file from the j2 template | ||
openshift_origin_version: 3.9 | ||
openshift_origin_version: "3.10" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1 @@ | ||
# Repository where the project will be cloned from | ||
istio_git_repo: https://github.com/istio/istio.git | ||
|
||
# Istio github branch to be used to install the istio playbook | ||
istio_git_branch: master | ||
|
||
# Folder where the project will be cloned on your machine | ||
istio_repo_dest: ~/.istio/playbooks | ||
istio_authentication: false |
43 changes: 43 additions & 0 deletions
43
ansible/playbook/roles/install_istio/tasks/install_operator.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
- name: Generate Istio Operator Template | ||
template: | ||
src: istio_community_operator_template.yaml.j2 | ||
dest: /tmp/istio_community_operator_template.yaml | ||
|
||
- name: Generate Istio CRD file | ||
template: | ||
src: istio_crd.yaml.j2 | ||
dest: /tmp/istio_crd.yaml | ||
|
||
- name: Create namespace | ||
command: oc {{ openshift_env.oc_admin_kubeconfig_arg }} new-project istio-operator | ||
|
||
- name: Create Istio Operator | ||
command: oc {{ openshift_env.oc_admin_kubeconfig_arg }} new-app -f /tmp/istio_community_operator_template.yaml -n istio-operator | ||
|
||
- name: Wait for Istio Operator to run | ||
command: oc {{ openshift_env.oc_admin_kubeconfig_arg }} get pods --field-selector status.phase=Running -l name=istio-operator -o jsonpath='{.items[0].metadata.name}' | ||
register: operator | ||
until: operator.rc == 0 | ||
delay: 10 | ||
retries: 20 | ||
|
||
- name: Create Istio CRD | ||
command: oc {{ openshift_env.oc_admin_kubeconfig_arg }} create -f /tmp/istio_crd.yaml -n istio-operator | ||
|
||
- name: Wait for the Istio CRD to be created | ||
command: oc {{ openshift_env.oc_admin_kubeconfig_arg }} get crd installations.istio.openshift.com -n istio-operator | ||
register: crd | ||
until: crd.rc == 0 | ||
delay: 5 | ||
retries: 5 | ||
|
||
- name: Wait for pod that performs the actual installation of Istio to run | ||
command: oc {{ openshift_env.oc_admin_kubeconfig_arg }} get pods --field-selector status.phase=Running -l job-name=openshift-ansible-istio-installer-job -o jsonpath='{.items[0].metadata.name}' -n istio-system | ||
register: install | ||
until: install.rc == 0 | ||
delay: 10 | ||
retries: 20 | ||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,3 @@ | ||
- include_tasks: patch_master.yml | ||
|
||
- name: Clone Istio project | ||
git: | ||
repo: "{{ istio_git_repo }}" | ||
dest: "{{ istio_repo_dest }}" | ||
version: "{{ istio_git_branch }}" | ||
force: yes | ||
connection: local | ||
|
||
- debug: | ||
msg: "Istio git project {{ istio_git_repo }}/{{ istio_git_branch }} cloned to {{ istio_repo_dest }}" | ||
|
||
- name: Config used to install Istio | ||
debug: | ||
msg: | ||
- "Git istio repo: {{ istio_git_repo }}" | ||
- "Git istio branch: {{ istio_git_branch }}" | ||
- "Git istio download directory: {{ istio_repo_dest }}" | ||
- "Git istio playbook directory: {{ istio_repo_dest }}/install/ansible" | ||
- "Istio version to be installed: {{ istio.release_tag_name }}" | ||
- "Using TLS: {{ istio.auth }}" | ||
- "Target cloud platform: {{ cluster_flavour }}" | ||
- "Destination to install istio client, examples,...: {{ istio.dest }}" | ||
- "Namespace where istio will be installed: {{ istio.namespace }}" | ||
- "Addons: {{ istio.addon }}" | ||
- "Install samples: {{ istio.samples }}" | ||
|
||
- name: Create temporary symlink to istio playbook | ||
file: | ||
src: "{{ istio_repo_dest }}/install/ansible" | ||
dest: "istio_playbook_src" | ||
state: link | ||
connection: local | ||
|
||
- name: Execute the Istio Role | ||
include_role: | ||
name: istio_playbook_src/istio | ||
|
||
- name: Delete temporary symlink to istio playbook | ||
file: | ||
path: "istio_playbook_src" | ||
state: absent | ||
connection: local | ||
- include_tasks: install_operator.yml |
Oops, something went wrong.