-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This starts all services. Closes #7 Signed-off-by: Serge Hallyn <[email protected]>
- Loading branch information
Showing
5 changed files
with
71 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package main | ||
|
||
import ( | ||
"github.com/pkg/errors" | ||
"github.com/project-machine/mos/pkg/mosconfig" | ||
"github.com/urfave/cli" | ||
) | ||
|
||
var bootCmd = cli.Command{ | ||
Name: "boot", | ||
Usage: "start all services listed in mos manifest", | ||
Action: doBootCmd, | ||
} | ||
|
||
func doBootCmd(ctx *cli.Context) error { | ||
opts := mosconfig.DefaultMosOptions() | ||
mos, err := mosconfig.OpenMos(opts) | ||
if err != nil { | ||
return errors.Wrapf(err, "Failed opening mos") | ||
} | ||
|
||
err = mos.Boot() | ||
if err != nil { | ||
return errors.Wrapf(err, "Failed to boot") | ||
} | ||
|
||
return nil | ||
} |
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
[Unit] | ||
Description=mos-boot-setup | ||
After=local-fs.target | ||
After=systemd-journal-flush.service logs.mount | ||
Requires=local-fs.target | ||
[Service] | ||
Type=oneshot | ||
RemainAfterExit=yes | ||
ExecStart=/usr/bin/mosctl boot | ||
StandardOutput=journal+console | ||
StandardError=journal+console | ||
|
||
# Journal namespaces implementation also affects the mount namespaces. | ||
# Assigning a separate journal namespace to Atomix process hides mount points | ||
# like /config and /tmp from the "main" user namespace. | ||
# LogNamespace=atomix | ||
[Install] | ||
WantedBy=multi-user.target |
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