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 ansible/roles/install-logging/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
# install-logging default vars

logging_packages:
- golang-github-prometheus
- grafana
- golang-github-prometheus
- grafana

logging_services:
- prometheus
Expand Down
6 changes: 5 additions & 1 deletion ansible/roles/install-logging/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
when: (ansible_distribution == "CentOS") or (ansible_distribution == "RedHat") or (ansible_distribution == "Fedora")

- name: copy prometheus config
template:
ansible.builtin.template:
src: prometheus.yml.j2
dest: /etc/prometheus/prometheus.yml
backup: true
Expand All @@ -39,6 +39,10 @@
ansible.builtin.set_fact:
microshift_dashboard: "{{ lookup('ansible.builtin.file', 'microshift_perf.json') }}"

# The following URI commands fail without accessing some external network
- name: wake up network access
ansible.builtin.command: curl github.com

- name: create prometheus datasource in grafana
ansible.builtin.uri:
url: http://{{ ansible_default_ipv4.address }}:{{ grafana_port }}/api/datasources
Expand Down
12 changes: 7 additions & 5 deletions ansible/roles/manage-repos/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
---
# manage-repos default vars

ocp_repo_name: rhocp-4.13-for-rhel-{{ ansible_distribution_major_version }}-mirrorbeta-{{ ansible_architecture }}-rpms
ocp_version: 4.12
rhel_repos:
- rhel-8-for-x86_64-baseos-rpms
- rhel-8-for-x86_64-appstream-rpms
- codeready-builder-for-rhel-8-x86_64-rpms
- fast-datapath-for-rhel-8-x86_64-rpms
- rhocp-4.10-for-rhel-8-x86_64-rpms
- rhel-{{ ansible_distribution_major_version }}-for-{{ ansible_architecture }}-baseos-rpms
- rhel-{{ ansible_distribution_major_version }}-for-{{ ansible_architecture }}-appstream-rpms
- codeready-builder-for-rhel-{{ ansible_distribution_major_version }}-{{ ansible_architecture }}-rpms
#- fast-datapath-for-rhel-{{ ansible_distribution_major_version }}-{{ ansible_architecture }}-rpms
#- rhocp-{{ ocp_version }}-for-rhel-{{ ansible_distribution_major_version }}-{{ ansible_architecture }}-rpms
5 changes: 5 additions & 0 deletions ansible/roles/manage-repos/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@
name: 'https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm'
disable_gpg_check: true
state: present

- name: install ocp beta repo
ansible.builtin.template:
src: ocpbeta.repo.j2
dest: /etc/yum.repos.d/{{ ocp_repo_name }}.repo
when: ansible_distribution == "RedHat"

- name: gather the package facts
Expand Down
6 changes: 6 additions & 0 deletions ansible/roles/manage-repos/templates/ocpbeta.repo.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[{{ ocp_repo_name }}]
name=Beta rhocp-4.13 RPMs for RHEL {{ ansible_distribution_major_version }}
baseurl=https://mirror.openshift.com/pub/openshift-v4/$basearch/dependencies/rpms/4.13-el{{ ansible_distribution_major_version }}-beta/
enabled=1
gpgcheck=0
skip_if_unavailable=0
9 changes: 9 additions & 0 deletions ansible/roles/setup-microshift-host/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,27 @@
---
# setup-microshift-host default vars

go_arch: arm64
go_files:
- go
- gofmt
go_version: 1.19.6
go_install_dir: /usr/local/go{{ go_version }}

install_packages:
- bash-completion
- firewalld
- git
- golang
- jq
- lvm2
- make
- openshift-clients
- python3-firewall
- perf
- rpm-build
- selinux-policy-devel
- tar
- vnstat

vg_name: rhel
Expand Down
26 changes: 26 additions & 0 deletions ansible/roles/setup-microshift-host/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,31 @@
state: present
update_cache: true

- name: determine system architecture
ansible.builtin.set_fact:
go_arch: amd64
when: ansible_facts['architecture'] == "x86_64"

- name: create target directory for go version
ansible.builtin.file:
path: "{{ go_install_dir }}"
state: directory

- name: download & extract newer version of golang
ansible.builtin.unarchive:
src: https://go.dev/dl/go{{ go_version }}.linux-{{ go_arch }}.tar.gz
dest: "{{ go_install_dir }}"
remote_src: yes
extra_opts:
- "--strip-components=1"

- name: create symbolic links
ansible.builtin.file:
src: "{{ go_install_dir }}/bin/{{ item }}"
dest: "/usr/local/bin/{{ item }}"
state: link
with_items: "{{ go_files }}"

- name: start and enable firewalld
ansible.builtin.systemd:
name: firewalld
Expand All @@ -28,6 +53,7 @@
ansible.builtin.dnf:
name: "*"
state: latest
nobest: true
notify: reboot machine

- name: flush handlers
Expand Down