|
|
|
@ -13,7 +13,7 @@ import (
|
|
|
|
|
"strings" |
|
|
|
|
|
|
|
|
|
"git.wegmueller.it/opencloud/opencloud/image/oci" |
|
|
|
|
"git.wegmueller.it/opencloud/opencloud/smf" |
|
|
|
|
"git.wegmueller.it/opencloud/opencloud/svcgen" |
|
|
|
|
"github.com/docker/docker/pkg/fileutils" |
|
|
|
|
"github.com/opencontainers/runtime-spec/specs-go" |
|
|
|
|
"github.com/sirupsen/logrus" |
|
|
|
@ -376,13 +376,13 @@ func CreateEntryPointInZone(cfg *Image) error {
|
|
|
|
|
} |
|
|
|
|
fullPath := filepath.Join("/lib/svc/manifest/application/entrypoint.xml") |
|
|
|
|
|
|
|
|
|
manifestObj := smf.NewManifestFromOCIProcess("oci-entrypoint", smf.OCIEntryPointSVCName, cfg.Milestone, p) |
|
|
|
|
manifestObj.Services[0].Dependent = append(manifestObj.Services[0].Dependent, smf.Dependent{ |
|
|
|
|
manifestObj := svcgen.NewManifestFromOCIProcess("oci-entrypoint", svcgen.OCIEntryPointSVCName, cfg.Milestone, p) |
|
|
|
|
manifestObj.Services[0].Dependent = append(manifestObj.Services[0].Dependent, svcgen.Dependent{ |
|
|
|
|
Name: "oci-process", |
|
|
|
|
Grouping: "require_all", |
|
|
|
|
RestartOn: "none", |
|
|
|
|
ServiceFmri: smf.ServiceFmri{ |
|
|
|
|
Value: smf.OCIProcesSVCName, |
|
|
|
|
ServiceFmri: svcgen.ServiceFmri{ |
|
|
|
|
Value: svcgen.OCIProcesSVCName, |
|
|
|
|
}, |
|
|
|
|
}) |
|
|
|
|
manifestObj.Services[0].PropertyGroup[0].PropVal[0].Value = "transient" |
|
|
|
@ -393,7 +393,7 @@ func CreateEntryPointInZone(cfg *Image) error {
|
|
|
|
|
} |
|
|
|
|
defer manFile.Close() |
|
|
|
|
|
|
|
|
|
if _, err := manFile.WriteString(smf.Header); err != nil { |
|
|
|
|
if _, err := manFile.WriteString(svcgen.Header); err != nil { |
|
|
|
|
return tracerr.Wrap(err) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -403,7 +403,7 @@ func CreateEntryPointInZone(cfg *Image) error {
|
|
|
|
|
return tracerr.Wrap(err) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if err := smf.Import(fullPath); err != nil { |
|
|
|
|
if err := svcgen.Import(fullPath); err != nil { |
|
|
|
|
return tracerr.Wrap(err) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -430,7 +430,7 @@ func CreateProcessInZoneSMF(cfg *Image) error {
|
|
|
|
|
|
|
|
|
|
fullPath := filepath.Join("/lib/svc/manifest/application/oci-process.xml") |
|
|
|
|
|
|
|
|
|
manifestObj := smf.NewManifestFromOCIProcess("oci-process", smf.OCIProcesSVCName, cfg.Milestone, p) |
|
|
|
|
manifestObj := svcgen.NewManifestFromOCIProcess("oci-process", svcgen.OCIProcesSVCName, cfg.Milestone, p) |
|
|
|
|
|
|
|
|
|
if cfg.ExposedPorts != nil { |
|
|
|
|
needsPrivPorts := false |
|
|
|
@ -455,7 +455,7 @@ func CreateProcessInZoneSMF(cfg *Image) error {
|
|
|
|
|
} |
|
|
|
|
defer manFile.Close() |
|
|
|
|
|
|
|
|
|
if _, err := manFile.WriteString(smf.Header); err != nil { |
|
|
|
|
if _, err := manFile.WriteString(svcgen.Header); err != nil { |
|
|
|
|
return tracerr.Wrap(err) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -465,7 +465,7 @@ func CreateProcessInZoneSMF(cfg *Image) error {
|
|
|
|
|
return tracerr.Wrap(err) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if err := smf.Import(fullPath); err != nil { |
|
|
|
|
if err := svcgen.Import(fullPath); err != nil { |
|
|
|
|
return tracerr.Wrap(err) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|