Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixes #12006 - update Windows smart proxy instructions
Closes GH-441
- Loading branch information
Showing
2 changed files
with
68 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,96 +1,30 @@ | ||
|
||
The Microsoft smart-proxy installation procedure is very basic compared to the RPM or APT based solution. | ||
|
||
It is required that this procedure is executed as an administrator. | ||
|
||
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. | ||
|
||
1. Go to the smart-proxy repository at https://github.com/theforeman/smart-proxy/releases | ||
2. Just under the tag matching your Foreman version, click the ZIP link in order to download the Smart Proxy source code | ||
3. Extract the archive to a directory that does not have any spaces in its name | ||
4. Go to the rubyinstaller web page at http://rubyinstaller.org/downloads/ | ||
5. Download and install the "ruby 1.9.3-p551": (Allow the ruby associations to be installed.) | ||
6. Download and install the Development Kit For Ruby 1.9.3: (DevKit-tdm-32-4.5.2-20111229-1559-sfx.exe) | ||
7. Open a CMD window and, install the bundler_ext gem using *gem install --platform x86-mingw32 bundler* | ||
8. CD to the root of the smart-proxy directory (the one you created in step 3) | ||
9. Copy the file Gemfile to GemFile.in : *copy Gemfile GemFile.in* | ||
10. Install all the dependencies using bundler : *bundle install --without krb5 puppet puppetca* | ||
|
||
11. Edit config/settings.yml so that it looks a bit like this | ||
|
||
_Sample config/settings.yml file_ | ||
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. If this is the case, make sure the smart proxy service runs as a user with sufficient privileges. | ||
|
||
--- | ||
# Web site conf | ||
#:bind_host: 10.10.10.1 | ||
:http_port: 8080 | ||
__Note:__ Refer to the [installation guide](manuals/{{page.version}}/index.html#4.3.1SmartProxyInstallation) for general setup. | ||
|
||
# SSL settings | ||
:https_port: 8443 | ||
:ssl_certificate: c:\documents\smart-proxy\config\signed.pem | ||
:ssl_private_key: c:\documents\smart-proxy\config\private.pem | ||
:ssl_ca_file: c:\documents\smart-proxy\config\ca.pem | ||
|
||
:trusted_hosts: [ foreman.someware.com] | ||
|
||
:daemon: false | ||
|
||
# Where our proxy log files are stored | ||
# filename or STDOUT | ||
# Unix setting | ||
#:log_file: log/proxy.log | ||
# Windows setting | ||
:log_file: c:\tmp\proxy.log | ||
# valid options are | ||
# WARN, DEBUG, ERROR, FATAL, INFO, UNKNOWN | ||
#:log_level: DEBUG | ||
:log_level: ERROR | ||
|
||
12. Edit config/settings.d/dhcp.yml so that it looks a bit like this | ||
1. Edit config/settings.d/dhcp.yml so that it looks a bit like this. `:dhcp_server:` can be left commented out if smart proxy runs on the same host. | ||
|
||
_Sample config/settings.d/dhcp.yml file_ | ||
|
||
--- | ||
# Can be true, false, or http/https to enable just one of the protocols | ||
:enabled: true | ||
# Enable DHCP management | ||
:dhcp: true | ||
# The vendor can be either isc or native_ms | ||
:dhcp_vendor: native_ms | ||
# The dhcp_server is only used by the native_ms implementation | ||
:dhcp_server: 10.10.10.1 | ||
|
||
13. Create the SSL key | ||
--- | ||
# Can be true, false, or http/https to enable just one of the protocols | ||
:enabled: true | ||
# Enable DHCP management | ||
:dhcp: true | ||
# The vendor can be either isc or native_ms | ||
:dhcp_vendor: native_ms | ||
# The dhcp_server is only used by the native_ms implementation | ||
:dhcp_server: 10.10.10.1 | ||
|
||
- Login to your puppetmaster | ||
|
||
- On the command line, type the following command. Take care not to use an alias nor upper case characters. | ||
|
||
puppet ca generate _Smart-proxy FQDN_ | ||
|
||
- 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. | ||
|
||
14. If needed, you have to create the option 60 on the Windows DHCP (for PXE Boot) | ||
2. If needed, you have to create the option 60 on the Windows DHCP (for PXE Boot) | ||
|
||
- Open an administrator command prompt | ||
- Create the PXE Option using netsh | ||
|
||
C:\Windows\system32>netsh | ||
netsh>dhcp | ||
netsh dhcp> server 10.10.45.1 | ||
netsh dhcp server>add optiondef 60 PXEClient String 0 comment= PXE Support | ||
|
||
15. Test the installation by running ruby bin\smart-proxy.rb within an administrator cmd.exe prompt. | ||
16. Install the program as a service | ||
|
||
- Install the dependencies to create the service : | ||
|
||
gem install --platform x86-mingw32-60 win32-service | ||
|
||
- Use the script in extra to create the service | ||
|
||
ruby extra\register-service.rb | ||
|
||
This may install the service but not run it. If so then try to start the service from the Ordinary Microsoft services snapin utility. | ||
C:\Windows\system32>netsh | ||
netsh>dhcp | ||
netsh dhcp> server 10.10.10.1 | ||
netsh dhcp server>add optiondef 60 PXEClient String 0 comment= PXE Support | ||
|
||
17. 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.) |