Add a form to provision a new instance
This commit is contained in:
parent
80906d3791
commit
53f63d4efd
25 changed files with 367 additions and 236 deletions
|
|
@ -47,7 +47,7 @@ func (r reserve) Run(context wisski_distillery.Context) error {
|
|||
// check that it doesn't already exist
|
||||
logging.LogMessage(context.Stderr, context.Context, "Reserving new WissKI instance %s", slug)
|
||||
if exists, err := dis.Instances().Has(context.Context, slug); err != nil || exists {
|
||||
return errProvisionAlreadyExists.WithMessageF(slug)
|
||||
return errReserveAlreadyExists.WithMessageF(slug)
|
||||
}
|
||||
|
||||
// make it in-memory
|
||||
|
|
@ -59,7 +59,7 @@ func (r reserve) Run(context wisski_distillery.Context) error {
|
|||
// check that the base directory does not exist
|
||||
logging.LogMessage(context.Stderr, context.Context, "Checking that base directory %s does not exist", instance.FilesystemBase)
|
||||
if fsx.IsDirectory(dis.Environment, instance.FilesystemBase) {
|
||||
return errProvisionAlreadyExists.WithMessageF(slug)
|
||||
return errReserveAlreadyExists.WithMessageF(slug)
|
||||
}
|
||||
|
||||
// setup docker stack
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue