Skip to content

Commit

Permalink
Version 2.2.0
Browse files Browse the repository at this point in the history
Updated version and documentation to refernence new
Makefile targets for building a deb from the master branch.
  • Loading branch information
ehdoyle committed Dec 24, 2020
1 parent 8975ee6 commit 40525ca
Show file tree
Hide file tree
Showing 7 changed files with 291 additions and 182 deletions.
12 changes: 11 additions & 1 deletion ChangeLog
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
due (2.2.0-1) unstable; urgency=medium

* Version bump to 2.2.0
* debian/master debian/changelog set from master ChangeLog
* libdue: Initial support to run under Red Hat Linux
* Makefile: debian package build target, help
* README.md: installation update

-- Alex Doyle <adoyle@nvidia.com> Sun, 21 Dec 2020 21:21:21 -0700

due (2.1.0-1) unstable; urgency=medium

* debian-package: duebuild now builds binaries by default, not source as well.
* debian-package: fixed incorrect examples in help-examples.
* debian-package: --use-local-repo now usues due-manage-local-repo.sh.
* debian-package: added due-manage-local-repo.sh to let the user add/remove local pacakges.o
* debian-package: added due-manage-local-repo.sh to let the user add/remove local pacakges.
* debian-package: README.md - updated with due-manage-local-repo.sh documentation.
* debian-package: duebuild - better error handling on dependency install fails.
* common-templates: c-add-docker-user script will add user to docker group, if it exists
Expand Down
9 changes: 1 addition & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,9 @@

DUE is a wrapper for Docker to create easy to use build environments.

## Type the following to configure DUE to build as a Debian package:
1. `git checkout master`
2. `make orig.tar`
3. `git checkout debian/master`
...and use a Debian build environment to build. If you need one, see:
**./docs/GettingStarted.md** to have DUE create one for you.

## The TL:DR

Docker image for your desired Debian based operating system
Start with a Docker image for your desired Debian based operating system
**+**
DUE configuration utilities
**+**
Expand Down
41 changes: 27 additions & 14 deletions docs/GettingStarted.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,13 @@ are start and end with back ticks like `this`. If you are using a Markdown viewe
**The point**
If you cut and paste from this file, do not copy the `s

# Installing from a .deb
If you have a .deb file of DUE that was installed with Apt, skip to **A Practical Example** below.
If it is just a deb file, `sudo dpkg -i due_*deb` and resolve missing dependencies using Apt.

# Install DUE's software dependencies
# Installing from a Git checkout

## Install DUE's software dependencies
To run DUE from the source directory, you will need to install the following
packages:
* docker.io (docker.ce works as well)
Expand All @@ -18,36 +23,41 @@ packages:
* curl
* and maybe pandoc, if you plan on updating the man pages.

From the Master Git branch, you can also run `make install` as root and it will try to install these packages.
Running `make install` from the `master` Git branch as root will attepmpt to install these packages for both Debian and Red Hat Linux.

If you are using a Debian based Linux, like Ubuntu `sudo apt-get update; sudo apt-get install git docker.io` will handle this.
## Add yourself to the Docker group
Once Docker is installed, add yourself to the docker group with:

`sudo /usr/sbin/usermod -a -G docker $(whoami)`

You will probably have to log out and back in for your new membership to take effect.

If you have downloaded DUE as source from it's GitHub page (https://github.com/CumulusNetworks/DUE) you can run it by invoking it with a ./
## Run DUE locally with ./due
If DUE is invoked with a ./, it will use the copy of `due` in the local directory (as expected) and use the template files that are under the local directory. This allows users to try it out without installing it on their systems.

**Ex:** `./due`

## Installing DUE
The preferred method of installing DUE is to build a .deb of it, using the debian/master branch and install the deb.
Alternately, typing `make install` as `root` from the master Git branch will install DUE files in the system, which is currently the easiest way to install DUE in a Red Hat Linux system.

# A Practical Example: create an image and build DUE as a Debian package
DUE can be used to build itself as a Debian package.

1. Start with DUE's `master` Git branch.
2. `make orig.tar`
3. Use Git to check out DUE's debian/master branch
`git checkout debian/master`
You should see that there is now a "debian" directory.
4. Create a Debian package build container, using an example from `due --create help`.
2. Create a Debian package build container, using an example from `./due --create help`.
If you are using Ubuntu, this might look like:
`./due --create --from ubuntu:18.04 --description "Package Build for Ubuntu 18.04" --name pkg-u-18.04 --prompt PKGU1804 --tag pkg-ubuntu-18.04 --use-template debian-package`
**TIP** `--filter` term can be used with `due --create --help` to limit the output to entries that match the term.
5. Once image creation has finished, tell DUE to run a build, and pick your Debian package build container.
`due --build` <- Will let you choose your image, if there is more than one.
Or specify the image to use with:
`due --run-image due-pkg-u-18.04:pkg-ubuntu-18.04 --build` <- build using `due-pkg-u-18.04` image with tag `pkg-ubuntu-18.04`

3. At this point you can type `make debian-package`and the makefile will:
3a. `make orig.tar`
3b. `git checkout debian/master`
3c. `due --build`
3d. Ask you to choose the image to build with, if you have more than one.
3e. Build the .deb, leaving it in the parent directory of DUE.
3f. ...and check out the `master` Git branch again.
...or you can run those steps individually.

Once the build completes, there should be a due*.deb in the directory above where you just built. This can be installed with:
`sudo dpkg -i due_*all.deb`

Expand Down Expand Up @@ -77,6 +87,9 @@ the role of the container, as this may not be obvious. The Ubuntu package build

..And that's the basics of using DUE to create and run containers.


**TIP** You can specify the image to use with `--run-image`:
**Ex:** `due --run-image due-pkg-u-18.04:pkg-ubuntu-18.04 --build` <- build using `due-pkg-u-18.04` image with tag `pkg-ubuntu-18.04`

The rest of this document will get in to using specific types of containers, and how you can create and debug your own.
**TIP** Take a look at the README.md files under the `./templates` directory as well.
Expand Down
Loading

0 comments on commit 40525ca

Please sign in to comment.