-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- adds api and cli action to be able retrieve logs - deals with cleaning up old images - deletes image and container when application is being redeployed - further consolidates deployment logic into the deployment model - starts up containers from cold start - shuts down containers when process is closing - adds caching to static-server - abstract models into their own files and their own collections - fixes the middleware request logger - fixes CLI responses - adds whoami functionality that will show the current logged in user (deploy whoami)
- Loading branch information
1 parent
5e79857
commit dc89a0a
Showing
29 changed files
with
2,918 additions
and
558 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,10 @@ | ||
- [x] be able to persist data | ||
- [x] Once there is a way to store metadata, have an in memory store of a proxy routing to deal with subrouting application. | ||
- [ ] be able retrieve logs | ||
- [x] be able retrieve logs | ||
- [ ] add timing metrics to cli calls (maybe add just overall function call tracing) | ||
- [ ] add lamba functionality | ||
- [ ] add web gui | ||
- [ ] deal with shutting down and cleaning up old images | ||
- [ ] store most recent tars and metadata somewhere to make sure when the service starts back up it will start those sub services also | ||
- [x] deal with shutting down | ||
- [x] deal with cleaning up old images | ||
- [x] store most recent tars and metadata somewhere to make sure when the service starts back up it will start those sub services also | ||
- [ ] have a pull command that retrieves the contents of a deployed instance |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
#!/usr/bin/env node | ||
|
||
const Async = require('async'); | ||
const ora = require('ora'); | ||
|
||
const program = require('commander'); | ||
program | ||
.option('-u, --url [url]', 'The endpoint of the deploy.sh server', 'http://localhost:5000') | ||
.parse(process.argv); | ||
|
||
const name = program.args[0]; | ||
const { getLogs, getCredentials } = require('../lib/helpers/cli')(program.url); | ||
|
||
const spinner = ora(`Opening up url to deployment instance`).start(); | ||
|
||
Async.waterfall([ | ||
function(callback) { | ||
spinner.text = 'Getting deploy keys'; | ||
|
||
getCredentials() | ||
.then((credentials) => callback(null, credentials)) | ||
.catch((ex) => callback(ex, null)); | ||
}, | ||
function(credentials, callback) { | ||
spinner.text = 'Calling log API'; | ||
|
||
const { token, username } = credentials; | ||
|
||
getLogs({ token, username, name }) | ||
.then((response) => callback(null, response)) | ||
.catch((error) => callback(error, null)); | ||
} | ||
], (ex, result) => { | ||
if (ex) return spinner.fail(`API call failed 🙈 ${JSON.stringify({ | ||
ex | ||
}, null, 4)}`); | ||
|
||
spinner.stop(); | ||
const { logs } = result; | ||
|
||
console.log( // eslint-disable-line | ||
logs.map((l) => { | ||
let log = l.split(' '); | ||
log.unshift('-'); | ||
return log.join(' '); | ||
}).join('') | ||
); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.