[Koha-devel] Kohadevbox for testing Packages+Plack

Tomas Cohen Arazi tomascohen at gmail.com
Thu Sep 24 22:21:53 CEST 2015


2015-09-23 6:57 GMT-03:00 Jonathan Druart <
jonathan.druart at bugs.koha-community.org>:

> It works perfectly with a Jessie host.
> Note that I am using vagrant 1.6.5 and ansible 1.7.2.
>
> Some questions:
> 1/ > $ export SYNC_REPO=/home/katrina/kohaclone
> Why this variable is not in the vars/user.yml file?
>

That's because it is used by vagrant, to mount your local Koha clone as an
NFS filesystem (we could use Virtualbox's folder sharing driver, but it is
painfully slow). We should extend this to more options (LXC containers?).


> The process explodes if not defined:
> TASK: [kohadevbox | Gitify the Koha instance]
> *********************************
> failed: [jessie] => {"changed": true, "cmd": "./koha-gitify kohadev
> /home/vagrant/kohaclone", "delta": "0:00:00.045243", "end":
> "2015-09-23 09:12:58.035161", "rc": 2, "start": "2015-09-23
> 09:12:57.989918"}
> stderr: ERROR: git checkout not found at (/home/vagrant/kohaclone)
>

Yeah, that's on my TODO. Basically, we need to use that env var to control
wether to clone from the ansible script or not. Currently, it is assumed
that the clone exists.


> 2/ Can we imagine several instances running? How can we access them
> separately?
>

We should try. The main issue with the current Vagrantfile would be the
fixed IP (needed for the NFS thing only). Maybe we could just define a
different one for each vm definition (jessie, wheezy, etc). The port
mapping should be handled that way too, to avoid collision.


> 3/ Can we imagine a way to automatically insert a specific DB (from
> the contrib/sandboxes repo for instance)?
>

Magnus' branch currently lets you specify an SQL file to be loaded. That's
on the TODO list too, the same for another feature Magnus implemented:
controlling wether to load the shipped default data, or let the user go
through the webinstaller.


> Cheers,
> Jonathan
>

Thanks for the feedback. I'm sending a pull request to Chris Hall for
koha-gitify to take care of the new plack.psgi file paths.



>
> 2015-09-21 15:22 GMT+01:00 Tomas Cohen Arazi <tomascohen at gmail.com>:
> > Hi everyone, I hope you had a great weekend :-D
> >
> > We have pushed a new branch to the kohadevbox repository. The branch is
> > called 'ansible' and relies on that tool (Ansible) to load a full
> packages
> > environment, suitable for testing Plack on packages. I already use it
> for my
> > RM duties, daily.
> >
> > To try/use it, you need to:
> >
> > (1) Install the latest vagrant:
> >   https://www.vagrantup.com/downloads.html
> >
> > (2) Install the latest ansible:
> >
> >
> http://docs.ansible.com/ansible/intro_installation.html#latest-releases-via-apt-ubuntu
> >
> > (3) Install nfs-kernel-server (for re-using your host machine cloned
> repo)
> >   $ sudo apt-get install nfs-kernel-server
> >
> > (4) Clone the kohadevbox repo https://github.com/digibib/kohadevbox.git
> >
> > (5) Checkout the 'ansible' branch.
> >
> > (6) Dive into the directory, uncomment the lines you would like to tweak
> in
> > vars/user.yml (email, name, bz configuration, etc)
> >
> > (7) Set an env variable pointing to your local koha clone (for example)
> >   $ export SYNC_REPO=/home/katrina/kohaclone
> >
> > (8) Launch kohadevbox for the desired distribution:
> >   $ vagrant up trusty
> > or
> >   $ vagrant up wheezy
> > or
> >   $ vagrant up jessie
> >
> > Once you have your vagrant environment up and running, you will have
> access
> > to Koha like this:
> > - OPAC: http://localhost:8080
> > - Staff: http://localhost:8081
> >
> > After this, you can enable Plack from within the VM by running:
> >
> >  $ vagrant ssh <os> # to get into
> >  $ sudo -s # gain root access
> >  $ koha-plack --enable kohadev
> >  $ koha-plack --start kohadev
> >  $ service apache2 restart
> >
> > Once you have it running and figure how easy is to destroy your
> environment
> > and re-create it, you will really love this (+10000 to Magnus!).
> >
> > So, this is a pledge to all of you, to use it so we properly test Plack
> on
> > packages for the next release.
> >
> > Thanks in advance!
> >
> > --
> > Tomás Cohen Arazi
> > Theke Solutions (http://theke.io)
> > ✆ +54 9351 3513384
> > GPG: B76C 6E7C 2D80 551A C765  E225 0A27 2EA1 B2F3 C15F
> >
> > _______________________________________________
> > Koha-devel mailing list
> > Koha-devel at lists.koha-community.org
> > http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
> > website : http://www.koha-community.org/
> > git : http://git.koha-community.org/
> > bugs : http://bugs.koha-community.org/
> _______________________________________________
> Koha-devel mailing list
> Koha-devel at lists.koha-community.org
> http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
> website : http://www.koha-community.org/
> git : http://git.koha-community.org/
> bugs : http://bugs.koha-community.org/
>



-- 
Tomás Cohen Arazi
Theke Solutions (http://theke.io)
✆ +54 9351 3513384
GPG: B76C 6E7C 2D80 551A C765  E225 0A27 2EA1 B2F3 C15F
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.koha-community.org/pipermail/koha-devel/attachments/20150924/74c4d5e5/attachment.html>


More information about the Koha-devel mailing list