Skip to content

Latest commit

 

History

History
224 lines (152 loc) · 9.22 KB

README_ADMIN.md

File metadata and controls

224 lines (152 loc) · 9.22 KB

#Develop With Passion® - Windows Machine Setup for a user running as admin

##For this document it is assumed that you are either running with UAC disbled, or you are running as an account that has full admin privileges on the local machine, and you don't need to explicitly run prompts "As admin".

##The following setup should take between 30-90 minutes to complete depending on your skill level and familiarity with unix based environments.

##Network Security Considerations

  • Make sure that you have access to port 443 for github ssh operations (have your network admins open this up for the week if necessary, to avoid any unecessary complications)

##The main programs you will be installing in this setup are:

  • Git
  • Ruby
  • Mingw
  • VS2015 Community Edition

#Required Setup

The following is the setup that you WILL need to perform to configure all necessary prerequisites to be able to enjoy the week. If you have any questions, please do not hesitate to contact me

##Make sure that you have configured windows to show all hidden files and folders

##Create the utility folder

  1. Open up windows explorer and navigate to your C:\ drive
  2. Create a new folder at the root of C:\ called utils (all lowercase). All of the tools we will install for the week will go into here.

##Get setup at Github

  • Sign up for a free account at github.com. My recommendation is to use an all lowercase username.

##Fork the project repositories for the week

  1. Login to your account at github
  2. Navigate to the following url: http://github.com/2015-10-a-and-m
  3. Click on the code repository: repository
  4. Click on the fork button to create your own copy of the code repository: code

##Install Git for windows

  1. Download Git from here, this is a stable build (older) that is not plagued with weird SSH timeout issues.
  • Run the installer and configure according to the following screenshots:

git_setup_part_1 git_setup_part_2 git_setup_part_3 git_setup_part_4

For the remainder of the document, when asked to open a git bash prompt, use either the Start Menu item you created during the install or navigate to your C:\utils\git folder in explorer and double click on the [Git Bash.vbs] file

##Install Ruby

  1. Download ruby from here. Run the installer and configure according to the following screenshots:

ruby_setup_part_1

##Setup your git ssh authentication key

  1. Open up a git bash prompt

  2. Enter the following command:

    ssh-keygen -t rsa -C your_email_address  

    Accept the defaults for the remaining prompts (leave the passphrase blank).

  3. Navigate to the folder where your ssh key was created (by default your profile ssh folder C:\Users\your_user_name\.ssh)

  4. Open the file id_rsa.pub and copy the contents to the clipboard.

  5. Login to your account at github.

  6. Navigate to your ssh settings

  7. Click on the Add SSH Key Button

  8. Give your key a title and paste the public key that is in your clipboard from step 4 into the Key text entry:

ssh key entry

##Verify that your git ssh authentication works

  1. Open up a git bash prompt

  2. Enter the following command:

  3. If prompted to cache the server identity, type yes.

  4. If you have setup your ssh settings correctly the bottom part of the command output should look similar to the following:

 developwithpassion! You've successfully authenticated, but GitHub does not provide shell access.
 debug1: channel 0: free: client-session, nchannels 1
 Connection to ssh.github.com closed.
 Transferred: sent 3512, received 2008 bytes, in 0.2 seconds
 Bytes per second: sent 20911.4, received 11956.1
 debug1: Exit status 1

##Install Mingw

Click on this link and install according to the following screenshots:

mingw_setup_part_1 mingw_setup_part_2 mingw_setup_part_3 mingw_setup_part_4 mingw_setup_part_5 mingw_setup_part_6 mingw_setup_part_7 mingw_setup_part_8

##Install VS2015 Community Edition

Download the installer for VS2015 Community Edition from here and install according to this screenshot:

vs_20015_setup_part_1

If you already have a copy of visual studio 2015 you can use that, but I would "STRONGLY" recommend installing it to a path that has "NO" spaces in it.

##Clone this repository

  1. Open up a git bash prompt and type the following commands:
cd /c
mkdir course
cd course
git clone https://github.com/2015-10-a-and-m/win_dev_box

##Run the dev box setup

  1. Open up a git bash prompt and run the following commands:
cd /c/course/win_dev_box
./x.bootstrap

When the script completes you will be prompted with the following message:

Change the settings in the file [your login name].settings and rerun the script ./copy_configs

If you followed the setup above correctly, the only setting you should need to change is the username setting under the "github" section. This just needs to be changed to your github username. The ssh_key value is the path to the ssh key that you setup near the top of the document. This should not need to be changed unless you placed/named your key something different.

Here is what your file should look like (before you make the changes you need to):

configure({
  github: {
    ssh_key: '~/.ssh/id_rsa',
    ssh_entry: 'github',
    username: 'YOU NEED TO CHANGE THIS'
  },
  paths: {
    windows:{
      utils: "C:\\utils\\",
      ruby: "C:\\ruby\\223\\",
    },
    unix:{
      utils: '/c/utils/',
      ruby: '/c/utils/ruby/223/',
      mingw: delayed { 
        File.join(settings.paths.unix.utils, 'mingw')
      }
    }
  }
})

As you can see, the only "setting" that has to be changed is your github username. Make any changes that are necessary.

##Completing setup

Open up an git bash prompt.

Type in the following commands:

cd /c/course/win_dev_box
./install_mingw
./copy_configs

##Verify your setup

Close down any existing msys/git bash prompts and open up a new msys prompt (if you have not already, I would recommend having a fast way to activate this, whether it be through a launcher or a shortcut).

If you happened to have put a passphrase on your ssh key (following these steps you would not have), you will be prompted for your passphrase. This is so that it can be stored in the ssh-agent so that you don't need to type it in on successive calls to github.

Type the following command:

devbox

This should successfully have switched your directory to the /c/course/win_dev_box folder

Type the following command:

ssh -v github

If prompted to cache the server identity, type yes. The command output should look similar to the following:

successful authentication

Type the following command:

ruby -v

You should see a ruby version of 2.2.3, if you don't see anything you may need to repeat the steps above as you may have missed a step.

##Your'e done!! That's it for now, the rest of setup will be completed in the first hour of training!

###Optional

  • ReSharper 9 - I installed it to my C:\utils\resharper\9 folder.