Snippets

DavidC pkgbox manual

Created by David Cuddihy last modified

Set up pkgbox

Install Ubuntu 14.04 on a fresh VM

...Copy Dru's post, but:

  • Remove betabox part;
  • Make port-forwarding specifically reference -p 4022;
  • Maybe even make the hostname specific.

Start VM

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

Set up bbansible on host;

  1. Clone autonomy/bbansible --> cuddihyd/bbansible
  2. Check it out. (Alternative: apt-get install, have postinstall symlink /opt/bbansible/current/inventory/local to /opt/etc/me.acr/bbansible/inventory/local)
  3. cd /opt/bbansible/current

Confirm pkgbox reachable

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

Confirm that the hostname shown here matches what you expect for your VM.

Setup pkgbox

ansible-playbook -i inventory/local --ask-pass --become --ask-become-pass -e dev_user=$(whoami) ./playbook.pystackdev.yml

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

Set up environment for packaging

use bbsage && bb-dot.sh bbsage --sync
checkoutmanage co betabox-trusty
sudo mkdir /opt/apt
sudo ln -s ${HOME}/hgdev/org.bitbucket/betabox-trusty/betabox-trusty.bitbucket.org /opt/apt/current

#Add a line to `/etc/apt/sources.list` prior to the entry for betabox-trusty:
sudo sed -i  '/^deb.*betabox.*$/i \
deb file:///opt/apt/current/ubuntu fimero main
' /etc/apt/source.list

Build Packages

First:

export FLAVOR=betabox

...Then:

  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

Testing Packages install

sudo apt-get update
sudo apt-get install bbginger

Ensure no errors on install.

Smoke-Test Pystack

Try a few pystack commands to make sure it passes basic smoke-test:

use bbginger
use bbruntime

publish-list

export BBDILL_TX_HOST=rest.knyc.acr.lab
tx-get-quotable-id dl.fx.dxy

Unit-Test Pystack

Now that we have a clean VM with the dependencies as per the latest pystack-deb-packages only, we can unit-test:

  1. cd ~/hgdev/org.bitbucket/autonomy/bbmint/content/ && make opt-bbmint && make test
  2. cd ~/hgdev/org.bitbucket/autonomy/bbdill/content/ && make opt-bbdill && make test
  3. cd ~/hgdev/org.bitbucket/autonomy/bbthyme/content/ && make opt-bbthyme && make test
  4. cd ~/hgdev/org.bitbucket/autonomy/bbginger/content/ && make opt-bbginger && make test

For any errors detected here:

  1. notify the responsible dev.
  2. Await the pull-request and merge into the respective autonomy/bbxxx repositories.
  3. Run checkoutmanager co pystack-default.
  4. Rerun unit-tests.

Create Release Branches

Once everything passes unit-test:

  1. For each pystack repo:
    1. Create a branch for the current major.minor release;
    2. Modify the ~/hgdev/org.bitbucket/autonomy/bbxxx/packaging/manifest file -- update the version number, and commit.
    3. Tag each branch;
  2. Push all repos back up to Bitbucket -- You can confirm everything's synced up with:
    • checkoutmanager st pystack-default
    • checkoutmanager out pystack-default

Send Repackage Ticket to Admin

Send a repackage ticket to Admin.

Comments (0)

HTTPS SSH

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