MS DHCP » History » Version 3
Kai Stian Olstad, 09/22/2011 08:48 AM
| 1 | 1 | Paul Kelly | h1. MS DHCP |
|---|---|---|---|
| 2 | |||
| 3 | The Microsoft smart-proxy installation procedure is very basic compared to the RPM or APT based solution. |
||
| 4 | |||
| 5 | It is required that this procedure is executed as an administrator. |
||
| 6 | |||
| 7 | 1) Go to the smart-proxy repository at https://github.com/ohadlevy/smart-proxy |
||
| 8 | 2) Select download and choose the latest revision |
||
| 9 | 3) Extract this to a directory that does not have any spaces in its name. |
||
| 10 | 4) Go to the rubyinstaller webpage at http://rubyinstaller.org/downloads/ |
||
| 11 | 5) Download and install the latest ruby 1.8.7 release. (Allow the ruby associations to be installed.) |
||
| 12 | 6) Download and install the latest DevKit release |
||
| 13 | 6.1) ruby dk.rb init |
||
| 14 | 6.2) ruby dk.rb install |
||
| 15 | 7) Open a CMD window and, using *gem install --version X.X.X --platform ?????*, add these gems |
||
| 16 | |||
| 17 | columnize (0.3.2) |
||
| 18 | haml (3.0.24) |
||
| 19 | highline (1.6.1) |
||
| 20 | json (1.4.6 x86-mswin32) |
||
| 21 | linecache (0.43 mswin32) |
||
| 22 | mime-types (1.16) |
||
| 23 | mocha (0.9.11) |
||
| 24 | net-ping (1.3.7) |
||
| 25 | rack (1.2.0) |
||
| 26 | rake (0.8.7) |
||
| 27 | rest-client (1.6.1) |
||
| 28 | sinatra (1.1.0) |
||
| 29 | tilt (1.1) |
||
| 30 | win32-api (1.4.6 x86-mswin32-60) |
||
| 31 | win32-open3 (0.3.2 x86-mswin32-60) |
||
| 32 | win32-service (0.7.1 x86-mswin32-60) |
||
| 33 | windows-api (0.4.0) |
||
| 34 | windows-pr (1.1.2) |
||
| 35 | |||
| 36 | 2 | Kai Stian Olstad | Command to download them all: |
| 37 | <pre> |
||
| 38 | wget http://rubygems.org/downloads/columnize-0.3.2.gem \ |
||
| 39 | http://rubygems.org/downloads/haml-3.0.24.gem \ |
||
| 40 | http://rubygems.org/downloads/highline-1.6.1.gem \ |
||
| 41 | http://rubygems.org/downloads/json-1.4.6-x86-mswin32.gem \ |
||
| 42 | http://rubygems.org/downloads/linecache-0.43-mswin32.gem \ |
||
| 43 | http://rubygems.org/downloads/mime-types-1.16.gem \ |
||
| 44 | http://rubygems.org/downloads/mocha-0.9.11.gem \ |
||
| 45 | http://rubygems.org/downloads/net-ping-1.3.7.gem \ |
||
| 46 | http://rubygems.org/downloads/rack-1.2.0.gem \ |
||
| 47 | http://rubygems.org/downloads/rake-0.8.7.gem \ |
||
| 48 | http://rubygems.org/downloads/rest-client-1.6.1.gem \ |
||
| 49 | http://rubygems.org/downloads/sinatra-1.1.0.gem \ |
||
| 50 | http://rubygems.org/downloads/tilt-1.1.gem \ |
||
| 51 | http://rubygems.org/downloads/win32-api-1.4.6-x86-mswin32-60.gem \ |
||
| 52 | http://rubygems.org/downloads/win32-open3-0.3.2-x86-mswin32-60.gem \ |
||
| 53 | http://rubygems.org/downloads/win32-service-0.7.1-x86-mswin32-60.gem \ |
||
| 54 | http://rubygems.org/downloads/windows-api-0.4.0.gem \ |
||
| 55 | http://rubygems.org/downloads/windows-pr-1.1.2.gem |
||
| 56 | </pre> |
||
| 57 | |||
| 58 | 3 | Kai Stian Olstad | To get it to work on Windows 2008 R2 some of the packages has to change |
| 59 | <pre> |
||
| 60 | columnize (0.3.2) |
||
| 61 | haml (3.0.24) |
||
| 62 | highline (1.6.1) |
||
| 63 | json (1.4.6 x86-mingw32) |
||
| 64 | linecache (0.43 mswin32) |
||
| 65 | mime-types (1.16) |
||
| 66 | mocha (0.9.11) |
||
| 67 | net-ping (1.3.7) |
||
| 68 | rack (1.2.0) |
||
| 69 | rake (0.8.7) |
||
| 70 | rest-client (1.6.1) |
||
| 71 | sinatra (1.1.0) |
||
| 72 | tilt (1.1) |
||
| 73 | win32-api (1.4.6 x86-mingw32) |
||
| 74 | win32-open3 (0.3.2 x86-mingw32) |
||
| 75 | win32-service (0.7.1 x86-mswin32-60) |
||
| 76 | windows-api (0.4.0) |
||
| 77 | windows-pr (1.1.2) |
||
| 78 | </pre> |
||
| 79 | |||
| 80 | Command to download them all: |
||
| 81 | <pre> |
||
| 82 | wget http://rubygems.org/downloads/columnize-0.3.2.gem \ |
||
| 83 | http://rubygems.org/downloads/haml-3.0.24.gem \ |
||
| 84 | http://rubygems.org/downloads/highline-1.6.1.gem \ |
||
| 85 | http://rubygems.org/downloads/json-1.4.6-x86-mingw32.gem \ |
||
| 86 | http://rubygems.org/downloads/linecache-0.43-mswin32.gem \ |
||
| 87 | http://rubygems.org/downloads/mime-types-1.16.gem \ |
||
| 88 | http://rubygems.org/downloads/mocha-0.9.11.gem \ |
||
| 89 | http://rubygems.org/downloads/net-ping-1.3.7.gem \ |
||
| 90 | http://rubygems.org/downloads/rack-1.2.0.gem \ |
||
| 91 | http://rubygems.org/downloads/rake-0.8.7.gem \ |
||
| 92 | http://rubygems.org/downloads/rest-client-1.6.1.gem \ |
||
| 93 | http://rubygems.org/downloads/sinatra-1.1.0.gem \ |
||
| 94 | http://rubygems.org/downloads/tilt-1.1.gem \ |
||
| 95 | http://rubygems.org/downloads/win32-api-1.4.6-x86-mingw32.gem \ |
||
| 96 | http://rubygems.org/downloads/win32-open3-0.3.2-x86-mingw32.gem \ |
||
| 97 | http://rubygems.org/downloads/win32-service-0.7.1-x86-mswin32-60.gem \ |
||
| 98 | http://rubygems.org/downloads/windows-api-0.4.0.gem \ |
||
| 99 | http://rubygems.org/downloads/windows-pr-1.1.2.gem |
||
| 100 | </pre> |
||
| 101 | |||
| 102 | 1 | Paul Kelly | 8) CD to the root of the smart-proxy install directory |
| 103 | 9) Edit config/settings.yml so that it looks a bit like this |
||
| 104 | |||
| 105 | _Sample config/settings.yml file_ |
||
| 106 | <pre> |
||
| 107 | --- |
||
| 108 | # HTTPS settings |
||
| 109 | :ssl_certificate: c:\documents\smart-proxy\config\signed.pem |
||
| 110 | :ssl_private_key: c:\documents\smart-proxy\config\private.pem |
||
| 111 | :ssl_ca_file: c:\documents\smart-proxy\config\ca.pem |
||
| 112 | |||
| 113 | :trusted_hosts: [ foreman.someware.com] |
||
| 114 | |||
| 115 | :daemon: false |
||
| 116 | |||
| 117 | |||
| 118 | # Enable DHCP management |
||
| 119 | :dhcp: true |
||
| 120 | # The vendor can be either isc or native_ms |
||
| 121 | :dhcp_vendor: native_ms |
||
| 122 | # The dhcp_server is only used by the native_ms implementation |
||
| 123 | :dhcp_server: 172.29.90.240 |
||
| 124 | |||
| 125 | # Where our proxy log files are stored |
||
| 126 | # filename or STDOUT |
||
| 127 | # Unix setting |
||
| 128 | #:log_file: log/proxy.log |
||
| 129 | # Windows setting |
||
| 130 | :log_file: c:\tmp\proxy.log |
||
| 131 | # valid options are |
||
| 132 | # Logger::WARN, Logger::DEBUG, Logger::Error, Logger::Fatal, Logger:INFO, LOGGER::UNKNOWN |
||
| 133 | #:log_level: Logger::DEBUG |
||
| 134 | </pre> |
||
| 135 | |||
| 136 | 10) Create the SSL key |
||
| 137 | 10.1) Login to your puppetmaster |
||
| 138 | 10.2) puppetca --generate _Smart-proxy FQDN_. (Do not use an alias here.) |
||
| 139 | 10.3) Copy the private key, the public certificate and the ca.pem from /var/lib/puppet/ssl over to the locations that you specified in the setting file. |
||
| 140 | 11) Test the installation by running ruby bin\smart-proxy.rb |
||
| 141 | 12) Install the program as a service |
||
| 142 | 12.1) ruby extra\register-service.rb |
||
| 143 | 12.2) This may install the service but not run it. If so then try to start the service from the Ordinary Microsoft services snapin utility. |
||
| 144 | 13) You may test connectivity by running the *extra\query.rb* utility from your foreman host. (Note that this file comes from the _extra_ directory in the smart-proxy release.) |