st2-packages
st2-packages copied to clipboard
[INFO] How to produce packages and debug an issue locally?
Generating packages locally
- Spin a fresh ubuntu VM
- git clone https://github.com/manasdk/st2-test-ground
- HOSTNAME=PKGS_BOX vagrant up u14 --no-provision
- vagrant ssh u14
- Inside the VM, install the following pre-requisites
- sudo apt-get install python-pip
- sudo pip install --upgrade pip
- sudo -H pip install docker-compose
- Install docker by following instructions here: https://docs.docker.com/engine/installation/ubuntulinux/
- Fetch the st2-packages repo and checkout the appropriate branch:
- git clone https://github.com/StackStorm/st2-packages.git
- git checkout ${branch}
- Get ready to build:
- sudo docker-compose kill
- sudo docker-compose rm -f
- Now build packages:
- sudo docker-compose run --rm wheezy # You can also run packages for trusty, el6, el7 etc
Debugging
After build and test stages finished all docker containers remain active, so you are welcome to some more in-depth testing if desired. To do so simply run:
- List containers
- sudo docker ps
Find the required testing container
In our case it will be st2packages_wheezytest_1
- sudo docker ps
- Get a shell inside container
- sudo docker exec -it st2packages_wheezytest_1 bash
Once done, you are inside the testing environment where all services are up and running. Don't forget to do (after exec):
export TERM=xterm At this point you can do any manual testing which is required.
@lakshmi-kannan @armab I didn't get this. But @armab has found an issue long time ago that docker stuff doesn't work under vagrant. Right?
I see absolutely no point in using docker-inside-vagrant (unless you are on windows/mac). However it seems that recent docker works just fine under windows/mac. (as far as I'm aware).
Responding with https://github.com/StackStorm/st2-packages/issues/146 why Vagrant case can be useful.
I codified this knowledge in https://github.com/manasdk/st2-package-builder/blob/master/README.md