Split up WissKI Instance code
This commit is contained in:
parent
d7110dd63c
commit
85b5603d9d
16 changed files with 285 additions and 244 deletions
|
|
@ -107,7 +107,7 @@ func (p provision) Run(context wisski_distillery.Context) error {
|
|||
|
||||
// start the container!
|
||||
logging.LogMessage(context.IOStream, "Starting Container")
|
||||
if err := instance.Stack().Up(context.IOStream); err != nil {
|
||||
if err := instance.Barrel().Up(context.IOStream); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ func (p purge) Run(context wisski_distillery.Context) error {
|
|||
|
||||
// remove docker stack
|
||||
logging.LogMessage(context.IOStream, "Stopping and removing docker container")
|
||||
if err := instance.Stack().Down(context.IOStream); err != nil {
|
||||
if err := instance.Barrel().Down(context.IOStream); err != nil {
|
||||
context.EPrintln(err)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ func (rb rebuild) Run(context wisski_distillery.Context) error {
|
|||
var globalErr error
|
||||
for _, instance := range instances {
|
||||
logging.LogOperation(func() error {
|
||||
s := instance.Stack()
|
||||
s := instance.Barrel()
|
||||
if err := logging.LogOperation(func() error {
|
||||
return s.Install(context.IOStream, component.InstallationContext{})
|
||||
}, context.IOStream, "Installing docker stack"); err != nil {
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ func (r reserve) Run(context wisski_distillery.Context) error {
|
|||
}
|
||||
|
||||
// setup docker stack
|
||||
s := instance.ReserveStack()
|
||||
s := instance.Reserve()
|
||||
{
|
||||
if err := logging.LogOperation(func() error {
|
||||
return s.Install(context.IOStream, component.InstallationContext{})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue