I didn’t have the opportunity yet to test anything related to Oracle Fleet Patching and Provisioning but a BrokeDBA’s tweet, made me realised I really should check it out:


Since BrokeDBA forked the Official Vagrant git and added a couple of interesting scripts, I decided to try it out using my recent installed VirtualBox (but you can use Libvirt)

The first thing I needed to do is to test Vagrant with VirtualBox, so I decided to create a simple Oracle 8 Box:

|=| server in ~/Vagrant_VBox ○ → vagrant init oraclelinux/8 https://oracle.github.io/vagrant-projects/boxes/oraclelinux/8.json
A `Vagrantfile` has been placed in this directory. You are now
ready to `vagrant up` your first virtual environment! Please read
the comments in the Vagrantfile as well as documentation on
`vagrantup.com` for more information on using Vagrant.

|=| server in ~/Vagrant_VBox ○ → vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'oraclelinux/8' could not be found. Attempting to find and install...
    default: Box Provider: virtualbox
    default: Box Version: >= 0
==> default: Loading metadata for box 'https://oracle.github.io/vagrant-projects/boxes/oraclelinux/8.json'
    default: URL: https://oracle.github.io/vagrant-projects/boxes/oraclelinux/8.json
==> default: Adding box 'oraclelinux/8' (v8.3.182) for provider: virtualbox
[....]
==> default: Mounting shared folders...
    default: /vagrant => /home/solifugo/Vagrant_VBox

|=| server in ~/Vagrant_VBox ○ → vagrant ssh
Welcome to Oracle Linux Server release 8.3 (GNU/Linux 5.4.17-2036.100.6.1.el8uek.x86_64)
[....]
[vagrant@localhost ~]$ head -1 /etc/*rel*
==> /etc/oracle-release <==
Oracle Linux Server release 8.3
[....]
[vagrant@localhost ~]$

Let’s try "BrokenDBA’s FFP" now 🙂

First, cloning the github and making sure we have the software ISOs (both 12.1 and 19c) located in the right place

|=| server in /kvm/SDD/Vagrant_FPP ○ → git clone https://github.com/brokedba/OracleFPP.git
Cloning into 'OracleFPP'...
remote: Enumerating objects: 56, done.
remote: Counting objects: 100% (56/56), done.
remote: Compressing objects: 100% (55/55), done.
remote: Total 218 (delta 26), reused 0 (delta 0), pack-reused 162
Receiving objects: 100% (218/218), 309.18 KiB | 1.24 MiB/s, done.
Resolving deltas: 100% (107/107), done.

|=| server in /kvm/SDD/Vagrant_FPP ○ →

|=| server in /kvm/SDD/Vagrant_FPP ○ → tree
.
└── OracleFPP
    ├── config
    │   ├── neofetch_config.conf
    │   └── vagrant.yml
    ├── images
    │   ├── fpp_vagrant_yml.png
    │   ├── OracleFPP.png
    │   └── westworld1.jpg
    ├── ORCL_software
    │   ├── check_crs.sh
    │   ├── check_pdb.sql
    │   ├── fpp_software.png

    │   ├── linuxamd64_12102_database_1of2.zip   <<<<<<<<<<
    │   ├── linuxamd64_12102_database_2of2.zip   <<<<<<<<<<
    │   ├── LINUX.X64_193000_db_home.zip         <<<<<<<<<<
    │   ├── LINUX.X64_193000_grid_home.zip       <<<<<<<<<<

    │   ├── put_Oracle-software_here.txt
    │   └── rac-status.sh
    ├── README.md
    ├── scripts
    │   ├── 01_setup_u01.sh
    │   ├── 01_setup_u02.sh
    │   ├── 02_install_os_packages.sh
    │   ├── 03_setup_hosts.sh
    │   ├── 04_setup_chrony.sh
    │   ├── 05_setup_shared_disks.sh
    │   ├── 06_setup_users.sh
    │   ├── 07_setup_user_equ.expect
    │   ├── 08_asmfd_label_disk.sh
    │   ├── 08_asmlib_label_disk.sh
    │   ├── 10_gi_setup.sh
    │   ├── 12_Setup_FPP.sh
    │   ├── 13_Setup_db.sh
    │   ├── oracle-rdbms.service
    │   ├── ora-response
    │   │   ├── dbca.rsp.tmpl
    │   │   └── db_install.rsp.tmpl
    │   └── setup.sh
    ├── userscripts
    │   └── put_custom_scripts_here.txt
    └── Vagrantfile

7 directories, 34 files

|=| server in /kvm/SDD/Vagrant_FPP ○ →

I did a small change to ./config/vagrant.yml file, since the ASM disk Path is originally set to "C:\" and I’m using Linux. Needed also to change the default VirtualBox VMs base location to a bigger filesystem

|=| server in /kvm/SDD/Vagrant_FPP/OracleFPP ± |master U:1 ?:9 ✗| → cat config/vagrant.yml
  [....]
  asm_disk_path: /kvm/SDD/Vagrant_FPP/disks
  asm_disk_num:   6
  asm_disk_size: 10
  [....]

|=| server in ~/VirtualBox VMs ○ → vboxmanage setproperty machinefolder /kvm/SDD/Vagrant

|=| server in ~/VirtualBox VMs ○ →  

Everything is ready to go, so let’s just make vagrant to do its magic

|=| server in /kvm/SDD/Vagrant_FPP/OracleFPP ± |master U:1 ?:4 ✗| → vagrant up
--------------------
Detected virtualbox
--------------------
Installing vagrant-reload Plugin...
Installing the 'vagrant-reload' plugin. This can take a few minutes...
Building native extensions. This could take a while...
Building native extensions. This could take a while...
Fetching fog-libvirt-0.8.0.gem
Fetching vagrant-reload-0.0.1.gem
Successfully uninstalled fog-libvirt-0.7.0
Installed the plugin 'vagrant-reload (0.0.1)'!
Installing vagrant-proxyconf Plugin...
Installing the 'vagrant-proxyconf' plugin. This can take a few minutes...
Building native extensions. This could take a while...
Building native extensions. This could take a while...
Fetching vagrant-proxyconf-2.0.10.gem
Installed the plugin 'vagrant-proxyconf (2.0.10)'!
Bringing machine 'host1' up with 'virtualbox' provider...
Bringing machine 'host2' up with 'virtualbox' provider...
==> host1: Box 'ol74' could not be found. Attempting to find and install...
    host1: Box Provider: virtualbox
    host1: Box Version: >= 0
==> host1: Box file was not detected as metadata. Adding it directly...
==> host1: Adding box 'ol74' (v0) for provider: virtualbox
    host1: Downloading: https://yum.oracle.com/boxes/oraclelinux/ol74/ol74.box
==> host1: Successfully added box 'ol74' (v0) for 'virtualbox'!
==> host1: Importing base box 'ol74'...
==> host1: Matching MAC address for NAT networking...
==> host1: Setting the name of the VM: london-fleet-fpp-Server
==> host1: Clearing any previously set network interfaces...
==> host1: Preparing network interfaces based on configuration...

[....]

    host1: -----------------------------------------------------------------
    host1: INFO: 2021-01-18 17:26:55: Grid Infrastructure configuration as 'RAC'
    host1: INFO: 2021-01-18 17:26:55: - ASM library   : ASMLIB
    host1: -----------------------------------------------------------------
    host1: Launching Oracle Grid Infrastructure Setup Wizard...
    host1: You can find the logs of this session at:
    host1: /u01/app/oraInventory/logs/GridSetupActions2021-01-18_05-26-56PM
    host1: You can find the log of this install session at:
    host1:  /u01/app/oraInventory/logs/UpdateNodeList2021-01-18_05-26-56PM.log

[....]

    host1: === Enabling NFS SERVER ===
    host1: Created symlink from /etc/systemd/system/multi-user.target.wants/nfs-server.service to /usr/lib/systemd/system/nfs-server.service.
    host1: -----------------------------------------------------------------
    host1: INFO: 2021-01-18 18:12:48: Running user-defined post-setup scripts
    host1: -----------------------------------------------------------------
==> host2: Box 'ol74' could not be found. Attempting to find and install...
    host2: Box Provider: virtualbox
    host2: Box Version: >= 0
==> host2: Box file was not detected as metadata. Adding it directly...
==> host2: Adding box 'ol74' (v0) for provider: virtualbox
==> host2: Importing base box 'ol74'...
==> host2: Matching MAC address for NAT networking...
==> host2: Setting the name of the VM: london-fleet-fpp-Client
==> host2: Fixed port collision for 22 => 2222. Now on port 2200.
==> host2: Clearing any previously set network interfaces...
==> host2: Preparing network interfaces based on configuration...
    host2: Adapter 1: nat
    host2: Adapter 2: intnet
==> host2: Forwarding ports...
    host2: 22 (guest) => 2200 (host) (adapter 1)
==> host2: Running 'pre-boot' VM customizations...
==> host2: Booting VM...
==> host2: Waiting for machine to boot. This may take a few minutes...
    host2: SSH address: 127.0.0.1:2200
    host2: SSH username: vagrant
    host2: SSH auth method: private key
[....]

By the way, the whole process can take very long depending on your system performance, but as long as the host1 (fpp-Server by default) is created, you can actually check the deployment process, like here where I wanted to confirm the GI installation in the server was progressing:

|=| server in /kvm/SDD/Vagrant_FPP/OracleFPP ± |master U:1 ?:8 ✗| → vagrant ssh host1
--------------------
Detected virtualbox
--------------------
[....]
[vagrant@fpp-Server ~]$ sudo su -
[root@fpp-Server ~]# tail /u01/app/19.3.0.0/grid/install/root_fpp-Server_2021-01-18_16-59-57-194194477.log
CRS-4256: Updating the profile
CRS-4266: Voting file(s) successfully replaced
##  STATE    File Universal Id                File Name Disk group
--  -----    -----------------                --------- ---------
 1. ONLINE   bf8d8643f1b94fe1bf01963358729a9e (/dev/oracleasm/disks/ORCL_DISK2_P1) [DATA]
Located 1 voting disk(s).
2021/01/18 17:08:38 CLSRSC-594: Executing installation step 17 of 19: 'StartCluster'.
2021/01/18 17:10:42 CLSRSC-343: Successfully started Oracle Clusterware stack
2021/01/18 17:10:42 CLSRSC-594: Executing installation step 18 of 19: 'ConfigNode'.
2021/01/18 17:13:53 CLSRSC-594: Executing installation step 19 of 19: 'PostConfig'.

[root@fpp-Server ~]# ps -ef |grep pmon
grid      4066     1  0 17:10 ?        00:00:00 asm_pmon_+ASM1
grid     10180     1  0 17:14 ?        00:00:00 apx_pmon_+APX1
root     14827  9687  0 17:22 pts/0    00:00:00 grep --color=auto pmon
[root@fpp-Server ~]#

And voilà! our server and client are ready:

[....]
    host2: INSTALLER: Database created
    host2: INSTALLER: Oratab configured
    host2: ******************************************************************************
    host2:  Configure systemd to start oracle instance on startup  Mon Jan 18 20:50:55 GMT 2021
    host2: ******************************************************************************
    host2: Created symlink from /etc/systemd/system/multi-user.target.wants/oracle-rdbms.service to /etc/systemd/system/oracle-rdbms.service.
    host2: INSTALLER: Created and enabled oracle-rdbms systemd's service
    host2: INSTALLER: Done running user-defined post-setup scripts
    host2: ORACLE PASSWORD FOR SYS, SYSTEM AND PDBADMIN: welcome1
    host2: INSTALLER: Installation complete, database ready to use!
    host2: -----------------------------------------------------------------
    host2: ESC[0;34mINFO: ESC[0m2021-01-18 20:51:18: Running user-defined post-setup scripts
    host2: ----------------------------------------------------------------- 

Once the initial deployment is completed, we can see the Server and Client current status, including a 12.1 DB created already (and that nice and colourful Neofetch welcome screen added by Brokedba’s script :stuck_out_tongue_winking_eye: )

|=| server in /kvm/SDD/Vagrant_FPP/OracleFPP ± |master U:1 ?:12 ✗| → vssh host2
--------------------
Detected virtualbox
--------------------
getting Proxy Configuration from Host...
Last login: Mon Jan 18 21:55:56 2021 from 10.0.2.2
                                      vagrant@fpp-Client
      `-/+++++++++++++++++/-.`        ------------------
   `/syyyyyyyyyyyyyyyyyyyyyyys/.      OS: Oracle Linux Server 7.4 x86_64
  :yyyyo/-...............-/oyyyy/     Host: VirtualBox 1.2
 /yyys-                     .oyyy+    Kernel: 4.1.12-112.16.4.el7uek.x86_64
.yyyy`                       `syyy-   Uptime: 19 mins
:yyyo                         /yyy/   Packages: 407 (rpm)
.yyyy`                       `syyy-   Shell: bash 4.2.46
 /yyys.                     .oyyyo    Terminal: /dev/pts/0
  /yyyyo:-...............-:oyyyy/`    CPU: Intel Xeon X5670 (1) @ 2.934GHz
   `/syyyyyyyyyyyyyyyyyyyyyyys+.      GPU: VirtualBox Graphics Adapter
     `.:/+ooooooooooooooo+/:.`        Memory: 1431MiB / 5708MiB

[vagrant@fpp-Client ~]$ sudo su - oracle
Last login: Mon Jan 18 20:50:55 GMT 2021
[oracle@fpp-Client ~]$ ps -ef |grep pmon
oracle    1161     1  0 13:19 ?        00:00:00 ora_pmon_cdb1
oracle   22420 22396  0 13:41 pts/0    00:00:00 grep --color=auto pmon
[oracle@fpp-Client ~]$

[oracle@fpp-Client ~]$ . oraenv
ORACLE_SID = [cdb1] ?
The Oracle base remains unchanged with value /u01/app/oracle
[oracle@fpp-Client ~]$ sqlplus / as sysdba
[....]

DB_NAME   DB_UNIQUE_NAME INSTANCE_NAME  CDB HOST_NAME   DATABASE_ROLE 
--------- -------------- -------------- --- ----------- --------------
CDB1      cdb1           cdb1           YES fpp-Client  PRIMARY       

   INST_ID     CON_ID NAME      OPEN_MODE   STATUS
---------- ---------- --------- ----------  -------
         1          2 PDB$SEED  READ ONLY   NORMAL
         1          3 PDB1      READ WRITE  NORMAL

|=| server in /kvm/SDD/Vagrant_FPP/OracleFPP ± |master U:1 ?:12 ✗| → vssh host1
[....]
[vagrant@fpp-Server ~]$ sudo su - grid
Last login: Tue Jan 19 13:46:08 GMT 2021 on pts/0
[grid@fpp-Server ~]$
[grid@fpp-Server ~]$ ps -ef |grep pmon
grid      1577  1402  0 13:46 pts/0    00:00:00 grep --color=auto pmon
grid      7919     1  0 13:19 ?        00:00:00 asm_pmon_+ASM1
grid      9749     1  0 13:21 ?        00:00:00 apx_pmon_+APX1
grid     10710     1  0 13:21 ?        00:00:00 mdb_pmon_-MGMTDB
[grid@fpp-Server ~]$

Like you see, as long as you have space, memory and Vagrant installed, there is nothing that stops you to try Oracle FPP.

I will try few more things on the coming days, so I hope to share more posts about Oracle FPP soon.

Thanks to BrokeDBA for sharing his experience!! :blush:

Last modified: 19 March 2021

Author

Comments

Awesome thanks for sharing Victor!!

Write a Reply or Comment

Your email address will not be published.