Coder Social home page Coder Social logo

pstadler / flightplan Goto Github PK

View Code? Open in Web Editor NEW
1.8K 1.8K 117.0 364 KB

Run sequences of shell commands against local and remote hosts.

Home Page: https://www.npmjs.com/package/flightplan

License: MIT License

JavaScript 100.00%
deploy devops javascript nodejs ssh tasks

flightplan's Introduction

pstadler.dev Twitter Mastodon LinkedIn

flightplan's People

Contributors

chris-ray-abis avatar danielgtaylor avatar doublerebel avatar g-div avatar gfilardo avatar glebka avatar jason-cooke avatar markbaird avatar pedrokiefer avatar pstadler avatar renarsvilnis avatar steve-obrien avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

flightplan's Issues

Provide way to delete release on disaster

It would be great to have a way to delete the release that I'm pushing in case of disaster. Currently there is a disaster function, but I can't find a way to pass in remote and delete the current release.

Example host configuration question

Is the value of the hist parameter a shell script? If yes, can you post an example of what the contents would be like?

host: 'staging.pstadler.sh'

Thanks

Ignore this please, I just found out that ".sh" is a TLD

Update briefing in run-time

Hi,

I'm from python Fabric world and have just started with nodejs so I'm trying to use flightplan as the tool.

But I'm missing a couple of possibilities with flightplan. Let me first explain the use case:

I'm combining flightplan with aws-sdk so I can with one command create the host to witch I later will deploy to. To group the environment they use the concept of Stack that is a name for the setup, so you can run multiple setup in parallel without interfering. This mean that most of the time the host in the briefing is not known and possible the destination it self is just the stackname and isn't known.

I would like to be able to create the destination and host on the fly. That would mean:

  • Easy access to the briefing object, if the current can be used it would be grate!
  • Enable set of destination in runtime.
  • Late check for requiresDestination,

A use case would look like:

plan.local(['ensure_stack', 'deploy'], function(local){
/* Let AWS-SDK setup the current stack. */

new_destination = host.env.destination; //See issue "Set options on CLI"

hosts = get_all_host_from_AWS();
briefing.destinations[new_destination] = hosts;

})

plan.remote(['push_app','deploy'], function(remote){
/* This will push the app to the newly created hosts as normal */

})

executing in login shell & with path

I noticed my aliases and sourced scripts didn't work as expected (most notably nvm). I believe this is because commands is not executed in a login shell, so the .bashrc / .profile etc. is not applied.

I came up with a workaround though, executing with .sudo() and a user works, but then I cant use .with(), because when sudoing I'm ending up at the users home directory.

so then I needed to cd to the correct path before executing anything again, but now we've ended up with

remote.sudo('cd ~/www/mysite && npm install', {user:'myuser'});

for every command that I need to be executed with a login shell.

could this be done in the same manner as .with() ?

i.e.:

remote.login('myuser', function(){
    remote.with('cd ~/www/mysite', function(){
        remote.exec('npm install');
        ...
    });
});

also, i don't really know how you do .with() since we seem to use the same transport, does it get set through the rest of the flight? why not pass a new modified transport in as argument to the function (I might have missed something here).

like so:

remote.with('cd ~/www/mysite', function(withTransport){
     withTransport.exec('dostuff');
});

otherwise, why the need to pass a function?

Tasks

Howdy,

I am needing a deployment system for a couple of boxes at work, since we are using Node.js, I figured a Node.js deployment system would make sense.

Is there a concept of tasks? I see that it is a provisioning system, but unless I write many different flightplan.js files, I can't define a task list "restart" to restart the box or server. I know that you can do this in Fabric, is there a way to do this?

Rsync issue on Windows - hostname not same as transfer hostname

I have cwRsync on Window. In my flightplan I have:

plan.remote('windows', function(remote) {
remote.log('Preparing destination...');
remote.exec('rm -rf ' + remoteWindowsPath);
remote.exec('mkdir ' + remoteWindowsPath);
});

// fly windows:
plan.local('windows', function(local) {
local.log('Copy files to remote hosts');
var curDir = local.exec('chdir').stdout + '';
local.transfer(curDir + 'myfile', remoteWindowsPath + '/build');
})

I get the following results:

myremotehost.com ● Preparing destination...
myremotehost.com $ rm -rf ~/build
myremotehost.com ● ok
myremotehost.com $ mkdir ~/build
myremotehost.com ● ok

localhost ● Copy files to remote hosts
localhost $ chdir
localhost > C:\src
localhost ● ok
localhost $ rsync --files-from C:\Users\Ken\AppData\Local\Temp\e228633a-7454-46df-8f52-bf9ad0c72323 -az --rsh="ssh -p22"
./ [email protected]:~/build
localhost > --files-from hostname is not the same as the transfer hostname
localhost > rsync error: syntax or usage error (code 1) at main.c(1293) [sender=3.1.1]
localhost ● failed with exit code: 1
✈ Error: rsync --files-from C:\Users\Me\AppData\Local\Temp\e228633a-7454-46df-8f52-bf9ad0c72323 -az --rsh="ssh -p22" ./ [email protected]:~/build failed on localhost

The file C:\Users\Me\AppData\Local\Temp\e228633a-7454-46df-8f52-bf9ad0c72323 contains:

   C:\src\myfile

I cannot determine how to fix the rysync "--files-from hostname is not the same as the transfer hostname" error. I tried:

rsync myfile -az --rsh="ssh -p22" ./ [email protected]:~/build

And that transfers the file ok. So it appears the issue is could be resolved by eliminating the --files-from option.

remote.mv/cp fails because of tty

I'm getting the following when trying to deploy to a staging server without sudo.

✈ Executing flightplan with 2 planned flight(s) to staging

✈ Flight 1/2 launched...

local ● Run build
local ● Copy files to remote hosts
local $ git ls-files
local ● ok
local ● Transfering files to culshaw-sh-1393145175582
local $ (echo "flightplan.js\nindex.html") | rsync --files-from - -azv --rsh="ssh" ./ [email protected]:/tmp/culshaw-sh-1393145175582
local > stdin: is not a tty
local > building file list ... done
local > created directory /tmp/culshaw-sh-1393145175582
local > flightplan.js
local > index.html

local > sent 1015 bytes received 64 bytes 719.33 bytes/sec
local > total size is 2000 speedup is 1.85
local ● ok
✈ Flight 1/2 landed after 990ms

✈ Flight 2/2 launched...

test.test ● Move folder to web root
test.test $ mv /tmp/culshaw-sh-1393145175582 /home/test/deploy/
test.test > stdin: is not a tty
test.test ● failed with exit code: 1
✈ Flight 2/2 aborted after 846ms when mv /tmp/culshaw-sh-1393145175582 /home/test/deploy/ failed on test.test

✈ Flightplan aborted after 1839ms

Any help would be great :)

Support for loops with delay?

How easy would it be to add support for loops? Something like the ability to remote.exec() something in a loop with a delay until a condition is true (say output.code === 0)? I tried the naive approach of using a setTimeout but (understandably) that fails.

Add coffee-script flightplan support.

What do you think about adding coffee-script flightplans, the feature can be added seamlessly without even having to have the coffee-script module as dependency. Are you open to contributions?

How to get user password?

I have somethign like this

plan.target('production', {
    host:     '54.145.*.*',
    username: 'deploy',
    password: '*****',
    agent:    process.env.SSH_AUTH_SOCK
});

But I do not want to have password there. i want to be asked for password during fly command execution. That is because this file is a part of Github repository and I do not what to reveal SSH user name and password.

I know about transfer.prompt() but how can I update data in target?

Allow transfer to be silent or respect .silent()

I'm trying to suppress the output of transport.transfer()

I've tried

local.transfer(filesToCopy, tmpDir , {silent:true});

And

local.silent();
var t = local.transfer(filesToCopy, tmpDir);
local.verbose();

But I'm still seeing output during the flight

localhost $ (echo "./app/co ...  DME.md") | rsync --files-from .... tmpDir

It's a huge blob of text and it makes the other log output useless (because I can't track it). My flightplan is such that the entire build it pushed on each flight. This makes for a huge wall of text.

Am I just doing it wrong or could the transfer be leaking to stdout?

Does not catch requireFail error emitted from Liftoff

Hello,

I upgraded to 0.5.0 today, and discovered my flightplan.coffee was being interpreted as plain JS. Liftoff emits an error requireFail, but that is not caught by Flightplan.

requireFail was triggered because Liftoff uses its own requireLocal to find the local <js-variant> interpreter, and I only previously needed CoffeeScript available globally.

(I have asked if Liftoff would take a PR for global fallback -- gulpjs/liftoff#28 -- but I think the error should be relayed regardless.)

Thanks for your work,

Charles

Remote commands does not work if server has disabled root login

I am working with the server that does not allow root user logins. Looks like this is causing flightplan to fail completely even though I have specified the username in destination in plan briefings.

My SSH keys are correct as flight plan is able to transport file to the server using rsync.

I have following code that fails.

plan.remote(function(remote) {
  remote.log('Move folder to web root');
});

This results in following output in log

✈ Flight 2/2 launched...

✈ Error: Timed out while waiting for handshake
✈ at null._onTimeout (/vagrant/quickauth/node_modules/flightplan/node_modules/ssh2/lib/Connection.js:219:26)
✈ at Timer.listOnTimeout [as ontimeout] (timers.js:110:15)
✈ Flightplan aborted

Any idea what could cause this? Am I missing something.

Cannot install current version with NPM

I am unsure if it is NPM but I am getting the

Flight 1/1 aborted after 7.42 s when Cannot read property 'privateKey' of undefined

error in my flightplan when I don't specify destination. I wanted to get the response mentioned in #17 but I do not.

I am on 0.4.0.

0.4.0 Seems to not be able to find the destination.

This worked in 0.3.1:

var Flightplan = require('flightplan');

var plan = new Flightplan();

plan.briefing({
  debug: false,
  destinations: {
    'production': [{
      host: 'cors.corsproxy.io',
      username: 'www-data',
      agent: process.env.SSH_AUTH_SOCK
    }]
  }
});

plan.remote(function(remote) {
  remote.with('cd corsproxy', function() {
    remote.exec('git pull');
    remote.with('cd src/website', function() {
      remote.exec('bower install');
    });
  });
  remote.exec('supervisorctl restart cors jsonp');
});

But now I'm getting:

$ fly production
✈ Briefing done
✈ default is not a valid destination

The same issue happens from the the example in the readme.

Rsync fails with multiple files

I'm doing exactly the example:

var filesToCopy = local.exec('git ls-files');
// rsync files to all the destination's hosts
local.transfer(filesToCopy, '/tmp/' + tmpDir);

It tries to execute something like:

(echo "package.json\nindex.js") | rsync --files-from - -az --rsh="ssh -p22" ./ [email protected]:/tmp/test_app-1397240380593

Can't get pseudo-tty with SSH

CentOS and RHEL reject sudo commands without tty, which I used to avoid like so,

remote.exec('sudo systemctl restart api', { exec: { pty: true } });

but this has stopped working.

If I change this line: https://github.com/pstadler/flightplan/blob/master/lib/transport/ssh.js#L55, like so,

self._connection.exec(command, { pty: true }, function(err, stream) {

then it works. Are you able to make it possible to pass ssh2 options in through the transport.sudo command? Thanks.

Print available destinations

  • when fly is called without a destination
  • when fly is called with an invalid destination
  • when a puppy appears on my Twitter feed*

*not sure about this one

Available authentication methods: undefined

If I set up my destinations such as the examples:

plan.briefing({
    debug: false,
    destinations: {
        'staging': {
            host: 'host.com',
            username: 'username',
            agent: process.env.SSH_AUTH_SOCK
        }
    }
});

Then I get the following:

✈ Error: Authentication failure. Available authentication methods: undefined
✈ at Connection._tryNextAuth (/Users/dcarlson/dev/waterchase/node_modules/flightplan/node_modules/ssh2/lib/Connection.js:978:15)
✈ at /Users/dcarlson/dev/waterchase/node_modules/flightplan/node_modules/ssh2/lib/Connection.js:1256:21
✈ at Socket.onclose (/Users/dcarlson/dev/waterchase/node_modules/flightplan/node_modules/ssh2/lib/agent.js:187:7)
✈ at Socket.g (events.js:180:16)
✈ at Socket.EventEmitter.emit (events.js:95:17)
✈ at Pipe.close (net.js:465:12)
✈ Flightplan aborted

Any thoughts? Ideally I'd like it to use my SSH key, but fallback to asking for the password if that fails.

Nested with cd.

This is a fairly common pattern we would use with Fabric:

remote.with('cd project', function() {
  remote.exec('git pull');
  remote.with('cd src/website', function() {
    remote.exec('bower install');
  });
  remote.with('cd src/app', function() {
    remote.exec('npm install');
  });
});

Currently the second with cd will be off the home directory so we have to do this:

remote.with('cd project', function() {
  remote.exec('git pull');
});
remote.with('cd project/src/website', function() {
  remote.exec('bower install');
});
remote.with('cd project/src/app', function() {
  remote.exec('npm install');
});

When using privateKey to connect node throws 'fs undefined error'

When connecting a target with only username and privateKey the following error is thrown:
ReferenceError: fs is not defined
at new SSH (/Users/steve/Sites/wordpress-template/node_modules/flightplan/lib/transport/ssh.js:16:7)
at /Users/steve/Sites/wordpress-template/node_modules/flightplan/lib/flight/remote.js:16:23

Fix is to add fs to the list of reuired modules in transport/ssh.js
line 8:
, fs = require('fs');

Remote context in unexpected state

I cannot seem to run some commands via "exec" that I can run on the server directly. For example, when I run a command like this...

remote.exec("npm install")

I am getting a "bash: npm: command not found" error, while running the command via ssh works fine.

Another clue, is that running node -v indicates the version of Node that was installed by default on the system, as opposed to the NVM installed version I get when ssh'ing in.

Also, FWIW, "sudo" is not necessary to run these command on the server, and I am using flightplan with the same user I ssh in with.

Any idea if this a bug or a step I am missing?

Rsync issue on Windows

Hi, I'm trying to set up and use Flightplan on Windows (8) and am having a problem with the command line fly passes to rsync. The double quotes around the filename are the issue.

$(echo "browser/main-built.js") | rsync --files-from - -azv --rsh="ssh" ./ some_host

local > building file list ... local > rsync: link_stat "/cygdrive/c/webapps/clibu/"browser/main-built.js" " failed: No such file or directory (2) done

If I run this directly from the command line without the doubles quotes it works.
(echo browser/main-built.js) | rsync --files-from - -azv --rsh="ssh" ./

I am using Rsync that comes with cwRsync.

I've tried: filesToCopy = ["browser/main-built.js"] and filesToCopy = "browser/main-built.js"

Flightplan looks really good and is something I've been wanting for a while now.

-Neville

Provide flight-specific information on transports

In order to give the user more flexibility during flights (e.g. different functionality per destination) the Transport object should provide some basic information about the current flight:

// local and remote transport
transport.destination;    // 'production'

// remote transport
transport.host.name;      // 'www1.pstadler.sh'
transport.host.username;  // 'pstadler'
transport.host.port;      // 22

// local transport
transport.hosts;          // [{ name: 'www1.pstadler.sh', ... }]

Remote and Local File Support

I like what I see in Flightplan and I'm a heavy user or Fabric. I'm trying to figure out how to cover the basic file handling functionality with Flightplan. I notice that some basic primitives are missing. For example I'd like to to be able to simply pipe a stream to a remote file and vice versa. That allow me to do 100% of what I need to do in terms of build higher level primitives. In general here is what I'm thinking:

http://docs.fabfile.org/en/1.10/api/contrib/files.html

upload_template is of interest as well as "conditional" append

Consider removing C++ dependency

Right now Flightplan depends on the fibers module. Unfortunately the module is written in C++ and requires a C++ compiler to be set up for installation, which is inconvenient. While I personally don't mind, it makes onboarding new developers more difficult.

I don't have much experience with coroutines and promises but maybe another library could be used?

liftoff 2x / v8flags 2x released

Heya, this is just a friendly note to let you know that a new version of Liftoff and some of the dependencies commonly used in conjunction with it have been released. This release adds better support for situations where your user's configuration files are written using features behind a v8 flag (e.g. --harmony). Windows users and io.js users should see less issues if you upgrade!

Some helpful links:
https://github.com/tkellen/node-liftoff/blob/master/UPGRADING.md#100---200
https://github.com/tkellen/node-v8flags/blob/master/README.md#example
https://github.com/tkellen/node-hacker/blob/master/bin/hacker.js#L10-L14

Thanks!

List of tasks for a destination

(apologies for the issue creation spree)

Would it be generally useful to be able to specify a list of tasks, rather than just one? Something like this:

fly build,deploy:production ./prod-flights.js

Where prod-flight.js might contain:

plan.remote('build', ......);
plan.remote('test', ......);
plan.remote('deploy', ......);

I could use such a feature myself, but perhaps I am using the tool in an unintended or awkward way.

The alternative I guess is to either run the two tasks separately from the command-line or to create tasks like this (which can get unwieldy very fast):

plan.remote([ 'all', 'build-deploy', 'build' ], ......);
plan.remote([ 'all', 'test' ], ......);
plan.remote([ 'all', 'build-deploy', 'deploy'], .....);

Rsync not working when using ".pem" key

Rsync seems to be unable to send the pem key in the right way, because I am getting
"Permission denied (publickey)" error. Whereas doing other operations on the remote destination work without problems.

An example:

plan.briefing({
  destinations: {
    'remote': {
      host: 'ec2-12-34-56.compute-1.amazonaws.com',
      username: 'ubuntu',
      port: 22,
      privateKey: fs.readFileSync('key.pem', { encoding: 'utf8' }).trim()
    }
  }
});

plan.local(function (local) {
  ...
  // this doesn't work
  local.transfer(filesToCopy, '/home/ubuntu/');
});

plan.remote(function (remote) {
  // this works ok
  remote.exec('touch test.txt');
});

Looking at the error message I can see that it is in fact not using the key in the command:

✈ Error: `(echo "testfile.txt") | rsync --files-from - -azv --rsh="ssh -p22" ./ [email protected]:/home/ubuntu/` failed on localhost

Gulp task problem

In my flightplan.js in plan.remote I have this.

remote.exec('gulp publish', {user: 'deploy});

The thing is, that when it is done through flight.js I have _Local gulp not found in ~_ error.

2014-12-23_19-14-40

But if I login to SSH as that user and run this command inside that folder, then it is ok.

Would could it possibly be?

Connection failed

I have connection failed but very strange.

Error connecting to 54.145.. Error: Authentication failure. Available authentication methods: publickey,gssapi-keyex,gssapi-with-mic,password

  1. It makes rsync. SO the connection to SSH must be ok.

  2. When i connect in terminal with ssh [email protected] it works perfect without require login based on default RSA key.

  3. This is how I setup connection

    plan.target('production', {
    host: '54.145.**.**',
    username: 'deploy',
    agent: process.env.SSH_AUTH_SOCK
    });

So this is what I get.
2014-12-23_15-19-32

Stop task when killing

I'm running a task for running a expressjs server on a vagrant machine, something like this:

plan.remote('runserver', function(transport) {
  transport.with('cd myapp', function() {
    transport.exec('node server.js')
  });
});

When I type Ctrl+C to stop the server, flightplan closes but the task doesn't and when i want to run the task again it crashes because the previous process is still running.

At now, I'm killing the process manually in the task, but it would be great if this happen automatically.

Make remote.cd work

How can I make the following work?

plan.remote(function(remote) {
  remote.pwd();
  remote.cd("testfolder");
  remote.pwd();
  remote.git('pull')
  remote.npm('install')
  remote.exec("pm2 reload #{host}")
})

Both calls to pwd() return the same directory.

Additional configuration in briefing per destination

I think it would be nice if we could specify additional configuration options in the briefing. For example, I would like to pass some remote file system paths that are different for each destination. I would be great if we could do something like this:

plan.briefing({
    debug: false,
    destinations: {
        staging: {
            host: 'example.com',
            username: 'user',
            agent: process.env.SSH_AUTH_SOCK,
            deployPath: '/some/path/to/staging'
        },
        production: {
            host: 'example.com',
            username: 'user',
            agent: process.env.SSH_AUTH_SOCK,
            deployPath: '/some/path/to/production'
        }
    }
});

As far as I can see this is not possible, or am I overlooking something?

Cannot find module 'flightplan' : Allow for global only install

I'm confused as to why Flightplan requires both a global and local install.

If you install globally, and then try to run a plan with fly ... you get the error Cannot find module 'flightplan'

Installing locally first fixes the problem, but I don't get why flightplan has to exist in two places.

Solution

Allow Flightplan to run without installing locally.

TypeError: Cannot read property 'username' of undefined

When I try to run flightplan to a destination, such as:

% fly staging
✈ TypeError: Cannot read property 'username' of undefined
✈ at Object.Briefing.applyOptions (/Users/conrfrmn/Documents/dev/boulevard/node_modules/flightplan/lib/briefing.js:13:15)
✈ at Object.Flightplan.start (/Users/conrfrmn/Documents/dev/boulevard/node_modules/flightplan/lib/flightplan.js:329:23)
✈ at Object.<anonymous> (/usr/local/lib/node_modules/flightplan/bin/fly.js:63:12)
✈ at Module._compile (module.js:456:26)
✈ at Object.Module._extensions..js (module.js:474:10)
✈ at Module.load (module.js:356:32)
✈ at Function.Module._load (module.js:312:12)
✈ at Function.Module.runMain (module.js:497:10)
✈ at startup (node.js:119:16)
✈ at node.js:906:3
✈ Flightplan aborted

this is my flightplan.js config

// flightplan.js
var Flightplan = require('flightplan');
var tmpDir = new Date().getTime();
var plan = new Flightplan();

// configuration
plan.briefing({
    debug: false,
    destinations: {
        'staging': {
            host: 'XXX.com',
            username: 'usrname',
            releases: 'deployments/site/',
            current: 'public_html/site',
            agent: '/tmp/foo'
        },
        'production': {
            host: 'XXX.com',
            username: '',
            releases: 'deployments/',
            current: 'www',
            agent: '/tmp/foo'
        }
    }
});

// run commands on localhost
plan.local(function(local) {
    local.log('Run build');
    local.exec('rm -rf dist');
    local.exec('gulp --gulpfile gulpfile-' + plan.target.destination + '.js');

    local.log('Copy files to remote hosts');
    var filesToCopy = local.exec('find dist', {silent: true});
    // rsync files to all the destination's hosts
    local.transfer(filesToCopy, '~/' + plan.target.hosts[0].releases + tmpDir);
});

// run commands on remote hosts (destinations)
plan.remote(function(remote) {
    remote.log('Update symlink');
    remote.exec('rm -rf ~/' + plan.target.hosts[0].current);
    remote.exec('ln -s ~/' + plan.target.hosts[0].releases + tmpDir + '/dist/ ~/' + plan.target.hosts[0].current);
});

Set options on CLI

Hi,

I'm from python Fabric world and have just started with nodejs so I'm trying to use flightplan as the tool.

But I'm missing a couple of possibilities with flightplan. Let me first explain the use case:

I'm combining flightplan with aws-sdk so I can with one command create the host to witch I later will deploy to (see "Update briefing in run-time"). To group the environment they use the concept of Stack that is a name for the setup, so you can run multiple setup in parallel without interfering. This name is one of the things I want to be able to set on CLI when deploying.

As you have "stolen" ;) the syntax for this to describe destinations. I propose to add an new option to fly like:

fly -o variable=value deploy
fly --option variable=value deploy

This variable would end up in the plan object eg plan.env so one would access them as:

plan.env.variable

Bower install always fail

When I upload I run this.

$ bower install  ~/deploy/mydomain-com-1419324894507 --production

But it always fail because cannot resolve dependencies. In real world it allow you to chose what version you want and then it resolve to your choice. Here is simply fail.

bower angular-aria#~1.3.8                       extract archive.tar.gz
54.145.167.128 > bower angular-aria#~1.3.8      resolved git://github.com/angular/bower-angular-aria.git#1.3.8
54.145.167.128 > bower                          ECONFLICT Unable to find suitable version for angular

I understand what it say, but I cannot fix it. This is what we have in bower. This is my dependencies.

 "dependencies": {
    "modernizr": "~2.8.3",
    "angular": "~1.3.8",
    "angular-animate": "~1.3.8",
    "angular-aria": "~1.3.8",
    "angular-ui-router": "~0.2.13",
    "angular-ui-bootstrap": "~0.12.0",
    "angular-ui-bootstrap-bower": "~0.12.0",
    "bootstrap": "~3.3.1"
  }

and this is error

2014-12-23_17-02-48

SSH Auth failing

I've been using flightplan on a current project, and everything was working from my home laptop (2012 Macbook Pro). I have to make an emergency deployment from work now, so I've added my SSH-key to the server, and tested it by logging into the server. Now when I try to run fly staging, I get this error:

Error connecting to [redacted ip]: Error: Authentication failure. Available authentication methods: publickey,password

Any idea what's going on here? I've tried with both flightplan 0.4.5 and 0.5.0. On 0.4.5 it says Available authentication methods: undefined instead of publickey,password.

Make flight information available to the flight as it happens

When plans are being executed, variables in the briefing relating to the current flight are accessed via transport.flight.hosts[0].sampleVar.

// configuration
plan.briefing({
    debug: true,
    destinations: {
        'staging': {
            host: 'test.test',
            username: 'test',
            //port: 7889,
            agent: process.env.SSH_AUTH_SOCK,
            sampleVar: 'boosh'
...

It would be nicer to have an accessor here to reference the currently executing flight e.g. transport.flight('sampleVar').

Doesn't work with dash as remote shell (dropbear as remote ssh server)

I use flightplan to deploy my project to Raspberry Pi. In order to optimize RPi I switched from bash to dash.
Connecting over ssh it works fine, PATH available and no issues finding commands. But trying to deploy using flightplan I'm getting issue:

pi Install dependencies
pi $ npm --production --prefix /data/www/aquacontroller-11-01-2015-00-09-41 install /data/www/aquacontroller-11-01-2015-00-09-41
pi > bash: npm: command not found
pi ● failed (127)
● Command exited abnormally on pi

Support for custom "wrappers"

Per the documentation, there are convenience wrappers for common commands like ls. It would be very useful if this feature can be extended such that we can add custom wrappers, and even share them:

var result = transport.getuid('mylogin');
if( result.code === 0 && result.stdout !== 10000 )
    transport.abort("User 'mylogin' already exists with the wrong uid: " + result.stdout);

I realise stdoutin the above is a string, it contains a newline, etc, but I am ignoring that in the interest of keeping example simple. I hope you get what I am driving at.

Since this is a somewhat significant and philosophical issue, I am asking first if this is an interesting direction for the project, rather than sending a PR.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.