Skip to content

Automatically pull generator and dashboard before using #50

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Jun 28, 2017

Conversation

grayside
Copy link
Contributor

@grayside grayside commented Jun 21, 2017

Fixes #49

} else {
cmd.out.Error.Fatalf("Machine '%s' is not running.", cmd.machine.Name)
}

return nil
}

func (cmd *Dashboard) LaunchDashboard(machine Machine) {
func (cmd *Dashboard) LaunchDashboard(machine Machine, update bool) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is update confusing here. True means don;t update, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I got that flipped. Will fix.

args := []string{
"container",
"run",
"--rm",
"-it",
"-v", fmt.Sprintf("%s:/generated", cwd),
"--name",
generator_container_name,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we naming the container here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we name the Dashboard container. Since this might actually be done concurrently I'll remove that.

@@ -112,7 +112,7 @@ func (cmd *Start) Run(c *cli.Context) error {

cmd.out.Verbose.Println("Launching Dashboard...")
dash := Dashboard{BaseCommand{machine: cmd.machine, out: cmd.out}}
dash.LaunchDashboard(cmd.machine)
dash.LaunchDashboard(cmd.machine, true)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we update every time we start the VM, why would we want to provide the option to not update in the dashboard command. We should remove that and always update.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My thought was that all containers we use should have an auto-update with the option to suppress.


// If there was an error it implies no previous instance of the image is available
// or that docker operations failed and things will likely go wrong anyway.
if err == nil {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this be combined with the if err == nil above? its the same check

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or it doesn;t matter if it exist locally or not. Just always pull it.

@febbraro febbraro merged commit 31060c0 into develop Jun 28, 2017
@febbraro febbraro deleted the auto-update-generator-image branch June 28, 2017 00:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants