Coder Social home page Coder Social logo

build-onie's Introduction

build-onie

This Dockerfile creates a Debian build environment for ONIE. It also clarifies how Docker could be used in a build workflow.

  • It has not been tested yet. I will revisit this image upon a return to the ONIE build process.

Docker allows you to package an entire Linux environment into units called containers. Containers utilise control groups, a resource isolation & management feature of the Linux kernel, to execute their processes with allowances specific to their control group.

Steps (Container preparation)

The goal is to access a shell session as the 'build' user within the container environment.

Clone this repository. Then navigate into the directory.

  • git clone https://github.com/bluejumper/build-onie && cd build-onie

Build the image using Docker.

  • docker build -t debian:build-onie .

Create a container from this image, and attach your terminal onto it. You can define any mount options using the alternative command.

  • docker run -it --name debian debian:build-onie
  • docker run -it -v [a_host_directory]:/mnt/build --name debian debian:build-onie to specify a mount

Should you find yourself detached from your container instance, you can use docker attach [name] to re-attach onto a running container.

Steps (Build preparation)

As the build user, navigate to the build directory.

  • cd /mnt/build

Use Git to clone the ONIE repository.

  • git clone https://github.com/opencomputeproject/onie

Navigate through the repository to 'build-config'.

  • cd ./onie/build-config

Steps (To build)

You can now follow a target's build steps from the ONIE repository. Please review the 'INSTALL' file within a directory you'll find here.

  • For a KVM build: make -j2 MACHINE=kvm_x86_64 all recovery-iso
  • For an Accton platform: make -j4 MACHINEROOT=../machine/accton MACHINE=accton_as7816_64x all

build-onie's People

Contributors

bluejumper avatar cbrune avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

cbrune

build-onie's Issues

move these files into the ONIE repo ??

Hello @bluejumper -

I think what you have done is really great. Various folks have wanted this for a long time, but no one ever stood up and made it happen. Honestly, thanks a bunch for doing this.

I have a couple of suggestions, however.

First off I think we should move this into the ONIE repo proper. We have a top level contrib sub-directory which could house this code nicely. Longer term I think it will be easier to maintain this code if it lives alongside the main ONIE code base. Also the ONIE documentation could more easily refer to this code.

My other suggestions are in the nature of polish, minor things really. For example instead of having the big apt-get install ... happen when the docker image is created, I would move that step to the instructions and just have the end user run make debian-prepare-build-host. The list of packages needed on the build host does change a little of over time, so relying on make debian-prepare-build-host will prevent us from having to maintain two separate, but nearly identical lists of packages. Anyway that is just a polishing suggestion.

If you are agreeable to me relocating your code let me know. I can make the ONIE pull requests and update various ONIE wiki documentation. I know your LICENSE terms already allow me to do this, but I'd like to include your input first.

Cheers,
Curt

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.