Ansible playbook for OJS3 beta testing and server install

Hey. I just made this ansible playbook to provision a virtual box machine with vagrant. Almost every time I needed to start testing, I’d pull and update everything… then it would all break for some reason or another. Then I’d have to install everything all over again.

With this, I’ll be sure to have a fresh, up-to-date instance for testing. I have no doubt that this could be adapted, without a great deal of effort for deployment to production environments.

What this does:

  • create the virtual machine in virtual box (using vagrant)
  • provision the machine using ansible:
    • it installs a LAMP stack
    • clones and does the necessary steps for a Github install of OJS3
1 Like

Hi @nmp,

That looks great! We’ve done a little bit of work with vagrant over here:

We also have a set of testing scripts that perform integration testing but (almost as a side-effect) generate a set of test data. The process takes a while (approx. 30 minutes) to build, but it’s been very helpful for continuous-integration-style testing.

Regards,
Alec Smecher
Public Knowledge Project Team

Are you sharing these testing scripts anywhere?

Yeah, basically, ansible does the work here that your shell scripts do in the Official Repo. This was partially a learning exercise because I’ve been wanting to learn one of the tools for automating server setup (like chef or puppet). Overall, ansible was pretty easy to learn.

Hi @nmp,

The scripts are included in the tests/data directory. For an example of how they get kicked off in the Travis testing environment (which IIRC uses an Ubuntu-based image), have a look at .travis.yml in the repository’s base directory.

Regards,
Alec Smecher
Public Knowledge Project Team