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

[WIP] Cleaning up the www setup to match production #54

Closed
wants to merge 8 commits into from

Conversation

kenperkins
Copy link

This is a work in progress; the plan is to get the anisble playbook up to date with production such that we can re-build an identical box in moments should the need arise.

  • Figure out how to setup dist and staging users
  • Figure out how to setup crontab jobs
  • deploy dist-indexer and npm install in /home/dist/dist-indexer
  • get promote_nightly.sh into /home/staging/promote/
  • get update-download-stats.sh into /home/iojs

Current Changes

  • Detected if dhparam.pem exists, saving a boatload of time
  • adding a bunch of paths into the nginx config from /home/dist
  • Added @kenperkins as an authorized_keys member
  • reworked authorized_keys setup to be a bit cleaner
  • added dist, staging users with ssh keys
  • added crontab jobs for promote_nightly.sh and update-download-stats.sh

Open Questions

  • What is /root/mkdldtxt.sh?
  • What is /root/countdldtxt.sh
  • Who is responsible to create /home/dist/public and /home/dist/public-test directories?
  • What is /home/dist/dist-indexer/ls-types.js?
  • What is /home/dist/dist-indexer/transform-filename.js?
  • What are all of the files in /home/staging/promote?
  • Who creates /home/staging/staging directory?

- Detected if dhparam.pem exists, saving a boatload of time
- adding a bunch of paths into the app from /home/dist
- Also sets up authorized_keys for staging, dist
- Includes setting up the id_rsa and id_rsa.pub keys in .ssh
with_items:
- "{{ server_user }}"
- "{{ staging_user }}"
- "{{ dist_user }}"

This comment was marked as off-topic.


- name: Configure | setup cron for download-stats
cron: name="update_download_stats" minute="30" hour="1" job="/home/iojs/update-download-stats.sh" user="root"
tags: setup

This comment was marked as off-topic.

This comment was marked as off-topic.

@kenperkins
Copy link
Author

This is getting close, but I'm unable to find promote_nightly.sh in source control. @rvagg are you able to assist on this? should I just take it from the current production webserver?

@kenperkins
Copy link
Author

Additional open questions:

  • What is /root/mkdldtxt.sh?
  • What is /root/countdldtxt.sh
  • Who is responsible to create /home/dist/public and /home/dist/public-test directories?
  • What is /home/dist/dist-indexer/ls-types.js?
  • What is /home/dist/dist-indexer/transform-filename.js?
  • What are all of the files in /home/staging/promote?
  • Who creates /home/staging/staging directory?

@kenperkins
Copy link
Author

Reminder @rvagg that I'm blocked on finishing this without some input.

@rvagg
Copy link
Member

rvagg commented Apr 15, 2015

Really sorry @kenperkins, I'm a terrible bottle-neck for these things, way too overloaded. Trying to get on top of some of these things now.

What is /root/mkdldtxt.sh?

An initial version of what's in /home/iojs/update-download-stats.sh, it's redundant now. It only ever was meant to be a temporary "let's see what these numbers look like" thing but that script is now run via cron and exposed via https://iojs.org/download-stats.json because ppl asked for it.

What is /root/countdldtxt.sh

Part of the above, redundant now too. There were two scripts to do the job that one is now doing.

Who is responsible to create /home/dist/public and /home/dist/public-test directories?

The promote script(s) are responsible for /home/dist/public/. There is a mkdir -p in there but the root directories should be created by the script I think since they are served by nginx. Currently there needs to be next-nightly, nightly, release (aliased ad https://iojs.org/dist/) and there is also a test directory but that's not controlled by any tool, it's been a place to share some test builds, manually, so unimportant.

What is /home/dist/dist-indexer/ls-types.js?

What is /home/dist/dist-indexer/transform-filename.js?

Parts of dist-indexer https://github.com/iojs/build/tree/master/tools/dist/dist-indexer, but also:

  1. There seems to be an incomplete refactor going on there and I'm wondering if a commit or two got lost somewhere, transform-filename.js should be used by dist-indexer.js as well as ls-types.js but it's only used by the latter with some duplicated code in dist-indexer.js.
  2. ls-types.js is used by the scripts in /usr/local/bin, you'll see there are 3 dist-* scripts there now and they are used for the release process so that authorised release people can run (tools/release.sh](https://github.com/iojs/io.js/blob/v1.x/tools/release.sh) to promote and sign a release without needing to log in to the server. Those files need to become part of a scripted setup of the server too.

What are all of the files in /home/staging/promote?

I've put them in a PR including a README, see #76 and note that they are also invoked by scripts in /usr/local/bin which also need to be part of this setup

Who creates /home/staging/staging directory?

It should be created by server setup. Each of the release build slaves has a jenkins config which makes it ssh in to the server as staging and mkdir -p and then scp in the build artifacts, but as with /home/dist/ we should probably set the basics of it up including the next-nightly, nightly and release subdirectories.

@kenperkins
Copy link
Author

Wow, it's like Christmas morning! Thanks @rvagg I'll try to resurrect this as soon as I can find some engineering time.

@jbergstroem
Copy link
Member

This unfortunately looks stale. Going to close it but feel free to reopen with a rebased version seeing how a lot of the changes has gone in one way or the other.

@jbergstroem jbergstroem closed this May 3, 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.

3 participants