To have some interactions on the script we need to allocate a tty. This
adds a pseudo-tty to the ssh session.
This enables `read -s` on deployment scripts.
`sudo -S` reads the password from stdin. The way it was it was executing
the deploy script with the password as the stdin of the pipe.
Now, when password is passed as an argument we aquire a sudo session
executing a command that always work and then prefixing the installation
with sudo.
Previously, because we were piping the compiled script blob over ssh to
decompress over there without creating an intermediated bundled file, we
were allocating the stdin of the ssh session to have the read from the
pipe.
This blocked the allocation of the /dev/tty over the session and
prevented users to interact with the script. We would like some of the
interactions to work, like prompting for a confirmation or typing a
password.
To fix this, the deployment process was split in two steps. The first
step still receives the bundled file over a pipe, decompresses it on a
temprary folder, and outputs the location of the deployment folder.
We grab this output to feed on the second step, which has a script to go
to the deployment folder and start the execution.
Now, roles can make use of read, as well as sudo with password.
The part of trying out scripts involve creating a docker container with
ssh and running some projects and functions on it.
This change allows to define the docker image name to be used with the
docker-* functions.
Modules are located on the `modules` folder on the project.
By default, kickstart will put itself on the `compile/modules/kickstart`
before any folder is linked there as well. This give the possibility of
overriding which kickstart project will be deployed with you.
Kickstart is treated as an special folder, given that the projects
requires its functions. So, it is loaded before all of the modules, and
skiped looping over the `modules` folder.
The root-dir is important to know so we can include the kickstart as a
module on compile, so projects can access the kickstart utilities on
their recipes