-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
apps: App fetch and install using CLI utility
Add implementation of the app fetching and installation methods that make use of the `composectl` utility to perform their action. Signed-off-by: Mike Sul <[email protected]>
- Loading branch information
Showing
4 changed files
with
21 additions
and
5 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,10 +1,17 @@ | ||
#include "appengine.h" | ||
|
||
#include <boost/format.hpp> | ||
#include <boost/process.hpp> | ||
|
||
#include "exec.h" | ||
|
||
namespace ctr { | ||
AppEngine::Result AppEngine::fetch(const App& app) { | ||
// TODO | ||
exec(boost::format{"%s --store %s pull %s --storage-usage-watermark %d"} % composectl_cmd_ % storeRoot() % app.uri % storage_watermark_, "failed to pull compose app"); | ||
return true; | ||
} | ||
void AppEngine::installAppAndImages(const App& app) { | ||
exec(boost::format{"%s --store %s install --compose-dir %s --docker-host %s %s"} % composectl_cmd_ % storeRoot() % installRoot() % dockerHost() % app.uri, "failed to installl compose app"); | ||
} | ||
|
||
} // namespace ctr |
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