You can use this vagrant image for quickly setup development environment.
All code available for edit on host-machine in directory project
.
This is an image for developing or for a quick review of the system. NOT for production!
git clone https://github.com/moira-alert/moira-vagrant-dev
vagrant up
start http://localhost:8888
- Fork repository
- Replace variable value
moira_web_repo
ormoira_worker_repo
on your fork in fileansible\group_vars\all.yml
- Start vagrant provisioning
- Write code on host-machine in
project
directory - Apply changes:
vagrant ssh
sudo systemctl restart moira-web
sudo systemctl restart moira-checker
sudo systemctl restart moira-api
- Look at the changes on http://localhost:8888/
- Push & PR
- Fork repository
- Start vagrant provisioning
- Set GOPATH in your editor to
project\gocode
(if you want IntelliSense to work) - Add git remote to your repo in directory
project\gocode\github.com\moira-alert\cache
git remote add myfork https://github.com/you/cache.git
- Write code on host-machine in
project\gocode\moira-alert\
directory - Apply changes:
vagrant ssh
cd /vagrant/data/gocode/src/moira-alert/cache
go install
sudo systemctl restart moira-cache
- Look at the changes on http://localhost:8888/
- Push & PR
git push myfork
In the same way as Cache.
Apply changes:
vagrant ssh
cd /vagrant/data/gocode/src/moira-alert/notifier/notifier
go install
sudo systemctl restart moira-notifier
> vagrant provision
There are errors in the configuration of this machine. Please fix
the following errors and try again:
ansible local provisioner:
* `playbook` does not exist on the guest: c:/vagrant/ansible/moira.yml
This is a known issue hashicorp/vagrant#6740
Use:
vagrant halt
vagrant up --provision
or
vagrant ssh
cd /vagrant
./start_provision.sh
###Q:
TASK: [moira | Create symlink for node_modules] *******************************
failed: [localhost] => {"failed": true, "path": "/vagrant/project/moira-web/node_modules", "state": "absent"}
msg: Error while linking: [Errno 71] Protocol error
FATAL: all hosts have already failed -- aborting
###A: Start cmd as Administrator