Skip to content
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

Provide default InstallURL in EngineOptions for libmachine #5104

Merged
merged 1 commit into from
Aug 18, 2019

Conversation

afbjorklund
Copy link
Collaborator

@afbjorklund afbjorklund commented Aug 16, 2019

Provide defaults for libmachine.

This URL is normally https://get.docker.com, it is used to provision docker if not available:

	if err := installDockerGeneric(provisioner, provisioner.EngineOptions.InstallURL); err != nil {
		return err
	}
func installDockerGeneric(p Provisioner, baseURL string) error {
	// install docker - until cloudinit we use ubuntu everywhere so we
	// just install it using the docker repos
	if output, err := p.SSHCommand(fmt.Sprintf("if ! type docker; then curl -sSL %s | sh -; fi", baseURL)); err != nil {
		return fmt.Errorf("error installing docker: %s", output)
	}

	return nil
}

Currently we use "", which just leads to a weird error from curl (if trying it on another OS).

        "EngineOptions": {
            "ArbitraryFlags": null,
            "Dns": null,
            "GraphDir": "",
            "Env": null,
            "Ipv6": false,
            "InsecureRegistry": [
                "10.96.0.0/12"
            ],
            "Labels": null,
            "LogLevel": "",
            "StorageDriver": "",
            "SelinuxEnabled": false,
            "TlsVerify": false,
            "RegistryMirror": null,
            "InstallURL": ""
        },
curl: no URL specified!
curl: try 'curl --help' or 'curl --manual' for more information

Cherry-picked from the "generic" driver. (#4734)

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Aug 16, 2019
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: afbjorklund

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Aug 16, 2019
@tstromberg
Copy link
Contributor

Do you mind clarifying "why?" in your PR description. I don't understand what the net effect of this change is.

@afbjorklund
Copy link
Collaborator Author

Do you mind clarifying "why?" in your PR description. I don't understand what the net effect of this change is.

Sure thing!

@medyagh medyagh changed the title Provide default InstallURL in EngineOptions Provide default InstallURL in EngineOptions for libmachine Aug 18, 2019
@medyagh medyagh merged commit 86e158e into kubernetes:master Aug 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants