Add mac complete script #1

Merged
merged 14 commits into from Jun 25, 2012

Conversation

Projects
None yet
5 participants
@xymostech
Member

xymostech commented Jun 19, 2012

This script should install most everything a new mac needs to develop at Khan.
It might be missing a few things here and there, but it should at least provide
a much better start for new people.

I've been running this multiple times throughout the day, and it shouldn't break anything,
nor should it break if something is already installed (although it might give a few warnings).
It's sorta hard to test to ensure that this works, but each individual part should be pretty obvious.

Please point out any better ways to do anything, they would be most appreciated.

@divad12

Add mac complete setup script
This script should install most everything a new mac needs to develop at Khan.
It might be missing a few things here and there, but it should at least provide
a much better start for new people.
mac-setup.sh
+read -p "Enter your KA email for use in git/hg: " email
+read -p "Enter your full name for use on git/hg: " name
+
+echo "Downloading Command Line Tools (log in to start the download)"

This comment has been minimized.

@divad12

divad12 Jun 19, 2012

How about make this optional for those Mac users who already have it set up?

@divad12

divad12 Jun 19, 2012

How about make this optional for those Mac users who already have it set up?

This comment has been minimized.

@xymostech

xymostech Jun 19, 2012

Member

I was thinking about this. What do you think a good way to make something optional would be? Ask if they've set it up already?

@xymostech

xymostech Jun 19, 2012

Member

I was thinking about this. What do you think a good way to make something optional would be? Ask if they've set it up already?

This comment has been minimized.

@divad12

divad12 Jun 19, 2012

Yeah, just prompt for a yes/no from them I guess.

@divad12

divad12 Jun 19, 2012

Yeah, just prompt for a yes/no from them I guess.

This comment has been minimized.

@sophiebits

sophiebits Jun 19, 2012

Or which gcc?

+
+echo "Installing Homebrew"
+# if homebrew is already installed, don't do it again
+if [ ! -d /usr/local/.git ]

This comment has been minimized.

@divad12

divad12 Jun 19, 2012

FYI: In shell scripts I usually like to put the then on the same line as the if to conserve vertical space, as in

if [ ... ]; then
@divad12

divad12 Jun 19, 2012

FYI: In shell scripts I usually like to put the then on the same line as the if to conserve vertical space, as in

if [ ... ]; then

This comment has been minimized.

@xymostech

xymostech Jun 19, 2012

Member

Ah, that does seem better.

@xymostech

xymostech Jun 19, 2012

Member

Ah, that does seem better.

This comment has been minimized.

@jlfwong

jlfwong Jun 20, 2012

Is there a good reason to check if /usr/local/.git exists instead of just using which brew?

@jlfwong

jlfwong Jun 20, 2012

Is there a good reason to check if /usr/local/.git exists instead of just using which brew?

This comment has been minimized.

@xymostech

xymostech Jun 20, 2012

Member

In case they don't have /usr/local/bin in their $PATH? I don't know. That would probably work fine. The reason I did this is because that seems to be what the brew installer checks (i.e. if you have a /usr/local/.git, the brew install fails)

@xymostech

xymostech Jun 20, 2012

Member

In case they don't have /usr/local/bin in their $PATH? I don't know. That would probably work fine. The reason I did this is because that seems to be what the brew installer checks (i.e. if you have a /usr/local/.git, the brew install fails)

mac-setup.sh
+# brew doctor
+brew doctor
+
+# if no email or name was provided, get it from git

This comment has been minimized.

@divad12

divad12 Jun 19, 2012

This feels a little iffy to me... if no email or name was provided, how about just don't continue with the rest of the script? Also, my GitHub email is not the same as my Kiln/mercurial email, since most of us have personal GitHub accounts using our personal emails. Could probably separately ask for GitHub email and username (if the user doesn't already have this setup).

@divad12

divad12 Jun 19, 2012

This feels a little iffy to me... if no email or name was provided, how about just don't continue with the rest of the script? Also, my GitHub email is not the same as my Kiln/mercurial email, since most of us have personal GitHub accounts using our personal emails. Could probably separately ask for GitHub email and username (if the user doesn't already have this setup).

This comment has been minimized.

@xymostech

xymostech Jun 19, 2012

Member

Ah, I will ask for separate emails.

@xymostech

xymostech Jun 19, 2012

Member

Ah, I will ask for separate emails.

This comment has been minimized.

@xymostech

xymostech Jun 19, 2012

Member

I had it retrieve from git because then if you re-ran it, you wouldn't have to type everything again. On second thought, it probably makes more sense for them just to type again.

@xymostech

xymostech Jun 19, 2012

Member

I had it retrieve from git because then if you re-ran it, you wouldn't have to type everything again. On second thought, it probably makes more sense for them just to type again.

mac-setup.sh
+
+echo "Cloning stable"
+# get the stable branch
+rm -f ~/.hgrc

This comment has been minimized.

@divad12

divad12 Jun 19, 2012

Um... how about back up the old ~/.hgrc if one exists (as .hgrc.orig or something)?

@divad12

divad12 Jun 19, 2012

Um... how about back up the old ~/.hgrc if one exists (as .hgrc.orig or something)?

This comment has been minimized.

@xymostech

xymostech Jun 19, 2012

Member

Fiiine. Protect users' settings, see how I care.

@xymostech

xymostech Jun 19, 2012

Member

Fiiine. Protect users' settings, see how I care.

+sudo cp dummycert.pem /etc/hg-dummy-cert.pem
+rm dummycert.pem
+# setup the .hgrc
+echo "[ui]

This comment has been minimized.

@divad12

divad12 Jun 19, 2012

I haven't looked into this, but is there an equivalent to git-config in Mercurial? It would be nice to not to echo out our own .hgrc since there's already a more complete one in this repo! All we really need is to fill in ui.username... could just remind the user to fill that in at the end or something.

@divad12

divad12 Jun 19, 2012

I haven't looked into this, but is there an equivalent to git-config in Mercurial? It would be nice to not to echo out our own .hgrc since there's already a more complete one in this repo! All we really need is to fill in ui.username... could just remind the user to fill that in at the end or something.

This comment has been minimized.

@xymostech

xymostech Jun 19, 2012

Member

I didn't look into this either. This was basically just the minimal one that would work/included everything that forge said. Is there a way to add the username and not anything else?

@xymostech

xymostech Jun 19, 2012

Member

I didn't look into this either. This was basically just the minimal one that would work/included everything that forge said. Is there a way to add the username and not anything else?

This comment has been minimized.

@sophiebits

sophiebits Jun 19, 2012

perhaps sed -i -e s/stuff/things/ .hgrc

@sophiebits

sophiebits Jun 19, 2012

perhaps sed -i -e s/stuff/things/ .hgrc

This comment has been minimized.

@divad12

divad12 Jun 19, 2012

Hm, I googled for about 2 mins and didn't find anything relevant for accessing environment variables (like $HOME) in nginx config file... I guess we'll have to settle with sed then.

@divad12

divad12 Jun 19, 2012

Hm, I googled for about 2 mins and didn't find anything relevant for accessing environment variables (like $HOME) in nginx config file... I guess we'll have to settle with sed then.

This comment has been minimized.

@sophiebits

sophiebits Jun 19, 2012

That wouldn't work because nginx runs as root anyway probably?

@sophiebits

sophiebits Jun 19, 2012

That wouldn't work because nginx runs as root anyway probably?

This comment has been minimized.

@jlfwong

jlfwong Jun 20, 2012

Another option is using the %include feature of hgrc. From hg help config:

    A line of the form "%include file" will include "file" into the current
    configuration file. The inclusion is recursive, which means that included
    files can include other files. Filenames are relative to the configuration
    file in which the "%include" directive is found. Environment variables and
    "~user" constructs are expanded in "file". This lets you do something
    like:

      %include ~/.hgrc.d/$HOST.rc

    to include a different configuration file on each computer you use.
@jlfwong

jlfwong Jun 20, 2012

Another option is using the %include feature of hgrc. From hg help config:

    A line of the form "%include file" will include "file" into the current
    configuration file. The inclusion is recursive, which means that included
    files can include other files. Filenames are relative to the configuration
    file in which the "%include" directive is found. Environment variables and
    "~user" constructs are expanded in "file". This lets you do something
    like:

      %include ~/.hgrc.d/$HOST.rc

    to include a different configuration file on each computer you use.

This comment has been minimized.

@xymostech

xymostech Jun 20, 2012

Member

Oohh. That actually looks like the best route.

@xymostech

xymostech Jun 20, 2012

Member

Oohh. That actually looks like the best route.

+
+echo "Setting up ssh keys"
+
+# if there is no ssh key, make one

This comment has been minimized.

@divad12

divad12 Jun 19, 2012

Default SSH keys can also be named id_dsa{,.pub}.... (Mine is.)

@divad12

divad12 Jun 19, 2012

Default SSH keys can also be named id_dsa{,.pub}.... (Mine is.)

This comment has been minimized.

@xymostech

xymostech Jun 19, 2012

Member

Woah. I have never seen that before! Okay, I'll add that too.

@xymostech

xymostech Jun 19, 2012

Member

Woah. I have never seen that before! Okay, I'll add that too.

mac-setup.sh
+
+read
+
+echo "Cloning exercises (you will probably have to type your ssh key password)"

This comment has been minimized.

@divad12

divad12 Jun 19, 2012

This can probably be skipped... khan-exercises is already a subrepo of the main website mercurial repo (cloned as stable).

@divad12

divad12 Jun 19, 2012

This can probably be skipped... khan-exercises is already a subrepo of the main website mercurial repo (cloned as stable).

This comment has been minimized.

@xymostech

xymostech Jun 19, 2012

Member

is it cloned as the ssh version, though, or the http version? (i.e. we can write to the ssh version, but not the http version) if the subrepo uses the ssh version then we can just use that. Or we could modify the .ssh/config in the subrepo or something...

@xymostech

xymostech Jun 19, 2012

Member

is it cloned as the ssh version, though, or the http version? (i.e. we can write to the ssh version, but not the http version) if the subrepo uses the ssh version then we can just use that. Or we could modify the .ssh/config in the subrepo or something...

This comment has been minimized.

@divad12

divad12 Jun 19, 2012

I checked and it's the ssh version... I usually edit files in khan-exercises by editing in the subrepo, committing in git, doing a substate commit in the mercurial repo, and then pushing in mercurial (which also pushes the git subrepo to GitHub (but prompts for username and password)). That is, if I want the change to go live.

@divad12

divad12 Jun 19, 2012

I checked and it's the ssh version... I usually edit files in khan-exercises by editing in the subrepo, committing in git, doing a substate commit in the mercurial repo, and then pushing in mercurial (which also pushes the git subrepo to GitHub (but prompts for username and password)). That is, if I want the change to go live.

This comment has been minimized.

@xymostech

xymostech Jun 19, 2012

Member

Ah, okay. Then I will delete this.

@xymostech

xymostech Jun 19, 2012

Member

Ah, okay. Then I will delete this.

This comment has been minimized.

@sophiebits

sophiebits Jun 19, 2012

@divad12 pretty sure all people who seriously work on exercises have a separate clone of it.

@sophiebits

sophiebits Jun 19, 2012

@divad12 pretty sure all people who seriously work on exercises have a separate clone of it.

This comment has been minimized.

@divad12

divad12 Jun 19, 2012

@spicyj I believe you, that's probably a good idea for those who work on exercises. Everybody should have a local app engine server running but currently not everybody is on the exercises team....

@divad12

divad12 Jun 19, 2012

@spicyj I believe you, that's probably a good idea for those who work on exercises. Everybody should have a local app engine server running but currently not everybody is on the exercises team....

This comment has been minimized.

@sophiebits

sophiebits Jun 19, 2012

(Actually, exercises people don't need the website repo…)

@sophiebits

sophiebits Jun 19, 2012

(Actually, exercises people don't need the website repo…)

This comment has been minimized.

@xymostech

xymostech Jun 19, 2012

Member

That's not true. What if we need to test out how exercises look on the real site? Or with the scratchpad or something?

@xymostech

xymostech Jun 19, 2012

Member

That's not true. What if we need to test out how exercises look on the real site? Or with the scratchpad or something?

This comment has been minimized.

@sophiebits

sophiebits Jun 19, 2012

Once upon a time, khan-exercises actually looked like the real site.

@sophiebits

sophiebits Jun 19, 2012

Once upon a time, khan-exercises actually looked like the real site.

This comment has been minimized.

@divad12

divad12 Jun 19, 2012

Your call Emily, this is bikeshed to me.

@divad12

divad12 Jun 19, 2012

Your call Emily, this is bikeshed to me.

mac-setup.sh
+
+echo "Getting development tools"
+# download a bunch of developer tools
+mkdir -p devtools

This comment has been minimized.

@divad12

divad12 Jun 19, 2012

Should we cd into the ~/khan directory before doing this?

@divad12

divad12 Jun 19, 2012

Should we cd into the ~/khan directory before doing this?

This comment has been minimized.

@xymostech

xymostech Jun 19, 2012

Member

We do, on line 100

@xymostech

xymostech Jun 19, 2012

Member

We do, on line 100

This comment has been minimized.

@divad12

divad12 Jun 19, 2012

Ah, cool, sorry I missed that.

@divad12

divad12 Jun 19, 2012

Ah, cool, sorry I missed that.

mac-setup.sh
+
+echo "Setting up nginx"
+# setup the nginx configuration file
+echo "worker_processes 1;

This comment has been minimized.

@divad12

divad12 Jun 19, 2012

Instead of echoing this out, why don't we put this file in the dotfiles repo here, clone this repo, and symlink it? Would also be helpful to emit a bit more documentation as we go (eg. link to http://desmondbrand.com 's blog post).

@divad12

divad12 Jun 19, 2012

Instead of echoing this out, why don't we put this file in the dotfiles repo here, clone this repo, and symlink it? Would also be helpful to emit a bit more documentation as we go (eg. link to http://desmondbrand.com 's blog post).

This comment has been minimized.

@xymostech

xymostech Jun 19, 2012

Member

I guess the real problem is that both of the servers use $USER in the root line, which automatically gets replaced here. If there's a better way to do this, then I'd definitely go for symlinking.

@xymostech

xymostech Jun 19, 2012

Member

I guess the real problem is that both of the servers use $USER in the root line, which automatically gets replaced here. If there's a better way to do this, then I'd definitely go for symlinking.

+sudo launchctl load -w /Library/LaunchDaemons/homebrew.mxcl.nginx.plist
+
+echo "Setting up App Engine Launcher"
+curl -s http://googleappengine.googlecode.com/files/GoogleAppEngineLauncher-1.6.6.dmg > ~/Downloads/GoogleAppEngineLauncher-1.6.6.dmg

This comment has been minimized.

@divad12

divad12 Jun 19, 2012

Is there a URL for the latest version?

@divad12

divad12 Jun 19, 2012

Is there a URL for the latest version?

This comment has been minimized.

@xymostech

xymostech Jun 19, 2012

Member

I don't think so. We can just update the script when we need to.

@xymostech

xymostech Jun 19, 2012

Member

I don't think so. We can just update the script when we need to.

mac-setup.sh
+
+echo "Downloading Command Line Tools (log in to start the download)"
+# download the command line tools
+open "https://developer.apple.com/downloads/download.action?path=Developer_Tools/command_line_tools_for_xcode__june_2012/command_line_tools_for_xcode_june_2012.dmg"

This comment has been minimized.

@divad12

divad12 Jun 19, 2012

nit: (feel free to put this off) Is there a URL for latest version?

@divad12

divad12 Jun 19, 2012

nit: (feel free to put this off) Is there a URL for latest version?

This comment has been minimized.

@xymostech

xymostech Jun 19, 2012

Member

I don't think there is one for this either. However, this one is probably better left alone, in case apple does something crazy with the command line tools and breaks stuff in much later versions.

@xymostech

xymostech Jun 19, 2012

Member

I don't think there is one for this either. However, this one is probably better left alone, in case apple does something crazy with the command line tools and breaks stuff in much later versions.

xymostech added some commits Jun 19, 2012

Make names/emails more definite
Don't get from git, and seperate into github and mercurial emails
@divad12

This comment has been minimized.

Show comment
Hide comment
@divad12

divad12 Jun 19, 2012

Sweet, thanks for doing this! I'm sure many people while setting up their dev environments have said, one day, I will write a script to automate EVERYTHING! I know I certainly did. I think @tomyedwab has a TODO comment about this on our Forge. Except... you actually did it!

Also, probably a Makefile could work too since dividing up the work into recipes naturally modularizes the stuff to be done and lets end users pick what they want. I'm fine with this though for now.

Also, feel free to take all my comments as suggestions... what you have is great for devs who've done this setup process before and want to set up another machine, but for new employees or those who may already have a partially set up machine, we probably want to be a bit more cautious and not delete forever the ~/.hgrc and some of my other review comments like that.

@tomyedwab @phleet more review?

divad12 commented Jun 19, 2012

Sweet, thanks for doing this! I'm sure many people while setting up their dev environments have said, one day, I will write a script to automate EVERYTHING! I know I certainly did. I think @tomyedwab has a TODO comment about this on our Forge. Except... you actually did it!

Also, probably a Makefile could work too since dividing up the work into recipes naturally modularizes the stuff to be done and lets end users pick what they want. I'm fine with this though for now.

Also, feel free to take all my comments as suggestions... what you have is great for devs who've done this setup process before and want to set up another machine, but for new employees or those who may already have a partially set up machine, we probably want to be a bit more cautious and not delete forever the ~/.hgrc and some of my other review comments like that.

@tomyedwab @phleet more review?

mac-setup.sh
+ expires epoch;
+ }
+ }
+}" | sudo tee /usr/local/etc/nginx/nginx.conf >/dev/null

This comment has been minimized.

@divad12

divad12 Jun 19, 2012

Could we append to this file or backup the old one?

@divad12

divad12 Jun 19, 2012

Could we append to this file or backup the old one?

This comment has been minimized.

@jlfwong

jlfwong Jun 20, 2012

Why use sudo tee instead of just sudo echo "..." > /usr/local/etc/nginx/nginx.conf?

Also, IMO, it'd be better to have this thing in a file and template this with sed. If that turns out to be a pain, then this is fine.

@jlfwong

jlfwong Jun 20, 2012

Why use sudo tee instead of just sudo echo "..." > /usr/local/etc/nginx/nginx.conf?

Also, IMO, it'd be better to have this thing in a file and template this with sed. If that turns out to be a pain, then this is fine.

This comment has been minimized.

@xymostech

xymostech Jun 20, 2012

Member

Because you can't sudo echo >, because then echo gets run as root but > doesn't. See: http://stackoverflow.com/questions/82256/how-do-i-use-sudo-to-redirect-output-to-a-location-i-dont-have-permission-to-wr

This comment has been minimized.

@xymostech

xymostech Jun 20, 2012

Member

For the templating, should I still overwrite the file with a templated version, or should change the copy in the repository and link it to the right spot?

@xymostech

xymostech Jun 20, 2012

Member

For the templating, should I still overwrite the file with a templated version, or should change the copy in the repository and link it to the right spot?

This comment has been minimized.

@jlfwong

jlfwong Jun 20, 2012

I would modify the version of the repo, then have this script do an in place sed.

Also, thanks for the explanation about sudo echo - TIL!

@jlfwong

jlfwong Jun 20, 2012

I would modify the version of the repo, then have this script do an in place sed.

Also, thanks for the explanation about sudo echo - TIL!

This comment has been minimized.

@xymostech

xymostech Jun 20, 2012

Member

I mean, should we end up with this script changing files in here with user-specific changes? The problem I see is that then, when someone who's working on it runs the script, then this file is marked as modified and might be pushed. Would a non-in-place sed work well too?

@xymostech

xymostech Jun 20, 2012

Member

I mean, should we end up with this script changing files in here with user-specific changes? The problem I see is that then, when someone who's working on it runs the script, then this file is marked as modified and might be pushed. Would a non-in-place sed work well too?

This comment has been minimized.

@jlfwong

jlfwong Jun 20, 2012

That's a good point - it would mean undoing changes every time you want to test.

Non-in-place sounds good.

@jlfwong

jlfwong Jun 20, 2012

That's a good point - it would mean undoing changes every time you want to test.

Non-in-place sounds good.

@osnr

This comment has been minimized.

Show comment
Hide comment
@osnr

osnr Jun 19, 2012

I don't think it checks out the khan-exercises repo?

osnr commented Jun 19, 2012

I don't think it checks out the khan-exercises repo?

@sophiebits

This comment has been minimized.

Show comment
Hide comment
@sophiebits

sophiebits Jun 19, 2012

Indeed, that was just removed because David thought it was unhelpful. (You could work inside stable/khan-exercises.)

Indeed, that was just removed because David thought it was unhelpful. (You could work inside stable/khan-exercises.)

mac-setup.sh
+ server {
+ listen 127.0.0.1:80;
+ server_name exercises.ka.local;
+ root /Users/$USER/khan/khan-exercises;

This comment has been minimized.

@osnr

osnr Jun 19, 2012

Okay, was just expecting it to clone to this path.

@osnr

osnr Jun 19, 2012

Okay, was just expecting it to clone to this path.

This comment has been minimized.

@sophiebits

sophiebits Jun 19, 2012

Oh, hey.

mac-setup.sh
+ exit 1
+fi
+
+read -p "Have you installed the command line tools? y/n [n] " clt_installed

This comment has been minimized.

@jlfwong

jlfwong Jun 20, 2012

This is really vague to me - I have xcode command line utilities, but I wouldn't have known what to answer to this. It should probably at least say "the Xcode command line tools" and maybe "includes gcc".

You could even do a which gcc or some other feature detection to see if they have them, then not even prompt them if they do.

@jlfwong

jlfwong Jun 20, 2012

This is really vague to me - I have xcode command line utilities, but I wouldn't have known what to answer to this. It should probably at least say "the Xcode command line tools" and maybe "includes gcc".

You could even do a which gcc or some other feature detection to see if they have them, then not even prompt them if they do.

This comment has been minimized.

@xymostech

xymostech Jun 20, 2012

Member

If someone has gcc, can we be sure that everything is set up correctly? If so, then this would definitely be the better route. I will change the wording for now, though.

@xymostech

xymostech Jun 20, 2012

Member

If someone has gcc, can we be sure that everything is set up correctly? If so, then this would definitely be the better route. I will change the wording for now, though.

This comment has been minimized.

@jlfwong

jlfwong Jun 20, 2012

I'm not confident that having gcc means you have xcode command line tools, so yeah - sticking with wording changes sounds good.

@jlfwong

jlfwong Jun 20, 2012

I'm not confident that having gcc means you have xcode command line tools, so yeah - sticking with wording changes sounds good.

+brew update > /dev/null
+
+# make the cellar
+mkdir -p /usr/local/Cellar

This comment has been minimized.

@jlfwong

jlfwong Jun 20, 2012

I don't remember having to do this when I installed homebrew - does it do it for you?

@jlfwong

jlfwong Jun 20, 2012

I don't remember having to do this when I installed homebrew - does it do it for you?

This comment has been minimized.

@xymostech

xymostech Jun 20, 2012

Member

I actually checked this a bunch, and apparently this is now needed. It might be a bug in brew though.

Edit: this actually just causes brew doctor to fail, but it doesn't do any of the other checks if this isn't there so it is important.

@xymostech

xymostech Jun 20, 2012

Member

I actually checked this a bunch, and apparently this is now needed. It might be a bug in brew though.

Edit: this actually just causes brew doctor to fail, but it doesn't do any of the other checks if this isn't there so it is important.

This comment has been minimized.

@jlfwong

jlfwong Jun 20, 2012

Ah - I'm guessing the first brew install creates that directory if it doesn't exist.

If you have the time - you should file a bug against homebrew for that. brew doctor failing if run immediately after homebrew is installed is silly.

@jlfwong

jlfwong Jun 20, 2012

Ah - I'm guessing the first brew install creates that directory if it doesn't exist.

If you have the time - you should file a bug against homebrew for that. brew doctor failing if run immediately after homebrew is installed is silly.

This comment has been minimized.

@xymostech

xymostech Jun 20, 2012

Member

Yes, it is created as soon as something is installed. It's referenced in this bug: mxcl/homebrew#12870 which says that you should just install something...

@xymostech

xymostech Jun 20, 2012

Member

Yes, it is created as soon as something is installed. It's referenced in this bug: mxcl/homebrew#12870 which says that you should just install something...

This comment has been minimized.

@jlfwong

jlfwong Jun 20, 2012

That's really stupid. It should at least say something like "Have you installed anything yet?".

Anyway - manually making the directory is fine.

@jlfwong

jlfwong Jun 20, 2012

That's really stupid. It should at least say something like "Have you installed anything yet?".

Anyway - manually making the directory is fine.

mac-setup.sh
+
+echo "Installing mercurial"
+# install mercurial
+sudo pip -q install Mercurial

This comment has been minimized.

@jlfwong

jlfwong Jun 20, 2012

Why do we need a copy of mercurial outside of the virtualenv?

@jlfwong

jlfwong Jun 20, 2012

Why do we need a copy of mercurial outside of the virtualenv?

This comment has been minimized.

@xymostech

xymostech Jun 20, 2012

Member

We probably don't?

@xymostech

xymostech Jun 20, 2012

Member

We probably don't?

This comment has been minimized.

@jlfwong

jlfwong Jun 20, 2012

I think this is probably going to cause more problems than it's worth - especially if the system python happens to be 2.5.

@jlfwong

jlfwong Jun 20, 2012

I think this is probably going to cause more problems than it's worth - especially if the system python happens to be 2.5.

This comment has been minimized.

@xymostech

xymostech Jun 20, 2012

Member

Ha. Good point.

@xymostech

xymostech Jun 20, 2012

Member

Ha. Good point.

mac-setup.sh
+
+echo "Setting up your .hgrc"
+# make the dummy certificate
+yes "" | openssl req -new -x509 -extensions v3_ca -keyout /dev/null -out dummycert.pem -days 3650 -passout pass:pass 2> /dev/null

This comment has been minimized.

@jlfwong

jlfwong Jun 20, 2012

This is probably right, but I don't have this - what is this?

@jlfwong

jlfwong Jun 20, 2012

This is probably right, but I don't have this - what is this?

This comment has been minimized.

@xymostech

xymostech Jun 20, 2012

Member

This gets rid of the weird problems in mercurial pulls/pushes about unverified certificates. You'll see the relevant line in the .hgrc under web.cacerts.

@xymostech

xymostech Jun 20, 2012

Member

This gets rid of the weird problems in mercurial pulls/pushes about unverified certificates. You'll see the relevant line in the .hgrc under web.cacerts.

@jlfwong

This comment has been minimized.

Show comment
Hide comment
@jlfwong

jlfwong Jun 20, 2012

This is awesome!

Having fast setup makes engineering onboarding so nice.

jlfwong commented Jun 20, 2012

This is awesome!

Having fast setup makes engineering onboarding so nice.

@divad12

This comment has been minimized.

Show comment
Hide comment
@divad12

divad12 Jun 20, 2012

Whoops, I still have to merge this in! I'll do so before games night tonight, or whenever you're ready @xymostech!

Also, one of us will need to update http://khanacademy.org/r/forge docs and the Makefile.

divad12 commented Jun 20, 2012

Whoops, I still have to merge this in! I'll do so before games night tonight, or whenever you're ready @xymostech!

Also, one of us will need to update http://khanacademy.org/r/forge docs and the Makefile.

@xymostech

This comment has been minimized.

Show comment
Hide comment
@xymostech

xymostech Jun 20, 2012

Member

I think @phleet and I are still working out a few bugs, but we should be done before tonight.

Member

xymostech commented Jun 20, 2012

I think @phleet and I are still working out a few bugs, but we should be done before tonight.

@divad12

This comment has been minimized.

Show comment
Hide comment
@divad12

divad12 Jun 20, 2012

Sweet. No pressure intended, take your time.

divad12 commented Jun 20, 2012

Sweet. No pressure intended, take your time.

@jlfwong

This comment has been minimized.

Show comment
Hide comment
@jlfwong

jlfwong Jun 20, 2012

Assuming everything works (I don't have an easy way of testing this), lgtm!

How have you been testing this anyway?

Another thing that would make this process even smoother is just having a shell script checked in so we could do curl http://raw.github.com/...... | sh to setup. It could just git clone this repo then run this script. That doesn't need to be in this pull request though.

jlfwong commented Jun 20, 2012

Assuming everything works (I don't have an easy way of testing this), lgtm!

How have you been testing this anyway?

Another thing that would make this process even smoother is just having a shell script checked in so we could do curl http://raw.github.com/...... | sh to setup. It could just git clone this repo then run this script. That doesn't need to be in this pull request though.

@xymostech

This comment has been minimized.

Show comment
Hide comment
@xymostech

xymostech Jun 20, 2012

Member

Bleh. I was checking it the first day because I had a new computer, but since then I haven't been. I'll make a VM and test this.

Member

xymostech commented Jun 20, 2012

Bleh. I was checking it the first day because I had a new computer, but since then I haven't been. I'll make a VM and test this.

@xymostech

This comment has been minimized.

Show comment
Hide comment
@xymostech

xymostech Jun 21, 2012

Member

I just realized, we probably shouldn't be putting nginx.conf in a seperate file that someone needs git to download, when they might not have git before running this....

Member

xymostech commented Jun 21, 2012

I just realized, we probably shouldn't be putting nginx.conf in a seperate file that someone needs git to download, when they might not have git before running this....

@xymostech

This comment has been minimized.

Show comment
Hide comment
@xymostech

xymostech Jun 21, 2012

Member

Or I could do that zipfile thing! That sounds good.

Member

xymostech commented Jun 21, 2012

Or I could do that zipfile thing! That sounds good.

@divad12

This comment has been minimized.

Show comment
Hide comment
@divad12

divad12 Jun 22, 2012

Thanks for all these improvements @xymostech! Tell me when you're ready to have this merged.

divad12 commented Jun 22, 2012

Thanks for all these improvements @xymostech! Tell me when you're ready to have this merged.

divad12 added a commit that referenced this pull request Jun 25, 2012

@divad12 divad12 merged commit f28db65 into Khan:master Jun 25, 2012

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