Snippets

DavidC pkgbox manual

You are viewing an old version of this snippet. View the current version.
Revised by David Cuddihy 6f9f9a6

Start VM

vboxmanage startvm aal-lpc-1-4 --type headless

Confirm pkgbox configured correctly in inventory file

ansible pkgbox -i inventory/local -a hostname -u ubuntu --ask-pass

Run the playbook

ansible-playbook -i inventory/local --ask-pass --become --ask-become-pass ./playbook.pkgbox.yml

...then enter s****t for password. Hit enter to use that for the sudo password as well.

Assuming you've already created a standard VM in which to do this work, here are the steps:

Prepare your work environment

These steps will turn your raw Ubuntu VM into a machine tuned for testing and packaging the pystack components.

  1. Make your VM comfortable -- Make yourself an account, add your SSH-keys for Bitbucket, install your favorite dev tools, etc.
  2. Install bbsage -- sudo apt-get install bbsage bbansible -- this will include all of the tools you need to build and package the pystack debs.
  3. Sync bbsage dotfiles -- You'll customize this VM for packaging so sync the bbsage dotfiles into your working directory: use bbsage && bb-dot bbsage --sync
  4. Retrieve betabox-trusty tree --
    1. cd ~/hgdev/org.bitbucket
    2. mkdir betabox-trusty
    3. hg clone ssh://hg@bitbucket.org/betabox-trusty/betabox-trusty.bitbucket.org
  5. Add local betabox-trusty tree to your /etc/apt/sources.list
    1. sudo mkdir /opt/apt
    2. `sudo ln -s ${HOME}/hgdev/org/bitbucket/betabox-trusty/ /opt/apt/current;
    3. Add a line prior to the other betabox-trusty entries like: deb file:///opt/apt/current/ubuntu fimero main
    4. sudo apt-get update
    5. sudo apt-get install bbginger

Test Packaging

We'll testing the packaging step first to ensure we have all of the prerequisite libraries install properly.

  1. Retrieve pystack source packages checkoutmanager co pystack-default (this works courtesy of bbsage dotfiles)
  2. Make debs -- This will create the debs and install them in your local reprepro tree:
    1. cd ~/hgdev/org.bitbucket/autonomy/bbsage && bb-package.sh
    2. cd ~/hgdev/org.bitbucket/autonomy/bbmint && bb-package.sh
    3. cd ~/hgdev/org.bitbucket/autonomy/bbdill && bb-package.sh
    4. cd ~/hgdev/org.bitbucket/autonomy/bbthyme && bb-package.sh
    5. cd ~/hgdev/org.bitbucket/autonomy/bbginger && bb-package.sh
  3. **Install
HTTPS SSH

You can clone a snippet to your computer for local editing. Learn more.