Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add compatibility for installing Oracle Free Editions #175

Merged
merged 13 commits into from
Jan 28, 2025

Conversation

simonpane
Copy link
Collaborator

Change Description:

Add support for installing Oracle Database 23ai Free Edition.

Solution Overview:

Toolkit required significant modification to support installing Oracle Database Free Edition. Summarized as:

  • Must support an RPM based installation (only option for installing Free Edition).
  • Must support installing the Oracle pre-installation RPM.
  • Must support installation in to /opt.
  • Some options and Grid Infrastructure (ASM) are not applicable/excluded.
  • Version can be specified or can default to the latest version (software must be staged in the swlib).

Documentation is updated with additional details.

Test Commands:

Multiple tests, using different options, to be run.

Test Prep:

Required asm_disk_config.json file content:

[
  {
    "diskgroup": "DATA",
    "disks": [
      {
        "blk_device": "/dev/disk/by-id/google-oracle-asm-1",
        "name": "DATA1"
      }
    ]
  },
  {
    "diskgroup": "RECO",
    "disks": [
      {
        "blk_device": "/dev/disk/by-id/google-oracle-asm-2",
        "name": "RECO1"
      }
    ]
  }
]

Required data_mounts_config.json file content:

[
  {
    "purpose": "software",
    "blk_device": "/dev/disk/by-id/google-oracle-disk-1",
    "name": "u01",
    "fstype": "xfs",
    "mount_point": "/u01",
    "mount_opts": "nofail"
  }
]

Test 1: Check that software is available:

./check-swlib.sh --ora-swlib-bucket gs://pythian-gto-oracle-software/free-edition --ora-edition FREE

Test 2: Run a complete 23ai Free Edition install:

Enter the appropriate IP address for the target database server:

export INSTANCE_IP_ADDR=10.2.80.66

Install the "latest" version of 23ai Free Edition by default (i.e. by not explicitly stating a specific version):

./install-oracle.sh \
  --instance-ip-addr ${INSTANCE_IP_ADDR} \
  --ora-edition FREE \
  --ora-swlib-bucket gs://pythian-gto-oracle-software/free-edition \
  --backup-dest /opt/oracle/fast_recovery_area/FREE \
  --ora-pdb-count 2 \
  --ora-pdb-name-prefix FREEPDB \
  --allow-install-on-vm

Test 3: Run a custom version of 23ai Free Edition full installation:

Enter the appropriate IP address for a new target database server:

export INSTANCE_IP_ADDR=10.2.80.67

Install a specific version of 23ai Free Edition by including the --ora-version argument:

./install-oracle.sh \
  --instance-ip-addr ${INSTANCE_IP_ADDR} \
  --ora-edition FREE \
  --ora-version 23.5.0.24.07 \
  --ora-swlib-bucket gs://pythian-gto-oracle-software/free-edition \
  --backup-dest /opt/oracle/fast_recovery_area/FREE \
  --ora-pdb-count 2 \
  --ora-pdb-name-prefix FREEPDB \
  --allow-install-on-vm

Test 4: Run a regression test to create a 19c EE database environment:

Enter the appropriate IP address for a new target database server:

export INSTANCE_IP_ADDR=10.2.80.68

Run an Oracle Database 19c regression test to ensure that the current changes didn't break existing functionality:

./install-oracle.sh \
  --instance-ip-addr ${INSTANCE_IP_ADDR} \
  --ora-edition EE \
  --ora-version 19 \
  --ora-swlib-type gcs \
  --ora-swlib-bucket gs://pythian-gto-oracle-software/19c \
  --ora-swlib-path /u01/oracle_install \
  --backup-dest "+RECO" \
  --cluster-type NONE \
  --ora-data-diskgroup DATA \
  --ora-reco-diskgroup RECO \
  --ora-db-name orcl \
  --ora-db-container false \
  --allow-install-on-vm

Expected Results:

  1. Updated documentation is complete and comprehensive.

  2. Scripts complete successfully without any failed tasks.

  3. Oracle 23ai Free Edition database is available (with PDBs in READ WRITE state).

  4. When not explicitly stated using the --ora-version switch, the latest (23.6) version is installed.

  5. When an explicit version is specified using the ora-version switch, that specific version is installed.

  6. Backups completed successfully as per .out and .log files in ~oracle/logs directory on the DB server.

  7. Regression test successfully installed 19c EE environment.

@simonpane simonpane self-assigned this Jan 23, 2025
@mfielding
Copy link
Member

/test bms-toolkit-install

@simonpane
Copy link
Collaborator Author

/test bms-toolkit-install

simonpane and others added 2 commits January 26, 2025 13:33
Toolkit required significant modification to support installing Oracle Database Free Edition. Summarized as:

* Must support an RPM based installation (only option for installing Free Edition).
* Must support installing the Oracle pre-installation RPM.
* Must support installation in to /opt.
* Some options and Grid Infrastructure (ASM) are not applicable/excluded.
* Version can be specified or can default to the latest version (software must be staged in the swlib).

Documentation is updated with additional details.
@simonpane
Copy link
Collaborator Author

/test bms-toolkit-install

check-swlib.sh Outdated Show resolved Hide resolved
config-db.yml Outdated Show resolved Hide resolved
install-sw.yml Outdated Show resolved Hide resolved
install-sw.yml Outdated Show resolved Hide resolved
install-oracle.sh Outdated Show resolved Hide resolved
install-sw.yml Outdated Show resolved Hide resolved
install-sw.yml Show resolved Hide resolved
roles/check-swlib/tasks/main.yml Outdated Show resolved Hide resolved
roles/check-swlib/tasks/main.yml Outdated Show resolved Hide resolved
roles/common/defaults/main.yml Outdated Show resolved Hide resolved
Copy link
Member

@mfielding mfielding left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

More comments here; Thanks for going through these, and we'll likely need another round due to the complexity.

docs/user-guide.md Outdated Show resolved Hide resolved
docs/user-guide.md Outdated Show resolved Hide resolved
group_vars/all.yml Outdated Show resolved Hide resolved
roles/db-adjustements/templates/archivelog_mode.sh.j2 Outdated Show resolved Hide resolved
roles/db-create/defaults/main.yml Outdated Show resolved Hide resolved
roles/db-create/tasks/main.yml Outdated Show resolved Hide resolved
roles/db-create/tasks/main.yml Outdated Show resolved Hide resolved
roles/ora-host/tasks/main.yml Outdated Show resolved Hide resolved
roles/ora-host/tasks/main.yml Outdated Show resolved Hide resolved
roles/ora-host/tasks/main.yml Outdated Show resolved Hide resolved
@simonpane
Copy link
Collaborator Author

Updated gist links showing execution from the latest set of commits:

install-sw.yml Show resolved Hide resolved
install-sw.yml Show resolved Hide resolved
roles/db-adjustements/templates/archivelog_mode.sh.j2 Outdated Show resolved Hide resolved
@google-oss-prow google-oss-prow bot added the lgtm label Jan 28, 2025
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mfielding, simonpane

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@mfielding mfielding merged commit c08e659 into google:master Jan 28, 2025
1 check passed
@simonpane simonpane deleted the rel/oratk-18 branch January 28, 2025 21:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants