requested chanages and vagrant

This commit is contained in:
Felix Mino 2021-05-11 17:31:11 -05:00
parent 578327da39
commit 830fcbd034
4 changed files with 26 additions and 4 deletions

View File

@ -3,14 +3,16 @@
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](virtualbox)
2. Install [Vagrant](vagrant)
1. Install [VirtualBox][virtualbox]
2. Install [Vagrant][vagrant]
4. You must have a ssh key with the name `id_rsa`.
If you're not sure this [article](ssh) can be helfpul.
If you're not sure this [article][ssh] can be helfpul.
5. Go to the `/hapistano/example` directory.
6. Execute in your terminal the next line.
```bash
vagrant up
#This could take a couple of minutes
$ vagrant up
$ hap deploy
```
If everything went good, this should trigger the deployment procces to the virtual machine.
9. To check that the project was built you can ssh the vagrant vm, and do the folowing:

5
example/Vagrantfile vendored
View File

@ -1,5 +1,10 @@
Vagrant.configure("2") do |config|
config.vm.box = "debian/buster64"
config.vm.provider "virtualbox" do |v|
v.memory = 2048
v.cpus = 2
end
# ~/.ssh/id_rsa.pub is a file in the host machine
config.vm.provision "file", source: "~/.ssh/id_rsa.pub", destination: "~/.ssh/me.pub"
config.vm.provision "shell", inline: <<-SCRIPT

3
example/stack.yaml Normal file
View File

@ -0,0 +1,3 @@
resolver: lts-17.10
packages:
- .

12
example/stack.yaml.lock Normal file
View File

@ -0,0 +1,12 @@
# This file was autogenerated by Stack.
# You should not edit this file by hand.
# For more information, please see the documentation at:
# https://docs.haskellstack.org/en/stable/lock_files
packages: []
snapshots:
- completed:
size: 567241
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/17/10.yaml
sha256: 321b3b9f0c7f76994b39e0dabafdc76478274b4ff74cc5e43d410897a335ad3b
original: lts-17.10