Monday, January 25, 2016

Creating Remote APT Package Repositories on Github

Creating remote apt repos on github

If you read my last blog post, you would know that I am really into deploying applications and systems with deb and rpm packages whenever possible. One of the things you will eventualy want to do, to make deb and rpm package deployment easier, is to create a remote apt or yum repo to host your packages. One of the cooler tricks I have come up with in recent times is creating apt/yum repos in obscure locations.

This aritical will go over how to host an apt repo inside of a git repo on github. This little trick has the following benifits:

  1. free hosting for you apt repo
  2. publicly availability
  3. provide a single location for source code and packages.

Simple Deb Package Creation

Building a Simple Deb Package

All of the hip kids today are into deploying packages and complex systems with things like Ansible, Docker, Chef, Puppet, Vagrent and Salt Stack. While these deployment tools are awesome, you should not forget about good old fashioned system packages for application deployment. I fully understand there are times when some of these newer deployment tools are a better fit, but, as time goes on, I run across more and more overly complicated and convoluted deployment procedures using these new tools when a simple deb or rpm package could be used. Maybe Im just oldschool, but whenever possible, I prefer to handle application deployment with system packages, such as debs or rpms.

Creating deb packages to deploy applications in Debian or Ubuntu is a fairly simple process. However, I have found that the majority of existing documentation for doing so is overly verbose or more complex than needed. This writeup aims to summaries the process of creating deb packages in just a few simple steps.

Here is a short summary of what this writeup covers:

  1. How to create a bare bones deb package
  2. How to optionally add package configuration files
  3. How to optionally add package dependancies
  4. How to optionally add package scripts that run before or after installation

Using Make for Easy Yocto Builds On Intel Edison

This documentation goes though the process of building a Yocto Linux image via simple make files for the Intel Edison board. The make file method for building Yocto images is much simpler than the manual build methods. The make files provided by Intel in the BSP Edison source package wrap the build process with scripts to make building an extremely simple process.

Manually Building Yocto Images for the Intel Edison Board from Source

This documentation goes though the process of manually building a Yocto Linux image for the Intel Edison hardware. The build techniques used here do not use the easier make file method which is now available in the Intel Edison Board Support Package (BSP) source. For documentation on building via the make file method, I will do a follow up post which explains that process in detail.

The manual build method used in this documentation allows for easier customization of the base Yocto image. Customizations can include tweaks such as changing the base kernel, adding extra kernel modules, adding base application packages, etc.