Skip to content

xlp0/VirtualBox_PKC

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VirtualBox_PKC


For anyone who can run Oracle Virtualbox on their machine, one can install PKC (Personal Knowledge Container) using this project. Then, the Virtualbox image created by this procedure can just be copied and run on any other machine that runs Virtualbox.

Users will need to follow the instructions below to install relevant solftware from scratch. Based on our current test results, Mac OS X, Windows 10, and Linux Ubuntu should be able to run this configuration. To ensure portability, this project uses Virtualbox, Vagrant, and Docker. So that it standardizes configuration using standardized Docker images. Overtime, this project will deploy these Docker Services on Kubernetes. So that individual users can try out a cluster of services on personal desktops or laptops, and eventually deploy to the cloud.

Operating System Requirements

At the time of this writing, we have tested on Mac, Windows 10, and Linux computers. The following versions of operating systems have worked.

Windows 10 Home or Professional: version 20H2

Mac OS X: Big Sur 11.2.3 (11.1 and 11.2 seems to have problems with Vagrant) Catalina 10.5.7 has shown to work with Earlier models of Mac Book, but has problems with Vagrant for more recent machines.

Linux Ubuntu 16.04 +


Restarting Your Computer Recommended

If you have a computer with more than 2 cores and 8GB of memory, the computer should be able to execute the following tasks. Make sure you reboot your computer before starting all these procedures. Sometimes, background processes or users that were logged in to the same computer might occupy significant resources. Therefore, restarting at this time would be a good practice.

Host Machine Software Installation

Install VirtualBox (Tested with 6.1.18)

Please go to the following link and download appropriate installation binary for your platform. VirtualBox Download.

Install Vagrant

After VirtualBox installation, please install Vagrant: Vagrant Download

Note: If you see problems when running Vagrant, it might be solved by updating your Operating System. For Mac OS X, It is preferred to have Big Sur 11.2.3 version or later running on your host machine. Prior versions of Big Sur such as 11.1 and 11.2 seems to have issues with Vagrant.

Install Git

Your system must have Git installed. Therefore, please go to the website to install Git. Git Installation

After Git has been installed, you should read the following section to avoid End of Line errors between Windows and other Unix variant machines. Handle Windows line ending anomoly in Git

Grab code from Git, and Execute the installation activities

Working from this Project Directory

After Git has been installed on your local system, please go to a Command Line Interface (CLI), and use Git to download the this project. To a local directory.

Note:

On Mac, a typical CLI would be the Terminal.app.

On Windows 10, we recommend you to use Git Bash as your CLI interface, the main reason is that Bash is required for the script to work. The other implementations of CLI, such as Git CMD will not work, since it will not execute Bash Script as the way this project provides it.

On Linux platforms, use the proper command line tool and type the following command:

git clone https://github.com/xlp0/VirtualBox_PKC.git

Then, "change directory" (type "cd" in Command Line Prompt) to the top level directory of this project.

cd VirtualBox_PKC

Launch vagrant processes

In the top level working directory, there is a text file named: "VagrantFile". This file contains the configuration information regarding how to download and launch a VirtualBox Ubuntu instance.

You may trigger this sequence of actions using the following command:

./powerup.sh

After this instruction is fully completed, you should be anbel to go to your browser and type: http://localhost:9352 to access your MediaWiki service.

Note: Windows users might witness some hickups after Vagrant is installed. When running vagrant up, it might provide a message saying that your Hyper-Visor or VT-x options is disabled. You might need to go to BIOS or UEFI to turn it on.

The sequence in rebooting your Windows machine and changing the BIOS or UEFI configurations can be found here: Rebooting Windows into BIOS/UEFI

Use ssh to get into the Ubuntu-Linux instance running on VirtualBox

After Vagrant launched the Ununtu-Linux intance successful, please use the following instruction to get into the Ubuntu-Linux instance:

vagrant ssh

This should take you to the "vagrant" directory in that Ubuntu instance.

Note: Windows users are likely to face the issue of "$\r command not found" error message when executing script files. This is due to the incompatible end of line symbol set between Windows and other Unix variants. To resolve this problem, one needs to install dos2unix command on Linux, and run dos2unix on the script files.

Please type in the following command in a Command Line Interface on Windows environment, within the vagrant-Linux command prompt:

sudo add-apt-repository universe
sudo apt update && sudo apt install dos2unix
# Then, go to the directory that contains script files, run the following command.
sudo dos2unix *.sh

Some useful references can be found here: Ask Ubuntu's Answer on End of Line problems

Launch the installation script in the InstallationScript directory

To ease the installation process, this instance of Ubuntu-Linux already has access to your host machine's directory: InstallationScript.

This installation script will copy the initialData.zip in the vagrant_data/ directory to Ubuntu-Linux's /data directory and decompress all the data content into /data/initialData/ directory. Please run the following commands to install Docker and other relevant software in your Ubuntu-Linux system.

cd data

Launch MediaWiki from Command Line

If you are running the up.sh script for the first time, it will try to install Docker and other supporting software, and then it will continue to start MediaWiki. If you have already had Docker installed on the specific Virtualbox, it will skip the installation process for Docker, and start MediaWiki directly. Note that you will add the sudo command before the ./up.sh script name.

sudo ./up.sh

After it shows the docker processes have done launching, one can use http://localhost:9352 to access the MediaWiki docker service.

Exception Handling

Due to the massive size (about 2Gb +) of softwrae downloads, the download procedure might hang, if it waits for too long, just use the following command to stop the download process, and relaunch the "./up.sh" command.

service docker stop

Handle CRLF end of line differences across platforms

For Mac OSX and Linux

git config --global core.autocrlf input

For Windows

git config --global core.autocrlf true

References(reference content hidden, viewable in raw text form.)

About

For people who can run Virtualbox

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published