hapistrano/example
2024-01-21 20:48:10 -05:00
..
app Address comments and suggestions 2021-04-13 18:05:03 -05:00
src Improve vagrant procces 2021-04-16 11:39:36 -05:00
.gitignore Improve vagrant procces 2021-04-16 11:39:36 -05:00
example.cabal [RELEASE] Documentation changes and release preparation (#184) 2022-04-12 15:57:44 -05:00
hap.yaml chore: Update default branch name (#233) 2024-01-21 20:48:10 -05:00
README.md Fix grammar issues and typos (#168) 2021-10-31 20:14:05 -05:00
Setup.hs example project 2021-03-29 11:08:09 -05:00
stack.yaml requested chanages and vagrant 2021-05-11 17:31:11 -05:00
stack.yaml.lock requested chanages and vagrant 2021-05-11 17:31:11 -05:00
Vagrantfile Reduce vagran ram 2021-05-12 12:04:35 -05:00

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:

  1. Install VirtualBox
  2. Install Vagrant
  3. Make sure you have hapistrano installed. You can install it via stack by running
    stack install hapistrano
    
  4. You must have a ssh key with the name id_rsa.If you're not sure this article can be helpful.
  5. Go to the /hapistano/example directory.
  6. Execute in your terminal the next line. *
    #This could take a couple of minutes
    $ vagrant up
    $ hap deploy
    
    If everything went fine, this should trigger the deployment process to the virtual machine.
  7. To check if the project was built you can ssh the vagrant vm, and do the following:
    vagrant ssh
    cd /tmp/hap-examle/current/example
    stack build
    
    Nothing should happen since your project is already compiled.

* 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.