You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: documentation/docker_examples.md
+38-7
Original file line number
Diff line number
Diff line change
@@ -1,17 +1,12 @@
1
1
## Docker Based Examples
2
2
This module provides docker compose files for the various architectures for experimentation purposes. This gives you the ability to stand up an entire PE stack in order to learn how this module and DR works. If you have docker and docker-compose you can start up a full Puppet architecture with a single command. Please note that Puppet does not support PE on containers in production.
3
3
4
-
In order to decouple Bolt from a dev system, a special bolt container is created that will run all the bolt commands. This is
5
-
required to achieve maximum portability. Should you want to run bolt commands against the PE stack you must
6
-
first login to this bolt container via ssh, docker or docker-compose.
7
-
8
-
Example: `docker-compose run --entrypoint=/bin/bash bolt`
9
-
10
4
### Requirements
11
5
To run the container based examples you will need the following requirements:
12
6
13
7
1. Docker
14
8
2. Docker compose
9
+
3. Bolt 3.18+
15
10
3. realpath (brew install coreutils on mac)
16
11
4. 16GB memory, 24GB+ for XL and XL-DR architectures
17
12
5. CPU with many cores (Tested with Core i7 6700)
@@ -46,6 +41,8 @@ In order to stop and remove the containers you will need to perform the followin
46
41
2.`cd <chosen architecture>`
47
42
3. docker-compose down
48
43
44
+
Alternative you can run something similar like: `docker-compose --project-directory=large down`
45
+
49
46
### Logging into the console
50
47
You can login to the PE Console after successful install. However, first you will need to
51
48
grab the mapped port number of the PE console. The port numbers are mapped dynamically as to not
You can also run `docker inspect pe-xl-core-0.puppet.vm -f "{{json .HostConfig.NetworkMode }}" | sed -e 's/^"//' -e 's/"$//'`
109
+
111
110
**NOTE** In these example you may see the use of `jq`. This is a [cli utility for parsing JSON](https://stedolan.github.io/jq/). I recommend installing it. As a alternative you can pipe output to `python -m json.tool`.
112
111
113
112
### Starting agent containers
@@ -122,8 +121,38 @@ Example:
122
121
For most tasks these images are great. However, if you wish to use puppet orchestrator with the pcp transport. The one requirement is that all images used must be systemd aware, otherwise pxp will not start. If you do not plan on using pcp
123
122
there is no need for containers with systemd.
124
123
125
-
At this time we have not added documention for starting a container with systemd. Instructions coming soon.
124
+
You can use the the custom image `pe-base` built with the docker cluster named pe-base. This is a centos:7 image that you can use to generate tens or hundreds of agents. (Resources permitting). You will also want to run the docker run command with additonal flags.
docker rm $(docker ps -a -q -f label="${BASE_NAME}-agent")
151
+
# The docker-compose down command cannot be run until the agents have been removed
152
+
cd spec/docker/${PE_CLUSTER_TYPE}
153
+
docker-compose down
154
+
155
+
```
127
156
128
157
### Other notes
129
158
1. The install plan is not fully idempotent.
@@ -134,3 +163,5 @@ At this time we have not added documention for starting a container with systemd
134
163
6. You can use top to view all the processes being run in the containers.
135
164
7. Docker will use the privilege mode option when running these examples (systemd support)
136
165
8. Systemd is running inside these containers! The real systemd, not the fake one.
166
+
167
+
If you see errors regarding peadmin::puppet_runonce, just run the install or upgrade script again. Might have to perform multiple times for resource constrained docker hosts.
0 commit comments