Remote deployment over Redis pubsub
npm install -g stargate
The stargate CLI allows your to push deployments and execute commands on remote servers. It reads from a file in your current working directory,
.stargate, which contains configuation to connect to a Redis server and information about the git repository.
On each remote server, a drone must be running - listening to the Redis server for commands. On your local machine, running stargate will connect to this Redis server and issue said commands.
After installing globalling or running
npm link from a cloned stargate repo, you have access to the
stargate executable, aliased to
$ sg -hUsage: sg command optionsCommands:init Initialize a .stargate filedrone Start a new dronels List running dronespush Deploy the current projectexec Execute a command on remote serversOptions:-v, --verbose Print debug information-h, --help Display this message
On your remote machines, inside a directory with a
.stargate configuation file:
In your working directory:
will execute the
script path in your
.stargate should have this structure:
exportsmyProject =redis:host: 'myproject.com'port: 6379auth: 'superSecretPassword'script: 'executableFile.sh'
...which is autmatically generated by
.stargatercfor use anywhere on the file system
(The MIT License)
Copyright (c) 2011 Cam Pedersen email@example.com
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.