Smart-proxy: различия между версиями

Материал из ALT Linux Wiki
(Новая страница: «== Установка smart-proxy == apt-get install smart-proxy-compat Пред запуском сервиса проверяем содержимое фай…»)
 
Строка 1: Строка 1:
== Smart-proxy ==
Smart-Proxy предоставляет API-интерфейс подсистем DNS, DHCP и т.п. для взаимодействия с системами управления инфраструктурой высокого уровня
== Установка smart-proxy ==
== Установка smart-proxy ==
  apt-get install smart-proxy-compat
  apt-get install smart-proxy-compat


Пред запуском сервиса проверяем содержимое файлов ниже
Пред запуском сервиса проверяем содержимое файлов ниже
''/etc/smart-proxy/config/settings.d/puppetca_hostname_whitelisting.yml''
---
#
# Configuration of the PuppetCA hostname_whitelisting provider
#
:autosignfile: /etc/puppet/autosign.conf


''/etc/smart-proxy/config/settings.d/puppetca_http_api.yml''
''/etc/smart-proxy/config/settings.d/puppetca_http_api.yml''
  ---
  ---
  #
  #
Строка 25: Строка 18:


''/etc/smart-proxy/config/settings.d/puppet_proxy_puppet_api.yml''
''/etc/smart-proxy/config/settings.d/puppet_proxy_puppet_api.yml''
  ---
  ---
  #
  #
Строка 53: Строка 45:


''/etc/smart-proxy/config/settings.d/puppet.yml''
''/etc/smart-proxy/config/settings.d/puppet.yml''
  ---
  ---
  # Can be true, false, or http/https to enable just one of the protocols
  # Can be true, false, or http/https to enable just one of the protocols
Строка 64: Строка 55:
  #:use_provider: puppet_proxy_customrun
  #:use_provider: puppet_proxy_customrun
  :puppet_version: 7.1.0
  :puppet_version: 7.1.0
''/etc/smart-proxy/config/settings.d/puppetca_hostname_whitelisting.yml''
---
#
# Configuration of the PuppetCA hostname_whitelisting provider
#
:autosignfile: /etc/puppet/autosign.conf


''/etc/smart-proxy/config/settings.d/facts.yml''
''/etc/smart-proxy/config/settings.d/facts.yml''
  ---
  ---
  # Can be true, false, or http/https to enable just one of the protocols
  # Can be true, false, or http/https to enable just one of the protocols
Строка 80: Строка 77:
  systemctl enable smart-proxy; systemctl start smart-proxy
  systemctl enable smart-proxy; systemctl start smart-proxy


Настраиваем соединение Foreman и Smart-proxy через веб интерфейс через
== Настройка подключения Foreman и Smart-proxy ==
меню Инфраструктура -> Капсулы -> Create Smart Proxy  
Настройка соединения Foreman и Smart-proxy производится через веб интерфейс Foreman.
Потребуется перейти в меню '''Инфраструктура -> Капсулы -> Create Smart Proxy'''
или по прямой ссылке
или по прямой ссылке


  http://sample.server.name:2345/smart_proxies/new
  http://sample.server.name:2345/smart_proxies/new


Url Smart-proxy ''http://sample.server.name:8000''
Адрес Smart-proxy ''http://sample.server.name:8000''


Запустите (через перезапуск) smart-proxy:
Запустите (через перезапуск) smart-proxy:

Версия от 13:25, 31 декабря 2020

Smart-proxy

Smart-Proxy предоставляет API-интерфейс подсистем DNS, DHCP и т.п. для взаимодействия с системами управления инфраструктурой высокого уровня

Установка smart-proxy

apt-get install smart-proxy-compat

Пред запуском сервиса проверяем содержимое файлов ниже

/etc/smart-proxy/config/settings.d/puppetca_http_api.yml

---
#
# URL of the puppet master itself for API requests.
:puppet_url: https://sample.server.name:8140
#
# SSL certificates used to access the CA API.
:puppet_ssl_ca: /etc/puppet/ssl/certs/ca.pem
:puppet_ssl_cert: /etc/puppet/ssl/certs/sample.server.name.pem
:puppet_ssl_key: /etc/puppet/ssl/private_keys/sample.server.name.pem

/etc/smart-proxy/config/settings.d/puppet_proxy_puppet_api.yml

---
#
# URL of the puppet master itself for API requests.
:puppet_url: https://sample.server.name:8140
#
# SSL certificates used to access the CA API.
:puppet_ssl_ca: /etc/puppet/ssl/certs/ca.pem
:puppet_ssl_cert: /etc/puppet/ssl/certs/sample.server.name.pem
:puppet_ssl_key: /etc/puppet/ssl/private_keys/sample.server.name.pem
# Smart Proxy api timeout when Puppet's environment classes api is used and classes cache is disabled
:api_timeout: 30

/etc/smart-proxy/config/settings.d/puppetca.yml

---
#
# PuppetCA management
# Can be true, false, or http/https to enable just one of the protocols
#
:enabled: http
# valid providers:
#   - puppetca_hostname_whitelisting (verify CSRs based on a hostname whitelist)
#   - puppetca_token_whitelisting (verify CSRs based on a token whitelist)
:use_provider: puppetca_hostname_whitelisting
# Puppet version used
:puppet_version: 7.1.0

/etc/smart-proxy/config/settings.d/puppet.yml

---
# Can be true, false, or http/https to enable just one of the protocols
:enabled: http
# valid providers:
#   puppet_proxy_mcollective (uses mco puppet)
#   puppet_proxy_ssh         (run puppet over ssh)
#   puppet_proxy_salt        (uses salt puppet.run)
#   puppet_proxy_customrun   (calls a custom command with args)
#:use_provider: puppet_proxy_customrun
:puppet_version: 7.1.0

/etc/smart-proxy/config/settings.d/puppetca_hostname_whitelisting.yml

---
#
# Configuration of the PuppetCA hostname_whitelisting provider
#
:autosignfile: /etc/puppet/autosign.conf

/etc/smart-proxy/config/settings.d/facts.yml

---
# Can be true, false, or http/https to enable just one of the protocols
:enabled: true

Проверяем наличие файла /etc/puppet/autosign.conf и установленные на него разрешения

touch /etc/puppet/autosign.conf
chmod 664 /etc/puppet/autosign.conf

Разрешаем и запускаем сервис smart-proxy

systemctl enable smart-proxy; systemctl start smart-proxy

Настройка подключения Foreman и Smart-proxy

Настройка соединения Foreman и Smart-proxy производится через веб интерфейс Foreman. Потребуется перейти в меню Инфраструктура -> Капсулы -> Create Smart Proxy или по прямой ссылке

http://sample.server.name:2345/smart_proxies/new

Адрес Smart-proxy http://sample.server.name:8000

Запустите (через перезапуск) smart-proxy:

# systemctl restart smart-proxy