Skip to content

Commit

Permalink
gets status from container
Browse files Browse the repository at this point in the history
- be able to get container status by querying the container on the get call (add to decorator function) is now visible when running (deploy ls) as a status column
  • Loading branch information
gabrielcsapo committed Aug 15, 2017
1 parent 1a195e7 commit 06ab86b
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 3 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# UNRELEASED

- adds the ability to delete deployment and its assets
- adds the ability to delete deployment and its assets
- be able to get container status by querying the container on the get call (add to decorator function) is now visible when running (deploy ls) as a status column

# 0.2.0 (08/14/2017)

Expand Down
9 changes: 7 additions & 2 deletions TODO.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
## Completed

- [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.
- [x] be able retrieve logs
- [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
- [x] be able to get container status by querying the container on the get call (add to decorator function)
- [x] be able to remove an instance and its data (purge)

## Backlog

- [ ] have a pull command that retrieves the contents of a deployed instance
- [ ] be able to get container status by querying the container on the get call (add to decorator function)
- [ ] add timing metrics to cli calls (maybe add just overall function call tracing)
- [ ] add lamba functionality
- [ ] add web gui
- [ ] be able to remove an instance and its data (purge)
1 change: 1 addition & 0 deletions bin/deploy-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ Async.waterfall([
table.cell('url', url);
table.cell('age', moment(r.updated_at).fromNow());
table.cell('requests', r.requests);
table.cell('status', r.status);
table.newRow();
});
table.sort('age|asc');
Expand Down
11 changes: 11 additions & 0 deletions lib/models/deployment.js
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,17 @@ module.exports.decorate = decorate = function decorate(deployment) {
ddeployment.requests = 0;
callback();
});
},
function(callback) {
const container = docker.getContainer(deployment.id);
container.inspect((err, info) => {
if(err) {
ddeployment.status = 'error';
} else {
ddeployment.status = info.State.Status;
}
callback();
});
}
], (error) => {
if(error) return reject(error);
Expand Down

0 comments on commit 06ab86b

Please sign in to comment.