Deploy Oracle Blockchain Platform Enterprise Edition on Red Hat OpenShift Local
You can install Oracle Blockchain Platform Enterprise Edition on Red Hat OpenShift Local for testing and internal development purposes. It is not supported for production environments.
For detailed information about Red Hat OpenShift Local, see Red Hat OpenShift Local.
- CPUs: 12 or more
- Memory: 30GB or higher
- Disk size: 150GB or higher
- RedHat OpenShift Local - Embedded OpenShift version 4.15.3, CRC (Code Ready Container) version 2.34.1
- Operating system: CentOS 8
This section provides an example walkthrough of installing the tested versions of the prerequisites. Refer to each product's documentation for additional information and any required modifications to the installation instructions. The following walkthrough was tested using CentOS 8 as the operating system. Other distributions of Linux, such as Oracle Linux or Red Hat Enterprise Linux, can also be used.
Note:
When you install Istio as part of the Install Prerequisite Software tasks, install version 1.22.1, not the latest version.Install Red Hat OpenShift Local
Complete the following steps to download and install Red Hat OpenShift Local. For additional information, see Installing CodeReady Containers.
- Navigate to Red Hat OpenShift Local and click Install OpenShift on your laptop. You are redirected to a login page where you can enter your Red Hat credentials or create an account if you do not already have one.
- After you log in, click Clusters and then click the Local tab.
- On the Local page, click Download OpenShift Local and then Download pull secret.
- Copy the
crcpackage and the pull secret that you downloaded in the previous step to your VM. For example:scp -r -i ~/.ssh/id_rsa ~/Downloads/crc-linux-amd64.tar.xz <username>@<ip-address>:/tmp scp -r -i ~/.ssh/id_rsa ~/Downloads/pull-secret.txt <username>@<ip-address>:/tmp cd - On your VM, create a directory called
crcand copy thecrcpackage and the pull secret to that directory. - Install OpenShift by running the following command:
If an error starting with Failed loading plugin "osmsplugin": No module named 'librepo' is displayed, run the following commands and then run the installation command again.sudo dnf install NetworkManagersudo sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* sudo sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-* - Run the following commands to extract the archive file:
cd ~/crc tar xvf crc-linux-amd64.tar.xz - Run the following commands to move the binary file to the
/bindirectory and to update the path:mkdir -p ~/bin cp ~/crc/crc-linux-*-amd64/crc ~/bin export PATH=$PATH:$HOME/bin echo 'export PATH=$PATH:$HOME/bin' >> ~/.bashrc
Increase Disk Space in the Root Partition
If the VM root partition space is less than 150 GB, complete the following steps.
- Ensure that the boot disk, root file system, or logical volume manager (LVM) has at least 150 GB free space.
- Use
fdiskto create a Linux file system partition of at least 100GB (in this example, the new partition is/dev/sda4) .sudo fdisk /dev/sda - Use the following command to add the physical volume to a volume group.
sudo vgextend centosvolume /dev/sda4 - Use the following command to increase the size of the logical volume.
sudo lvextend -L+99G /dev/mapper/centosvolume-root - Use the following command to increase the size of the filesystem.
The equivalent command on Oracle Enterprise Linux issudo xfs_growfs /dev/centosvolume/rootoci_growfs.
Configure OpenShift Local Parameters
Run the following commands to configure OpenShift Local to use 12 CPU cores, 30 GB memory, and 100 GB disk space.
crc config set cpus 12
crc config set memory 30720
crc config set disk-size 100Download and Install the OpenShift Client
Run the following commands to download and install oc, the OpenShift client software.
wget -O ~/crc/openshift-client-linux.tar.gz https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/ocp/4.15.3/openshift-client-linux-4.15.3.tar.gz
tar xvzf openshift-client-linux.tar.gz
sudo mv oc /usr/local/binStart the Cluster
Run the following commands to set up, start, and check the status of the cluster. Use the pull secret that you downloaded when you downloaded Red Hat OpenShift Local.
crc setup
crc start -p ~/crc/pull-secret.txt
crc statusOnce the installation is complete, information similar to the following will display:INFO Adding crc-admin and crc-developer contexts to kubeconfig...
Started the OpenShift cluster.
The server is accessible via web console at:
https://console-openshift-console.apps-crc.testing
Log in as administrator:
Username: kubeadmin
Password: password (note this password)
Log in as user:
Username: developer
Password: developer
Use the 'oc' command line interface:
$ eval $(crc oc-env)
$ oc login -u developer https://api.crc.testing:6443
Install Oracle Blockchain Platform Enterprise Edition
Access Blockchain Platform Manager
- Run the following command to get the list of configured
hostnames:
kubectl get virtualservice -n obp-cp -o json | jq -r .items[].spec.hosts[0] - Configure host name resolution for these generated host names to the IP address of the running Red Hat OpenShift cluster by adding the following entry to the
/etc/hostsfile on the VM.
In the example,<IP_Address> controlplane.<parentDomainName> openldap.<parentDomainName> auth.<parentDomainName><IP_address>is the output of thecrc ipcommand. - Ensure that the
crcVM security list allows ports 443, 6443, and 80 from the client host computer.
You can now log on to Blockchain Platform Manager (the control plane management tool) to create an instance.
Once you've created your instance, you must configure DNS forwarding as described in: Provisioning Postrequisites.