Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
oracle_nosql_config [2023/01/06 10:56] – created andonovj | oracle_nosql_config [2023/01/06 11:33] (current) – [Oracle NoSQL] andonovj | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | =====Setup===== | + | =====Overview===== |
The whole setup of Oracle NoSQL, in my opinion, is bananas. Each time I tried to set it up, something always failed. | The whole setup of Oracle NoSQL, in my opinion, is bananas. Each time I tried to set it up, something always failed. | ||
Luckily, or because of it, some people (oracle) create a script to facilitate the configuration. | Luckily, or because of it, some people (oracle) create a script to facilitate the configuration. | ||
The script can be downloaded by cloning [[https:// | The script can be downloaded by cloning [[https:// | ||
+ | |||
+ | In this repo, there is a folder called: cluster_setup into which, there is a script called: cluster_setup.sh, | ||
+ | |||
+ | Either way, so in our case, we will just configure 2 VMs (using vagrant) and run that setup. | ||
+ | |||
+ | |||
+ | =====Virtual Machines===== | ||
+ | I have done it many times, but the setup of the VMs using vagrant is pretty easy. I have created the following Vagrantfile, | ||
+ | |||
+ | < | ||
+ | $allow_shell = << | ||
+ | sed -i ' | ||
+ | systemctl restart sshd.service | ||
+ | SCRIPT | ||
+ | |||
+ | $edit_hosts_file = << | ||
+ | cat > /etc/hosts <<EOF | ||
+ | 127.0.0.1 localhost | ||
+ | 192.168.0.101 sn1.example.com sn1 | ||
+ | 192.168.0.102 sn2.example.com sn2 | ||
+ | 192.168.0.103 sn3.example.com sn3 | ||
+ | EOF | ||
+ | SCRIPT | ||
+ | |||
+ | $install_vnc_server = << | ||
+ | yum -y install net-tools | ||
+ | yum -y install unzip | ||
+ | yum -y install curl | ||
+ | yum -y install lvm2 | ||
+ | yum -y remove java | ||
+ | yum -y install java-1.8.0-openjdk-1.8.0.352.b08-2.el7_9.x86_64 | ||
+ | SCRIPT | ||
+ | |||
+ | $config_storage = << | ||
+ | vgcreate vg_nosql /dev/sdb | ||
+ | lvcreate -L 1G -n lv_disk1 vg_nosql | ||
+ | lvcreate -L 1G -n lv_disk2 vg_nosql | ||
+ | lvcreate -L 1G -n lv_disk3 vg_nosql | ||
+ | mkfs.ext4 / | ||
+ | mkfs.ext4 / | ||
+ | mkfs.ext4 / | ||
+ | cat >> /etc/fstab <<EOF | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | EOF | ||
+ | mkdir -p / | ||
+ | mkdir -p / | ||
+ | mkdir -p / | ||
+ | mount / | ||
+ | mount / | ||
+ | mount / | ||
+ | mkdir -p / | ||
+ | cp / | ||
+ | unzip / | ||
+ | rpm -Uvh / | ||
+ | SCRIPT | ||
+ | |||
+ | Vagrant.configure(" | ||
+ | | ||
+ | config.vm.provision :shell, inline: " | ||
+ | config.vm.define " | ||
+ | sn.vm.box = " | ||
+ | sn.vm.hostname = " | ||
+ | sn.vm.synced_folder " | ||
+ | sn.vm.network " | ||
+ | sn.vm.provision " | ||
+ | sn.vm.provision " | ||
+ | sn.vm.provision " | ||
+ | second_disk = " | ||
+ | sn.vm.provider :virtualbox do |v| | ||
+ | # Get disk path | ||
+ | v.customize [" | ||
+ | v.customize [" | ||
+ | v.customize [" | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | v.customize [' | ||
+ | v.customize [' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | end | ||
+ | sn.vm.provision " | ||
+ | end | ||
+ | end | ||
+ | end | ||
+ | </ | ||
+ | |||
+ | As, maybe, you will guess, that will create us 2 Virtual machines, with an additional disk which we will create a volume group, which we will split into 3 and which we will mount each LV to a separate File system...geeesh that is a lot. | ||
+ | Anywho, after this, we should have 2 VMs, running and all installed...but the Oracle NoSQL of course | ||
+ | |||
+ | |||
+ | =====Oracle NoSQL===== | ||
+ | The script pretty much guides you through the entire process, but let's set the steps: | ||
+ | |||
+ | - Intro screen (Enter) | ||
+ | - Location of the Oracle NoSQL ZIP file (Enter) | ||
+ | - Host/IPs of the nodes in the cluster and username to connect (Enter) | ||
+ | - Installation path (Enter) | ||
+ | - Store name: DefaultStore (I leave my default) (Enter) | ||
+ | - A lot of connections and password entering (Unless you configure passwordless authentication...too lazy to do so) | ||
+ | - Data directory: Enter disks (Enter) | ||
+ | - Log directories (Up to you if you wanna keep logs) (Enter) | ||
+ | - Port: 5000 (Enter) | ||
+ | - Replication Factor: 1, it is a test after all (Enter) | ||
+ | |||
+ | There might be some issues with the JAVA, don't ask me....Oracle |