MS DHCP » History » Version 13
Ohad Levy, 02/21/2012 07:45 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 | 12 | Corey Osman | It is not required that the smart-proxy be on the same host as the MS dhcp server. The smart-proxy just needs to be on a windows host that has netsh commands available. |
| 8 | |||
| 9 | 13 | Ohad Levy | # Go to the smart-proxy repository at https://github.com/theforeman/smart-proxy |
| 10 | 4 | Ohad Levy | # Select download and choose the latest revision |
| 11 | # Extract this to a directory that does not have any spaces in its name. |
||
| 12 | # Go to the rubyinstaller webpage at http://rubyinstaller.org/downloads/ |
||
| 13 | 11 | Corey Osman | # Download and install the "ruby 1.8.7 release 334":http://rubyforge.org/frs/download.php/74293/rubyinstaller-1.8.7-p334.exe (Allow the ruby associations to be installed.) |
| 14 | 4 | Ohad Levy | # Open a CMD window and, using *gem install --version X.X.X --platform ?????*, add these gems |
| 15 | 5 | Ohad Levy | <pre> |
| 16 | 1 | Paul Kelly | columnize (0.3.2) |
| 17 | highline (1.6.1) |
||
| 18 | json (1.4.6 x86-mswin32) |
||
| 19 | linecache (0.43 mswin32) |
||
| 20 | mime-types (1.16) |
||
| 21 | mocha (0.9.11) |
||
| 22 | net-ping (1.3.7) |
||
| 23 | rack (1.2.0) |
||
| 24 | rake (0.8.7) |
||
| 25 | rest-client (1.6.1) |
||
| 26 | sinatra (1.1.0) |
||
| 27 | tilt (1.1) |
||
| 28 | win32-api (1.4.6 x86-mswin32-60) |
||
| 29 | win32-open3 (0.3.2 x86-mswin32-60) |
||
| 30 | win32-service (0.7.1 x86-mswin32-60) |
||
| 31 | windows-api (0.4.0) |
||
| 32 | windows-pr (1.1.2) |
||
| 33 | 5 | Ohad Levy | </pre> |
| 34 | 1 | Paul Kelly | |
| 35 | 2 | Kai Stian Olstad | Command to download them all: |
| 36 | <pre> |
||
| 37 | wget http://rubygems.org/downloads/columnize-0.3.2.gem \ |
||
| 38 | http://rubygems.org/downloads/haml-3.0.24.gem \ |
||
| 39 | http://rubygems.org/downloads/highline-1.6.1.gem \ |
||
| 40 | http://rubygems.org/downloads/json-1.4.6-x86-mswin32.gem \ |
||
| 41 | http://rubygems.org/downloads/linecache-0.43-mswin32.gem \ |
||
| 42 | http://rubygems.org/downloads/mime-types-1.16.gem \ |
||
| 43 | http://rubygems.org/downloads/mocha-0.9.11.gem \ |
||
| 44 | http://rubygems.org/downloads/net-ping-1.3.7.gem \ |
||
| 45 | http://rubygems.org/downloads/rack-1.2.0.gem \ |
||
| 46 | http://rubygems.org/downloads/rake-0.8.7.gem \ |
||
| 47 | http://rubygems.org/downloads/rest-client-1.6.1.gem \ |
||
| 48 | http://rubygems.org/downloads/sinatra-1.1.0.gem \ |
||
| 49 | http://rubygems.org/downloads/tilt-1.1.gem \ |
||
| 50 | http://rubygems.org/downloads/win32-api-1.4.6-x86-mswin32-60.gem \ |
||
| 51 | http://rubygems.org/downloads/win32-open3-0.3.2-x86-mswin32-60.gem \ |
||
| 52 | http://rubygems.org/downloads/win32-service-0.7.1-x86-mswin32-60.gem \ |
||
| 53 | http://rubygems.org/downloads/windows-api-0.4.0.gem \ |
||
| 54 | http://rubygems.org/downloads/windows-pr-1.1.2.gem |
||
| 55 | </pre> |
||
| 56 | 3 | Kai Stian Olstad | |
| 57 | To get it to work on Windows 2008 R2 some of the packages has to change |
||
| 58 | <pre> |
||
| 59 | columnize (0.3.2) |
||
| 60 | highline (1.6.1) |
||
| 61 | json (1.4.6 x86-mingw32) |
||
| 62 | linecache (0.43 mswin32) |
||
| 63 | mime-types (1.16) |
||
| 64 | mocha (0.9.11) |
||
| 65 | net-ping (1.3.7) |
||
| 66 | rack (1.2.0) |
||
| 67 | rake (0.8.7) |
||
| 68 | rest-client (1.6.1) |
||
| 69 | sinatra (1.1.0) |
||
| 70 | tilt (1.1) |
||
| 71 | win32-api (1.4.6 x86-mingw32) |
||
| 72 | win32-open3 (0.3.2 x86-mingw32) |
||
| 73 | win32-service (0.7.1 x86-mswin32-60) |
||
| 74 | windows-api (0.4.0) |
||
| 75 | windows-pr (1.1.2) |
||
| 76 | </pre> |
||
| 77 | 6 | Corey Osman | Easy copy and paste method (platform may be different for you. Please check gem environment to find out. |
| 78 | <pre> |
||
| 79 | gem install --version 0.3.2 --platform x86-mingw32 columnize |
||
| 80 | gem install --version 1.6.1 --platform x86-mingw32 highline |
||
| 81 | gem install --version 1.4.6 --platform x86-mingw32 json |
||
| 82 | gem install --version 0.43 --platform x86-mingw32 linecache |
||
| 83 | gem install --version 1.16 --platform x86-mingw32 mime-types |
||
| 84 | gem install --version 0.9.11 --platform x86-mingw32 mocha |
||
| 85 | gem install --version 1.3.7 --platform x86-mingw32 net-ping |
||
| 86 | gem install --version 1.2.0 --platform x86-mingw32 rack |
||
| 87 | gem install --version 0.8.7 --platform x86-mingw32 rake |
||
| 88 | gem install --version 1.6.1 --platform x86-mingw32 rest-client |
||
| 89 | gem install --version 1.1.0 --platform x86-mingw32 sinatra |
||
| 90 | gem install --version 1.1 --platform x86-mingw32 tilt |
||
| 91 | gem install --version 1.4.6 --platform x86-mingw32 win32-api |
||
| 92 | gem install --version 0.3.2 --platform x86-mingw32 win32-open3 |
||
| 93 | gem install --version 0.7.1 --platform x86-mingw32-60 win32-service |
||
| 94 | gem install --version 0.4.0 --platform x86-mingw32 windows-api |
||
| 95 | gem install --version 1.1.2 --platform x86-mingw32 windows-pr |
||
| 96 | </pre> |
||
| 97 | 3 | Kai Stian Olstad | Command to download them all: |
| 98 | <pre> |
||
| 99 | wget http://rubygems.org/downloads/columnize-0.3.2.gem \ |
||
| 100 | http://rubygems.org/downloads/haml-3.0.24.gem \ |
||
| 101 | http://rubygems.org/downloads/highline-1.6.1.gem \ |
||
| 102 | http://rubygems.org/downloads/json-1.4.6-x86-mingw32.gem \ |
||
| 103 | http://rubygems.org/downloads/linecache-0.43-mswin32.gem \ |
||
| 104 | http://rubygems.org/downloads/mime-types-1.16.gem \ |
||
| 105 | http://rubygems.org/downloads/mocha-0.9.11.gem \ |
||
| 106 | http://rubygems.org/downloads/net-ping-1.3.7.gem \ |
||
| 107 | http://rubygems.org/downloads/rack-1.2.0.gem \ |
||
| 108 | http://rubygems.org/downloads/rake-0.8.7.gem \ |
||
| 109 | http://rubygems.org/downloads/rest-client-1.6.1.gem \ |
||
| 110 | http://rubygems.org/downloads/sinatra-1.1.0.gem \ |
||
| 111 | http://rubygems.org/downloads/tilt-1.1.gem \ |
||
| 112 | http://rubygems.org/downloads/win32-api-1.4.6-x86-mingw32.gem \ |
||
| 113 | http://rubygems.org/downloads/win32-open3-0.3.2-x86-mingw32.gem \ |
||
| 114 | http://rubygems.org/downloads/win32-service-0.7.1-x86-mswin32-60.gem \ |
||
| 115 | http://rubygems.org/downloads/windows-api-0.4.0.gem \ |
||
| 116 | http://rubygems.org/downloads/windows-pr-1.1.2.gem |
||
| 117 | </pre> |
||
| 118 | |||
| 119 | 1 | Paul Kelly | 8) CD to the root of the smart-proxy install directory |
| 120 | 9) Edit config/settings.yml so that it looks a bit like this |
||
| 121 | |||
| 122 | _Sample config/settings.yml file_ |
||
| 123 | <pre> |
||
| 124 | --- |
||
| 125 | # HTTPS settings |
||
| 126 | :ssl_certificate: c:\documents\smart-proxy\config\signed.pem |
||
| 127 | :ssl_private_key: c:\documents\smart-proxy\config\private.pem |
||
| 128 | :ssl_ca_file: c:\documents\smart-proxy\config\ca.pem |
||
| 129 | |||
| 130 | :trusted_hosts: [ foreman.someware.com] |
||
| 131 | |||
| 132 | :daemon: false |
||
| 133 | |||
| 134 | |||
| 135 | # Enable DHCP management |
||
| 136 | :dhcp: true |
||
| 137 | # The vendor can be either isc or native_ms |
||
| 138 | :dhcp_vendor: native_ms |
||
| 139 | # The dhcp_server is only used by the native_ms implementation |
||
| 140 | :dhcp_server: 172.29.90.240 |
||
| 141 | |||
| 142 | # Where our proxy log files are stored |
||
| 143 | # filename or STDOUT |
||
| 144 | # Unix setting |
||
| 145 | #:log_file: log/proxy.log |
||
| 146 | # Windows setting |
||
| 147 | :log_file: c:\tmp\proxy.log |
||
| 148 | # valid options are |
||
| 149 | # Logger::WARN, Logger::DEBUG, Logger::Error, Logger::Fatal, Logger:INFO, LOGGER::UNKNOWN |
||
| 150 | #:log_level: Logger::DEBUG |
||
| 151 | </pre> |
||
| 152 | |||
| 153 | 10) Create the SSL key |
||
| 154 | 10.1) Login to your puppetmaster |
||
| 155 | 10.2) puppetca --generate _Smart-proxy FQDN_. (Do not use an alias here.) |
||
| 156 | 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. |
||
| 157 | 11) Test the installation by running ruby bin\smart-proxy.rb |
||
| 158 | 12) Install the program as a service |
||
| 159 | 12.1) ruby extra\register-service.rb |
||
| 160 | 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. |
||
| 161 | 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.) |