Allow laptop to run idempotently #156

Closed
djcp opened this Issue Nov 8, 2013 · 13 comments

Comments

Projects
None yet
5 participants
@djcp
Contributor

djcp commented Nov 8, 2013

I think this would be an excellent feature - allow laptop to run idempotently so that you can re-run with impunity and get new features if/when we add them. I'll take a look today, though I may need some osx testing at some point before a merge.

@ghost ghost assigned djcp Nov 8, 2013

@gabebw

This comment has been minimized.

Show comment Hide comment
@gabebw

gabebw Nov 8, 2013

Contributor

#155 ties into this. I'd love to help via Vagrant.

Contributor

gabebw commented Nov 8, 2013

#155 ties into this. I'd love to help via Vagrant.

@gabebw

This comment has been minimized.

Show comment Hide comment
@gabebw

gabebw Nov 8, 2013

Contributor

Postgres is a blocker, since it fails when it tries to re-init the DB (at least on Mac):

initdb: directory "/usr/local/var/postgres" exists but is not empty
If you want to create a new database system, either remove or empty
the directory "/usr/local/var/postgres" or run initdb
with an argument other than "/usr/local/var/postgres".
failed
Contributor

gabebw commented Nov 8, 2013

Postgres is a blocker, since it fails when it tries to re-init the DB (at least on Mac):

initdb: directory "/usr/local/var/postgres" exists but is not empty
If you want to create a new database system, either remove or empty
the directory "/usr/local/var/postgres" or run initdb
with an argument other than "/usr/local/var/postgres".
failed
@djcp

This comment has been minimized.

Show comment Hide comment
@djcp

djcp Nov 8, 2013

Contributor

Yep. This works a bit different in debian derivatives, so my plan was to make this work there and ideally there'd be minimal changes for the osx side done by those who know osx best.

Contributor

djcp commented Nov 8, 2013

Yep. This works a bit different in debian derivatives, so my plan was to make this work there and ideally there'd be minimal changes for the osx side done by those who know osx best.

@djcp

This comment has been minimized.

Show comment Hide comment
@djcp

djcp Nov 8, 2013

Contributor

See: #159

Contributor

djcp commented Nov 8, 2013

See: #159

croaky added a commit that referenced this issue Nov 24, 2013

@kevinSuttle

This comment has been minimized.

Show comment Hide comment
@kevinSuttle

kevinSuttle Nov 24, 2013

@gabebw

This comment has been minimized.

Show comment Hide comment
@gabebw

gabebw Nov 24, 2013

Contributor

@kevinSuttle Oh that's fancy.

Contributor

gabebw commented Nov 24, 2013

@kevinSuttle Oh that's fancy.

geoffharcourt added a commit to geoffharcourt/laptop that referenced this issue Dec 1, 2013

@kevinSuttle

This comment has been minimized.

Show comment Hide comment
@kevinSuttle

kevinSuttle Dec 5, 2013

Also, heads up. This is what happens when an individual component fails right now (in this case, Postgres) :

kevins-mbp:~ kevinsuttle$ zsh <(curl -s https://raw.github.com/thoughtbot/laptop/master/mac)

Installing Homebrew, a good OS X package manager ...
It appears Homebrew is already installed. If your intent is to reinstall you
should do the following before running this installer again:
    rm -rf /usr/local/Cellar /usr/local/.git && brew cleanup
failed

kevins-mbp:~ kevinsuttle$ brew doctor
Your system is ready to brew.
kevins-mbp:~ kevinsuttle$ brew cleanup
kevins-mbp:~ kevinsuttle$ zsh <(curl -s https://raw.github.com/thoughtbot/laptop/master/mac)

Installing Homebrew, a good OS X package manager ...
It appears Homebrew is already installed. If your intent is to reinstall you
should do the following before running this installer again:
    rm -rf /usr/local/Cellar /usr/local/.git && brew cleanup
failed

Somehow Laptop isn't able to catch this one.
https://github.com/thoughtbot/laptop/blob/master/mac#L49

Also, heads up. This is what happens when an individual component fails right now (in this case, Postgres) :

kevins-mbp:~ kevinsuttle$ zsh <(curl -s https://raw.github.com/thoughtbot/laptop/master/mac)

Installing Homebrew, a good OS X package manager ...
It appears Homebrew is already installed. If your intent is to reinstall you
should do the following before running this installer again:
    rm -rf /usr/local/Cellar /usr/local/.git && brew cleanup
failed

kevins-mbp:~ kevinsuttle$ brew doctor
Your system is ready to brew.
kevins-mbp:~ kevinsuttle$ brew cleanup
kevins-mbp:~ kevinsuttle$ zsh <(curl -s https://raw.github.com/thoughtbot/laptop/master/mac)

Installing Homebrew, a good OS X package manager ...
It appears Homebrew is already installed. If your intent is to reinstall you
should do the following before running this installer again:
    rm -rf /usr/local/Cellar /usr/local/.git && brew cleanup
failed

Somehow Laptop isn't able to catch this one.
https://github.com/thoughtbot/laptop/blob/master/mac#L49

@croaky

This comment has been minimized.

Show comment Hide comment
@croaky

croaky Dec 5, 2013

Contributor

I noticed that this week as well and was hoping @pbrisbin's ! which brew &>/dev/null in #168 will fix it.

Contributor

croaky commented Dec 5, 2013

I noticed that this week as well and was hoping @pbrisbin's ! which brew &>/dev/null in #168 will fix it.

@pbrisbin

This comment has been minimized.

Show comment Hide comment
@pbrisbin

pbrisbin Dec 5, 2013

Contributor

Yeah, the conditional is currently backwards (my bash-branch does fix it, but might be worth a hotfix):

if (( ! $+commands[brew] )); then
  # install homebrew
fi

EDIT: #174

Contributor

pbrisbin commented Dec 5, 2013

Yeah, the conditional is currently backwards (my bash-branch does fix it, but might be worth a hotfix):

if (( ! $+commands[brew] )); then
  # install homebrew
fi

EDIT: #174

@kevinSuttle

This comment has been minimized.

Show comment Hide comment
@kevinSuttle

kevinSuttle Jan 1, 2014

Any movement on this?

Any movement on this?

@djcp djcp added linux and removed linux labels Apr 4, 2014

@djcp

This comment has been minimized.

Show comment Hide comment
@djcp

djcp Apr 4, 2014

Contributor

f24f565 improves idempotency on the linux side but I can't close this until someone on the osx side has figured out what changes are necessary there.

Contributor

djcp commented Apr 4, 2014

f24f565 improves idempotency on the linux side but I can't close this until someone on the osx side has figured out what changes are necessary there.

@croaky

This comment has been minimized.

Show comment Hide comment
@croaky

croaky Apr 11, 2014

Contributor

#216 should meet the mac script's idempotency goal.

Contributor

croaky commented Apr 11, 2014

#216 should meet the mac script's idempotency goal.

@croaky

This comment has been minimized.

Show comment Hide comment
@croaky

croaky Apr 14, 2014

Contributor

This should be all set now.

Contributor

croaky commented Apr 14, 2014

This should be all set now.

@croaky croaky closed this Apr 14, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment