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

github-bot: ansible setup #469

Merged
merged 1 commit into from
Aug 31, 2016
Merged

Conversation

phillipj
Copy link
Member

Sooo, here's my first shot at creating an ansible setup for the bot. Has been run on the test host @jbergstroem created for this purpose, seems to be working nicely.

Primarly installs necessary binaries, checks out the application code from github.com, before starting the created systemd service which runs (and supervises) npm start.

As there's a big ansible refactor just around the corner, these changes doesn't need to be merged asap, but would be nice to get some feedback about obviously missing/wrong parts.

WantedBy=multi-user.target

[Service]
ExecStart=/usr/bin/npm start

This comment was marked as off-topic.

@phillipj
Copy link
Member Author

Thanks for excellent reviews, just what I needed!

@jbergstroem
Copy link
Member

You accidentally checked in ansible-playbook.retry

apt: name="{{ item }}" state=latest
with_items: "{{ baseline_packages }}"
tags: general

This comment was marked as off-topic.

@phillipj
Copy link
Member Author

Just pushed a commit removing some unwanted quotes. I thought every variable should be quoted, that didn't work as expected. Tried this playbook on the server running the bot in production ATM, but couldn't get the bot started afterwards. Suddenly realised a strange directory had been made in /home:

/home# ls
drwxr-xr-x 4 iojs   root   4096 Aug 25 13:41 "iojs"
drwxr-xr-x 5 iojs   iojs   4096 Aug 25 13:47 iojs

@jbergstroem
Copy link
Member

@phillipj you should quote the full string, not the variable. That way it doesn't get escaped.

@jbergstroem
Copy link
Member

Ok, if you've tested that quotes work this is LGTM. Thanks for enduring my nitpick :) Great to have you on board!

@phillipj
Copy link
Member Author

My pleasure, now I almost know how ansible works and your nitpicks was perfect for doing things right™.

I'll squash 14 commits so far, but let you decide when the time is right to merge -- maybe land your big ansible refactoring first for all I know.

This adds an ansible setup for the github-bot. Primarly installs
necessary binaries, checks out the application code from github.com,
before starting the systemd service.

Refs: nodejs#404
PR-URL: nodejs#469
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
@jbergstroem
Copy link
Member

Squash it and see if anyone else in the build group wants to LGTM, then merge at will!

@mhdawson
Copy link
Member

LGTM

@phillipj phillipj merged commit 3d8a0ad into nodejs:master Aug 31, 2016
@phillipj phillipj deleted the ansible-github-bot branch August 31, 2016 06:00
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.

4 participants