Skip to content

Commit 9661b6a

Browse files
authored
Merge pull request OpenVoxProject#176 from binford2k/ecosystem_guides
Add first draft of jerald's getting started guide
2 parents c5c938a + 6d5e068 commit 9661b6a

14 files changed

Lines changed: 1120 additions & 0 deletions

File tree

_config.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,13 @@ jekyll_vitepress:
3333

3434
collections_dir: docs
3535
collections:
36+
ecosystem_latest:
37+
output: true
38+
permalink: '/ecosystem/latest/:path:output_ext'
39+
ecosystem_8x:
40+
output: true
41+
permalink: '/ecosystem/8.x/:path:output_ext'
42+
3643
openfact_latest:
3744
output: true
3845
permalink: '/openfact/latest/:path:output_ext'
@@ -73,6 +80,17 @@ collections:
7380
permalink: '/openvox-containers/latest/:path:output_ext'
7481

7582
defaults:
83+
- scope:
84+
path: ''
85+
type: ecosystem_latest
86+
values:
87+
nav: ecosystem_8x
88+
- scope:
89+
path: ''
90+
type: ecosystem_8x
91+
values:
92+
nav: ecosystem_8x
93+
7694
- scope:
7795
path: ''
7896
type: openfact_latest

_data/nav/ecosystem_8x.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
- text: OpenVox Ecosystem
3+
items:
4+
- text: What is OpenVox?
5+
link: index.html
6+
- text: History
7+
link: history.html
8+
- text: OpenVox Community
9+
link: community.html
10+
- text: Getting Started
11+
items:
12+
- text: Whirlwind guide
13+
link: "getting_started/index.html"
14+
- text: Setting up a Server
15+
link: "getting_started/agent-server.html"
16+
- text: Architecture and Concepts
17+
link: "getting_started/architecture.html"
18+
- text: Puppet Language intro
19+
link: "getting_started/language.html"
20+
- text: Orchestration
21+
link: "getting_started/orchestration.html"
22+
- text: Quick Reference
23+
link: "getting_started/quickref.html"
24+

_data/nav_map.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
- nav_key: ecosystem_8x
2+
collections: ecosystem_latest|ecosystem_8x
3+
base: /ecosystem/latest/
4+
15
- nav_key: openfact_5x
26
collections: openfact_latest|openfact_5x
37
base: /openfact/latest/

docs/_ecosystem_8x/community.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
layout: default
3+
title: "Engaging with the OpenVox Community"
4+
---
5+
6+
> *Come for the automation, stay for the people.*
7+
8+
## The OpenVox Community
9+
10+
OpenVox exists because of its community.
11+
Born from the [Vox Pupuli](https://voxpupuli.org/) collective — a group of Puppet module maintainers who've been collaborating for years — OpenVox carries forward the tradition of open-source infrastructure management.
12+
13+
Now we'd love to have you engaging too.
14+
15+
### Key Community Resources
16+
17+
* **VoxPupuli Connect** — A single page with links to all community channels, mailing lists, and social media: [voxpupuli.org/connect](https://voxpupuli.org/connect/).
18+
* **VoxPupuli Community Slack** — The home turf for OpenVox and Vox Pupuli discussion. [voxpupuli.slack.com](https://voxpupuli.slack.com/).
19+
* [Join the Slack here](https://short.voxpupu.li/puppetcommunity_slack_signup)
20+
* **Contribution Guide** — Whether you're filing a bug report or contributing code, we deeply appreciate it: [voxpupuli.org/contributing](https://voxpupuli.org/contributing/).
21+
* **Blog posts** — Release announcements, articles, discussions: [voxpupuli.org/blog](https://voxpupuli.org/blog/).
22+
23+
24+
## Conferences and Events
25+
26+
* **VoxConf** — Vox Pupuli's community conference ([voxpupuli.org/voxconf](https://voxpupuli.org/voxconf/))
27+
* **Config Management Camp** — Annual configuration management conference in Ghent, Belgium ([cfgmgmtcamp.org](https://cfgmgmtcamp.org))
28+
* **PuppetCamp** — Regional community meetups
29+
30+
31+
## Code of Conduct
32+
33+
The OpenVox and Vox Pupuli communities are committed to providing a welcoming, inclusive environment for everyone.
34+
Be kind, be respectful, and be constructive.
35+
We're all here because we love automating things and occasionally complaining about YAML indentation.
36+
37+
[Read the Code of Conduct](https://voxpupuli.org/coc/).
Lines changed: 193 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,193 @@
1+
---
2+
layout: default
3+
title: "Setting Up an OpenVox Server"
4+
---
5+
6+
Using `puppet apply` is great for standalone work, but the real power of OpenVox comes from the agent-server architecture, where one or more OpenVox servers compile catalogs for all your nodes.
7+
If you'd like to try it out, then we'll set up a server and connect our agent.
8+
9+
**What you'll learn:**
10+
11+
* [Setting up an OpenVox Server](#server-installation)
12+
* [Managing something with your new server](#managing-something-with-your-new-server)
13+
* [Where to go next](#next-steps)
14+
15+
16+
## Prerequisites
17+
18+
Before we dive in, you'll need:
19+
20+
* The machine you already set up with the OpenVox agent
21+
* A Linux machine for the OpenVox server
22+
* Root or `sudo` access
23+
* Internet connectivity (to reach the package repos)
24+
* A healthy sense of adventure
25+
26+
{% include alert.html type="tip" title="Pro tip" content="The OpenVox server currently supports only Linux platforms rather than everything that the agent runs on." %}
27+
28+
## Server Installation
29+
30+
We're going to use two nodes for this testing infrastructure; the agent you already built and a server node.
31+
It's possible to run both on the same node (and most server nodes do indeed also run the agent to self-manage), but doing so makes it easy to slip up and accidentally write code that requires local filesystem access.
32+
33+
Read carefully to see which node the instructions are meant to run on; we'll switch back and forth a few times.
34+
35+
### *[Server Node]* Installation
36+
37+
Install the server on a Linux machine following the [installation guide](/openvox-server/latest/install_from_packages.html).
38+
This will require you to install a supported JDK, and configure or validate firewall and network settings.
39+
Make sure to complete all the pre-install tasks **prior to installation**; it can be fiddly to recover an in-progress failed install.
40+
41+
42+
### *[Agent Node]* Connecting the Agent
43+
44+
You already have an agent installed.
45+
Now let's configure it to connect to the server.
46+
47+
```console
48+
sudo puppet config set server your-openvox-server.example.com --section agent
49+
```
50+
51+
Now we'll generate and sign certificates so that your nodes can communicate securely.
52+
Depending on what you've experimented with, you may have already unknowingly created certificates, so we'll just reset the whole SSL directory to start fresh.
53+
In regular operation, you'll rarely need to do this.
54+
55+
```console
56+
sudo rm -rf /opt/puppetlabs/puppet/ssl
57+
```
58+
59+
Now we'll run the agent once to generate and request a certificate:
60+
61+
```console
62+
sudo puppet agent -t
63+
```
64+
65+
You'll see something like this.
66+
If you don't see the certificate generation then go back to the previous step to reset the SSL directory and try again.
67+
The name printed in this output is known as the `certname` and is the infrastructure-wide identifier for this node.
68+
By default, it's the same as your hostname.
69+
70+
```console
71+
$ sudo puppet agent -t
72+
Info: Creating a new RSA SSL key for agent1.example.com
73+
Info: csr_attributes file loading from /etc/puppetlabs/puppet/csr_attributes.yaml
74+
Info: Creating a new SSL certificate request for agent1.example.com
75+
Info: Certificate Request fingerprint (SHA256): AB:CD:12:34:...
76+
Exiting; no certificate found and waitforcert is disabled
77+
```
78+
79+
### *[Server Node]* Sign the Certificate
80+
81+
See the outstanding certificate signing requests:
82+
83+
```console
84+
sudo puppetserver ca list
85+
```
86+
87+
Sign the agent's certificate, using the same name as shown in the list:
88+
89+
```console
90+
sudo puppetserver ca sign --certname agent1.example.com
91+
```
92+
93+
Or sign all pending requests:
94+
95+
```console
96+
sudo puppetserver ca sign --all
97+
```
98+
99+
### *[Agent Node]* Install the Certificate
100+
101+
Run the agent again to download and install the freshly signed certificates:
102+
103+
```console
104+
$ sudo puppet agent -t
105+
Info: Refreshing CA certificate
106+
Info: CA certificate is unmodified, using existing CA certificate
107+
Info: Refreshing CRL
108+
Info: CRL is unmodified, using existing CRL
109+
Info: Using environment 'production'
110+
Info: Retrieving pluginfacts
111+
Info: Retrieving plugin
112+
Info: Loading facts
113+
Notice: Requesting catalog from puppet.example.com:8140 (192.168.1.100)
114+
Notice: Catalog compiled by puppet.example.com
115+
Info: Applying configuration version 'openvox-production-719ab13e0a1'
116+
Notice: Applied catalog in 2.55 seconds
117+
```
118+
119+
{% include alert.html type="tip" title="Pro tip" content="The `-t` flag (short for `--test`) runs the agent in test mode with verbose output and detailed reporting.
120+
For production runs, the agent daemon (managed by systemd) runs automatically every 30 minutes.
121+
Use `puppet agent -t --noop` for a dry-run that shows what *would* change without actually changing anything.
122+
This is invaluable for CI/CD pipelines and change reviews." %}
123+
124+
This time it should successfully connect, download its (empty) catalog, and apply it.
125+
You're in business!
126+
127+
128+
## Managing Something With Your New Server
129+
130+
You've now got a fully functional OpenVox server managing an infrastructure made up of a single agent.
131+
It's not yet really doing much though, since you haven't defined any configuration for your infrastructure.
132+
Let's write some!
133+
134+
### *[Server Node]* Create a main site manifest
135+
136+
The OpenVox server always starts compiling with a single starting point, no matter which node it is compiling for.
137+
This is called the *main manifest* or *site manifest* and you can read about [more advanced usage](/openvox/latest/dirs_manifest.html) in the docs.
138+
139+
Let's create a site manifest that will ensure that all nodes are enforcing configuration regularly.
140+
We'll also add a bit of configuration for specific nodes.
141+
142+
Edit the file `/etc/puppetlabs/code/environments/production/manifests/site.pp`, creating it and any directory structure as needed.
143+
144+
```puppet
145+
# global configuration that applies unconditionally to all nodes
146+
service { 'puppet':
147+
ensure => running, # ensure it's currently running
148+
enable => true, # and will start at system bootup
149+
}
150+
151+
node 'agent1.example.com' {
152+
file { '/tmp/hello-openvox.txt':
153+
ensure => file,
154+
content => "Hello from OpenVox! 🦊\nThis node is managed by an OpenVox server.\n",
155+
mode => '0644',
156+
}
157+
}
158+
159+
node default {
160+
notify { 'welcome_message':
161+
message => This node is managed by an OpenVox server, but has no configuration defined.',
162+
}
163+
}
164+
```
165+
166+
### *[Agent Node]* Enforce configuration
167+
168+
From now on, all you do on the agent node is trigger an OpenVox run and validate that it did what you want.
169+
After the `puppet` service is enabled, it will continue to *converge* to the desired state every 30 minutes.
170+
171+
```console
172+
$ sudo puppet agent -t
173+
Info: Using environment 'production'
174+
Info: Retrieving pluginfacts
175+
Info: Retrieving plugin
176+
Info: Loading facts
177+
Notice: Requesting catalog from puppet.example.com:8140 (192.168.1.100)
178+
Notice: Catalog compiled by puppet.example.com
179+
Info: Caching catalog for agent1.example.com
180+
Info: Applying configuration version '1778625673'
181+
Notice: /Stage[main]/Main/Service[puppet]/ensure: ensure changed 'stopped' to 'running'
182+
Info: /Stage[main]/Main/Service[puppet]: Unscheduling refresh on Service[puppet]
183+
Notice: Applied catalog in 2.27 seconds
184+
```
185+
186+
{% include alert.html type="tip" title="Pro tip" content="The `-t` or `--test` flag is named this way because in regular use you won't *push* configuration to your agent nodes.
187+
You'll just let them retrieve and enforce configuration on their regular schedule.
188+
The `test` mode lets you interactively observe the results of new configuration you've written." %}
189+
190+
## Next Steps
191+
192+
* Dive a little deeper into how the whole [OpenVox infrastructure is architected](architecture.html).
193+
* Learn a bit more about the [Puppet Language](language.html) and classifying nodes.

0 commit comments

Comments
 (0)