It sets up Ubuntu-16.04 Virtual Boxes and installs Redis-5.0.3 from package(tar.gz) and/or from it's repository using Vagrant. The installation and configuration is done using Chef cookbook-install-redis and hence it can be used on any (currently only ubuntu 16.04
) Chef Client hosts
Tested with below components on OSX-10.14.3
- VirtualBox 6.0
- Vagrant 2.2.3
- Chef Development Kit Version: 3.7.23 - For running integration tests.
Once the requirements are installed, open up a terminal. We'll need to clone this repository and setup vagrant:
git clone https://github.com/joy-george/redis-installer.git
cd redis-installer
redis-installer$ vagrant up --no-provision
This will help vagrant to store all the node information
redis-installer$ mkdir nodes
redis-installer$ vagrant provision
The current vagrant setup will create 2 virtual boxes
- 172.30.0.140: With Redis server installed from package
- 172.30.0.141: With Redis server installed from repository
If required, the above configuration can be modified from the Vagrantfile
Integration test can be done after provision to verify
- Redis has been installed
- Redis is running
- Redis is runing on version 5.0.3
- Configuration changes are in place and correct
- Service listens to necessary ports (6379)
- Redis is able to set and get test key values
redis-installer$ chef exec inspec exec cookbooks/install-redis/test/integration/default/server_test.rb -t ssh://vagrant@172.30.0.140 --password=vagrant
redis-installer$ chef exec inspec exec cookbooks/install-redis/test/integration/default/server_test.rb -t ssh://vagrant@172.30.0.141 --password=vagrant