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

Allow deploys via the API #1

Merged
merged 3 commits into from
Dec 1, 2021
Merged

Allow deploys via the API #1

merged 3 commits into from
Dec 1, 2021

Conversation

SimonRichardson
Copy link
Owner

@SimonRichardson SimonRichardson commented Dec 1, 2021

This is the MVP for deploying a charm.

There are no resources deployed here. See the example on how you can deploy.

	applicationsAPI := api.NewApplicationsAPI(client)
	if err := applicationsAPI.Deploy("default", "ubuntu", api.DeployArgs{
		Channel:  charm.MakePermissiveChannel("latest", "stable", ""),
		Revision: -1,
		NumUnits: 1,
	}); err != nil {
		log.Fatalf("%+v\n", err)
	}

This is harder than it looks, it's taken at least a couple of attempts
to get the code to do this. As we end up bringing in the world.
@SimonRichardson SimonRichardson merged commit 9428fbd into main Dec 1, 2021
@SimonRichardson SimonRichardson deleted the deploy branch December 1, 2021 11:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant