Commit Graph

43 Commits

Author SHA1 Message Date
Aleksander Cynarski
368c4e934f find fix 2017-06-06 16:50:57 +02: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
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
Rogério Chaves
7cff074e95 Remove double quotes from ssh target 2015-09-25 20:12:01 -03:00
Bruno Tavares
08a4e1ac77 Reports the deployment execution status 2015-06-26 12:14:22 -03:00
Bruno Tavares
9fd8dcbca0 Lints the completion command 2015-05-20 17:21:27 -03:00
Bruno Tavares
25069f4877 Lints the executable scripts 2015-05-20 17:16:16 -03:00
Bruno Tavares
07f5059cc6 Bootstrap on a temp folder like deploy 2014-03-20 18:37:51 -03:00
Bruno Tavares
5bdabf6556 Deploy kickstart on a tmp folder 2014-03-19 18:23:28 -03:00
Bruno Tavares
ac1009f77a Add commands with - to the output 2014-03-17 18:23:04 -03:00
Bruno Tavares
14c2e2aa83 Make kickstart infect go back to the current folder 2014-03-03 10:59:52 -03:00
Bruno Tavares
e0ef543f92 Add kickstart to PATH under ~/.bash_profile to work with systems that does not use ~/.bashrc by default 2014-03-02 20:13:57 -03:00
Bruno Tavares
c9633bb7b9 Add support for using different docker images
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.
2014-03-02 20:09:25 -03:00
Bruno Tavares
e60e0bbebf Fix module loading logic
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.
2014-02-23 12:48:33 -03:00
Bruno Tavares
b783772864 Add support to send password on deploy 2014-02-21 21:27:32 -03:00
Bruno Tavares
57b73e88fd Add support to debug 2014-02-21 21:14:39 -03:00
Bruno Tavares
c908d00703 Add autocomplete 2014-02-21 19:43:24 -03:00
Bruno Tavares
460fdd57f8 Add doc function 2014-02-21 19:30:18 -03:00
Bruno Tavares
424a7166df Introduce kickstart bootstrap 2014-02-21 17:00:16 -03:00
Bruno Tavares
00f52c7336 Remove debugging from create 2014-02-21 16:08:19 -03:00
Bruno Tavares
b30b745509 Suggest use of docker-ssh when create 2014-02-21 16:02:39 -03:00
Bruno Tavares
47e692b57f Support running with sudo 2014-02-21 15:59:46 -03:00
Bruno Tavares
d3b46b912d Introduce baseline infect 2014-02-20 16:53:59 -03:00
Bruno Tavares
8f9187f034 Ignore compile folder on create project 2014-02-20 15:06:18 -03:00
Bruno Tavares
4229923661 Introduce kickstart help and commands 2014-02-20 13:28:28 -03:00
Bruno Tavares
aae2eb2f41 Introduce kickstart local 2014-02-20 13:24:40 -03:00
Bruno Tavares
092e48e3fd Introduce kickstart root-dir
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
2014-02-20 13:21:15 -03:00
Bruno Tavares
32e708710b Introduce kickstart create 2014-02-20 13:20:31 -03:00
Bruno Tavares
fcfd9c516e Introduce kickstart deploy 2014-02-20 13:19:43 -03:00
Bruno Tavares
a833d374d1 Introduce kickstart compile command 2014-02-20 12:53:48 -03:00
Bruno Tavares
749fbae08c Docker utilities to try out recipes and the commands 2014-02-20 12:49:57 -03:00