From 168cf5e72bc445165ef8c9b76d717c9889f8ba69 Mon Sep 17 00:00:00 2001 From: William Graef Date: Tue, 8 Oct 2024 19:42:36 -0400 Subject: [PATCH 1/3] add oci ingress rules for ocne ingress --- ocne2/default_vars.yml | 1 + ocne2/templates/ingress_security_rules.j2 | 16 +++++++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/ocne2/default_vars.yml b/ocne2/default_vars.yml index b74d3ae..c0e2c7b 100644 --- a/ocne2/default_vars.yml +++ b/ocne2/default_vars.yml @@ -17,6 +17,7 @@ debug_enabled: false add_block_storage: false block_volume_size_in_gbs: 50 block_count: 1 +use_ingress_lb: false ocne_type: libvirt install_ocne_rpm: false diff --git a/ocne2/templates/ingress_security_rules.j2 b/ocne2/templates/ingress_security_rules.j2 index db769f6..f95d626 100644 --- a/ocne2/templates/ingress_security_rules.j2 +++ b/ocne2/templates/ingress_security_rules.j2 @@ -11,4 +11,18 @@ instance_ingress_security_rules: tcp_options: destination_port_range: max: 22 - min: 22 \ No newline at end of file + min: 22 +{% if use_ingress_lb %} + - source: "0.0.0.0/0" + protocol: 6 + tcp_options: + destination_port_range: + max: 80 + min: 80 + - source: "0.0.0.0/0" + protocol: 6 + tcp_options: + destination_port_range: + max: 443 + min: 443 +{% endif %} \ No newline at end of file From 750c5d3924da035257a089c304d61f11b8a80999 Mon Sep 17 00:00:00 2001 From: William Graef Date: Tue, 8 Oct 2024 19:47:26 -0400 Subject: [PATCH 2/3] split download of ol iso for vbox --- ol/create_instance.yml | 4 ++++ ol/default_vars.yml | 2 +- ol/download_ol_iso.yml | 26 ++++++++++++++++++++++++++ 3 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 ol/download_ol_iso.yml diff --git a/ol/create_instance.yml b/ol/create_instance.yml index 0606e6a..b2215b1 100644 --- a/ol/create_instance.yml +++ b/ol/create_instance.yml @@ -319,6 +319,10 @@ ansible.builtin.import_playbook: provision_vbox.yml when: use_vbox +- name: Download OL ISO + ansible.builtin.import_playbook: download_ol_iso.yml + when: dwnld_ol_iso + - name: Print instances hosts: all become: true diff --git a/ol/default_vars.yml b/ol/default_vars.yml index 7d24e1f..bb89e82 100644 --- a/ol/default_vars.yml +++ b/ol/default_vars.yml @@ -51,4 +51,4 @@ virtualbox_version: "7.1" virtualbox_extpack_version: "7.1.2" ol_iso_version: "9" ol_update: "4" - +dwnld_ol_iso: false diff --git a/ol/download_ol_iso.yml b/ol/download_ol_iso.yml new file mode 100644 index 0000000..0cd4551 --- /dev/null +++ b/ol/download_ol_iso.yml @@ -0,0 +1,26 @@ +--- +# Copyright (c) 2024 Oracle and/or its affiliates. +# This software is made available to you under the terms of the Universal Permissive License (UPL), Version 1.0. +# The Universal Permissive License (UPL), Version 1.0 (see COPYING or https://oss.oracle.com/licenses/upl) +# See LICENSE.TXT for details. + +- name: Download Oracle Linux iso file + hosts: vbox + vars_files: + - default_vars.yml + become: true + + tasks: + + - name: Download the Oracle Linux iso file + ansible.builtin.get_url: + url: "{{ base_url }}/OL{{ ol_iso_version }}/u{{ ol_update }}/x86_64/OracleLinux-R{{ ol_iso_version }}-U{{ ol_update }}-x86_64-dvd.iso" + dest: /home/{{ username }} + force: true + mode: "0644" + register: download_iso_result + until: "'OK' in download_iso_result.msg" + retries: 5 + delay: 10 + vars: + base_url: "https://yum.oracle.com/ISOS/OracleLinux" From 0c91a9ff1aa6a9acbe2a956d7acfad2cfb6e9069 Mon Sep 17 00:00:00 2001 From: William Graef Date: Tue, 8 Oct 2024 21:28:28 -0400 Subject: [PATCH 3/3] update iso download --- ol/download_ol_iso.yml | 2 +- ol/provision_vbox.yml | 15 +-------------- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/ol/download_ol_iso.yml b/ol/download_ol_iso.yml index 0cd4551..0c0d455 100644 --- a/ol/download_ol_iso.yml +++ b/ol/download_ol_iso.yml @@ -5,7 +5,7 @@ # See LICENSE.TXT for details. - name: Download Oracle Linux iso file - hosts: vbox + hosts: server,vbox vars_files: - default_vars.yml become: true diff --git a/ol/provision_vbox.yml b/ol/provision_vbox.yml index 7155a2c..ce0354a 100644 --- a/ol/provision_vbox.yml +++ b/ol/provision_vbox.yml @@ -4,7 +4,7 @@ # The Universal Permissive License (UPL), Version 1.0 (see COPYING or https://oss.oracle.com/licenses/upl) # See LICENSE.TXT for details. -- name: Install VNC Server and GNOME Desktop +- name: Install VirtualBox hosts: vbox vars_files: - default_vars.yml @@ -87,16 +87,3 @@ register: install_extpack changed_when: install_extpack != 0 when: 'extpack_list.stdout == "Extension Packs: 0"' - - - name: Download the Oracle Linux iso file - ansible.builtin.get_url: - url: "{{ base_url }}/OL{{ ol_iso_version }}/u{{ ol_update }}/x86_64/OracleLinux-R{{ ol_iso_version }}-U{{ ol_update }}-x86_64-dvd.iso" - dest: /home/{{ username }} - force: true - mode: "0644" - register: download_iso_result - until: "'OK' in download_iso_result.msg" - retries: 5 - delay: 10 - vars: - base_url: "https://yum.oracle.com/ISOS/OracleLinux"