Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Neil Crawford
@bapti
Hi
I've been trying out flightplan, I'm using windows
I got this sudo: no tty present and no askpass program specified as my error for this command sudo -u root -i bash -c 'cd /myproj-ui/development
the whole log is
✈ Running default:development
✈ Connecting to "my-server.com"
✈ Executing remote task on my-server.com
my-server.com $ sudo -u root -i bash -c 'cd /myproj-ui/development'
my-server.com > sudo: no tty present and no askpass program specified
Not quite sure on the next step
Looks like it's connecting ok
Neil Crawford
@bapti
Actually, got it working, just hadn't set up the user correctly have no password for sudo
Patrick Stadler
@pstadler
Exactly @bapti, good to know that you've fixed it. How's it going for you on windows? any problems with keys et al?
Neil Crawford
@bapti
@pstadler - it's going ok, I don't have much (any) experience with deploying to *nix so just finding my way. In your examples you've got a www user that you use for the sudo commands. Would you be able to share how you set up that user and what groups they're in. Do they have to be in the sudo group?
But in regards to windows everything seems to be fine
Patrick Stadler
@pstadler
You probably didn't assume that this would be documented, but it is: https://github.com/pstadler/flightplan#transportsudocommand-options--code-int-stdout-string-stderr-string
Neil Crawford
@bapti
@pstadler I did read that and followed the instructions but I didn't manage to get it working properly. I created a www user and added them to the sudo group. I added that line to the file you describe and made sure that www was a bash user. It ended up getting confused between the home directories of the user I connected with and the www user.
I ended up having a deploy and just do everything within the home directory of the deploy user so that I don't need sudo access for anything and that's working ok. I don't think this is anything to do with your library, just my lack of knowledge with setting up users/permissions on unix
Patrick Stadler
@pstadler
Definitely. User www would be the one which basically owns the whole fancy and the node processes, but no direct ssh access should be granted to him. If you have a team it comes handy to just create an account for each user and grant access to them for sudoing as the true owner of the processes.
This covers basic security and organizational concerns. You know who deployed when because you have user accounts in access logs instead of general one called deploy for example. But there are many ways to achieve this.
Neil Crawford
@bapti
@pstadler thanks for that, makes sense. I've got everyting working now without any sudo needs but I can see how your solution works.
Also have it working from my windows teamcity build agents so pretty much continuous deployment in a couple of days
Much easier than using msdeploy and deploying iis apps!!!
Ravi Sarma
@ravi
Hey folks, before I dip into the code, I wonder if someone knows the answer: if I launch a flightplan across 20 hosts, it fails on the SSH connection on some host and aborts everything. I wonder: (a) if I can get flightplan to tell me which host failed (debug: true doesn’t help), and/or (b) just flightplan to keep going.
Patrick Stadler
@pstadler
a) yes
b) there are ways to fail safely, but not during connection
Please open a ticket regarding (b) if you want to.
Ravi Sarma
@ravi
@pstadler thanks, can you elaborate on (a)? How can I get Flightplan to give me the host for which the SSH connection failed? Creating a GitHub issue for (b).
pstadler/flightplan#92
Patrick Stadler
@pstadler
✈ Running default:test
✈ Connecting to "somehost"
✈ Connecting to "localhost"
● Error connecting to somehost: Error: getaddrinfo ENOTFOUND somehost
Anas AMEZIANE
@anasdox
Hello all, where can i find the API doc of flightplan ? Thanks
Philip Weaver
@philmaker1
In my flightplan, when I try to invoke the commands nvm or node, I get the message "command not found". They both work fine when I ssh in using a terminal window. What am I possibly missing?
Patrick Stadler
@pstadler
@anasdox it's all in the README.
@philmaker1 you should make sure that these commands are in the PATH. See: pstadler/flightplan#98
Philip Weaver
@philmaker1
I'm still having a bit of a difficult time using flightplan. Sometimes things that I can do in the terminal don't work in my flightplan script. For example, I'm currently having trouble registering my ssh key. Permission denied (publickey)
Here is a code sample of what I'm trying to do: http://codeshare.io/BttfN
Nick Tomlin
@NickTomlin
Does anyone have a workflow or guide for a git based flight-plan deploy? Everything i'm seeing focuses on SSH, but i'm used to using git ala capistrano
js
@js08
I have a react app, in which folder name is sports, inside the sports folder I have node modules, inside the node modules folder I have football folder and react folder.
If go to football folder and do npm install react its installing react, which makes my application fail, how to prevent this command npm install react from being successful.
Is it anyway we can right a script to prevent this process to happen, but it should work when we do npm install react in sports folder. Is there any already npm packages which we use it make automatically validated our npm commands.
Patrick Stadler
@pstadler
@rk08 this is not a general node/npm support channel here.
Ashley Roach
@aroach
has anyone set up flightplan through a bastion host? it seems like @pstadler says to look into this project: https://github.com/mscdex/ssh2 -- for doing 'extra' things. In the readme for ssh2, there's an example of "connection hopping" but i'm not sure how to fit that into flightplan.
Alexander Gundermann
@taurose
is there any way to make local.transfer work with encrypted keys on windows? Basic ssh works by passing the passphrase or using pageant, but I can't figure out how to make this work with rsync
Jason Brackins
@leff
Is there an elegant way to share flightplans across projects? I have about 20 repos that all get deployed in exactly the same way. I'd hate to have to copy the flightplan into each one of them. Likewise I'd hate to have to type -f .../path/to/file every time. Thx.
Patrick Stadler
@pstadler
Just add a flightplan.js in each repo which contains something like require('my-shared-flightplan'). my-shared-flightplan should then contain all the setup, e.g. the entry point, typically index.js, contains the actual var plan = require('flightplan'); plan.task()...
Jason Brackins
@leff
Thanks @pstadler, I tired something like that, but 'my-shared-flightplan' wasn't the entry point (because I chucked it in an existing shared tools repo). That didn't work. I'll try separating it out into it's own repo so it's easier to require.
Patrick Stadler
@pstadler
It doesn't have to be the entry point, but your flightplan.js has to export the plan it requires from another file / module. This might points you into the right direction: https://github.com/pstadler/flightplan/issues/82#issuecomment-110849208
Yojan Shrestha
@shri3k
Hi, just curious. How does flightplan know which remote server to hit? I've reading the readme and I'm a little confused on how this works.
Lorenzo
@slackerzz
hi, i'm new to flightplan, i have the same need described in this pstadler/flightplan#142
any help?
Patrick Stadler
@pstadler
widmoser
@widmoser
Hi, I am trying to create a new user via flighplan on the remote host via adduser and I would like the interactive queries to be forwarded. I tried using pty but it has no effect. Is there another way to accomplish this?
Eric
@xeemed_twitter
hey there, i successfully used flightplan multiple times but i ran into a problem lately: i try to connect to a ssh remote without keys and without specifying a password. i only get a "Connecting to 'my-hostname'. but i get no error message at all and the script ends with this message without executing the remote commands
plan.target('staging', {
host: 'my-hostname',
username: 'my-username',
agent: process.env.SSH_AUTH_SOCK
});
Sriharsha Setty
@horsey
Hi folks!
Is there a way I can use flightplan like a library?
That is, I can execute plans without the `fly' command?