This article describes building a simple image on Linux for an Oracle database and delivering fast clones in containers from the image on Linux. The control plane runs on Windows while the cloning and containerization service runs on Linux. You need two downloads - the Windocks installer for Windows and the .Deb package for Linux. You may choose to call the Windocks Linux API directly if you don't want the Windows control plane - contact email@example.com for documentation on this.
Hardware requirements: The Windocks service is a software install on standard Linux (Ubuntu). The recommended minimum machine size for Oracle support is 8GB RAM with 80GB of disk not counting database sizes. If you want to deliver clones of an Oracle database of size say 1TB, then get a separate disk of size 1 TB + room for growth + room for fresh writes to the clones. The clones do not take disk space when you create them, only the images occupy the 1TB disk space. The cloning service requires one or more separate disks so you must add a separate disk to your machine (The single disk that most VMs come with is used to run the Windocks service and containers. The cloning service requires a different disk for delivering database clones, so you cannot use the single disk of the VM for the cloning service).
Software requirements: Ubuntu 18.04 onwards is supported. The installer package is a .deb file. Email firstname.lastname@example.org for the .deb file.
User account: You need a sudo user account. Configure the account in /etc/sudoers so that a password is not required each time sudo is used. To do this, edit the file with
In the file add the following line at the bottom:
YOUR_USERNAME_HERE ALL=(ALL) NOPASSWD: ALL
You may need to log out of ssh and log back in for it to take effect.
Install steps on Linux: Login to Ubuntu with the sudo account and run the following:
# Copy the .deb file into ~/windocksinstall
dpkg -x windockslinux.deb .
# Download the Oracle Zip installer from https://www.oracle.com/database/technologies/oracle-database-software-downloads.html#19c (the Linux x86-64 file)
# Copy the Oracle LINUX install file into ~/windocksinstall/oraclezip/19.3.0
# Repeat copy for all oracle versions you want
cp ~/LINUX.X64_193000_db_home.zip ~/windocksinstall/oraclezip/19.3.0
# Get the disks needed for the cloning system. Windocks Linux needs one or more disks for database cloning
# For example, If you are on AWS, then create one or more volumes and attach the volume(s) to your EC2 VM
# The disk(s) should be visible in the fdisk command (for example /dev/xvdf )
sudo fdisk -l
# Follow the instructions in install.sh
# Following a reboot of Ubuntu, you need to start Windocks again by
Open the firewall ports on the Linux machine for a range of container ports 10001 to 11000. These are the host ports for the containers.
Install steps on Windows: Run the Windows installer. On Windows open the file windocks\config\node.conf and uncomment the lines below and set the values. Save the node.conf file and restart the Windocks service. Put in the IP address or DNS name of the Linux server for ORACLE_LINUX_SERVICE_IP_OR_DNS
See the sample in windocks\samples\oraclelinux. On Windows, create a file named dockerfile (# indicates comments). Start with the sample windocks\samples\oraclelinux\dockerfile. Copy the restore.sql script to Linux to the path specified in the dockerfile. The dockerfile is below:dockerfile
Build the image from the above dockerfile. This will create an image
In a command line on the Windocks server:
docker build -t yourimagename path\to\directory\containing\dockerfile
Alternatively, use the web application and click on Build in the top menu and click Browse. Select all the files in the directory (dockerfile, any script files) and then Open. Then click Build.
You may also use the REST API to build the image
Create a container from the image. This can be done using a command line (only on the Windocks machine), or the web application (from any machine) or from the REST API (any machine)
In a command line on the Windocks server:
docker run -d yourimagename
This will deliver a container with a writeable database clone of the Oracle database
You may also create containers with the clones from the web application at ServerIp:/index.html or the file windocks\ui\index.html in Chrome or Firefox
You may also create containers with the REST API here