1
edit
Changes
→Setting up environment
{{Pidora}}[[Category:Pidora 18 (Raspberry Pi Fedora Remix)]][[Category:OSTEP SOP]]
{{Admon/important|Seneca-Specific SOP|This SOP is specific to the environment at Seneca CDOT since it refers to specific hosts, configurations, and tools. It is intended solely as a reference for the OSTEP team at CDOT, but the content may be useful to readers in other contexts.}}
= Intro =
This page covers how one can manage the various needed parts of a complete release process. This includes the other SOP pages containing file configurations and/or quick command line references for the following procedures:
# Setting up environment
# Building packages
# Signing packages
# Creating repositories
# Composing images
= Setting up environment =
Follow the instructions on Chris's blog post: http://blog.chris.tylers.info/index.php?/archives/272-Acessing-the-armv6hl-Koji-Buildsystem.html
For Fedora 21 or later, you need to enable MD5 verification before using koji commands (according to [https://bugzilla.redhat.com/show_bug.cgi?id=1157260 here]):
<pre>
export OPENSSL_ENABLE_MD5_VERIFY=1
</pre>
= Building Packages =
== Post Commands ==
* Repo analysis: <pre>repoclosure --arch=armv6hl --arch=noarch --repofrompath=v6,http://japan.proximity.on.ca/repos/f18f20-build/latest/armv6hl/ -r v6 | tee /tmp/reporeport.log</pre>
= Sign, Mash, and Rsync Together! =
== Prerequisites ==
* Must setup passwordless passphraseless logins from root@japan to all users in the script
* Must have a working mash configuration: [[Pidora_SOP#Creating_Repositories | See mash below]]
* Must have a configured sigul user with access to the signing key
* Make sure that any externally called scripts are in the correct locations
== Running pidora-update.py ==
* ssh japan
* run as root : pidora-smr* script location /root/pidora-update/pidora-update.py
<pre>
Usage: pidora-update.py smr [options]
Options:
-s, --sign sign all packages in listed tag
-m, --mash start a mash run
-r, --rync rsync perform a rsync of the mash repos -f, --force can force some options
-l, --list-unsigned list unsigned rpms
--pidora=PIDORA specify version of pidora = 18, 19
--auto enables logging and emails logs
--koji-tag=KOJITAG specify the koji tag to sign
--email=email@senecacollege.ca specify the email to send logs to --sigul-user=agreene USER specify the user for sigul --sigul-host=england HOSTNAME specify the host for sigul --mash-user=root USER specify the user for mash --mash-host=japan HOSTNAME specify the host for mash --rsync-user=pidoraprUSER
specify the user for rsync
--rsync-host=pidora.caHOSTNAME
specify the host for rsync
--log-dir=/var/log/pidora-smr/
specify a logging directory
--log-file=output specify a log file name
</pre>
** Can change which koji tag will be used for signing
** Can change the version of pidora to ssign, mash, rsync
== Examples runs ==
* Check which hosts can connect successfully
** Also shows default configurations
<pre>
[Connection]sigulhost = england.proximity.on.casiguluser = usermashhost = japan.proximity.on.camashuser = userrsynchost = pidora.proximity.on.casiguluser rsyncuser = agreeneusermashuser = rootrsyncuser [General]auto = pidoraprFalse
mashdir = /usr/local/bin/mash-pidora
kojitags = ['f18-updates', 'f18-rpfr-updates', 'f18-updates-testing', 'f18-rpfr-updates-testing']email = email@senecacollege.ca
logdir = /var/log/pidora-smr/logfile = /var/log/pidora-smr/output [Hosts]working hosts: ['japan.proximity.on.ca', 'england.proximity.on.ca', 'pidora.proximity.on.ca']failed hosts: []=
</pre>
* Get a list of unsigned packages
** Can check a single tag with --koji-tag=<tag-name>
<pre>
</pre>
<pre>
</pre>
<pre>
</pre>
<pre>
</pre>
* Changing the configurations with command line options
** Sign using a different user, on a single koji tag
<pre>
</pre>
<pre>
</pre>
<pre>
sigulhost = england.proximity.on.casiguluser = usermashhost = japan.proximity.on.camashuser = userrsynchost = pidora.proximity.on.casiguluser rsyncuser = agreeneusermashuser = rootrsyncuser [General]auto = pidoraprFalse
mashdir = /usr/local/bin/mash-pidora
kojitags = ['f18-updates', 'f18-rpfr-updates', 'f18-updates-testing', 'f18-rpfr-updates-testing']email = email@senecacollege.ca
</pre>
== Source Code ==
[[https://github.com/oatley/pidora-smr/tree/master Pidora-Update-Source | pidora-update.py]smr source code]
= Signing Packages =
= Composing Images =
<s>Before you can attempt to run a compose you should check to make sure that the following packages are installed:
* anaconda
* lorax</s> Because livemedia-tools is not stable software for creating pidora images we have a modified version of livemedia-creator that works well however this software is currently out of date, so we have decided to keep using this version of livemedia to produce future images. You can accessing our custom version of livemedia which is located on the host machine cal-7-2 within a chroot log onto the host machine iraq.proximity.on.ca then ssh into the compose node host machine cal-7-2.*ssh user@iraq.proximity.on.ca*ssh root@cal-7-2 *Note if you restart or the node is shutdown you will need to bind mount /proc, /dev, /sys to f17v6/proc, f17v6/dev, f17v6/sys with the following command before you chroot.*mount -o bind /proc/ f17v6/proc*mount -o bind /dev/ f17v6/dev*mount -o bind /sys/ f17v6/sys
chroot into the armv6hl directory on the arm device.
* chroot /root/f17v6
cd into the livemedia directory or where ever your kickstart file is located.
* cd /livemedia/f20
Run the provided Livemedia-Creator command provided below to start the compose process.
== Example Livemedia-Creator Command ==
* livemedia-creator --make-disk --no-virt --image-only --keep-image --ks=pidora-f20.ks
Estimated time for compilation (15mins)
== Example Kickstart File ==
Pidora 18 kickstart: http://scotlandzenit.proximitysenecac.on.ca/raspberrypiwiki/index.php/Pidora_kickstart Pidora 2014 kickstart: http://test-releaseszenit.senecac.on.ca/rpfr18v6wiki/latestindex.php/pidoraPidora-18.ks2014-kickStart== Example Livemedia-Creator Command Package List File ==* livemedia-creator Pidora 2014 Package List kickstart: http://zenit.senecac.on.ca/wiki/index.php/Pidora-2014-makePackagelist-disk --no-virt --image-only --keep-image --ks=rpfr-18.ks Estimated time for compilation (27mins)kickStart
* command details
<br>EOF
== Details About Ansible Preparing The Final Image ==
== How To Use Ansible Vfat Reformating Script ==This script copies the boot partition to a temporary folder then reformat's that partition to vfat from ext4 it also removes the swap partition that is created by live-media-creator the swap partition is created during the firstboot process by the user.
Example usage* Change to the ansible directory<pre>cd /etc/ansible</pre>revfat disk_image.img
* Copy over all configurations required and start the koji servicefdisk -l disk_image.img
<pre>
</pre>
== Change Builder Configurations Shrinking The Image ==Script to take an SD card image (such as for a Raspberry Pi) with a dos disklabel and two partitions (boot vfat and rootfs extX), and shrink it so that the rootfs (2nd partition) is as short as possible plus a small free space allowance. Pidora 2014 Shrink Script: http://zenit.senecac.on.ca/wiki/index.php/Pidora-2014-Shrink-Script
Disk /var/tmp/diskTLTF4t.img: 4294 MB, 4294967296 bytes255 heads, 63 sectors/track, 522 cylinders, total 8388608 sectorsUnits =sectors of 1 * 512 == Network ===512 bytes* Add a hostname to the Sector size (logical/etcphysical): 512 bytes /hosts file on japan512 bytes* Add a hostname to the I/etcO size (minimum/ansibleoptimal): 512 bytes /builders/config_files/hosts file on japan512 bytesDisk identifier: 0x0009c1ec
Device Boot Start End Blocks Id System/var/tmp/diskTLTF4t.img1 * If it uses DHCP, then link the hostname to a host in 2048 104447 51200 c W95 FAT32 (LBA)/etcvar/dhcptmp/dhcpddiskTLTF4t.conf by specifying the mac address and host nameimg2 104448 4234064 2064808+ 83 LinuxFilesystem Size Used Avail Use% Mounted onor/dev/mapper/loop0p2 2.0G 2.0G 0 100% /tmp/tmp.v9ADZEWeP2* If the builder has a changing mac address and canremoved `/tmp/tmp.v9ADZEWeP2/resize-reserve't use DHCP, get access to the builder and set the ip manually<pre>Filesystem Size Used Avail Use% Mounted onifconfig <interface> <ipaddr> netmask 255/dev/mapper/loop0p2 2.2550G 1.2558G 133M 93% /tmp/tmp.0 upv9ADZEWeP2route add default gw 192.168.1Image shrink completed.254
</pre>
=== Services =Preparing Pidora Noobs distribution ==* Initially change services on This script extracts and compresses the boot and rootfs of a Pidora image. It also generates and updates all the buildernecessary json files, since ansible needs to gain access to images and release notes required by the builder there are a few things that need to be doneNoobs distribution.* NetworkManager - If it is a static address, stop this service, or if you have already setup DHCP Pidora 2014 Noobs Script: http://zenit.senecac.on japan, start network manager<pre>systemctl start NetworkManager<.ca/wiki/pre>or<pre>systemctl stop NetworkManager<index.php/pre>* sshd Pidora- Start this service<pre>systemctl start sshd</pre>* firewalld 2014- Stop this service<pre>systemctl stop firewalld</pre>* selinux Noobs- Stop selinux for now as it interferes with ansible ssh<pre>setenforce 0</pre>Script