28
CS 486 - Capstone OS Tools for OpenBSD Overview Presentation Team Fugu

OS Tools for OpenBSD Overview Presentation - na U · –OpenBSD Filesets –Extract to / once the packages are on disk –If they're on the network, copy to /tmp –Copy, install,

Embed Size (px)

Citation preview

Page 1: OS Tools for OpenBSD Overview Presentation - na U · –OpenBSD Filesets –Extract to / once the packages are on disk –If they're on the network, copy to /tmp –Copy, install,

CS 486 - Capstone

OS Tools for OpenBSD

Overview PresentationTeam Fugu

Page 2: OS Tools for OpenBSD Overview Presentation - na U · –OpenBSD Filesets –Extract to / once the packages are on disk –If they're on the network, copy to /tmp –Copy, install,

Team Fugu

• Ben Atkin

• Thad Boyd

• Nauman Qureshi

• Erik Wilson

Fugu: A poisonous blowfish.The blowfish is the OpenBSD mascot.

Page 3: OS Tools for OpenBSD Overview Presentation - na U · –OpenBSD Filesets –Extract to / once the packages are on disk –If they're on the network, copy to /tmp –Copy, install,

Sponsor

US Geological Survey (USGS)– Ernest Bowman-Cisneros

and Margaret Johnson.

– System Administrators forAstrogeology Team.

Erik Wilson - 1

Page 4: OS Tools for OpenBSD Overview Presentation - na U · –OpenBSD Filesets –Extract to / once the packages are on disk –If they're on the network, copy to /tmp –Copy, install,

Task Definition: Problem

Our Client– USGS Astrogeology Division.– Data Analysis, Image Processing, etc.– Heavy Demands On Computing Infrastructure.– Heterogenous Computing Environment.

The Problem– Client uses Automatic Installers and Patchers to save

time and improve consistency, security.– Client uses OpenBSD, a free and secure OS.– OpenBSD lacks suitable Automatic Installer and

Patcher tools.

Erik Wilson - 2

Page 5: OS Tools for OpenBSD Overview Presentation - na U · –OpenBSD Filesets –Extract to / once the packages are on disk –If they're on the network, copy to /tmp –Copy, install,

Design Methodology

Using pre-existing code as much as possible.

Modularized Tepatche into Source and Binary Modules.

Add various utilities such as config parser and logging facilities.

Created well defined architecture.

Erik Wilson - 3

Page 6: OS Tools for OpenBSD Overview Presentation - na U · –OpenBSD Filesets –Extract to / once the packages are on disk –If they're on the network, copy to /tmp –Copy, install,

Architecture: Overview

Erik Wilson - 4

Page 7: OS Tools for OpenBSD Overview Presentation - na U · –OpenBSD Filesets –Extract to / once the packages are on disk –If they're on the network, copy to /tmp –Copy, install,

Architecture: Install Interactions

Erik Wilson - 5

Page 8: OS Tools for OpenBSD Overview Presentation - na U · –OpenBSD Filesets –Extract to / once the packages are on disk –If they're on the network, copy to /tmp –Copy, install,

Architecture: Install

Erik Wilson - 6

Page 9: OS Tools for OpenBSD Overview Presentation - na U · –OpenBSD Filesets –Extract to / once the packages are on disk –If they're on the network, copy to /tmp –Copy, install,

Architecture: Shell Scripting

Use global environment variablesAdvantage: can be accessed inside

backquotesBackquotes: execute a command string,

and capture the outputVery few tools at our disposal, because the

installation needs to run from a floppyDisk space calculations must be done in a

shell script.

Ben Atkin -7

Page 10: OS Tools for OpenBSD Overview Presentation - na U · –OpenBSD Filesets –Extract to / once the packages are on disk –If they're on the network, copy to /tmp –Copy, install,

Architecture – Disk Setup

Disk Partitioning– Requirement: Must be able to specify partition

sizes proportionally

– Solution:• Required Size – has priority

• Desired Size – extra space divided proportionally

• Extra Space – beyond the desired size, the extra space can be assigned to a partition

Two kinds of partitions– FDISK (on i386 only)

– disklabelBen Atkin - 8

Page 11: OS Tools for OpenBSD Overview Presentation - na U · –OpenBSD Filesets –Extract to / once the packages are on disk –If they're on the network, copy to /tmp –Copy, install,

Architecture – Package Installation

Installing Packages– OpenBSD Filesets

– Extract to / once the packages are on disk

– If they're on the network, copy to /tmp

– Copy, install, delete, before getting next package, so /tmp won't run out of space

Ben Atkin - 9

Page 12: OS Tools for OpenBSD Overview Presentation - na U · –OpenBSD Filesets –Extract to / once the packages are on disk –If they're on the network, copy to /tmp –Copy, install,

Architecture: Completing Install

Permanently write settings to disk– Disk mounting: fstab/mtab

– Networking

– Time/Date

Post-Install– Run script in configuration file

No interesting screenshots yet

Significant portions are complete

Ben Atkin - 10

Page 13: OS Tools for OpenBSD Overview Presentation - na U · –OpenBSD Filesets –Extract to / once the packages are on disk –If they're on the network, copy to /tmp –Copy, install,

Automated Patcher

Patcher will be created by adding new features to the existing Tepatche Perl Script.

The script will be divided into three main modules for better organization of functions.

Nauman Qureshi - 11

Page 14: OS Tools for OpenBSD Overview Presentation - na U · –OpenBSD Filesets –Extract to / once the packages are on disk –If they're on the network, copy to /tmp –Copy, install,

Design Overview

Nauman Qureshi - 12

Page 15: OS Tools for OpenBSD Overview Presentation - na U · –OpenBSD Filesets –Extract to / once the packages are on disk –If they're on the network, copy to /tmp –Copy, install,

Automated Patcher

Nauman Qureshi - 13

Functionality: Download Source Tarballs if neededDownload Source and Binary Patches as neededApplication to the system of those patchesCreate binary patch given that the source is patched

Page 16: OS Tools for OpenBSD Overview Presentation - na U · –OpenBSD Filesets –Extract to / once the packages are on disk –If they're on the network, copy to /tmp –Copy, install,

Main Tepatche Module

- Process:

The main module will provide the interaction from the shell and orchestrates all of the resulting actions

Nauman Qureshi - 14

Page 17: OS Tools for OpenBSD Overview Presentation - na U · –OpenBSD Filesets –Extract to / once the packages are on disk –If they're on the network, copy to /tmp –Copy, install,

Main Tepatche Module

- Functionality:

Read information from the “config” file

Call the appropriate module (Source or Binary) to perform patching

Send the appropriate messages and errors to location defined in the config file

Schedule a reboot if specified in the config file

Nauman Qureshi - 15

Page 18: OS Tools for OpenBSD Overview Presentation - na U · –OpenBSD Filesets –Extract to / once the packages are on disk –If they're on the network, copy to /tmp –Copy, install,

Tepatche Source Patching Module

- Process:

The source module will be used to compile from source any patches which exist from the OpenBSD website

Additionally it may act as a server by creating Binary Patches from the compiled source

Nauman Qureshi - 16

Page 19: OS Tools for OpenBSD Overview Presentation - na U · –OpenBSD Filesets –Extract to / once the packages are on disk –If they're on the network, copy to /tmp –Copy, install,

Tepatche Source Patching Module

- Functionality:Download the source tarballs and deflate if

source does not exist on the systemDownload patches from the OpenBSD web

server, or the other defined locationApply the downloaded patches to the

sourceCompile the source Creating a Binary Patch if desired from the

compiled source patchesNauman Qureshi - 17

Page 20: OS Tools for OpenBSD Overview Presentation - na U · –OpenBSD Filesets –Extract to / once the packages are on disk –If they're on the network, copy to /tmp –Copy, install,

Binary Patching Module

- Process:

This module will be useful for avoiding the slow compiling speeds associated with source patching

Thad Boyd - 18

Page 21: OS Tools for OpenBSD Overview Presentation - na U · –OpenBSD Filesets –Extract to / once the packages are on disk –If they're on the network, copy to /tmp –Copy, install,

Binary Patching Module

• create_bin_patch– create .tgz package using pkg_create

• download_bin_patches– download patches from location specified in

config file

• apply_bin_patch– install .tgz package using pkg_add

Thad Boyd - 19

Page 22: OS Tools for OpenBSD Overview Presentation - na U · –OpenBSD Filesets –Extract to / once the packages are on disk –If they're on the network, copy to /tmp –Copy, install,

Tepatche Binary Packaging:Architecture

Thad Boyd - 20

Page 23: OS Tools for OpenBSD Overview Presentation - na U · –OpenBSD Filesets –Extract to / once the packages are on disk –If they're on the network, copy to /tmp –Copy, install,

Binary Patching Module

- Functionality:

Download Binary modules of a specified architecture hosted on the network

Apply those binary patches using the pkg facility

Thad Boyd - 21

Page 24: OS Tools for OpenBSD Overview Presentation - na U · –OpenBSD Filesets –Extract to / once the packages are on disk –If they're on the network, copy to /tmp –Copy, install,

Features to Add

• Log all package installation history

• Roll back existing package; do not attempt to download and install again

• Choose which packages to install and which not to

• Install package from non-FTP location– HTTP

– NFS

Thad Boyd - 22

Page 25: OS Tools for OpenBSD Overview Presentation - na U · –OpenBSD Filesets –Extract to / once the packages are on disk –If they're on the network, copy to /tmp –Copy, install,

Tasks: Completed

Thad Boyd - 23

Page 26: OS Tools for OpenBSD Overview Presentation - na U · –OpenBSD Filesets –Extract to / once the packages are on disk –If they're on the network, copy to /tmp –Copy, install,

Tasks: Still to Do

Thad Boyd - 24

Page 27: OS Tools for OpenBSD Overview Presentation - na U · –OpenBSD Filesets –Extract to / once the packages are on disk –If they're on the network, copy to /tmp –Copy, install,

Major Tasks and Deadlines

2004.04.09 (Friday)– Combine/Swap Projects

2004.04.16 (Friday)– Complete installer testing

– Complete Tepatche testing

2004.04.19 (Monday)– Complete final presentation

– Give project to USGS for testing and feedback

Thad Boyd - 25

Page 28: OS Tools for OpenBSD Overview Presentation - na U · –OpenBSD Filesets –Extract to / once the packages are on disk –If they're on the network, copy to /tmp –Copy, install,

Conclusions

Automated Install almost completed.

Focused on learning PERL.

Lots of attention on team work.

Demonstration.

Thad Boyd - 26