Skip to content

Instantly share code, notes, and snippets.

@tcooper
Created June 10, 2015 16:50
Show Gist options
  • Save tcooper/664b9cd55e0ec7db74e4 to your computer and use it in GitHub Desktop.
Save tcooper/664b9cd55e0ec7db74e4 to your computer and use it in GitHub Desktop.
SDSC Roll Building Sample

Installed Rolls

	[root@sidewinder-fe1 ~]# rocks list roll
	NAME            VERSION ARCH   ENABLED
	kernel:         6.2     x86_64 yes
	web-server:     6.2     x86_64 yes
	base:           6.2     x86_64 yes
	CentOS:         6.6     x86_64 yes
	Updates-CentOS: 6.6     x86_64 yes

Clone sdsc-roll from Github

	[root@sidewinder-fe1 ~]# mkdir -p /export/rocks/src/roll/
	[root@sidewinder-fe1 ~]# cd /export/rocks/src/roll/
	[root@sidewinder-fe1 roll]# git clone https://github.com/sdsc/sdsc-roll.git
	Cloning into 'sdsc-roll'...
	remote: Counting objects: 369, done.
	remote: Compressing objects: 100% (20/20), done.
	remote: Total 369 (delta 9), reused 0 (delta 0), pack-reused 349
	Receiving objects: 100% (369/369), 79.36 KiB, done.
	Resolving deltas: 100% (230/230), done.

Build sdsc-roll

	[root@sidewinder-fe1 roll]# cd sdsc-roll/
	[root@sidewinder-fe1 sdsc-roll]# make > /tmp/build.log 2>&1

Install sdsc-roll

	[root@sidewinder-fe1 sdsc-roll]# rocks add roll sdsc-6.2-48.g7a9a4a7.x86_64.disk1.iso
	Copying sdsc to Rolls.....53 blocks
	[root@sidewinder-fe1 sdsc-roll]# rocks enable roll sdsc

Rebuild distro

	[root@sidewinder-fe1 sdsc-roll]# cd /export/rocks/install/
	[root@sidewinder-fe1 install]# rocks create distro
	Cleaning distribution
	Resolving versions (base files)
		including "kernel" (6.2,x86_64) roll...
		including "CentOS" (6.6,x86_64) roll...
		including "Updates-CentOS" (6.6,x86_64) roll...
		including "sdsc" (6.2,x86_64) roll...
		including "web-server" (6.2,x86_64) roll...
		including "base" (6.2,x86_64) roll...
	Including critical RPMS
	Resolving versions (RPMs)
		including "kernel" (6.2,x86_64) roll...
		including "CentOS" (6.6,x86_64) roll...
		including "Updates-CentOS" (6.6,x86_64) roll...
		including "sdsc" (6.2,x86_64) roll...
		including "web-server" (6.2,x86_64) roll...
		including "base" (6.2,x86_64) roll...
	Resolving versions (SRPMs)
		including "kernel" (6.2,x86_64) roll...
		including "CentOS" (6.6,x86_64) roll...
		including "Updates-CentOS" (6.6,x86_64) roll...
		including "sdsc" (6.2,x86_64) roll...
		including "web-server" (6.2,x86_64) roll...
		including "base" (6.2,x86_64) roll...
	Creating files (symbolic links - fast)
	Applying stage2.img
	Applying updates.img
	Installing XML Kickstart profiles
		installing "sdsc" profiles...
		installing "web-server" profiles...
		installing "base" profiles...
		installing "kernel" profiles...
		installing "site" profiles...
		 Calling Yum genpkgmetadata.py
	Creating repository
		 Rebuilding Product Image including md5 sums
		 Creating Directory Listing

Run sdsc-roll on frontend

	[root@sidewinder-fe1 install]# rocks run roll sdsc | /bin/sh
	Cleaning repos: Rocks-6.2
	Cleaning up Everything
	Setting up Install Process
	Rocks-6.2                                                          | 3.6 kB     00:00
	Rocks-6.2/primary_db                                               | 4.6 MB     00:00
	Resolving Dependencies
	--> Running transaction check
	---> Package sdsc-devel.x86_64 0:1-4 will be installed
	--> Finished Dependency Resolution

	Dependencies Resolved

	==========================================================================================
	 Package                Arch               Version            Repository             Size
	==========================================================================================
	Installing:
	 sdsc-devel             x86_64             1-4                Rocks-6.2              16 k

	Transaction Summary
	==========================================================================================
	Install       1 Package(s)

	Total download size: 16 k
	Installed size: 47 k
	Downloading Packages:
	sdsc-devel-1-4.x86_64.rpm                                          |  16 kB     00:00
	Running rpm_check_debug
	Running Transaction Test
	Transaction Test Succeeded
	Running Transaction
	  Installing : sdsc-devel-1-4.x86_64                                                  1/1
	  Verifying  : sdsc-devel-1-4.x86_64                                                  1/1

	Installed:
	  sdsc-devel.x86_64 0:1-4

	Complete!
	Setting up Install Process
	Resolving Dependencies
	--> Running transaction check
	---> Package sdsc-etc-profile.x86_64 0:1-2 will be installed
	--> Finished Dependency Resolution

	Dependencies Resolved

	==========================================================================================
	 Package                     Arch              Version         Repository            Size
	==========================================================================================
	Installing:
	 sdsc-etc-profile            x86_64            1-2             Rocks-6.2            3.1 k

	Transaction Summary
	==========================================================================================
	Install       1 Package(s)

	Total download size: 3.1 k
	Installed size: 2.1 k
	Downloading Packages:
	sdsc-etc-profile-1-2.x86_64.rpm                                    | 3.1 kB     00:00
	Running rpm_check_debug
	Running Transaction Test
	Transaction Test Succeeded
	Running Transaction
	  Installing : sdsc-etc-profile-1-2.x86_64                                            1/1
	  Verifying  : sdsc-etc-profile-1-2.x86_64                                            1/1

	Installed:
	  sdsc-etc-profile.x86_64 0:1-2

	Complete!
	Setting up Install Process
	Resolving Dependencies
	--> Running transaction check
	---> Package sdsc-roll-test.x86_64 0:1-2 will be installed
	--> Finished Dependency Resolution

	Dependencies Resolved

	==========================================================================================
	 Package                   Arch              Version           Repository            Size
	==========================================================================================
	Installing:
	 sdsc-roll-test            x86_64            1-2               Rocks-6.2            2.9 k

	Transaction Summary
	==========================================================================================
	Install       1 Package(s)

	Total download size: 2.9 k
	Installed size: 1.4 k
	Downloading Packages:
	sdsc-roll-test-1-2.x86_64.rpm                                      | 2.9 kB     00:00
	Running rpm_check_debug
	Running Transaction Test
	Transaction Test Succeeded
	Running Transaction
	  Installing : sdsc-roll-test-1-2.x86_64                                              1/1
	  Verifying  : sdsc-roll-test-1-2.x86_64                                              1/1

	Installed:
	  sdsc-roll-test.x86_64 0:1-2

	Complete!

Log out/in to source /etc/profile.d scripts


	[root@sidewinder-fe1 install]# exit

	$ ssh root@sidewinder-fe1
	Last login: Tue Jun  9 09:06:44 2015 from 192.168.17.2
	Rocks 6.2 (SideWinder)
	Profile built 18:02 01-Jun-2015

	Kickstarted 11:19 01-Jun-2015
	[root@sidewinder-fe1 ~]# 

Run sdsc-roll rolltest

	[root@sidewinder-fe1 ~]# ~/rolltests/sdsc.t
	ok 1 - sdsc installed
	ok 2 - devel files installed
	ok 3 - /etc/profile files installed
	ok 4 # skip no modulefiles installed
	ok 5 - /opt/sdsc/lib in PYTHONPATH
	ok 6 - /opt/sdsc/sbin in PATH
	ok 7 - /opt/sdsc/bin in PATH
	ok 8 - SDSCHOME set
	ok 9 - SDSCDEVEL set
	1..9

Clone gnucompiler-roll

	[root@sidewinder-fe1 roll]# git clone https://github.com/sdsc/gnucompiler-roll.git
	Cloning into 'gnucompiler-roll'...
	remote: Counting objects: 833, done.
	remote: Total 833 (delta 0), reused 0 (delta 0), pack-reused 833
	Receiving objects: 100% (833/833), 149.69 KiB, done.
	Resolving deltas: 100% (397/397), done.

Check gnucompiler-roll version

	[root@sidewinder-fe1 roll]# cd gnucompiler-roll/
	[root@sidewinder-fe1 gnucompiler-roll]# git describe --long --match v6.2
	v6.2-15-gd2879a6
	[root@sidewinder-fe1 gnucompiler-roll]# ./version.sh -a
	6.2-15.gd2879a6

Build gnucompiler-roll

	[root@sidewinder-fe1 gnucompiler-roll]# make > /tmp/build.log 2>&1

Check RPMs built

	[root@sidewinder-fe1 gnucompiler-roll]# find RPMS/ -name "*.rpm"
	RPMS/x86_64/sdsc-mpc-1.0.3-1.x86_64.rpm
	RPMS/x86_64/sdsc-gcc-4.9.2-1.x86_64.rpm
	RPMS/x86_64/sdsc-gmp-6.0.0a-1.x86_64.rpm
	RPMS/x86_64/sdsc-gcc-modules-4.9.2-3.x86_64.rpm
	RPMS/x86_64/sdsc-gmp-modules-6.0.0a-2.x86_64.rpm
	RPMS/x86_64/sdsc-mpc-modules-1.0.3-1.x86_64.rpm
	RPMS/x86_64/sdsc-gnucompiler-roll-test-1-3.x86_64.rpm
	RPMS/x86_64/sdsc-mpfr-modules-3.1.2-2.x86_64.rpm
	RPMS/x86_64/sdsc-mpfr-3.1.2-2.x86_64.rpm
	RPMS/noarch/roll-gnucompiler-kickstart-6.2-15.gd2879a6.noarch.rpm

Check for ISO file

	[root@sidewinder-fe1 gnucompiler-roll]# ls -l *.iso
	-rw-r--r-- 1 root root 92958720 Jun  9 18:12 gnucompiler-6.2-15.gd2879a6.x86_64.disk1.iso

Check ISO contents

	[root@sidewinder-fe1 gnucompiler-roll]# isoinfo -R -l -i gnucompiler-6.2-15.gd2879a6.x86_64.disk1.iso | grep rpm
	-r--r--r--   1    0    0            3616 Jun  9 2015 [     38 00]  roll-gnucompiler-kickstart-6.2-15.gd2879a6.noarch.rpm
	-r--r--r--   1    0    0          436776 Jun  9 2015 [     40 00]  sdsc-mpfr-3.1.2-2.x86_64.rpm
	-r--r--r--   1    0    0            3072 Jun  9 2015 [    254 00]  sdsc-gmp-modules-6.0.0a-2.x86_64.rpm
	-r--r--r--   1    0    0            3616 Jun  9 2015 [    256 00]  sdsc-gcc-modules-4.9.2-3.x86_64.rpm
	-r--r--r--   1    0    0            3060 Jun  9 2015 [    258 00]  sdsc-mpc-modules-1.0.3-1.x86_64.rpm
	-r--r--r--   1    0    0        91363572 Jun  9 2015 [    260 00]  sdsc-gcc-4.9.2-1.x86_64.rpm
	-r--r--r--   1    0    0          641112 Jun  9 2015 [  44872 00]  sdsc-gmp-6.0.0a-1.x86_64.rpm
	-r--r--r--   1    0    0            4092 Jun  9 2015 [  45186 00]  sdsc-gnucompiler-roll-test-1-3.x86_64.rpm
	-r--r--r--   1    0    0           97280 Jun  9 2015 [  45188 00]  sdsc-mpc-1.0.3-1.x86_64.rpm
	-r--r--r--   1    0    0            3068 Jun  9 2015 [  45236 00]  sdsc-mpfr-modules-3.1.2-2.x86_64.rpm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment