Commit Graph
26 Commits
Author SHA1 Message Date
Bruno Tavares 38ad846aeb Introduces kickstart.suppress_error function 2015-09-30 08:37:53 -03:00
Bruno Tavares 6538dd4bde Adjust documentation on kickstart.mute 2015-09-30 08:37:10 -03:00
Bruno Tavares 16b7005936 Make use of kickstart.mute on kickstart.command_exists.
This way we can debug the value returned when we enable the DEBUG flag.
2015-09-30 08:24:48 -03:00
Bruno Tavares a0bb7e160d Improves installed package detection on debian-based
Instead of relying only on the exit code of dpkg query, we check that
the status is installed for sure.

This prevents situations where the package was not properly installed,
and has a status like "install ok not-installed".
2015-09-27 13:31:03 -03:00
Bruno Tavares 790f5b41ee Improves the logic around ppa addition
kickstart will check if the ppa has already been added and only update
the package cache the first time it is added. Further updates must be
handled by hand.

It also installs the required packages to manage the ppa over command
line if it is not present yet.
2015-09-27 13:20:33 -03:00
Bruno Tavares caa3a7378b Allocates a tty when deploying to allow full fledge interaction
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.
2015-09-26 23:44:25 -03:00
Bruno Tavares a7daca90dd Fix prompt when executing the deployment with the password
`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.
2015-09-26 23:35:05 -03:00
Bruno Tavares 41cf8f98bf Allows deployment scripts to be interactive
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.
2015-09-26 22:36:18 -03:00
Bruno Tavares aafa6df1b7 Adds a command alias: create could also be called init 2015-09-26 15:51:49 -03:00
Bruno Tavares 2dbf3a59f3 Enables zsh autocompletion 2015-09-26 01:10:33 -03:00
Bruno Tavares 39e15e70a4 Fixes bash tab-completion 2015-09-26 01:00:17 -03:00
Bruno Tavares d157180b92 Ensures that we execute the bootstraping using bash 2015-09-26 00:52:37 -03:00
Bruno Tavares c68cbaeee8 Ensures that we execute the deployment using bash 2015-09-26 00:51:33 -03:00
Bruno Tavares 6149a4a8e1 Wraps deploy script execution on to prevent partial execution if it is terminated before finished transfering 2015-09-26 00:51:19 -03:00
Bruno Tavares c3fcd798c3 Uses literal heredoc when compiling the module loading script to reduce escapings 2015-09-26 00:46:57 -03:00
Bruno Tavares 181f40fabb Renames variable on bootstrap script to not confuse with deployment host target. Also, prevents escaping of variables on the script to use literal $ 2015-09-26 00:42:53 -03:00
Bruno Tavares 0c7f0fe389 Unquote to let word splitting happens and pass the information to ssh. Bug introduced when cleaning up linting warnings. 2015-09-26 00:39:52 -03:00
Bruno Tavares 87060cbc94 Small nit detail 2015-09-26 00:35:28 -03:00
Bruno Tavares d6da54c7ee Fixes container lookup not being able to find a container running for specific image.
docker ps does not receive any more arguments and we have to filter by image ourselves
2015-09-26 00:35:09 -03:00
Bruno Tavares b09cdfc3e4 Fixes error when looking up documentation introduced when cleaning up lint errors 2015-09-26 00:32:39 -03:00
Bruno Tavares f516cc2dac Renames variable on deployment script to not confuse with deployment host target 2015-09-26 00:32:34 -03:00
Bruno Lara Tavares f3229ab566 Merge pull request #5 from rogeriochaves/patch-3
Remove double quotes from ssh target
2015-09-25 23:47:39 -03:00
Bruno Lara Tavares 583bfa13db Merge pull request #4 from rogeriochaves/patch-2
Remove whitespace from the begining of templates
2015-09-25 11:56:11 -03:00
Bruno Lara Tavares a1c5a34269 Merge pull request #3 from rogeriochaves/patch-1
Use head option in uppercase
2015-09-25 08:43:37 -03:00
Bruno Lara Tavares 0860d143e1 Merge pull request #2 from mindyor/patch-1
typo
2015-06-04 16:19:31 +02:00
Bruno Lara Tavares 4420a365f5 Update README.md 2014-03-07 00:44:02 -03:00