Code Monkey home page Code Monkey logo

minishift-b2d-iso's Introduction

Minishift Boot2Docker ISO

This repository contains all required instructions and code to build an ISO based on Boot2Docker to use with minishift.


Build Status


Building the minishift-b2d ISO

The minishift-b2d.iso is built via a Dockerfile.

Prerequisites

  • A running docker daemon.

Building the ISO

$ git clone https://github.com/minishift/minishift-b2d-iso.git
$ cd minishift-b2d-iso
$ make
  • The ISO should be present in minishift-b2d-iso/build directory after the successful run of make.

Using the ISO

  • The ISO can be used with minishift with the help of --iso-url i.e. --iso-url=file:///$PATHTOISO.

Tests

Tests are written as Python scripts under tests directory and run through Avocado framework. Ensure you have Avocado installed by following Avocado instllation guide before running any tests.

Build ISO:

$ make

Run the tests:

$ make test

If you want to see the logs generated by test, run the test as:

$ SHOW_LOG=--show-job-log make test

Releasing the minishift-b2d ISO

Prerequisites

  • Working installation of Go with GOPATH properly set.
  • A running docker daemon.

Releasing the ISO

  • Assemble all the meaningful changes since the last release to create release notes.
  • Bump the VERSION variable in the Makefile.
  • Make sure to have a Github personal access token defined in your environment as GITHUB_ACCESS_TOKEN.
  • Run following command to release the ISO:
$ make release

CI Setup

minishift-b2d-iso uses CentOS CI as CI build server. It builds incoming pull requests and any push to master along with archiving the build artifacts. You can find the CentOS CI jenkins master job here and the pull request job here.

On a successful pull request build, the build artifacts can be found at artifacts.ci.centos.org/minishift/minishift-b2d-iso/pr/<PR ID>.

On a successful master build, the build artifacts can be found at artifacts.ci.centos.org/minishift/minishift-b2d-iso/master/<BUILD ID>.

For more information about CentOS CI, check out its Wiki to know more about CentOS CI.

History

  • This repository is created by exracting the iso directory of Minishift project.

Community

You can reach the Minishift community by:

minishift-b2d-iso's People

Contributors

aaron-prindle avatar coolbrg avatar dlorenc avatar gbraad avatar hferentschik avatar jimmidyson avatar lalatendumohanty avatar luxas avatar praveenkumar avatar pshail avatar rdsubhas avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

minishift-b2d-iso's Issues

Add script to allow IP address to be assigned

Updated

The issue is with how the B2D image handles the hyper-v data exchange module, which is part of the kernel. Since b2d uses a module, the values are not available in time to provide an IP address before DHCP has assigned one. The module seems to read the pool and clears the values? At least, while the WMI call as used in gbraad/go-hvkvp is received and confirmed, the value is not available, even after the module is loaded. It is therefore needed to resend the message several times... and there is no indication if the call actually succeeds.

Todo

Refer: minishift/minishift#1316

Fix docker installation in CI machine

With latest upgrades in docker, it seems that docker installation is failing in CentOs machine.
This build is failing due to that - https://ci.centos.org/job/minishift-pr/503/console.

Even getting failure error in my CentOS workstation:

[budhram@localhost ~]$ sudo yum -y install docker-engine
Loaded plugins: fastestmirror, langpacks

File contains parsing errors: file:///etc/yum.repos.d/docker.repo
	[line  2]:   name=Docker Repository

	[line  3]:   baseurl=https://yum.dockerproject.org/repo/main/centos/7/

	[line  4]:   enabled=1

	[line  5]:   gpgcheck=1

	[line  6]:   gpgkey=https://yum.dockerproject.org/gpg

The ISO name should be minishift-b2d.iso

The ISO name should be minishift-b2d.iso as per the repository name. currently it generates minishift.iso

$ bash build.sh

**************
+ xz -9 --format=lzma --verbose --verbose
+ cpio -o -H newc
xz: Filter chain: --lzma1=dict=64MiB,lc=3,lp=0,pb=2,mode=normal,nice=64,mf=bt4,depth=0
xz: 674 MiB of memory is required. The limiter is disabled.
xz: Decompression will need 65 MiB of memory.
335112 blocks
(stdin): 31.5 MiB / 163.6 MiB = 0.193, 1.5 MiB/s, 1:49
/
xorriso 1.3.2 : RockRidge filesystem manipulator, libburnia project.

Drive current: -outdev 'stdio:/boot2docker.iso'
Media current: stdio file, overwriteable
Media status : is blank
Media summary: 0 sessions, 0 data blocks, 0 data,  179g free
xorriso : WARNING : -volid text does not comply to ISO 9660 / ECMA 119 rules
Added to ISO image: directory '/'='/tmp/iso'
xorriso : UPDATE : 12 files added in 1 seconds
xorriso : UPDATE : 12 files added in 1 seconds
xorriso : NOTE : Copying to System Area: 432 bytes from file '/usr/lib/ISOLINUX/isohdpfx.bin'
libisofs: NOTE : Aligned image size to cylinder size by 299 blocks
xorriso : UPDATE :  88.89% done
ISO image produced: 18432 sectors
Written to medium : 18432 sectors at LBA 0
Writing to 'stdio:/boot2docker.iso' completed successfully.

 ---> 17c1e3c89489
Removing intermediate container 6f5da9fa41c1
Step 14 : CMD cat boot2docker.iso
 ---> Running in c10ae0053861
 ---> d1c1177e2334
Removing intermediate container c10ae0053861
Successfully built d1c1177e2334
~/code/gocode/src/github.com/minishift/minishift-b2d-iso/iso
Iso available at ./minishift.iso

Use cached images for socat, ethtool, and conntrack

We should not always have to rebuild these images. We can push the intermediate images to Docker hub, unless specified we want to rebuild them.

This is, in my opinion, better for QA... and certainly, speeds up the build of the ISO

Replace concatenation with writing full bootlocal.sh to /etc/rc.d/automount

At the moment we write by concatenating to the automount file.

RUN cat $ROOTFS/tmp/bootlocal.sh >> $ROOTFS/etc/rc.d/automount

it might be better to replace this with echoing a full file, as what is done in our CentOS ISO. This allows for a better insight to what happens and control over how links/mounts are done. See #57, #46, etc

I would also suggest to move the bootlocal.sh script to scripts/handle-user-data to make the two versions of images more consistent from a developer's viewpoint.

We need to fix code related to make_iso.sh as Boot2Docker has changed its path

Upstream boot2docker has changed the path of make_iso.sh [1] , hence our builds will fail once we move to any docker version later v1.12.4-rc1.

We have two ways to fix this. Either [2] [3] can be fixed or we can put the make_iso.sh in our repository. We can also also fetch it from the upstream repository through the Makefile automatically every time we do a build.

[1] boot2docker/boot2docker@2d5e77d
[2] https://github.com/minishift/minishift-b2d-iso/blob/master/iso/Dockerfile#L52
[3] https://github.com/minishift/minishift-b2d-iso/blob/master/iso/Dockerfile#L25

Add link to CI job to README

Good that we have a CI job now, but people also need to be able to get to it. Can we at a build status icon or if that is not enabled in our environment at least a couple of sentences of where the CI jobs are, where they are configured, link to minishift-ci-jobs repo, ...

Internally we might want to add something to the Mojo (how to log in to the Job, anything one needs to know about JBB, ...)

Cannot find make_iso.sh

Hi all, I'm trying to create the iso from scratch with some images i need but I'm facing a problem.

When parsing the Dockerfile, I get the following error

Step 4/17 : RUN sed -i '/^b2dVersion/,/^EOOS/d' /tmp/make_iso.sh
---> Running in 08136a0424be

sed: can't read /tmp/make_iso.sh: No such file or directory
The command '/bin/sh -c sed -i '/^b2dVersion/,/^EOOS/d' /tmp/make_iso.sh' returned a non-zero code: 2
make: *** [iso] Errore 2

Anybody has a clue?

Enable NFS installation test

Currently, test case to check NFS installation has been commented out due to issue minishift/minishift#660 which is fixed now.

See https://github.com/minishift/minishift-b2d-iso/blob/master/tests/test.py#L69-L74

Also, found that mount.nfs -V <anypath> does return version. Might be bug in mount.nfs

docker@minishift:~$ sudo /sbin/mount.nfs -V 
usage: mount.nfs remotetarget dir [-rvVwfnsh] [-o nfsoptions]
options:
	-r		Mount file system readonly
	-v		Verbose
	-V		Print version
	-w		Mount file system read-write
	-f		Fake mount, do not actually mount
	-n		Do not update /etc/mtab
	-s		Tolerate sloppy mount options rather than fail
	-h		Print this help
	nfsoptions	Refer to mount.nfs(8) or nfs(5)

docker@minishift:~$ sudo /sbin/mount.nfs -V ''     # Empty string after -V
mount.nfs: (linux nfs-utils 1.3.3)

docker@minishift:~$ sudo /sbin/mount.nfs -V /
mount.nfs: (linux nfs-utils 1.3.3)

Docker config should be persistent during restart

Currently b2d images doesn't have docker options persistent and restart will overwrite whatever configuration we change during a session. We need a persistent docker config to expose internal openshift registry and for proxy stuff.

Add minishift smoke tests

Similar to minishift-centos-iso, there should be smoke tests against minishift (preferably always the latest release).

Make the Makefile check target dependencies

Right now all targets in the Makefile are phony. With a bit of refactoring we can do "proper" dependency checks, so that 'make' will not rebuild the ISO if none of the underlying build files has changed.

gh-release usage is OS specific

Current release target only works on Linux. Either get gh-release installed independent of the OS (go get!?) or make it a prerequisite to install it. As it stands now it won't work.

Relocate/symlink /opt to /mnt/sda1/opt

To provide a place for people to store optional applications/binaries that survive restarts

mkdir -p /mnt/sda1/opt
rm -rf /opt
ln -s /mnt/sda1/opt /opt
chmod o+rwx /opt

Update tests to be run in macOS

Currently, the tests are only able to run in Linux as we are downloading only linux binary here

OS = os.getenv('OS', 'linux')
def main():
pattern = re.compile(".*%s-amd64.(tgz|zip)$" % OS)
r = requests.get('https://api.github.com/repos/minishift/minishift/releases/latest')
for asset in r.json()['assets']:
if pattern.match(asset['name']):
print asset['browser_download_url']

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.