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

Feature/apt package #461

Merged
merged 17 commits into from
Nov 7, 2016
Merged

Feature/apt package #461

merged 17 commits into from
Nov 7, 2016

Conversation

stevendborrelli
Copy link
Member

@stevendborrelli stevendborrelli commented Nov 1, 2016

  • adds ability to install/remove debian packages
  • refactors some of the code in the package resource to be shared

@stevendborrelli stevendborrelli added this to the 0.4.0 milestone Nov 1, 2016
@ryane
Copy link
Contributor

ryane commented Nov 7, 2016

Haven't figured out exactly why yet but I am getting the following error when trying to apply https://github.com/asteris-llc/converge/blob/1a41999d0730a51fb8982c3c51db5b07a4ac99de/samples/apt.hcl:

$ /vagrant/converge apply --local /vagrant/examples/rbenv/mc.hcl
2016-11-07T15:15:18Z |INFO| serving     addr=:47740 component=rpc
2016-11-07T15:15:18Z |WARN| skipping module verification        component=client
2016-11-07T15:15:18Z |INFO| got status  component=client file=/vagrant/examples/rbenv/mc.hcl id=root/package.apt.mc run=STARTED stage=APPLY
2016-11-07T15:15:19Z |INFO| got status  component=client file=/vagrant/examples/rbenv/mc.hcl id=root run=STARTED stage=APPLY

root/package.apt.mc:
 Error: root/package.apt.mc still has changes after apply: exit status 100
 Messages:
 Has Changes: yes
 Changes:
  mc: "absent" => "present"

Summary: 2 errors, 1 changes

 * root/package.apt.mc: root/package.apt.mc still has changes after apply: exit status 100
 * root: error in dependency "root/package.apt.mc"

(vagrant machine running the ubuntu/xenial64 box)

@ryane
Copy link
Contributor

ryane commented Nov 7, 2016

ignore the above (not using sudo, duh)

apt Package manages system packages with `apt` and `dpkg`. It assumes that
both `apt` and `dpkg` are installed on the system, and that the user has
permissions to install, remove, and query packages.

Copy link
Contributor

Choose a reason for hiding this comment

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

should we add a note about using group to ensure that multiple apt package installations do not run in parallel? (at least until we add an implicit group into the apt resource)

Copy link
Member Author

Choose a reason for hiding this comment

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

added to docs


// Prepare a new package
func (p *Preparer) Prepare(ctx context.Context, render resource.Renderer) (resource.Task, error) {
if p.State == "" {
Copy link
Contributor

Choose a reason for hiding this comment

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

might want to validate that Name != ""

Copy link
Member Author

Choose a reason for hiding this comment

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

added

@stevendborrelli stevendborrelli merged commit a68da17 into master Nov 7, 2016
@stevendborrelli stevendborrelli deleted the feature/apt-package branch November 7, 2016 17:18
@stevendborrelli stevendborrelli mentioned this pull request Nov 8, 2016
BrianHicks pushed a commit that referenced this pull request Dec 22, 2016
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.

2 participants