The frontend of Rocks 7.0 requires a web server to have rolls “installed” to download. If the frontend needs to be installed often, like for testing purposes in a local machine, then it is preferred to have a local roll-server.

Starting the web-server on MacOS Big Sur

Start the builtin Apache server

				
				
					sudo apachectl start				
			

You should now be able to direct your browser to ‘localhost’ or ‘127.0.0.1’ and see in the browser ‘ it works!’. The default Apache configuration reads from

				
				
					/Library/WebServer/Documents/index.html.en				
			

Apple recommends to create a directory ‘Sites’ in your home account and run your local user website from there. However, that will not work for the rocks roll-server. We need to install it in the main sever. But first, let’s download rocks.

Downloading rocks

The iso-disk images can be downloaded from

				
				
					http://central-7-0-x86-64.rocksclusters.org/isos				
			

Using wget, we can download the images

				
				
					wget http://central-7-0-x86-64.rocksclusters.org/isos/kernel-7.0-0.x86_64.disk1.iso
wget http://central-7-0-x86-64.rocksclusters.org/isos/base-7.0-2.x86_64.disk1.iso
wget http://central-7-0-x86-64.rocksclusters.org/isos/core-7.0-2.x86_64.disk1.iso
wget http://central-7-0-x86-64.rocksclusters.org/isos/CentOS-7.4.1708-0.x86_64.disk1.iso
wget http://central-7-0-x86-64.rocksclusters.org/isos/Updates-CentOS-7.4.1708-2017-12-01-0.x86_64.disk1.iso
wget http://central-7-0-x86-64.rocksclusters.org/isos/kvm-7.0-0.x86_64.disk1.iso
wget http://central-7-0-x86-64.rocksclusters.org/isos/ganglia-7.0-2.x86_64.disk1.iso
wget http://central-7-0-x86-64.rocksclusters.org/isos/htcondor-8.6.8-1.x86_64.disk1.iso
wget http://central-7-0-x86-64.rocksclusters.org/isos/sge-7.0-0.x86_64.disk1.iso
wget http://central-7-0-x86-64.rocksclusters.org/isos/hpc-7.0-0.x86_64.disk1.iso				
			

Creating the roll data

				
				
					sudo mkdir -p /Library/WebServer/Documents/rocks/7.0/install/rolls
mkdir -p /tmp/cdrom				
			

Next mount the disk by double-clicking it in the finder.

				
				
					hdiutil attach -nomount kernel-7.0-0.x86_64.disk1.iso				
			

with for example output

				
				
					/dev/disk3          	FDisk_partition_scheme         	
/dev/disk3s2        	0xEF  				
			

Now mount the disk.

				
				
					mount -t cd9660 /dev/disk3 /tmp/cdrom				
			

Copying the rpm’s from the disk to the web-server

				
				
					(cd /tmp/cdrom; tar cf - --exclude=TRANS.TBL --exclude=.discinfo --exclude=var \
--exclude=repodata --exclude=EFI --exclude=images --exclude=LiveOS --exclude=comps.xml \
 --exclude=ks.cfg --exclude=isolinux .) | (cd \ 
/Library/WebServer/Documents/rocks/7.0/install/rolls; \
 tar xvfBp - )				
			

Unmount and detached the disk.

				
				
					umount /dev/disk3
hdiutil detach /dev/disk3				
			

Repeat this process for all the iso-images.

Setting up the web-server on MacOS Big Sur

Next the Apache server needs to setup as a rocks roll-server. First, edit the apache config file

				
				
					/etc/apache2/httpd.conf				
			

Switch on cgi-capabilities, look the following section and uncomment the LoadModule lines.

				
				
					<IfModule !mpm_prefork_module>
        #LoadModule cgid_module libexec/apache2/mod_cgid.so
</IfModule>
<IfModule mpm_prefork_module>
        #LoadModule cgi_module libexec/apache2/mod_cgi.so
</IfModule>				
			

Append to the file

				
				
					<Directory /Library/WebServer/Documents/rocks/7.0/install/rolls>
        AddHandler cgi-script .cgi
        Options FollowSymLinks Indexes ExecCGI
        DirectoryIndex /rocks/7.0/install/rolls/index.cgi
        Allow from all
</Directory>				
			

Now restart the Apache web server

				
				
					sudo apachectl restart				
			

Testing the web setup

To test the setup, run

				
				
					wget -O - http://localhost/rocks/7.0/install/rolls				
			

which should look like

				
				
					--2021-01-04 10:20:49--  http://localhost/rocks/7.0/install/rolls
Resolving localhost (localhost)... ::1, 127.0.0.1
Connecting to localhost (localhost)|::1|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: http://localhost/rocks/7.0/install/rolls/ [following]
--2021-01-04 10:20:49--  http://localhost/rocks/7.0/install/rolls/
Reusing existing connection to [localhost]:80.
HTTP request sent, awaiting response... 200 OK
Length: 611 [text/html]
Saving to: ‘STDOUT’

-                                                         0%[    ]       0  --.-KB/s               ]
<html><body><table><tr><td>
<a href="base/">base/</a>
</td></tr>
<tr><td>
<a href="CentOS/">CentOS/</a>
</td></tr>
<tr><td>
<a href="core/">core/</a>
</td></tr>
<tr><td>
<a href="ganglia/">ganglia/</a>
</td></tr>
<tr><td>
<a href="hpc/">hpc/</a>
</td></tr>
<tr><td>
<a href="htcondor/">htcondor/</a>
</td></tr>
<tr><td>
<a href="index.html">index.html</a>
</td></tr>
<tr><td>
<a href="kernel/">kernel/</a>
</td></tr>
<tr><td>
<a href="kvm/">kvm/</a>
</td></tr>
<tr><td>
<a href="sge/">sge/</a>
</td></tr>
<tr><td>
<a href="Updates-CentOS-7.4.1708/">Updates-CentOS-7.4.1708/</a>
</td></tr>
-                                                       100%[====>]     611  --.-KB/s    in 0s      

2021-01-04 10:20:50 (117 MB/s) - written to stdout [611/611]
				
			

Installing rocks using the local roll-server

For the selection of rolls, now point to the local roll-server

				
				
					http://10.1.1.2/rocks/7.0/install/rolls				
			
Rocks roll server
Rocks roll server found at 10.1.1.2.

Select the rolls, and click ‘Add Selected Rolls’.

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to Top
X