Skip to content
This repository has been archived by the owner on Jun 2, 2020. It is now read-only.

Commit

Permalink
update local testing environment using vagrant
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-leonhardt committed Jan 26, 2018
1 parent 3e1e3a4 commit 14a290a
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Created by .ignore support plugin (hsz.mobi)
### Vagrant template
.vagrant/
.idea/
.vscode/

*.pyc

Expand Down
14 changes: 10 additions & 4 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ gpgcheck=0
enabled=1
EOF
sudo yum -y install sensu uchiwa rabbitmq-server redis
sudo rabbitmq-plugins enable rabbitmq_management
sudo chkconfig rabbitmq-server on
sudo chkconfig redis on
sudo chkconfig sensu-client on
Expand All @@ -30,15 +30,20 @@ EOF
sudo service rabbitmq-server restart
sudo service redis restart
sudo service sensu-client stop
sudo service sensu-client start
sudo service sensu-api stop
sudo service sensu-api start
sudo service sensu-server stop
sudo service sensu-server start
sudo service uchiwa restart
sudo service sensu-client start
# create sensu-grid user
sudo useradd -c "sensu-grid user" -d /opt/sensu-grid -M -s /sbin/nologin -r sensu-grid
sudo yum -y install supervisor python-pip python-devel
sudo pip install -r /vagrant/requirements.txt
sudo yum -y install supervisor python-pip python-devel python-virtualenv
sudo pip install --upgrade pip ||:
sudo pip install -r /vagrant/requirements.txt ||:
sudo touch /var/log/sensu-grid.log && sudo chown sensu-grid: /var/log/sensu-grid.log
sudo cp /vagrant/start-scripts/supervisord.conf /etc/supervisord.conf
sudo service supervisord start
Expand All @@ -55,6 +60,7 @@ EOF
vagrant1.vm.network "forwarded_port", guest: 3000, host: 3000
vagrant1.vm.network "forwarded_port", guest: 4567, host: 4567
vagrant1.vm.network "forwarded_port", guest: 5000, host: 5000
vagrant1.vm.network "forwarded_port", guest: 15672, host: 15672

vagrant1.vm.synced_folder ".", "/vagrant"
vagrant1.vm.synced_folder ".", "/opt/sensu-grid"
Expand Down
6 changes: 3 additions & 3 deletions vagrant-sensu-config/config.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{
"rabbitmq": {
"host": "localhost",
"host": "127.0.0.1",
"port": 5672,
"user": "guest",
"password": "guest",
"vhost": "/"
},
"redis": {
"host": "localhost",
"host": "127.0.0.1",
"port": 6379
},
"api": {
"host": "localhost",
"host": "127.0.0.1",
"port": 4567
},
"handlers": {
Expand Down

0 comments on commit 14a290a

Please sign in to comment.