Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions images/installer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ COPY images/installer/origin-extra-root /
# install ansible and deps
RUN INSTALL_PKGS="python-lxml python-dns pyOpenSSL python2-cryptography openssl python2-passlib httpd-tools openssh-clients origin-clients iproute patch" \
&& yum install -y --setopt=tsflags=nodocs $INSTALL_PKGS \
&& EPEL_PKGS="ansible-2.6.5 python2-boto python2-boto3 python2-crypto which python2-pip.noarch python2-scandir python2-packaging azure-cli-2.0.46" \
&& EPEL_PKGS="ansible python2-boto python2-boto3 python2-crypto which python2-pip.noarch python2-scandir python2-packaging azure-cli-2.0.46" \
&& yum install -y epel-release \
&& yum install -y --setopt=tsflags=nodocs $EPEL_PKGS \
&& if [ "$(uname -m)" == "x86_64" ]; then yum install -y https://sdodson.fedorapeople.org/google-cloud-sdk-183.0.0-3.el7.x86_64.rpm ; fi \
&& yum install -y java-1.8.0-openjdk-headless \
&& rpm -V $INSTALL_PKGS $EPEL_PKGS $EPEL_TESTING_PKGS \
&& pip install 'apache-libcloud~=2.2.1' 'SecretStorage<3' 'ansible[azure]' \
&& pip install 'apache-libcloud~=2.2.1' 'SecretStorage<3' 'ansible[azure] google-auth' \
&& yum clean all

LABEL name="openshift/origin-ansible" \
Expand Down

This file was deleted.

2 changes: 1 addition & 1 deletion inventory/dynamic/gcp/hosts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -euo pipefail
# Use a playbook to calculate the inventory dynamically from
# the provided cluster variables.
src="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
if ! out="$( ansible-playbook --inventory-file "${src}/none" ${src}/../../../playbooks/gcp/openshift-cluster/inventory.yml 2>&1 )"; then
if ! out="$( ansible-playbook --inventory-file "${src}/none" ${src}/../../../test/gcp/inventory.yml 2>&1 )"; then
echo "error: Inventory configuration failed" 1>&2
echo "$out" 1>&2
echo "{}"
Expand Down
102 changes: 102 additions & 0 deletions playbooks/bootkube.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
---
# Generate config using openshift-installer, set Base Domain to testing.tt
# Add bootstrap host in [bootstrap] group and set ignition_file
# Add master host to [masters] group
# Add worker hosts in [workers] group
# Make sure bootstrap has <clusterid>-api.<dns base> name
# Make sure masters have <clusterid>-etcd-<index>.<dns base> name

# FIXME: use dnsmasq to fake DNS entries

- import_playbook: init/main.yml
vars:
l_install_base_packages: True
l_repo_hosts: "all:!all"

# TODO: proper firewalld setup
# 49500 on bootstrap; 2379, 6443, 10250 on masters, 10250 on workers

- import_playbook: container-runtime/private/setup_storage.yml

- import_playbook: container-runtime/private/config.yml

- name: install nodes
hosts: nodes
tasks:
- import_role:
name: openshift_node40
tasks_from: install.yml

- name: setup AWS creds
hosts: masters:bootstrap:workers
tasks:
- import_role:
name: openshift_node40
tasks_from: aws.yml

- name: Config bootstrap node
hosts: bootstrap
tasks:
- import_role:
name: openshift_node40
tasks_from: aws.yml
- import_role:
name: openshift_node40
tasks_from: config.yml
- import_role:
name: openshift_node40
tasks_from: systemd.yml

- name: Start masters
hosts: masters
tasks:
# TODO Read this from master's ignition file
- set_fact:
openshift_bootstrap_endpoint: "https://{{ bootstrap }}:49500/config/master?etcd_index={{ index }}"
vars:
bootstrap: "{{ hostvars[groups['bootstrap'][0]]['ansible_host'] }}"
index: "{{ groups['masters'].index(inventory_hostname) }}"
- name: Wait for bootstrap endpoint to show up
uri:
url: "{{ openshift_bootstrap_endpoint }}"
validate_certs: false
delay: 10
retries: 60
register: result
until:
- "'status' in result"
- result.status == 200
- import_role:
name: openshift_node40
tasks_from: config.yml
- name: Make sure etcd user exists
user:
name: etcd
- import_role:
name: openshift_node40
tasks_from: systemd.yml

- name: Start workers
hosts: workers
tasks:
# TODO Read this from master's ignition file
- set_fact:
openshift_bootstrap_endpoint: "https://{{ bootstrap }}:49500/config/worker"
vars:
bootstrap: "{{ hostvars[groups['bootstrap'][0]]['ansible_host'] }}"
- name: Wait for bootstrap endpoint to show up
uri:
url: "{{ openshift_bootstrap_endpoint }}"
validate_certs: false
delay: 10
retries: 60
register: result
until:
- "'status' in result"
- result.status == 200
- import_role:
name: openshift_node40
tasks_from: config.yml
- import_role:
name: openshift_node40
tasks_from: systemd.yml
29 changes: 29 additions & 0 deletions playbooks/bootkube_node.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
# l_scale_up_hosts may be passed in via various scaleup plays.

- import_playbook: init/main.yml
vars:
l_install_base_packages: True
l_repo_hosts: "all:!all"

# This is required for container runtime for crio, only needs to run once.
- name: Configure os_firewall
hosts: "{{ l_scale_up_hosts | default(l_default_firewall_hosts) }}"
vars:
l_default_firewall_hosts: "oo_masters_to_config:oo_etcd_to_config:oo_lb_to_config:oo_nfs_to_config:oo_nodes_to_config"
roles:
- role: os_firewall

- import_playbook: container-runtime/private/setup_storage.yml

- import_playbook: container-runtime/private/config.yml

- name: install nodes
hosts: bootkube_nodes
tasks:
- import_role:
name: openshift_node40
tasks_from: install.yml
- import_role:
name: openshift_node40
tasks_from: bootkube_config.yml
14 changes: 0 additions & 14 deletions playbooks/gcp/OWNERS

This file was deleted.

186 changes: 0 additions & 186 deletions playbooks/gcp/openshift-cluster/build_base_image.yml

This file was deleted.

Loading