Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A Vagrant+Ansible automated test project #542

Merged
merged 3 commits into from
Apr 6, 2015

Conversation

dwhjames
Copy link
Contributor

@dwhjames dwhjames commented Apr 4, 2015

This provides a new test project in the test-project-play-rpm directory. It is the default Play 2.3.x sample project packaged as an RPM.

The build and test environment uses a Centos-6.6 VM, managed with Vagrant and provisioned with Ansible (see the vagrant file and provisioning/site.yml).

The the package building and tests are also orchestrated with Ansible (see provisioning/test.yml).

The test run (run-test-playbook.sh) performs the following:

  • compile and build rpm package
  • install the built rpm
  • check that server is running and responding after install
  • check that service can restart
  • and is responding after restart
  • uninstall the rpm

This provides a new test project in the `test-project-play-rpm` directory. It is the default Play 2.3.x sample project packaged as an RPM.

The build and test environment uses a Centos-6.6 VM, managed with Vagrant and provisioned with Ansible (see the vagrant file and `provisioning/site.yml`).

The the package building and tests are also orchestrated with Ansible (see `provisioning/test.yml`).

The tests run performs the following:
- compile and build rpm package
- install the built rpm
- check that server is running and responding after install
- check that service can restart
- and is responding after restart
- uninstall the rpm
@dwhjames
Copy link
Contributor Author

dwhjames commented Apr 4, 2015

Note, this PR depends on #541

@muuki88 muuki88 added the rpm label Apr 4, 2015
@muuki88
Copy link
Contributor

muuki88 commented Apr 5, 2015

Nice. How do you run the semi-automated tests? I'm fairly new to ansible :)

avoid substitution issues by excluding sbt-native-packager from Play’s sbt-plugin
@dwhjames
Copy link
Contributor Author

dwhjames commented Apr 5, 2015

Ah, I guess a readme is probably in order.

Ansible can be installed through a bunch of different package managers:
http://docs.ansible.com/intro_installation.html

The Vagrant file invokes Ansible as a ‘provisioner’
http://docs.vagrantup.com/v2/provisioning/ansible.html

The run-test-playbook.sh assumes the vagrant up has already been run, and invokes runs the test ‘playbook’ against that vm.

# the path on the guest to mount the folder. And the optional third
# argument is a set of non-required options.
# config.vm.synced_folder "../data", "/vagrant_data"
config.vm.synced_folder "..", "/vagrant"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will sync the complete sbt-native-packager project directory, rather than just this test subdirectory.

@muuki88
Copy link
Contributor

muuki88 commented Apr 6, 2015

Works fine for me. I'll merge this and add your instructions.

muuki88 added a commit that referenced this pull request Apr 6, 2015
A Vagrant+Ansible automated test project
@muuki88 muuki88 merged commit b58609f into sbt:master Apr 6, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants