mirror of
https://github.com/stackbuilders/hapistrano.git
synced 2024-11-23 06:42:02 +03:00
.. | ||
app | ||
src | ||
.gitignore | ||
example.cabal | ||
hap.yaml | ||
README.md | ||
Setup.hs | ||
stack.yaml | ||
stack.yaml.lock | ||
Vagrantfile |
Example project to test hapistrano's working_dir feature
We're going to test the hapistrano's working_dir
feature by deploying this project to a local server (Virtual machine).
To do this we need to:
- Install VirtualBox
- Install Vagrant
- Make sure you have hapistrano installed. You can install it via stack by running
stack install hapistrano
- You must have a ssh key with the name
id_rsa
.If you're not sure this article can be helpful. - Go to the
/hapistano/example
directory. - Execute in your terminal the next line.
*
If everything went fine, this should trigger the deployment process to the virtual machine.#This could take a couple of minutes $ vagrant up $ hap deploy
- To check if the project was built you can ssh the vagrant vm, and do the following:
Nothing should happen since your project is already compiled.vagrant ssh cd /tmp/hap-examle/current/example stack build
*
A known issue occurs if you have other vagrant vms. When trying to run hap deploy
you could get the following console result. To avoid this issue remove the line that contains the previous RSA host key and try running hap deploy
again.
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that the RSA host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
<host key>.
Please contact your system administrator.
Add correct host key in /path/to/.ssh/known_hosts to get rid of this message.
Offending key in /path/to/.ssh/known_hosts:<line>
RSA host key for [ip-or-host]:<port> has changed and you have requested strict checking.
Host key verification failed.