Add support for provisioning and rebuilding via interface
This commit is contained in:
parent
f5c5999f44
commit
ddb4bb3546
76 changed files with 1306 additions and 625 deletions
|
|
@ -19,7 +19,7 @@ var (
|
|||
// It validates that slug is a valid name for an instance.
|
||||
//
|
||||
// It does not perform any checks if the instance already exists, or does the creation in the database.
|
||||
func (instances *Instances) Create(slug string, phpversion string) (wissKI *wisski.WissKI, err error) {
|
||||
func (instances *Instances) Create(slug string, system models.System) (wissKI *wisski.WissKI, err error) {
|
||||
|
||||
// make sure that the slug is valid!
|
||||
slug, err = instances.IsValidSlug(slug)
|
||||
|
|
@ -66,7 +66,7 @@ func (instances *Instances) Create(slug string, phpversion string) (wissKI *wiss
|
|||
}
|
||||
|
||||
// docker image
|
||||
wissKI.Liquid.Instance.DockerBaseImage, err = models.GetBaseImage(phpversion)
|
||||
wissKI.Liquid.Instance.System = system
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import (
|
|||
|
||||
"github.com/FAU-CDI/wisski-distillery/internal/dis/component"
|
||||
"github.com/FAU-CDI/wisski-distillery/internal/dis/component/instances"
|
||||
"github.com/FAU-CDI/wisski-distillery/internal/models"
|
||||
"github.com/FAU-CDI/wisski-distillery/pkg/logging"
|
||||
"github.com/tkw1536/goprogram/exit"
|
||||
)
|
||||
|
|
@ -37,7 +38,7 @@ func (purger *Purger) Purge(ctx context.Context, out io.Writer, slug string) err
|
|||
instance, err := purger.Dependencies.Instances.WissKI(ctx, slug)
|
||||
if err == instances.ErrWissKINotFound {
|
||||
fmt.Fprintln(out, "Not found in bookkeeping table, assuming defaults")
|
||||
instance, err = purger.Dependencies.Instances.Create(slug, "")
|
||||
instance, err = purger.Dependencies.Instances.Create(slug, models.System{})
|
||||
}
|
||||
if err != nil {
|
||||
return errPurgeNoDetails.WithMessageF(err)
|
||||
|
|
|
|||
|
|
@ -1,8 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
# This utility script can be used to run all cron tasks.
|
||||
|
||||
cd /var/www/data/project || exit 1
|
||||
export PATH=/var/www/data/project/vendor/bin:$PATH
|
||||
|
||||
drush core-cron
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
# This script can be used to repatch EasyRDF when needed.
|
||||
cd /var/www/data/project/web/modules/contrib/wisski || exit 1
|
||||
EASYRDF_RESPONSE="./vendor/easyrdf/easyrdf/lib/EasyRdf/Http/Response.php"
|
||||
patch -N "$EASYRDF_RESPONSE" < "/patch/easyrdf.patch"
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
# This script can be used to repatch EasyRDF when needed.
|
||||
cd /var/www/data/project/web/modules/contrib/wisski/ || exit 1
|
||||
TRIPLESTABCONTROLLER="./wisski_adapter_sparql11_pb/src/Controller/Sparql11TriplesTabController.php"
|
||||
patch -N "$TRIPLESTABCONTROLLER" < "/patch/triples.patch"
|
||||
|
|
@ -18,7 +18,6 @@ popd || exit 1
|
|||
|
||||
# run the update and clear the cache!
|
||||
drush updatedb --yes
|
||||
# drush cc
|
||||
|
||||
# and reset everything back to normal
|
||||
chmod 755 web/sites/default
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue