devops:puppet
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| devops:puppet [2016/04/18 09:22] – [Glossary] skipidar | devops:puppet [2023/11/01 07:15] (current) – ↷ Page moved from camunda:devops:puppet to devops:puppet skipidar | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ===== Puppet ===== | ===== Puppet ===== | ||
| - | a | + | The Learning VM TUtorial is here: https:// |
| + | |||
| + | Te learning VM is available here: https:// | ||
| + | |||
| ==== Glossary ==== | ==== Glossary ==== | ||
| Line 179: | Line 183: | ||
| </ | </ | ||
| + | |||
| + | ==== Defined Resource types ==== | ||
| + | |||
| + | * Use **define** keyword instead of **class** | ||
| + | * **$title** is a special variable, which must be unique on a node and is mandatory | ||
| + | * Binding of parameter variables ($content, $password) to values happens in parallel, meaning that you cannot use the value of one parameter to set another. The exception is the $title variable. | ||
| + | |||
| + | |||
| + | # / | ||
| + | < | ||
| + | define web_user:: | ||
| + | $content | ||
| + | $password = undef, | ||
| + | ) { | ||
| + | $home_dir | ||
| + | $public_html = " | ||
| + | user { $title: | ||
| + | ensure | ||
| + | password => $password, | ||
| + | } | ||
| + | file { [$home_dir, $public_html]: | ||
| + | ensure => directory, | ||
| + | owner => $title, | ||
| + | group => $title, | ||
| + | mode => ' | ||
| + | } | ||
| + | file { " | ||
| + | ensure | ||
| + | owner => $title, | ||
| + | group => $title, | ||
| + | replace => false, | ||
| + | content => $content, | ||
| + | mode => ' | ||
| + | } | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | **Declaration** of users on a node. \\ | ||
| + | ' | ||
| + | |||
| + | # / | ||
| + | < | ||
| + | web_user:: | ||
| + | web_user:: | ||
| + | content | ||
| + | password => pw_hash(' | ||
| + | } | ||
| + | </ | ||
| ==== Classes Metaparameter ==== | ==== Classes Metaparameter ==== | ||
| Line 272: | Line 324: | ||
| defines the default node configuration. | defines the default node configuration. | ||
| + | ==== Node setup ==== | ||
| + | |||
| + | Puppet master provides a bash script for setting up nodes: | ||
| + | < | ||
| + | curl -k https://< | ||
| + | </ | ||
| + | |||
| + | Puppet MASTER keeps signed certificates of each Node, which is a part of the infrastructure. | ||
| + | To involve a node - sighn its certificate. | ||
| + | |||
| + | List all unsigned certificates of Nodes. Executable on master. | ||
| + | < | ||
| + | puppet cert list | ||
| + | </ | ||
| + | |||
| + | Sign a certificate of node named **webserver.learning.puppetlabs.vm ** | ||
| + | < | ||
| + | puppet cert sign webserver.learning.puppetlabs.vm | ||
| + | </ | ||
| ==== Variables ==== | ==== Variables ==== | ||
| Line 602: | Line 673: | ||
| yamldir = / | yamldir = / | ||
| </ | </ | ||
| + | |||
| + | |||
| + | |||
| + | ===== Orchestration ===== | ||
| + | |||
| + | Details are here: https:// | ||
| + | |||
| + | Orchestration allows to install dependent applications in the right order. | ||
| + | |||
| + | It works as following: | ||
| + | - setup the node to know the orchestrator | ||
| + | - create an Application, | ||
| + | - setup orchestrator user with the rights | ||
| + | - setup an **artificial, | ||
| + | - define, which node **produces** data to fill artificial, public resource. Which node consumes data from artificial, public resource. | ||
| + | - declare the resource | ||
| + | - in site.pp declare - which part of the application will be installed on which node. | ||
| + | |||
| + | {{http:// | ||
devops/puppet.1460971345.txt.gz · Last modified: (external edit)
